NXC Guide

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2223

NXC

Version 1.2.1 r4 Generated by Doxygen 1.6.2


Sun Mar 13 18:08:41 2011

CONTENTS

Contents
1 2 3 NXC Programmers Guide Introduction The NXC Language 3.1 Lexical Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.2 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . Whitespace . . . . . . . . . . . . . . . . . . . . . . . . . . . Numerical Constants . . . . . . . . . . . . . . . . . . . . . . String Constants . . . . . . . . . . . . . . . . . . . . . . . . Character Constants . . . . . . . . . . . . . . . . . . . . . . Identiers and Keywords . . . . . . . . . . . . . . . . . . . . 1 1 2 2 2 3 3 4 4 4 7 8 9 10 14 18 19 20 21 21 22 27 30 32 35 36 36 37

Program Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 Code Order . . . . . . . . . . . . . . . . . . . . . . . . . . . Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3.3

Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 Variable Declaration . . . . . . . . . . . . . . . . . . . . . . Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . Control Structures . . . . . . . . . . . . . . . . . . . . . . . The asm statement . . . . . . . . . . . . . . . . . . . . . . . Other NXC Statements . . . . . . . . . . . . . . . . . . . . .

3.4

Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.1 Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . .

3.5

The Preprocessor . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5.1 3.5.2 #include . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #dene . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

ii

3.5.3 3.5.4 3.5.5 3.5.6 4 5 6 Todo List

## (Concatenation) . . . . . . . . . . . . . . . . . . . . . . . Conditional Compilation . . . . . . . . . . . . . . . . . . . . #import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . #download . . . . . . . . . . . . . . . . . . . . . . . . . . .

37 37 38 38 39 40 42 42 43 43 43 44 45 45 45 46 47 47 47 48 49 49 49 50 50 51 51 52 53

Deprecated List Module Documentation 6.1 NXT Firmware Modules . . . . . . . . . . . . . . . . . . . . . . . . 6.1.1 6.2 Detailed Description . . . . . . . . . . . . . . . . . . . . . .

Input module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . .

6.3

Input module constants . . . . . . . . . . . . . . . . . . . . . . . . . 6.3.1 6.3.2 Detailed Description . . . . . . . . . . . . . . . . . . . . . . Dene Documentation . . . . . . . . . . . . . . . . . . . . .

6.4

Sensor types and modes . . . . . . . . . . . . . . . . . . . . . . . . . 6.4.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . .

6.5

Output module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.5.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . .

6.6

Output module constants . . . . . . . . . . . . . . . . . . . . . . . . 6.6.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . .

6.7

Command module . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.7.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . .

6.8

Command module constants . . . . . . . . . . . . . . . . . . . . . . 6.8.1 6.8.2 Detailed Description . . . . . . . . . . . . . . . . . . . . . . Dene Documentation . . . . . . . . . . . . . . . . . . . . .

6.9

Comm module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.9.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . .

6.10 Button module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.10.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . .

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

iii

6.11 IOCtrl module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.11.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.12 Loader module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.12.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.13 Sound module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.13.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.14 Ui module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.14.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.15 Low Speed module . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.15.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.16 Display module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.16.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.17 HiTechnic API Functions . . . . . . . . . . . . . . . . . . . . . . . . 6.17.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.17.2 Function Documentation . . . . . . . . . . . . . . . . . . . . 6.18 MindSensors API Functions . . . . . . . . . . . . . . . . . . . . . . 6.18.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.18.2 Function Documentation . . . . . . . . . . . . . . . . . . . . 6.19 Codatex API Functions . . . . . . . . . . . . . . . . . . . . . . . . . 6.19.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.19.2 Function Documentation . . . . . . . . . . . . . . . . . . . . 6.20 RIC Macro Wrappers . . . . . . . . . . . . . . . . . . . . . . . . . . 6.20.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.20.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.21 NXT rmware module names . . . . . . . . . . . . . . . . . . . . . 6.21.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.21.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.22 NXT rmware module IDs . . . . . . . . . . . . . . . . . . . . . . . 6.22.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.22.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.23 Miscellaneous NBC/NXC constants . . . . . . . . . . . . . . . . . .

53 53 53 54 54 54 55 55 55 56 57 57 58 66 66 108 124 124 210 211 211 214 217 217 223 224 224 225 226 226 227

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

iv

6.23.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.23.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.24 Third-party NXT devices . . . . . . . . . . . . . . . . . . . . . . . . 6.24.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.25 Standard-C API functions . . . . . . . . . . . . . . . . . . . . . . . . 6.25.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.26 A simple 3D graphics library . . . . . . . . . . . . . . . . . . . . . . 6.26.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.26.2 Function Documentation . . . . . . . . . . . . . . . . . . . . 6.27 Type aliases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.27.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.27.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.28 Input port constants . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.28.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.28.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.29 Sensor type constants . . . . . . . . . . . . . . . . . . . . . . . . . . 6.29.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.29.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.30 Sensor mode constants . . . . . . . . . . . . . . . . . . . . . . . . . 6.30.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.30.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.31 Combined sensor type and mode constants . . . . . . . . . . . . . . . 6.31.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.31.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.32 Input module types . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.32.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.33 Input module functions . . . . . . . . . . . . . . . . . . . . . . . . . 6.33.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.33.2 Function Documentation . . . . . . . . . . . . . . . . . . . . 6.34 Basic analog sensor value names . . . . . . . . . . . . . . . . . . . . 6.34.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . .

228 228 229 230 230 230 230 232 233 239 239 240 240 240 241 243 244 244 246 247 247 248 249 249 251 251 252 256 256 278 278

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

6.34.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.35 Output module types . . . . . . . . . . . . . . . . . . . . . . . . . . 6.35.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.36 Output module functions . . . . . . . . . . . . . . . . . . . . . . . . 6.36.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.36.2 Function Documentation . . . . . . . . . . . . . . . . . . . . 6.37 Display module types . . . . . . . . . . . . . . . . . . . . . . . . . . 6.37.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.38 Display module functions . . . . . . . . . . . . . . . . . . . . . . . . 6.38.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.38.2 Function Documentation . . . . . . . . . . . . . . . . . . . . 6.39 Sound module types . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.39.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.40 Sound module functions . . . . . . . . . . . . . . . . . . . . . . . . 6.40.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.40.2 Function Documentation . . . . . . . . . . . . . . . . . . . . 6.41 LowSpeed module types . . . . . . . . . . . . . . . . . . . . . . . . 6.41.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.42 LowSpeed module functions . . . . . . . . . . . . . . . . . . . . . . 6.42.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.42.2 Function Documentation . . . . . . . . . . . . . . . . . . . . 6.43 Low level LowSpeed module functions . . . . . . . . . . . . . . . . . 6.43.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.43.2 Function Documentation . . . . . . . . . . . . . . . . . . . . 6.44 LowSpeed module system call functions . . . . . . . . . . . . . . . . 6.44.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.44.2 Function Documentation . . . . . . . . . . . . . . . . . . . . 6.45 Command module types . . . . . . . . . . . . . . . . . . . . . . . . 6.45.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.46 Command module functions . . . . . . . . . . . . . . . . . . . . . . 6.46.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . .

278 279 279 279 284 284 312 313 313 317 317 339 340 340 342 342 352 352 352 354 354 368 370 370 375 375 376 377 378 378 384

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

vi

6.46.2 Function Documentation . . . . . . . . . . . . . . . . . . . . 6.47 Array API functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.47.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.47.2 Function Documentation . . . . . . . . . . . . . . . . . . . . 6.48 IOCtrl module types . . . . . . . . . . . . . . . . . . . . . . . . . . 6.49 IOCtrl module functions . . . . . . . . . . . . . . . . . . . . . . . . 6.49.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.49.2 Function Documentation . . . . . . . . . . . . . . . . . . . . 6.50 Comm module types . . . . . . . . . . . . . . . . . . . . . . . . . . 6.50.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.51 Comm module functions . . . . . . . . . . . . . . . . . . . . . . . . 6.51.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.51.2 Function Documentation . . . . . . . . . . . . . . . . . . . . 6.52 Direct Command functions . . . . . . . . . . . . . . . . . . . . . . . 6.52.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.52.2 Function Documentation . . . . . . . . . . . . . . . . . . . . 6.53 System Command functions . . . . . . . . . . . . . . . . . . . . . . 6.53.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.53.2 Function Documentation . . . . . . . . . . . . . . . . . . . . 6.54 Button module types . . . . . . . . . . . . . . . . . . . . . . . . . . 6.54.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.55 Button module functions . . . . . . . . . . . . . . . . . . . . . . . . 6.55.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.55.2 Function Documentation . . . . . . . . . . . . . . . . . . . . 6.56 Ui module types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.56.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.57 Ui module functions . . . . . . . . . . . . . . . . . . . . . . . . . . 6.57.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.57.2 Function Documentation . . . . . . . . . . . . . . . . . . . . 6.58 Loader module types . . . . . . . . . . . . . . . . . . . . . . . . . . 6.58.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . .

384 411 412 413 419 419 420 420 421 421 422 430 430 475 478 478 493 495 495 510 510 510 511 511 517 518 518 520 520 530 531

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

vii

6.59 Loader module functions . . . . . . . . . . . . . . . . . . . . . . . . 6.59.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.59.2 Function Documentation . . . . . . . . . . . . . . . . . . . . 6.60 cmath API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.60.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.60.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.60.3 Function Documentation . . . . . . . . . . . . . . . . . . . . 6.61 cstdio API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.61.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.61.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.61.3 Function Documentation . . . . . . . . . . . . . . . . . . . . 6.62 fseek origin constants . . . . . . . . . . . . . . . . . . . . . . . . . . 6.62.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.62.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.63 cstdlib API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.63.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.63.2 Function Documentation . . . . . . . . . . . . . . . . . . . . 6.64 cstdlib API types . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.64.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.65 cstring API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.65.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.65.2 Function Documentation . . . . . . . . . . . . . . . . . . . . 6.66 ctype API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.66.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.66.2 Function Documentation . . . . . . . . . . . . . . . . . . . . 6.67 Property constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.67.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.67.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.68 Array operation constants . . . . . . . . . . . . . . . . . . . . . . . . 6.68.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.68.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . .

532 535 535 555 559 559 572 588 590 590 591 599 599 599 600 601 601 609 609 609 611 612 627 628 628 633 633 634 634 634 635

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

viii

6.69 System Call function constants . . . . . . . . . . . . . . . . . . . . . 6.69.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.69.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.70 Line number constants . . . . . . . . . . . . . . . . . . . . . . . . . 6.70.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.70.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.71 Time constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.71.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.71.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.72 Mailbox constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.72.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.72.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.73 VM state constants . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.73.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.73.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.74 Fatal errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.74.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.74.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.75 General errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.75.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.75.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.76 Communications specic errors . . . . . . . . . . . . . . . . . . . . 6.76.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.76.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.77 Remote control (direct commands) errors . . . . . . . . . . . . . . . 6.77.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.77.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.78 Program status constants . . . . . . . . . . . . . . . . . . . . . . . . 6.78.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.78.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.79 Command module IOMAP offsets . . . . . . . . . . . . . . . . . . .

635 637 637 645 645 645 648 649 649 656 657 657 658 658 659 659 660 660 662 662 662 663 663 663 663 664 664 664 665 665 665

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

ix

6.79.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.79.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.80 IOCtrl module constants . . . . . . . . . . . . . . . . . . . . . . . . 6.80.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.81 PowerOn constants . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.81.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.81.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.82 IOCtrl module IOMAP offsets . . . . . . . . . . . . . . . . . . . . . 6.82.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.82.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.83 Loader module constants . . . . . . . . . . . . . . . . . . . . . . . . 6.83.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.83.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.84 Loader module IOMAP offsets . . . . . . . . . . . . . . . . . . . . . 6.84.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.84.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.85 Loader module error codes . . . . . . . . . . . . . . . . . . . . . . . 6.85.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.85.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.86 Loader module function constants . . . . . . . . . . . . . . . . . . . 6.86.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.86.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.87 Sound module constants . . . . . . . . . . . . . . . . . . . . . . . . 6.87.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.88 SoundFlags constants . . . . . . . . . . . . . . . . . . . . . . . . . . 6.88.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.88.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.89 SoundState constants . . . . . . . . . . . . . . . . . . . . . . . . . . 6.89.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.89.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.90 SoundMode constants . . . . . . . . . . . . . . . . . . . . . . . . . .

666 666 668 668 668 668 668 669 669 669 669 670 670 670 670 670 671 672 672 675 676 676 680 680 680 681 681 681 681 682 682

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

6.90.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.90.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.91 Sound module IOMAP offsets . . . . . . . . . . . . . . . . . . . . . 6.91.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.91.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.92 Sound module miscellaneous constants . . . . . . . . . . . . . . . . . 6.92.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.92.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.93 Tone constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.93.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.93.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.94 Button module constants . . . . . . . . . . . . . . . . . . . . . . . . 6.94.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.95 Button name constants . . . . . . . . . . . . . . . . . . . . . . . . . 6.95.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.95.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.96 ButtonState constants . . . . . . . . . . . . . . . . . . . . . . . . . . 6.96.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.96.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.97 Button module IOMAP offsets . . . . . . . . . . . . . . . . . . . . . 6.97.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.97.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.98 Ui module constants . . . . . . . . . . . . . . . . . . . . . . . . . . 6.98.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.99 CommandFlags constants . . . . . . . . . . . . . . . . . . . . . . . . 6.99.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.99.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.100UIState constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.100.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.100.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.101UIButton constants . . . . . . . . . . . . . . . . . . . . . . . . . . .

682 683 683 683 683 684 685 685 685 687 687 693 693 693 694 694 696 696 696 697 697 697 698 699 699 699 699 700 701 701 703

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xi

6.101.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.101.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.102BluetoothState constants . . . . . . . . . . . . . . . . . . . . . . . . 6.102.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.102.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.103VM run state constants . . . . . . . . . . . . . . . . . . . . . . . . . 6.103.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.103.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.104Ui module IOMAP offsets . . . . . . . . . . . . . . . . . . . . . . . 6.104.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.104.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.105NBC Input port constants . . . . . . . . . . . . . . . . . . . . . . . . 6.105.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.105.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.106NBC sensor type constants . . . . . . . . . . . . . . . . . . . . . . . 6.106.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.106.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.107NBC sensor mode constants . . . . . . . . . . . . . . . . . . . . . . 6.107.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.107.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.108Input eld constants . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.108.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.108.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.109Input port digital pin constants . . . . . . . . . . . . . . . . . . . . . 6.109.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.109.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.110Color sensor array indices . . . . . . . . . . . . . . . . . . . . . . . 6.110.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.110.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.111Color values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.111.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . .

703 703 704 704 704 705 706 706 706 707 707 709 709 709 710 711 711 713 713 713 714 715 715 716 716 716 716 716 717 717 718

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xii

6.111.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.112Color calibration state constants . . . . . . . . . . . . . . . . . . . . 6.112.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.112.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.113Color calibration constants . . . . . . . . . . . . . . . . . . . . . . . 6.113.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.113.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.114Input module IOMAP offsets . . . . . . . . . . . . . . . . . . . . . . 6.114.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.114.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.115Output port constants . . . . . . . . . . . . . . . . . . . . . . . . . . 6.115.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.115.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.116PID constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.116.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.116.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.117Output port update ag constants . . . . . . . . . . . . . . . . . . . . 6.117.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.117.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.118Tachometer counter reset ags . . . . . . . . . . . . . . . . . . . . . 6.118.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.118.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.119Output port mode constants . . . . . . . . . . . . . . . . . . . . . . . 6.119.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.119.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.120Output port option constants . . . . . . . . . . . . . . . . . . . . . . 6.120.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.120.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.121Output regulation option constants . . . . . . . . . . . . . . . . . . . 6.121.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.121.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . .

718 718 719 719 719 720 720 720 721 721 723 724 724 725 726 726 727 727 727 728 728 729 729 730 730 731 731 731 731 731 732

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xiii

6.122Output port run state constants . . . . . . . . . . . . . . . . . . . . . 6.122.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.122.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.123Output port regulation mode constants . . . . . . . . . . . . . . . . . 6.123.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.123.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.124Output eld constants . . . . . . . . . . . . . . . . . . . . . . . . . . 6.124.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.124.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.125Output module IOMAP offsets . . . . . . . . . . . . . . . . . . . . . 6.125.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.125.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.126LowSpeed module constants . . . . . . . . . . . . . . . . . . . . . . 6.126.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.127LSState constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.127.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.127.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.128LSChannelState constants . . . . . . . . . . . . . . . . . . . . . . . 6.128.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.128.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.129LSMode constants . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.129.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.129.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.130LSErrorType constants . . . . . . . . . . . . . . . . . . . . . . . . . 6.130.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.130.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.131Low speed module IOMAP offsets . . . . . . . . . . . . . . . . . . . 6.131.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.131.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.132LSNoRestartOnRead constants . . . . . . . . . . . . . . . . . . . . . 6.132.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . .

732 732 732 733 733 734 734 736 736 741 741 741 744 745 745 745 745 746 746 746 747 747 747 748 748 748 749 749 749 751 751

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xiv

6.132.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.133Standard I2C constants . . . . . . . . . . . . . . . . . . . . . . . . . 6.133.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.133.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.134LEGO I2C address constants . . . . . . . . . . . . . . . . . . . . . . 6.134.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.134.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.135Ultrasonic sensor constants . . . . . . . . . . . . . . . . . . . . . . . 6.135.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.135.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.136LEGO temperature sensor constants . . . . . . . . . . . . . . . . . . 6.136.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.136.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.137E-Meter sensor constants . . . . . . . . . . . . . . . . . . . . . . . . 6.137.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.137.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.138Display module constants . . . . . . . . . . . . . . . . . . . . . . . . 6.138.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.138.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.139DisplayExecuteFunction constants . . . . . . . . . . . . . . . . . . . 6.139.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.139.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.140Drawing option constants . . . . . . . . . . . . . . . . . . . . . . . . 6.140.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.140.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.141Font drawing option constants . . . . . . . . . . . . . . . . . . . . . 6.141.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.141.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.142Display ags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.142.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.142.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . .

751 752 752 753 754 754 754 754 755 755 756 757 757 759 760 760 761 762 762 767 767 767 768 769 769 771 772 772 774 774 774

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xv

6.143Display contrast constants . . . . . . . . . . . . . . . . . . . . . . . 6.143.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.143.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.144Text line constants . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.144.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.144.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.145Display module IOMAP offsets . . . . . . . . . . . . . . . . . . . . 6.145.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.145.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.146Comm module constants . . . . . . . . . . . . . . . . . . . . . . . . 6.146.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.147Miscellaneous Comm module constants . . . . . . . . . . . . . . . . 6.147.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.147.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.148Bluetooth State constants . . . . . . . . . . . . . . . . . . . . . . . . 6.148.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.148.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.149Data mode constants . . . . . . . . . . . . . . . . . . . . . . . . . . 6.149.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.149.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.150Bluetooth state status constants . . . . . . . . . . . . . . . . . . . . . 6.150.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.150.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.151Remote connection constants . . . . . . . . . . . . . . . . . . . . . . 6.151.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.151.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.152Bluetooth hardware status constants . . . . . . . . . . . . . . . . . . 6.152.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.152.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.153Hi-speed port constants . . . . . . . . . . . . . . . . . . . . . . . . . 6.153.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . .

775 775 775 775 776 776 777 778 778 780 781 781 782 782 783 784 784 784 784 785 785 786 786 786 787 787 789 789 789 790 790

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xvi

6.154Hi-speed port ags constants . . . . . . . . . . . . . . . . . . . . . . 6.154.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.154.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.155Hi-speed port state constants . . . . . . . . . . . . . . . . . . . . . . 6.155.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.155.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.156Hi-speed port SysCommHSControl constants . . . . . . . . . . . . . 6.156.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.156.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.157Hi-speed port baud rate constants . . . . . . . . . . . . . . . . . . . . 6.157.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.157.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.158Hi-speed port UART mode constants . . . . . . . . . . . . . . . . . . 6.158.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.158.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.159Hi-speed port data bits constants . . . . . . . . . . . . . . . . . . . . 6.159.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.159.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.160Hi-speed port stop bits constants . . . . . . . . . . . . . . . . . . . . 6.160.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.160.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.161Hi-speed port parity constants . . . . . . . . . . . . . . . . . . . . . 6.161.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.161.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.162Hi-speed port combined UART constants . . . . . . . . . . . . . . . 6.162.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.162.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.163Hi-speed port address constants . . . . . . . . . . . . . . . . . . . . . 6.163.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.163.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.164Device status constants . . . . . . . . . . . . . . . . . . . . . . . . .

790 790 791 791 791 791 792 792 792 793 793 793 795 796 796 796 796 796 797 797 797 797 798 798 798 799 799 799 800 800 801

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xvii

6.164.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.164.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.165Comm module interface function constants . . . . . . . . . . . . . . 6.165.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.165.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.166Comm module status code constants . . . . . . . . . . . . . . . . . . 6.166.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.166.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.167Comm module IOMAP offsets . . . . . . . . . . . . . . . . . . . . . 6.167.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.167.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.168RCX constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.168.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.169RCX output constants . . . . . . . . . . . . . . . . . . . . . . . . . . 6.169.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.169.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.170RCX output mode constants . . . . . . . . . . . . . . . . . . . . . . 6.170.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.170.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.171RCX output direction constants . . . . . . . . . . . . . . . . . . . . . 6.171.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.171.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.172RCX output power constants . . . . . . . . . . . . . . . . . . . . . . 6.172.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.172.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.173RCX IR remote constants . . . . . . . . . . . . . . . . . . . . . . . . 6.173.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.173.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.174RCX and Scout sound constants . . . . . . . . . . . . . . . . . . . . 6.174.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.174.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . .

801 801 802 802 803 805 805 805 806 807 807 812 813 813 814 814 815 815 815 816 816 816 816 817 817 817 818 818 820 820 820

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xviii

6.175Scout constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.175.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.176Scout light constants . . . . . . . . . . . . . . . . . . . . . . . . . . 6.176.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.176.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.177Scout sound constants . . . . . . . . . . . . . . . . . . . . . . . . . . 6.177.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.177.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.178Scout sound set constants . . . . . . . . . . . . . . . . . . . . . . . . 6.178.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.178.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.179Scout mode constants . . . . . . . . . . . . . . . . . . . . . . . . . . 6.179.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.179.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.180Scout motion rule constants . . . . . . . . . . . . . . . . . . . . . . . 6.180.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.180.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.181Scout touch rule constants . . . . . . . . . . . . . . . . . . . . . . . 6.181.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.181.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.182Scout light rule constants . . . . . . . . . . . . . . . . . . . . . . . . 6.182.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.182.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.183Scout transmit rule constants . . . . . . . . . . . . . . . . . . . . . . 6.183.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.183.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.184Scout special effect constants . . . . . . . . . . . . . . . . . . . . . . 6.184.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.184.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.185RCX and Scout source constants . . . . . . . . . . . . . . . . . . . . 6.185.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . .

821 822 822 822 823 823 824 824 826 826 826 827 827 827 828 828 828 829 830 830 830 831 831 831 832 832 832 833 833 833 834

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xix

6.185.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.186RCX and Scout opcode constants . . . . . . . . . . . . . . . . . . . . 6.186.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.186.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.187HiTechnic/mindsensors Power Function/IR Train constants . . . . . . 6.187.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.188Power Function command constants . . . . . . . . . . . . . . . . . . 6.188.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.188.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.189Power Function channel constants . . . . . . . . . . . . . . . . . . . 6.189.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.189.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.190Power Function mode constants . . . . . . . . . . . . . . . . . . . . 6.190.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.190.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.191PF/IR Train function constants . . . . . . . . . . . . . . . . . . . . . 6.191.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.191.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.192IR Train channel constants . . . . . . . . . . . . . . . . . . . . . . . 6.192.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.192.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.193Power Function output constants . . . . . . . . . . . . . . . . . . . . 6.193.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.193.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.194Power Function pin constants . . . . . . . . . . . . . . . . . . . . . . 6.194.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.194.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.195Power Function single pin function constants . . . . . . . . . . . . . 6.195.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.195.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.196Power Function CST options constants . . . . . . . . . . . . . . . . .

835 839 841 841 849 850 850 850 850 851 851 851 852 852 853 853 854 854 854 854 855 855 855 855 856 856 856 856 857 857 857

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xx

6.196.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.196.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.197Power Function PWM option constants . . . . . . . . . . . . . . . . 6.197.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.197.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.198HiTechnic device constants . . . . . . . . . . . . . . . . . . . . . . . 6.198.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.198.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.199HiTechnic IRSeeker2 constants . . . . . . . . . . . . . . . . . . . . . 6.199.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.199.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.200HiTechnic IRReceiver constants . . . . . . . . . . . . . . . . . . . . 6.200.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.200.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.201HiTechnic Color2 constants . . . . . . . . . . . . . . . . . . . . . . . 6.201.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.201.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.202HiTechnic Angle sensor constants . . . . . . . . . . . . . . . . . . . 6.202.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.202.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.203MindSensors device constants . . . . . . . . . . . . . . . . . . . . . 6.203.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.203.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.204MindSensors DIST-Nx constants . . . . . . . . . . . . . . . . . . . . 6.204.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.204.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.205MindSensors PSP-Nx constants . . . . . . . . . . . . . . . . . . . . 6.205.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.205.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.206MindSensors PSP-Nx button set 1 constants . . . . . . . . . . . . . . 6.206.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . .

858 858 859 859 860 861 862 862 863 864 864 866 866 866 867 868 868 869 869 869 871 872 872 876 876 876 877 878 878 879 879

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xxi

6.206.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.207MindSensors PSP-Nx button set 2 constants . . . . . . . . . . . . . . 6.207.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.207.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.208MindSensors nRLink constants . . . . . . . . . . . . . . . . . . . . . 6.208.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.208.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.209MindSensors ACCL-Nx constants . . . . . . . . . . . . . . . . . . . 6.209.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.209.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.210MindSensors ACCL-Nx sensitivity level constants . . . . . . . . . . . 6.210.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.210.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.211MindSensors PFMate constants . . . . . . . . . . . . . . . . . . . . . 6.211.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.211.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.212PFMate motor constants . . . . . . . . . . . . . . . . . . . . . . . . 6.212.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.212.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.213PFMate channel constants . . . . . . . . . . . . . . . . . . . . . . . 6.213.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.213.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.214MindSensors NXTServo constants . . . . . . . . . . . . . . . . . . . 6.214.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.215MindSensors NXTServo registers . . . . . . . . . . . . . . . . . . . 6.215.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.215.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.216MindSensors NXTServo position constants . . . . . . . . . . . . . . 6.216.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.216.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.217MindSensors NXTServo quick position constants . . . . . . . . . . .

879 880 880 881 881 882 882 883 884 884 886 887 887 887 888 888 889 889 890 890 890 890 891 891 891 892 892 895 896 896 896

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xxii

6.217.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.217.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.218MindSensors NXTServo servo numbers . . . . . . . . . . . . . . . . 6.218.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.218.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.219MindSensors NXTServo commands . . . . . . . . . . . . . . . . . . 6.219.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.219.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.220MindSensors NXTHID constants . . . . . . . . . . . . . . . . . . . . 6.220.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.221MindSensors NXTHID registers . . . . . . . . . . . . . . . . . . . . 6.221.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.221.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.222MindSensors NXTHID modier keys . . . . . . . . . . . . . . . . . 6.222.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.222.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.223MindSensors NXTHID commands . . . . . . . . . . . . . . . . . . . 6.223.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.223.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.224MindSensors NXTPowerMeter constants . . . . . . . . . . . . . . . 6.224.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.225MindSensors NXTPowerMeter registers . . . . . . . . . . . . . . . . 6.225.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.225.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.226MindSensors NXTPowerMeter commands . . . . . . . . . . . . . . . 6.226.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.226.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.227MindSensors NXTSumoEyes constants . . . . . . . . . . . . . . . . 6.227.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.227.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.228MindSensors NXTLineLeader constants . . . . . . . . . . . . . . . .

896 897 897 897 897 898 899 899 900 900 901 901 901 901 902 902 903 903 903 904 904 904 904 905 906 906 906 907 907 907 908

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xxiii

6.228.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.229MindSensors NXTLineLeader registers . . . . . . . . . . . . . . . . 6.229.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.229.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.230MindSensors NXTLineLeader commands . . . . . . . . . . . . . . . 6.230.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.230.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.231Codatex device constants . . . . . . . . . . . . . . . . . . . . . . . . 6.231.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.232Codatex RFID sensor constants . . . . . . . . . . . . . . . . . . . . . 6.232.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.232.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.233Codatex RFID sensor modes . . . . . . . . . . . . . . . . . . . . . . 6.233.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.233.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.234Data type limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.234.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.234.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.235Graphics library begin modes . . . . . . . . . . . . . . . . . . . . . . 6.235.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.235.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.236Graphics library actions . . . . . . . . . . . . . . . . . . . . . . . . . 6.236.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.236.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.237Graphics library settings . . . . . . . . . . . . . . . . . . . . . . . . 6.237.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.237.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 6.238Graphics library cull mode . . . . . . . . . . . . . . . . . . . . . . . 6.238.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 6.238.2 Dene Documentation . . . . . . . . . . . . . . . . . . . . .

908 908 909 909 911 911 911 912 912 913 913 913 914 914 914 914 915 915 917 917 917 918 918 918 920 920 920 921 921 921

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xxiv

Data Structure Documentation 7.1 ColorSensorReadType Struct Reference . . . . . . . . . . . . . . . . 7.1.1 7.1.2 7.2 Detailed Description . . . . . . . . . . . . . . . . . . . . . . Field Documentation . . . . . . . . . . . . . . . . . . . . . .

922 922 922 922 923 924 924 924 925 925 926 926 926 927 927 927 928 928 929 930 931 931 931 932 932 933 933 933 934 934 934

CommBTCheckStatusType Struct Reference . . . . . . . . . . . . . . 7.2.1 7.2.2 Detailed Description . . . . . . . . . . . . . . . . . . . . . . Field Documentation . . . . . . . . . . . . . . . . . . . . . .

7.3

CommBTConnectionType Struct Reference . . . . . . . . . . . . . . 7.3.1 7.3.2 Detailed Description . . . . . . . . . . . . . . . . . . . . . . Field Documentation . . . . . . . . . . . . . . . . . . . . . .

7.4

CommBTOnOffType Struct Reference . . . . . . . . . . . . . . . . . 7.4.1 7.4.2 Detailed Description . . . . . . . . . . . . . . . . . . . . . . Field Documentation . . . . . . . . . . . . . . . . . . . . . .

7.5

CommBTWriteType Struct Reference . . . . . . . . . . . . . . . . . 7.5.1 7.5.2 Detailed Description . . . . . . . . . . . . . . . . . . . . . . Field Documentation . . . . . . . . . . . . . . . . . . . . . .

7.6

CommExecuteFunctionType Struct Reference . . . . . . . . . . . . . 7.6.1 7.6.2 Detailed Description . . . . . . . . . . . . . . . . . . . . . . Field Documentation . . . . . . . . . . . . . . . . . . . . . .

7.7

CommHSCheckStatusType Struct Reference . . . . . . . . . . . . . . 7.7.1 7.7.2 Detailed Description . . . . . . . . . . . . . . . . . . . . . . Field Documentation . . . . . . . . . . . . . . . . . . . . . .

7.8

CommHSControlType Struct Reference . . . . . . . . . . . . . . . . 7.8.1 7.8.2 Detailed Description . . . . . . . . . . . . . . . . . . . . . . Field Documentation . . . . . . . . . . . . . . . . . . . . . .

7.9

CommHSReadWriteType Struct Reference . . . . . . . . . . . . . . 7.9.1 7.9.2 Detailed Description . . . . . . . . . . . . . . . . . . . . . . Field Documentation . . . . . . . . . . . . . . . . . . . . . .

7.10 CommLSCheckStatusType Struct Reference . . . . . . . . . . . . . . 7.10.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.10.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . .

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xxv

7.11 CommLSReadType Struct Reference . . . . . . . . . . . . . . . . . . 7.11.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.11.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.12 CommLSWriteExType Struct Reference . . . . . . . . . . . . . . . . 7.12.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.12.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.13 CommLSWriteType Struct Reference . . . . . . . . . . . . . . . . . 7.13.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.13.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.14 ComputeCalibValueType Struct Reference . . . . . . . . . . . . . . . 7.14.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.14.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.15 DatalogGetTimesType Struct Reference . . . . . . . . . . . . . . . . 7.15.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.15.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.16 DatalogWriteType Struct Reference . . . . . . . . . . . . . . . . . . 7.16.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.16.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.17 DisplayExecuteFunctionType Struct Reference . . . . . . . . . . . . 7.17.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.17.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.18 div_t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . 7.18.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.18.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.19 DrawCircleType Struct Reference . . . . . . . . . . . . . . . . . . . 7.19.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.19.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.20 DrawEllipseType Struct Reference . . . . . . . . . . . . . . . . . . . 7.20.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.20.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.21 DrawFontType Struct Reference . . . . . . . . . . . . . . . . . . . .

935 935 936 937 937 937 938 939 939 940 940 940 941 941 942 942 943 943 943 944 944 946 946 946 947 947 947 948 948 949 950

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xxvi

7.21.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.21.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.22 DrawGraphicArrayType Struct Reference . . . . . . . . . . . . . . . 7.22.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.22.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.23 DrawGraphicType Struct Reference . . . . . . . . . . . . . . . . . . 7.23.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.23.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.24 DrawLineType Struct Reference . . . . . . . . . . . . . . . . . . . . 7.24.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.24.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.25 DrawPointType Struct Reference . . . . . . . . . . . . . . . . . . . . 7.25.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.25.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.26 DrawPolygonType Struct Reference . . . . . . . . . . . . . . . . . . 7.26.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.26.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.27 DrawRectType Struct Reference . . . . . . . . . . . . . . . . . . . . 7.27.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.27.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.28 DrawTextType Struct Reference . . . . . . . . . . . . . . . . . . . . 7.28.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.28.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.29 FileCloseType Struct Reference . . . . . . . . . . . . . . . . . . . . 7.29.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.29.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.30 FileDeleteType Struct Reference . . . . . . . . . . . . . . . . . . . . 7.30.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.30.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.31 FileFindType Struct Reference . . . . . . . . . . . . . . . . . . . . . 7.31.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . .

950 950 951 952 952 953 953 953 954 955 955 956 956 956 957 957 958 958 959 959 960 960 960 961 961 962 962 962 963 963 963

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xxvii

7.31.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.32 FileOpenType Struct Reference . . . . . . . . . . . . . . . . . . . . . 7.32.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.32.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.33 FileReadWriteType Struct Reference . . . . . . . . . . . . . . . . . . 7.33.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.33.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.34 FileRenameType Struct Reference . . . . . . . . . . . . . . . . . . . 7.34.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.34.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.35 FileResizeType Struct Reference . . . . . . . . . . . . . . . . . . . . 7.35.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.35.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.36 FileResolveHandleType Struct Reference . . . . . . . . . . . . . . . 7.36.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.36.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.37 FileSeekType Struct Reference . . . . . . . . . . . . . . . . . . . . . 7.37.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.37.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.38 FileTellType Struct Reference . . . . . . . . . . . . . . . . . . . . . 7.38.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.38.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.39 GetStartTickType Struct Reference . . . . . . . . . . . . . . . . . . . 7.39.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.39.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.40 InputValuesType Struct Reference . . . . . . . . . . . . . . . . . . . 7.40.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.40.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.41 IOMapReadByIDType Struct Reference . . . . . . . . . . . . . . . . 7.41.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.41.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . .

964 964 965 965 966 966 966 967 968 968 969 969 969 970 970 970 971 972 972 973 973 973 974 974 974 974 975 975 976 977 977

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xxviii

7.42 IOMapReadType Struct Reference . . . . . . . . . . . . . . . . . . . 7.42.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.42.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.43 IOMapWriteByIDType Struct Reference . . . . . . . . . . . . . . . . 7.43.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.43.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.44 IOMapWriteType Struct Reference . . . . . . . . . . . . . . . . . . . 7.44.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.44.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.45 KeepAliveType Struct Reference . . . . . . . . . . . . . . . . . . . . 7.45.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.45.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.46 ldiv_t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . 7.46.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.46.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.47 ListFilesType Struct Reference . . . . . . . . . . . . . . . . . . . . . 7.47.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.47.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.48 LoaderExecuteFunctionType Struct Reference . . . . . . . . . . . . . 7.48.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.48.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.49 LocationType Struct Reference . . . . . . . . . . . . . . . . . . . . . 7.49.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.49.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.50 MemoryManagerType Struct Reference . . . . . . . . . . . . . . . . 7.50.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.50.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.51 MessageReadType Struct Reference . . . . . . . . . . . . . . . . . . 7.51.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.51.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.52 MessageWriteType Struct Reference . . . . . . . . . . . . . . . . . .

978 978 979 980 980 980 981 981 982 982 983 983 983 983 984 984 984 985 985 986 988 988 989 989 990 990 990 991 991 992 992

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xxix

7.52.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.52.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.53 OutputStateType Struct Reference . . . . . . . . . . . . . . . . . . . 7.53.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.53.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.54 RandomNumberType Struct Reference . . . . . . . . . . . . . . . . . 7.54.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.54.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.55 ReadButtonType Struct Reference . . . . . . . . . . . . . . . . . . . 7.55.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.55.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.56 ReadLastResponseType Struct Reference . . . . . . . . . . . . . . . 7.56.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 7.56.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 7.57 ReadSemDataType Struct Reference . . . . . . . . . . . . . . . . . . 7.57.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . .

993 993 994 994 994 995 996 996 996 996 997 998 998 998 999 999

7.57.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 1000 7.58 SetScreenModeType Struct Reference . . . . . . . . . . . . . . . . . 1000 7.58.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 1001 7.58.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 1001 7.59 SetSleepTimeoutType Struct Reference . . . . . . . . . . . . . . . . 1001 7.59.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 1002 7.59.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 1002 7.60 SizeType Struct Reference . . . . . . . . . . . . . . . . . . . . . . . 1002 7.60.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 1003 7.60.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 1003 7.61 SoundGetStateType Struct Reference . . . . . . . . . . . . . . . . . . 1003 7.61.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 1004 7.61.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 1004 7.62 SoundPlayFileType Struct Reference . . . . . . . . . . . . . . . . . . 1004 7.62.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 1005

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xxx

7.62.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 1005 7.63 SoundPlayToneType Struct Reference . . . . . . . . . . . . . . . . . 1006 7.63.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 1006 7.63.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 1006 7.64 SoundSetStateType Struct Reference . . . . . . . . . . . . . . . . . . 1007 7.64.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 1007 7.64.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 1008 7.65 Tone Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 1008 7.65.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 1008 7.65.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 1009 7.66 UpdateCalibCacheInfoType Struct Reference . . . . . . . . . . . . . 1009 7.66.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 1009 7.66.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 1010 7.67 WriteSemDataType Struct Reference . . . . . . . . . . . . . . . . . . 1011 7.67.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 1011 7.67.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . 1011 8 File Documentation 8.1 1012

NBCCommon.h File Reference . . . . . . . . . . . . . . . . . . . . . 1012 8.1.1 8.1.2 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 1052 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 1053

8.2

NXCAPIDocs.h File Reference . . . . . . . . . . . . . . . . . . . . . 1243 8.2.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 1243

8.3

NXCDefs.h File Reference . . . . . . . . . . . . . . . . . . . . . . . 1244 8.3.1 8.3.2 8.3.3 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 1329 Dene Documentation . . . . . . . . . . . . . . . . . . . . . 1330 Function Documentation . . . . . . . . . . . . . . . . . . . . 1352 1788

Example Documentation 9.1 9.2 9.3

alternating_tasks.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1788 ex_abort.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1788 ex_AbortFlag.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1789

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xxxi

9.4 9.5 9.6 9.7 9.8 9.9

ex_abs.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1789 ex_ACCLNxCalibrateX.nxc . . . . . . . . . . . . . . . . . . . . . . 1789 ex_ACCLNxCalibrateXEnd.nxc . . . . . . . . . . . . . . . . . . . . 1789 ex_ACCLNxCalibrateY.nxc . . . . . . . . . . . . . . . . . . . . . . 1789 ex_ACCLNxCalibrateYEnd.nxc . . . . . . . . . . . . . . . . . . . . 1789 ex_ACCLNxCalibrateZ.nxc . . . . . . . . . . . . . . . . . . . . . . 1789

9.10 ex_ACCLNxCalibrateZEnd.nxc . . . . . . . . . . . . . . . . . . . . 1790 9.11 ex_ACCLNxResetCalibration.nxc . . . . . . . . . . . . . . . . . . . 1790 9.12 ex_ACCLNxSensitivity.nxc . . . . . . . . . . . . . . . . . . . . . . . 1790 9.13 ex_ACCLNxXOffset.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1790 9.14 ex_ACCLNxXRange.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1790 9.15 ex_ACCLNxYOffset.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1790 9.16 ex_ACCLNxYRange.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1790 9.17 ex_ACCLNxZOffset.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1791 9.18 ex_ACCLNxZRange.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1791 9.19 ex_acos.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1791 9.20 ex_acosd.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1791 9.21 ex_Acquire.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1792 9.22 ex_addressof.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1792 9.23 ex_addressofex.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1793 9.24 ex_ArrayBuild.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1794 9.25 ex_ArrayInit.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1795 9.26 ex_ArrayLen.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1795 9.27 ex_ArrayMax.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1795 9.28 ex_ArrayMean.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1796 9.29 ex_ArrayMin.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1796 9.30 ex_ArrayOp.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1796 9.31 ex_ArraySort.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1796 9.32 ex_ArrayStd.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1797 9.33 ex_ArraySubset.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1797 9.34 ex_ArraySum.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1797

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xxxii

9.35 ex_ArraySumSqr.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1798 9.36 ex_asin.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1798 9.37 ex_asind.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1799 9.38 ex_atan.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1799 9.39 ex_atan2.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1800 9.40 ex_atan2d.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1800 9.41 ex_atand.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1801 9.42 ex_atof.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1801 9.43 ex_atoi.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1801 9.44 ex_atol.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1802 9.45 ex_BatteryState.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1802 9.46 ex_bcd2dec.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1802 9.47 ex_BluetoothState.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1802 9.48 ex_BluetoothStatus.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1802 9.49 ex_BluetoothWrite.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1803 9.50 ex_BrickDataBluecoreVersion.nxc . . . . . . . . . . . . . . . . . . . 1803 9.51 ex_BrickDataBtHardwareStatus.nxc . . . . . . . . . . . . . . . . . . 1803 9.52 ex_BrickDataBtStateStatus.nxc . . . . . . . . . . . . . . . . . . . . . 1803 9.53 ex_BrickDataName.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1803 9.54 ex_BrickDataTimeoutValue.nxc . . . . . . . . . . . . . . . . . . . . 1803 9.55 ex_BTConnectionClass.nxc . . . . . . . . . . . . . . . . . . . . . . . 1804 9.56 ex_BTConnectionHandleNum.nxc . . . . . . . . . . . . . . . . . . . 1804 9.57 ex_BTConnectionLinkQuality.nxc . . . . . . . . . . . . . . . . . . . 1804 9.58 ex_BTConnectionName.nxc . . . . . . . . . . . . . . . . . . . . . . 1804 9.59 ex_BTConnectionPinCode.nxc . . . . . . . . . . . . . . . . . . . . . 1804 9.60 ex_BTConnectionStreamStatus.nxc . . . . . . . . . . . . . . . . . . 1804 9.61 ex_BTDeviceClass.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1805 9.62 ex_BTDeviceCount.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1805 9.63 ex_BTDeviceName.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1805 9.64 ex_BTDeviceNameCount.nxc . . . . . . . . . . . . . . . . . . . . . 1805 9.65 ex_BTDeviceStatus.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1805

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xxxiii

9.66 ex_BTInputBufferInPtr.nxc . . . . . . . . . . . . . . . . . . . . . . . 1805 9.67 ex_BTInputBufferOutPtr.nxc . . . . . . . . . . . . . . . . . . . . . . 1806 9.68 ex_BTOutputBufferInPtr.nxc . . . . . . . . . . . . . . . . . . . . . . 1806 9.69 ex_BTOutputBufferOutPtr.nxc . . . . . . . . . . . . . . . . . . . . . 1806 9.70 ex_ButtonCount.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1806 9.71 ex_ButtonLongPressCount.nxc . . . . . . . . . . . . . . . . . . . . . 1806 9.72 ex_ButtonLongReleaseCount.nxc . . . . . . . . . . . . . . . . . . . 1806 9.73 ex_ButtonPressCount.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1807 9.74 ex_buttonpressed.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1807 9.75 ex_ButtonReleaseCount.nxc . . . . . . . . . . . . . . . . . . . . . . 1807 9.76 ex_ButtonShortReleaseCount.nxc . . . . . . . . . . . . . . . . . . . 1807 9.77 ex_ButtonState.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1807 9.78 ex_ByteArrayToStr.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1808 9.79 ex_ByteArrayToStrEx.nxc . . . . . . . . . . . . . . . . . . . . . . . 1808 9.80 ex_ceil.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1808 9.81 ex_CircleOut.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1808 9.82 ex_clearline.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1809 9.83 ex_ClearScreen.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1809 9.84 ex_ClearSensor.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1809 9.85 ex_CloseFile.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1809 9.86 ex_coast.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1809 9.87 ex_coastex.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1810 9.88 ex_ColorADRaw.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1810 9.89 ex_ColorBoolean.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1810 9.90 ex_ColorCalibration.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1810 9.91 ex_ColorCalibrationState.nxc . . . . . . . . . . . . . . . . . . . . . . 1810 9.92 ex_ColorCalLimits.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1810 9.93 ex_ColorSensorRaw.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1810 9.94 ex_ColorSensorValue.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1811 9.95 ex_CommandFlags.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1811 9.96 ex_CongureTemperatureSensor.nxc . . . . . . . . . . . . . . . . . . 1811

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xxxiv

9.97 ex_contrast.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1811 9.98 ex_copy.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1812 9.99 ex_cosh.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1812 9.100ex_CreateFile.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1812 9.101ex_CreateFileLinear.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1812 9.102ex_CreateFileNonLinear.nxc . . . . . . . . . . . . . . . . . . . . . . 1812 9.103ex_cstdio.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1812 9.104ex_cstring.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1813 9.105ex_ctype.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1814 9.106ex_CurrentTick.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1814 9.107ex_CustomSensorActiveStatus.nxc . . . . . . . . . . . . . . . . . . . 1814 9.108ex_CustomSensorPercentFullScale.nxc . . . . . . . . . . . . . . . . 1815 9.109ex_CustomSensorZeroOffset.nxc . . . . . . . . . . . . . . . . . . . . 1815 9.110ex_DataMode.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1815 9.111ex_delete_data_le.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1816 9.112ex_DeleteFile.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1816 9.113ex_dispfnout.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1816 9.114ex_dispftout.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1817 9.115ex_dispfunc.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1817 9.116ex_dispgaout.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1818 9.117ex_dispgaoutex.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1819 9.118ex_dispgout.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1824 9.119ex_dispgoutex.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1825 9.120ex_DisplayDisplay.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1825 9.121ex_DisplayEraseMask.nxc . . . . . . . . . . . . . . . . . . . . . . . 1825 9.122ex_DisplayFlags.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1825 9.123ex_displayfont.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1826 9.124ex_DisplayTextLinesCenterFlags.nxc . . . . . . . . . . . . . . . . . 1827 9.125ex_DisplayUpdateMask.nxc . . . . . . . . . . . . . . . . . . . . . . 1827 9.126ex_dispmisc.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1827 9.127ex_DISTNxDistance.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1828

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xxxv

9.128ex_DISTNxGP2D12.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1828 9.129ex_DISTNxGP2D120.nxc . . . . . . . . . . . . . . . . . . . . . . . 1828 9.130ex_DISTNxGP2YA02.nxc . . . . . . . . . . . . . . . . . . . . . . . 1828 9.131ex_DISTNxGP2YA21.nxc . . . . . . . . . . . . . . . . . . . . . . . 1828 9.132ex_DISTNxMaxDistance.nxc . . . . . . . . . . . . . . . . . . . . . . 1828 9.133ex_DISTNxMinDistance.nxc . . . . . . . . . . . . . . . . . . . . . . 1829 9.134ex_DISTNxModuleType.nxc . . . . . . . . . . . . . . . . . . . . . . 1829 9.135ex_DISTNxNumPoints.nxc . . . . . . . . . . . . . . . . . . . . . . . 1829 9.136ex_DISTNxVoltage.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1829 9.137ex_div.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1829 9.138ex_EllipseOut.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1829 9.139ex_exp.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1830 9.140ex_fclose.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1830 9.141ex_feof.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1830 9.142ex_fush.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1830 9.143ex_fgetc.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1830 9.144ex_fgets.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1831 9.145ex_le_system.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1831 9.146ex_ndrstle.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1834 9.147ex_ndnextle.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1835 9.148ex_FirstTick.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1835 9.149ex_Flatten.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1835 9.150ex_FlattenVar.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1835 9.151ex_oat.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1836 9.152ex_oor.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1836 9.153ex_Follows.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1836 9.154ex_fopen.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1836 9.155ex_ForceOff.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1837 9.156ex_FormatNum.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1837 9.157ex_fprintf.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1837 9.158ex_fputc.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1837

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xxxvi

9.159ex_fputs.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1837 9.160ex_frac.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1837 9.161ex_FreeMemory.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1838 9.162ex_fseek.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1838 9.163ex_ftell.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1838 9.164ex_GetBrickDataAddress.nxc . . . . . . . . . . . . . . . . . . . . . 1838 9.165ex_GetBTConnectionAddress.nxc . . . . . . . . . . . . . . . . . . . 1838 9.166ex_GetBTDeviceAddress.nxc . . . . . . . . . . . . . . . . . . . . . . 1839 9.167ex_GetBTInputBuffer.nxc . . . . . . . . . . . . . . . . . . . . . . . 1839 9.168ex_GetBTOutputBuffer.nxc . . . . . . . . . . . . . . . . . . . . . . . 1839 9.169ex_getc.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1839 9.170ex_getchar.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1839 9.171ex_GetDisplayNormal.nxc . . . . . . . . . . . . . . . . . . . . . . . 1840 9.172ex_GetDisplayPopup.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1840 9.173ex_GetHSInputBuffer.nxc . . . . . . . . . . . . . . . . . . . . . . . 1840 9.174ex_GetHSOutputBuffer.nxc . . . . . . . . . . . . . . . . . . . . . . . 1840 9.175ex_GetInput.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1840 9.176ex_GetLastResponseInfo.nxc . . . . . . . . . . . . . . . . . . . . . . 1840 9.177ex_GetLSInputBuffer.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1841 9.178ex_GetLSOutputBuffer.nxc . . . . . . . . . . . . . . . . . . . . . . . 1841 9.179ex_getmemoryinfo.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1841 9.180ex_getoutput.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1842 9.181ex_GetUSBInputBuffer.nxc . . . . . . . . . . . . . . . . . . . . . . . 1842 9.182ex_GetUSBOutputBuffer.nxc . . . . . . . . . . . . . . . . . . . . . . 1842 9.183ex_GetUSBPollBuffer.nxc . . . . . . . . . . . . . . . . . . . . . . . 1843 9.184ex_GraphicOut.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1843 9.185ex_GraphicOutEx.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1843 9.186ex_HSFlags.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1843 9.187ex_HSInputBufferInPtr.nxc . . . . . . . . . . . . . . . . . . . . . . . 1843 9.188ex_HSInputBufferOutPtr.nxc . . . . . . . . . . . . . . . . . . . . . . 1843 9.189ex_HSMode.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1844

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xxxvii

9.190ex_HSOutputBufferInPtr.nxc . . . . . . . . . . . . . . . . . . . . . . 1844 9.191ex_HSOutputBufferOutPtr.nxc . . . . . . . . . . . . . . . . . . . . . 1844 9.192ex_HSSpeed.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1844 9.193ex_HSState.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1844 9.194ex_HTGyroTest.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1844 9.195ex_HTIRTrain.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1846 9.196ex_HTPFComboDirect.nxc . . . . . . . . . . . . . . . . . . . . . . . 1846 9.197ex_HTPFComboPWM.nxc . . . . . . . . . . . . . . . . . . . . . . . 1846 9.198ex_HTPFRawOutput.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1846 9.199ex_HTPFRepeat.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1846 9.200ex_HTPFSingleOutputCST.nxc . . . . . . . . . . . . . . . . . . . . . 1846 9.201ex_HTPFSingleOutputPWM.nxc . . . . . . . . . . . . . . . . . . . . 1847 9.202ex_HTPFSinglePin.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1847 9.203ex_HTPFTrain.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1847 9.204ex_HTRCXAddToDatalog.nxc . . . . . . . . . . . . . . . . . . . . . 1847 9.205ex_HTRCXBatteryLevel.nxc . . . . . . . . . . . . . . . . . . . . . . 1847 9.206ex_HTRCXClearAllEvents.nxc . . . . . . . . . . . . . . . . . . . . . 1847 9.207ex_HTRCXClearCounter.nxc . . . . . . . . . . . . . . . . . . . . . . 1848 9.208ex_HTRCXClearMsg.nxc . . . . . . . . . . . . . . . . . . . . . . . 1848 9.209ex_HTRCXClearSensor.nxc . . . . . . . . . . . . . . . . . . . . . . 1848 9.210ex_HTRCXClearSound.nxc . . . . . . . . . . . . . . . . . . . . . . 1848 9.211ex_HTRCXClearTimer.nxc . . . . . . . . . . . . . . . . . . . . . . . 1848 9.212ex_HTRCXCreateDatalog.nxc . . . . . . . . . . . . . . . . . . . . . 1848 9.213ex_HTRCXDecCounter.nxc . . . . . . . . . . . . . . . . . . . . . . 1849 9.214ex_HTRCXDeleteSub.nxc . . . . . . . . . . . . . . . . . . . . . . . 1849 9.215ex_HTRCXDeleteSubs.nxc . . . . . . . . . . . . . . . . . . . . . . . 1849 9.216ex_HTRCXDeleteTask.nxc . . . . . . . . . . . . . . . . . . . . . . . 1849 9.217ex_HTRCXDeleteTasks.nxc . . . . . . . . . . . . . . . . . . . . . . 1849 9.218ex_HTRCXDisableOutput.nxc . . . . . . . . . . . . . . . . . . . . . 1849 9.219ex_HTRCXEnableOutput.nxc . . . . . . . . . . . . . . . . . . . . . 1850 9.220ex_HTRCXEvent.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1850

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xxxviii

9.221ex_HTRCXFloat.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1850 9.222ex_HTRCXFwd.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1850 9.223ex_HTRCXIncCounter.nxc . . . . . . . . . . . . . . . . . . . . . . . 1850 9.224ex_HTRCXInvertOutput.nxc . . . . . . . . . . . . . . . . . . . . . . 1850 9.225ex_HTRCXMuteSound.nxc . . . . . . . . . . . . . . . . . . . . . . . 1851 9.226ex_HTRCXObvertOutput.nxc . . . . . . . . . . . . . . . . . . . . . 1851 9.227ex_HTRCXOff.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1851 9.228ex_HTRCXOn.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1851 9.229ex_HTRCXOnFor.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1851 9.230ex_HTRCXOnFwd.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1851 9.231ex_HTRCXOnRev.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1852 9.232ex_HTRCXPBTurnOff.nxc . . . . . . . . . . . . . . . . . . . . . . . 1852 9.233ex_HTRCXPing.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1852 9.234ex_HTRCXPlaySound.nxc . . . . . . . . . . . . . . . . . . . . . . . 1852 9.235ex_HTRCXPlayTone.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1852 9.236ex_HTRCXPlayToneVar.nxc . . . . . . . . . . . . . . . . . . . . . . 1852 9.237ex_HTRCXPoll.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1853 9.238ex_HTRCXPollMemory.nxc . . . . . . . . . . . . . . . . . . . . . . 1853 9.239ex_HTRCXRemote.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1853 9.240ex_HTRCXRev.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1853 9.241ex_HTRCXSelectDisplay.nxc . . . . . . . . . . . . . . . . . . . . . 1853 9.242ex_HTRCXSelectProgram.nxc . . . . . . . . . . . . . . . . . . . . . 1853 9.243ex_HTRCXSendSerial.nxc . . . . . . . . . . . . . . . . . . . . . . . 1854 9.244ex_HTRCXSetDirection.nxc . . . . . . . . . . . . . . . . . . . . . . 1854 9.245ex_HTRCXSetEvent.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1854 9.246ex_HTRCXSetGlobalDirection.nxc . . . . . . . . . . . . . . . . . . 1854 9.247ex_HTRCXSetGlobalOutput.nxc . . . . . . . . . . . . . . . . . . . . 1854 9.248ex_HTRCXSetIRLinkPort.nxc . . . . . . . . . . . . . . . . . . . . . 1854 9.249ex_HTRCXSetMaxPower.nxc . . . . . . . . . . . . . . . . . . . . . 1855 9.250ex_HTRCXSetMessage.nxc . . . . . . . . . . . . . . . . . . . . . . 1855 9.251ex_HTRCXSetOutput.nxc . . . . . . . . . . . . . . . . . . . . . . . 1855

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xxxix

9.252ex_HTRCXSetPower.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1855 9.253ex_HTRCXSetPriority.nxc . . . . . . . . . . . . . . . . . . . . . . . 1855 9.254ex_HTRCXSetSensorMode.nxc . . . . . . . . . . . . . . . . . . . . 1855 9.255ex_HTRCXSetSensorType.nxc . . . . . . . . . . . . . . . . . . . . . 1856 9.256ex_HTRCXSetSleepTime.nxc . . . . . . . . . . . . . . . . . . . . . 1856 9.257ex_HTRCXSetTxPower.nxc . . . . . . . . . . . . . . . . . . . . . . 1856 9.258ex_HTRCXSetWatch.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1856 9.259ex_HTRCXStartTask.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1856 9.260ex_HTRCXStopAllTasks.nxc . . . . . . . . . . . . . . . . . . . . . . 1856 9.261ex_HTRCXStopTask.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1857 9.262ex_HTRCXToggle.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1857 9.263ex_HTRCXUnmuteSound.nxc . . . . . . . . . . . . . . . . . . . . . 1857 9.264ex_HTScoutCalibrateSensor.nxc . . . . . . . . . . . . . . . . . . . . 1857 9.265ex_HTScoutMuteSound.nxc . . . . . . . . . . . . . . . . . . . . . . 1857 9.266ex_HTScoutSelectSounds.nxc . . . . . . . . . . . . . . . . . . . . . 1857 9.267ex_HTScoutSendVLL.nxc . . . . . . . . . . . . . . . . . . . . . . . 1858 9.268ex_HTScoutSetEventFeedback.nxc . . . . . . . . . . . . . . . . . . . 1858 9.269ex_HTScoutSetLight.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1858 9.270ex_HTScoutSetScoutMode.nxc . . . . . . . . . . . . . . . . . . . . . 1858 9.271ex_HTScoutSetSensorClickTime.nxc . . . . . . . . . . . . . . . . . 1858 9.272ex_HTScoutSetSensorHysteresis.nxc . . . . . . . . . . . . . . . . . . 1858 9.273ex_HTScoutSetSensorLowerLimit.nxc . . . . . . . . . . . . . . . . . 1859 9.274ex_HTScoutSetSensorUpperLimit.nxc . . . . . . . . . . . . . . . . . 1859 9.275ex_HTScoutUnmuteSound.nxc . . . . . . . . . . . . . . . . . . . . . 1859 9.276ex_I2CBytes.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1859 9.277ex_I2CBytesReady.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1859 9.278ex_I2CCheckStatus.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1859 9.279ex_i2cdeviceid.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1860 9.280ex_i2cdeviceinfo.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1860 9.281ex_I2CRead.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1860 9.282ex_I2CSendCommand.nxc . . . . . . . . . . . . . . . . . . . . . . . 1860

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xl

9.283ex_I2CStatus.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1860 9.284ex_i2cvendorid.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1861 9.285ex_i2cversion.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1861 9.286ex_I2CWrite.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1861 9.287ex_isalnum.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1861 9.288ex_isalpha.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1861 9.289ex_iscntrl.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1862 9.290ex_isdigit.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1862 9.291ex_isgraph.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1862 9.292ex_islower.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1862 9.293ex_isnan.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1862 9.294ex_isprint.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1863 9.295ex_ispunct.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1863 9.296ex_isspace.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1863 9.297ex_isupper.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1863 9.298ex_isxdigit.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1863 9.299ex_labs.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1863 9.300ex_ldiv.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1864 9.301ex_leftstr.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1864 9.302ex_LineOut.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1864 9.303ex_log.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1865 9.304ex_log10.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1865 9.305ex_LongAbort.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1865 9.306ex_LowLevelModuleRoutines.nxc . . . . . . . . . . . . . . . . . . . 1865 9.307ex_LowspeedBytesReady.nxc . . . . . . . . . . . . . . . . . . . . . 1866 9.308ex_LowspeedCheckStatus.nxc . . . . . . . . . . . . . . . . . . . . . 1866 9.309ex_LowspeedRead.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1866 9.310ex_LowspeedStatus.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1866 9.311ex_LowspeedWrite.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1867 9.312ex_LSChannelState.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1867 9.313ex_LSErrorType.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1867

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xli

9.314ex_LSInputBufferBytesToRx.nxc . . . . . . . . . . . . . . . . . . . 1867 9.315ex_LSInputBufferInPtr.nxc . . . . . . . . . . . . . . . . . . . . . . . 1867 9.316ex_LSInputBufferOutPtr.nxc . . . . . . . . . . . . . . . . . . . . . . 1867 9.317ex_LSMode.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1868 9.318ex_LSNoRestartOnRead.nxc . . . . . . . . . . . . . . . . . . . . . . 1868 9.319ex_LSOutputBufferBytesToRx.nxc . . . . . . . . . . . . . . . . . . . 1868 9.320ex_LSOutputBufferInPtr.nxc . . . . . . . . . . . . . . . . . . . . . . 1868 9.321ex_LSOutputBufferOutPtr.nxc . . . . . . . . . . . . . . . . . . . . . 1868 9.322ex_LSSpeed.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1868 9.323ex_LSState.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1869 9.324ex_memcmp.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1869 9.325ex_memcpy.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1869 9.326ex_memmove.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1869 9.327ex_midstr.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1869 9.328ex_motoractualspeed.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1870 9.329ex_motorblocktachocount.nxc . . . . . . . . . . . . . . . . . . . . . 1870 9.330ex_motormode.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1870 9.331ex_motoroutputoptions.nxc . . . . . . . . . . . . . . . . . . . . . . . 1870 9.332ex_motoroverload.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1870 9.333ex_motorpower.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1871 9.334ex_motorpwnfreq.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1871 9.335ex_motorregdvalue.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1871 9.336ex_motorregivalue.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1871 9.337ex_motorregpvalue.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1871 9.338ex_motorregulation.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1871 9.339ex_motorrotationcount.nxc . . . . . . . . . . . . . . . . . . . . . . . 1871 9.340ex_motorrunstate.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1872 9.341ex_motortachocount.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1872 9.342ex_motortacholimit.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1872 9.343ex_motorturnratio.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1872 9.344ex_MSADPAOff.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1872

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xlii

9.345ex_MSADPAOn.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1872 9.346ex_MSDeenergize.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1872 9.347ex_MSEnergize.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1873 9.348ex_MSIRTrain.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1873 9.349ex_MSPFComboDirect.nxc . . . . . . . . . . . . . . . . . . . . . . . 1873 9.350ex_MSPFComboPWM.nxc . . . . . . . . . . . . . . . . . . . . . . . 1873 9.351ex_MSPFRawOutput.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1873 9.352ex_MSPFRepeat.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1873 9.353ex_MSPFSingleOutputCST.nxc . . . . . . . . . . . . . . . . . . . . 1874 9.354ex_MSPFSingleOutputPWM.nxc . . . . . . . . . . . . . . . . . . . . 1874 9.355ex_MSPFSinglePin.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1874 9.356ex_MSPFTrain.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1874 9.357ex_MSRCXAbsVar.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1874 9.358ex_MSRCXAddToDatalog.nxc . . . . . . . . . . . . . . . . . . . . . 1874 9.359ex_MSRCXAndVar.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1875 9.360ex_MSRCXBatteryLevel.nxc . . . . . . . . . . . . . . . . . . . . . . 1875 9.361ex_MSRCXBoot.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1875 9.362ex_MSRCXCalibrateEvent.nxc . . . . . . . . . . . . . . . . . . . . . 1875 9.363ex_MSRCXClearAllEvents.nxc . . . . . . . . . . . . . . . . . . . . 1875 9.364ex_MSRCXClearCounter.nxc . . . . . . . . . . . . . . . . . . . . . 1875 9.365ex_MSRCXClearMsg.nxc . . . . . . . . . . . . . . . . . . . . . . . 1876 9.366ex_MSRCXClearSensor.nxc . . . . . . . . . . . . . . . . . . . . . . 1876 9.367ex_MSRCXClearSound.nxc . . . . . . . . . . . . . . . . . . . . . . 1876 9.368ex_MSRCXClearTimer.nxc . . . . . . . . . . . . . . . . . . . . . . . 1876 9.369ex_MSRCXCreateDatalog.nxc . . . . . . . . . . . . . . . . . . . . . 1876 9.370ex_MSRCXDecCounter.nxc . . . . . . . . . . . . . . . . . . . . . . 1876 9.371ex_MSRCXDeleteSub.nxc . . . . . . . . . . . . . . . . . . . . . . . 1877 9.372ex_MSRCXDeleteSubs.nxc . . . . . . . . . . . . . . . . . . . . . . . 1877 9.373ex_MSRCXDeleteTask.nxc . . . . . . . . . . . . . . . . . . . . . . . 1877 9.374ex_MSRCXDeleteTasks.nxc . . . . . . . . . . . . . . . . . . . . . . 1877 9.375ex_MSRCXDisableOutput.nxc . . . . . . . . . . . . . . . . . . . . . 1877

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xliii

9.376ex_MSRCXDivVar.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1877 9.377ex_MSRCXEnableOutput.nxc . . . . . . . . . . . . . . . . . . . . . 1878 9.378ex_MSRCXEvent.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1878 9.379ex_MSRCXFloat.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1878 9.380ex_MSRCXFwd.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1878 9.381ex_MSRCXIncCounter.nxc . . . . . . . . . . . . . . . . . . . . . . . 1878 9.382ex_MSRCXInvertOutput.nxc . . . . . . . . . . . . . . . . . . . . . . 1878 9.383ex_MSRCXMulVar.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1879 9.384ex_MSRCXMuteSound.nxc . . . . . . . . . . . . . . . . . . . . . . 1879 9.385ex_MSRCXObvertOutput.nxc . . . . . . . . . . . . . . . . . . . . . 1879 9.386ex_MSRCXOff.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1879 9.387ex_MSRCXOn.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1879 9.388ex_MSRCXOnFor.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1879 9.389ex_MSRCXOnFwd.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1880 9.390ex_MSRCXOnRev.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1880 9.391ex_MSRCXOrVar.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1880 9.392ex_MSRCXPBTurnOff.nxc . . . . . . . . . . . . . . . . . . . . . . . 1880 9.393ex_MSRCXPing.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1880 9.394ex_MSRCXPlaySound.nxc . . . . . . . . . . . . . . . . . . . . . . . 1880 9.395ex_MSRCXPlayTone.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1881 9.396ex_MSRCXPlayToneVar.nxc . . . . . . . . . . . . . . . . . . . . . . 1881 9.397ex_MSRCXPoll.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1881 9.398ex_MSRCXPollMemory.nxc . . . . . . . . . . . . . . . . . . . . . . 1881 9.399ex_MSRCXRemote.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1881 9.400ex_MSRCXReset.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1881 9.401ex_MSRCXRev.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1882 9.402ex_MSRCXSelectDisplay.nxc . . . . . . . . . . . . . . . . . . . . . 1882 9.403ex_MSRCXSelectProgram.nxc . . . . . . . . . . . . . . . . . . . . . 1882 9.404ex_MSRCXSendSerial.nxc . . . . . . . . . . . . . . . . . . . . . . . 1882 9.405ex_MSRCXSet.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1882 9.406ex_MSRCXSetDirection.nxc . . . . . . . . . . . . . . . . . . . . . . 1882

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xliv

9.407ex_MSRCXSetEvent.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1883 9.408ex_MSRCXSetGlobalDirection.nxc . . . . . . . . . . . . . . . . . . 1883 9.409ex_MSRCXSetGlobalOutput.nxc . . . . . . . . . . . . . . . . . . . . 1883 9.410ex_MSRCXSetMaxPower.nxc . . . . . . . . . . . . . . . . . . . . . 1883 9.411ex_MSRCXSetMessage.nxc . . . . . . . . . . . . . . . . . . . . . . 1883 9.412ex_MSRCXSetNRLinkPort.nxc . . . . . . . . . . . . . . . . . . . . 1883 9.413ex_MSRCXSetOutput.nxc . . . . . . . . . . . . . . . . . . . . . . . 1884 9.414ex_MSRCXSetPower.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1884 9.415ex_MSRCXSetPriority.nxc . . . . . . . . . . . . . . . . . . . . . . . 1884 9.416ex_MSRCXSetSensorMode.nxc . . . . . . . . . . . . . . . . . . . . 1884 9.417ex_MSRCXSetSensorType.nxc . . . . . . . . . . . . . . . . . . . . . 1884 9.418ex_MSRCXSetSleepTime.nxc . . . . . . . . . . . . . . . . . . . . . 1884 9.419ex_MSRCXSetTxPower.nxc . . . . . . . . . . . . . . . . . . . . . . 1885 9.420ex_MSRCXSetUserDisplay.nxc . . . . . . . . . . . . . . . . . . . . 1885 9.421ex_MSRCXSetVar.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1885 9.422ex_MSRCXSetWatch.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1885 9.423ex_MSRCXSgnVar.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1885 9.424ex_MSRCXStartTask.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1885 9.425ex_MSRCXStopAllTasks.nxc . . . . . . . . . . . . . . . . . . . . . 1886 9.426ex_MSRCXStopTask.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1886 9.427ex_MSRCXSubVar.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1886 9.428ex_MSRCXSumVar.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1886 9.429ex_MSRCXToggle.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1886 9.430ex_MSRCXUnlock.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1886 9.431ex_MSRCXUnmuteSound.nxc . . . . . . . . . . . . . . . . . . . . . 1887 9.432ex_MSReadValue.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1887 9.433ex_MSScoutCalibrateSensor.nxc . . . . . . . . . . . . . . . . . . . . 1887 9.434ex_MSScoutMuteSound.nxc . . . . . . . . . . . . . . . . . . . . . . 1887 9.435ex_MSScoutSelectSounds.nxc . . . . . . . . . . . . . . . . . . . . . 1887 9.436ex_MSScoutSendVLL.nxc . . . . . . . . . . . . . . . . . . . . . . . 1887 9.437ex_MSScoutSetCounterLimit.nxc . . . . . . . . . . . . . . . . . . . 1888

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xlv

9.438ex_MSScoutSetEventFeedback.nxc . . . . . . . . . . . . . . . . . . 1888 9.439ex_MSScoutSetLight.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1888 9.440ex_MSScoutSetScoutMode.nxc . . . . . . . . . . . . . . . . . . . . 1888 9.441ex_MSScoutSetScoutRules.nxc . . . . . . . . . . . . . . . . . . . . . 1888 9.442ex_MSScoutSetSensorClickTime.nxc . . . . . . . . . . . . . . . . . 1888 9.443ex_MSScoutSetSensorHysteresis.nxc . . . . . . . . . . . . . . . . . 1889 9.444ex_MSScoutSetSensorLowerLimit.nxc . . . . . . . . . . . . . . . . . 1889 9.445ex_MSScoutSetSensorUpperLimit.nxc . . . . . . . . . . . . . . . . . 1889 9.446ex_MSScoutSetTimerLimit.nxc . . . . . . . . . . . . . . . . . . . . 1889 9.447ex_MSScoutUnmuteSound.nxc . . . . . . . . . . . . . . . . . . . . . 1889 9.448ex_muldiv32.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1889 9.449ex_NRLink2400.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1890 9.450ex_NRLink4800.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1890 9.451ex_NRLinkFlush.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1890 9.452ex_NRLinkIRLong.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1890 9.453ex_NRLinkIRShort.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1890 9.454ex_NRLinkSetPF.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1890 9.455ex_NRLinkSetRCX.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1890 9.456ex_NRLinkSetTrain.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1891 9.457ex_NRLinkStatus.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1891 9.458ex_NRLinkTxRaw.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1891 9.459ex_NumOut.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1891 9.460ex_NumToStr.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1891 9.461ex_NXTHID.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1891 9.462ex_NXTLineLeader.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1892 9.463ex_NXTPowerMeter.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1893 9.464ex_NXTServo.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1894 9.465ex_NXTSumoEyes.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1895 9.466ex_off.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1896 9.467ex_offex.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1896 9.468ex_OnBrickProgramPointer.nxc . . . . . . . . . . . . . . . . . . . . 1896

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xlvi

9.469ex_onfwd.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1896 9.470ex_onfwdex.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1897 9.471ex_onfwdreg.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1897 9.472ex_onfwdregex.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1897 9.473ex_onfwdregexpid.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1897 9.474ex_onfwdregpid.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1897 9.475ex_onfwdsync.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1897 9.476ex_onfwdsyncex.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1898 9.477ex_onfwdsyncexpid.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1898 9.478ex_onfwdsyncpid.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1898 9.479ex_onrev.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1898 9.480ex_onrevex.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1898 9.481ex_onrevreg.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1898 9.482ex_onrevregex.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1898 9.483ex_onrevregexpid.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1899 9.484ex_onrevregpid.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1899 9.485ex_onrevsync.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1899 9.486ex_onrevsyncex.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1899 9.487ex_onrevsyncexpid.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1899 9.488ex_onrevsyncpid.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1899 9.489ex_OpenFileAppend.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1899 9.490ex_OpenFileRead.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1900 9.491ex_OpenFileReadLinear.nxc . . . . . . . . . . . . . . . . . . . . . . 1900 9.492ex_PFMate.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1900 9.493ex_PlayFile.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1900 9.494ex_PlayFileEx.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1900 9.495ex_playsound.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1901 9.496ex_PlayTone.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1901 9.497ex_PlayToneEx.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1901 9.498ex_playtones.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1901 9.499ex_PointOut.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1902

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xlvii

9.500ex_PolyOut.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1902 9.501ex_Pos.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1902 9.502ex_PosReg.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1902 9.503ex_pow.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1903 9.504ex_PowerDown.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1903 9.505ex_Precedes.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1903 9.506ex_printf.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1903 9.507ex_PSPNxAnalog.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1904 9.508ex_PSPNxDigital.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1904 9.509ex_putc.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1904 9.510ex_rand.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1904 9.511ex_Random.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1904 9.512ex_Read.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1904 9.513ex_ReadButtonEx.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1905 9.514ex_ReadBytes.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1905 9.515ex_readi2cregister.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1905 9.516ex_ReadLn.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1905 9.517ex_ReadNRLinkBytes.nxc . . . . . . . . . . . . . . . . . . . . . . . 1905 9.518ex_ReadSensorColorEx.nxc . . . . . . . . . . . . . . . . . . . . . . 1905 9.519ex_ReadSensorColorRaw.nxc . . . . . . . . . . . . . . . . . . . . . . 1906 9.520ex_ReadSensorEMeter.nxc . . . . . . . . . . . . . . . . . . . . . . . 1906 9.521ex_ReadSensorHTAccel.nxc . . . . . . . . . . . . . . . . . . . . . . 1906 9.522ex_ReadSensorHTAngle.nxc . . . . . . . . . . . . . . . . . . . . . . 1906 9.523ex_ReadSensorHTColor.nxc . . . . . . . . . . . . . . . . . . . . . . 1906 9.524ex_ReadSensorHTColor2Active.nxc . . . . . . . . . . . . . . . . . . 1907 9.525ex_ReadSensorHTIRReceiver.nxc . . . . . . . . . . . . . . . . . . . 1907 9.526ex_ReadSensorHTIRReceiverEx.nxc . . . . . . . . . . . . . . . . . . 1907 9.527ex_ReadSensorHTIRSeeker.nxc . . . . . . . . . . . . . . . . . . . . 1907 9.528ex_ReadSensorHTIRSeeker2AC.nxc . . . . . . . . . . . . . . . . . . 1907 9.529ex_ReadSensorHTIRSeeker2DC.nxc . . . . . . . . . . . . . . . . . . 1907 9.530ex_ReadSensorHTNormalizedColor.nxc . . . . . . . . . . . . . . . . 1908

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xlviii

9.531ex_ReadSensorHTNormalizedColor2Active.nxc . . . . . . . . . . . . 1908 9.532ex_ReadSensorHTRawColor.nxc . . . . . . . . . . . . . . . . . . . . 1908 9.533ex_ReadSensorHTRawColor2.nxc . . . . . . . . . . . . . . . . . . . 1908 9.534ex_ReadSensorHTTouchMultiplexer.nxc . . . . . . . . . . . . . . . . 1908 9.535ex_ReadSensorMSAccel.nxc . . . . . . . . . . . . . . . . . . . . . . 1909 9.536ex_ReadSensorMSPlayStation.nxc . . . . . . . . . . . . . . . . . . . 1909 9.537ex_ReadSensorMSRTClock.nxc . . . . . . . . . . . . . . . . . . . . 1909 9.538ex_ReadSensorMSTilt.nxc . . . . . . . . . . . . . . . . . . . . . . . 1909 9.539ex_ReadSensorUSEx.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1909 9.540ex_RebootInFirmwareMode.nxc . . . . . . . . . . . . . . . . . . . . 1910 9.541ex_ReceiveMessage.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1910 9.542ex_ReceiveRemoteBool.nxc . . . . . . . . . . . . . . . . . . . . . . 1910 9.543ex_ReceiveRemoteMessageEx.nxc . . . . . . . . . . . . . . . . . . . 1910 9.544ex_ReceiveRemoteNumber.nxc . . . . . . . . . . . . . . . . . . . . . 1910 9.545ex_ReceiveRemoteString.nxc . . . . . . . . . . . . . . . . . . . . . . 1910 9.546ex_RechargeableBattery.nxc . . . . . . . . . . . . . . . . . . . . . . 1911 9.547ex_RectOut.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1911 9.548ex_reladdressof.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1911 9.549ex_Release.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1912 9.550ex_RemoteBluetoothFactoryReset.nxc . . . . . . . . . . . . . . . . . 1912 9.551ex_RemoteCloseFile.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1912 9.552ex_RemoteConnectionIdle.nxc . . . . . . . . . . . . . . . . . . . . . 1912 9.553ex_RemoteConnectionWrite.nxc . . . . . . . . . . . . . . . . . . . . 1912 9.554ex_RemoteDatalogRead.nxc . . . . . . . . . . . . . . . . . . . . . . 1912 9.555ex_RemoteDatalogSetTimes.nxc . . . . . . . . . . . . . . . . . . . . 1913 9.556ex_RemoteDeleteFile.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1913 9.557ex_RemoteDeleteUserFlash.nxc . . . . . . . . . . . . . . . . . . . . 1913 9.558ex_RemoteFindFirstFile.nxc . . . . . . . . . . . . . . . . . . . . . . 1913 9.559ex_RemoteFindNextFile.nxc . . . . . . . . . . . . . . . . . . . . . . 1913 9.560ex_RemoteGetBatteryLevel.nxc . . . . . . . . . . . . . . . . . . . . 1913 9.561ex_RemoteGetBluetoothAddress.nxc . . . . . . . . . . . . . . . . . . 1914

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

xlix

9.562ex_RemoteGetConnectionCount.nxc . . . . . . . . . . . . . . . . . . 1914 9.563ex_RemoteGetConnectionName.nxc . . . . . . . . . . . . . . . . . . 1914 9.564ex_RemoteGetContactCount.nxc . . . . . . . . . . . . . . . . . . . . 1914 9.565ex_RemoteGetContactName.nxc . . . . . . . . . . . . . . . . . . . . 1914 9.566ex_RemoteGetCurrentProgramName.nxc . . . . . . . . . . . . . . . 1915 9.567ex_RemoteGetDeviceInfo.nxc . . . . . . . . . . . . . . . . . . . . . 1915 9.568ex_RemoteGetFirmwareVersion.nxc . . . . . . . . . . . . . . . . . . 1915 9.569ex_RemoteGetInputValues.nxc . . . . . . . . . . . . . . . . . . . . . 1915 9.570ex_RemoteGetOutputState.nxc . . . . . . . . . . . . . . . . . . . . . 1915 9.571ex_RemoteGetProperty.nxc . . . . . . . . . . . . . . . . . . . . . . . 1916 9.572ex_RemoteIOMapRead.nxc . . . . . . . . . . . . . . . . . . . . . . . 1916 9.573ex_RemoteIOMapWriteBytes.nxc . . . . . . . . . . . . . . . . . . . 1916 9.574ex_RemoteIOMapWriteValue.nxc . . . . . . . . . . . . . . . . . . . 1916 9.575ex_RemoteKeepAlive.nxc . . . . . . . . . . . . . . . . . . . . . . . 1916 9.576ex_RemoteLowspeedGetStatus.nxc . . . . . . . . . . . . . . . . . . 1917 9.577ex_RemoteLowspeedRead.nxc . . . . . . . . . . . . . . . . . . . . . 1917 9.578ex_RemoteLowspeedWrite.nxc . . . . . . . . . . . . . . . . . . . . . 1917 9.579ex_RemoteMessageRead.nxc . . . . . . . . . . . . . . . . . . . . . . 1917 9.580ex_RemoteMessageWrite.nxc . . . . . . . . . . . . . . . . . . . . . 1917 9.581ex_RemoteOpenAppendData.nxc . . . . . . . . . . . . . . . . . . . 1918 9.582ex_RemoteOpenRead.nxc . . . . . . . . . . . . . . . . . . . . . . . 1918 9.583ex_RemoteOpenWrite.nxc . . . . . . . . . . . . . . . . . . . . . . . 1918 9.584ex_RemoteOpenWriteData.nxc . . . . . . . . . . . . . . . . . . . . . 1918 9.585ex_RemoteOpenWriteLinear.nxc . . . . . . . . . . . . . . . . . . . . 1918 9.586ex_RemotePlaySoundFile.nxc . . . . . . . . . . . . . . . . . . . . . 1919 9.587ex_RemotePlayTone.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1919 9.588ex_RemotePollCommand.nxc . . . . . . . . . . . . . . . . . . . . . 1919 9.589ex_RemotePollCommandLength.nxc . . . . . . . . . . . . . . . . . . 1919 9.590ex_RemoteRead.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1919 9.591ex_RemoteRenameFile.nxc . . . . . . . . . . . . . . . . . . . . . . . 1920 9.592ex_RemoteResetMotorPosition.nxc . . . . . . . . . . . . . . . . . . 1920

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

9.593ex_RemoteResetScaledValue.nxc . . . . . . . . . . . . . . . . . . . . 1920 9.594ex_RemoteResetTachoCount.nxc . . . . . . . . . . . . . . . . . . . . 1920 9.595ex_RemoteSetBrickName.nxc . . . . . . . . . . . . . . . . . . . . . 1920 9.596ex_RemoteSetInputMode.nxc . . . . . . . . . . . . . . . . . . . . . 1920 9.597ex_RemoteSetOutputState.nxc . . . . . . . . . . . . . . . . . . . . . 1921 9.598ex_RemoteSetProperty.nxc . . . . . . . . . . . . . . . . . . . . . . . 1921 9.599ex_RemoteStartProgram.nxc . . . . . . . . . . . . . . . . . . . . . . 1921 9.600ex_RemoteStopProgram.nxc . . . . . . . . . . . . . . . . . . . . . . 1921 9.601ex_RemoteStopSound.nxc . . . . . . . . . . . . . . . . . . . . . . . 1921 9.602ex_RemoteWrite.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1921 9.603ex_remove.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1922 9.604ex_rename.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1922 9.605ex_RenameFile.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1922 9.606ex_resetalltachocounts.nxc . . . . . . . . . . . . . . . . . . . . . . . 1922 9.607ex_resetblocktachocount.nxc . . . . . . . . . . . . . . . . . . . . . . 1922 9.608ex_resetrotationcount.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1922 9.609ex_ResetScreen.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1923 9.610ex_ResetSensor.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1923 9.611ex_ResetSensorHTAngle.nxc . . . . . . . . . . . . . . . . . . . . . . 1923 9.612ex_ResetSleepTimer.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1923 9.613ex_resettachocount.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1923 9.614ex_resizele.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1923 9.615ex_ResolveHandle.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1924 9.616ex_rewind.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1924 9.617ex_RFIDInit.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1924 9.618ex_RFIDMode.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1924 9.619ex_RFIDRead.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1924 9.620ex_RFIDReadContinuous.nxc . . . . . . . . . . . . . . . . . . . . . 1924 9.621ex_RFIDReadSingle.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1925 9.622ex_RFIDStatus.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1925 9.623ex_RFIDStop.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1925

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

li

9.624ex_rightstr.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1925 9.625ex_rotatemotor.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1925 9.626ex_rotatemotorex.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1925 9.627ex_rotatemotorexpid.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1926 9.628ex_rotatemotorpid.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1926 9.629ex_RS485Receive.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1926 9.630ex_RS485Send.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1927 9.631ex_RunNRLinkMacro.nxc . . . . . . . . . . . . . . . . . . . . . . . 1928 9.632ex_SendMessage.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1928 9.633ex_SendRemoteBool.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1928 9.634ex_SendRemoteNumber.nxc . . . . . . . . . . . . . . . . . . . . . . 1928 9.635ex_SendRemoteString.nxc . . . . . . . . . . . . . . . . . . . . . . . 1929 9.636ex_SendResponseBool.nxc . . . . . . . . . . . . . . . . . . . . . . . 1929 9.637ex_SendResponseNumber.nxc . . . . . . . . . . . . . . . . . . . . . 1929 9.638ex_SendResponseString.nxc . . . . . . . . . . . . . . . . . . . . . . 1929 9.639ex_Sensor.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1929 9.640ex_SensorBoolean.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1929 9.641ex_SensorDigiPinsDirection.nxc . . . . . . . . . . . . . . . . . . . . 1930 9.642ex_SensorDigiPinsOutputLevel.nxc . . . . . . . . . . . . . . . . . . 1930 9.643ex_SensorDigiPinsStatus.nxc . . . . . . . . . . . . . . . . . . . . . . 1930 9.644ex_SensorHTColorNum.nxc . . . . . . . . . . . . . . . . . . . . . . 1930 9.645ex_SensorHTCompass.nxc . . . . . . . . . . . . . . . . . . . . . . . 1930 9.646ex_SensorHTEOPD.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1930 9.647ex_SensorHTGyro.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1931 9.648ex_SensorHTIRSeeker2ACDir.nxc . . . . . . . . . . . . . . . . . . . 1931 9.649ex_SensorHTIRSeeker2Addr.nxc . . . . . . . . . . . . . . . . . . . . 1931 9.650ex_SensorHTIRSeeker2DCDir.nxc . . . . . . . . . . . . . . . . . . . 1931 9.651ex_SensorHTIRSeekerDir.nxc . . . . . . . . . . . . . . . . . . . . . 1931 9.652ex_SensorHTMagnet.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1931 9.653ex_SensorInvalid.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1932 9.654ex_SensorMode.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1932

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

lii

9.655ex_SensorMSCompass.nxc . . . . . . . . . . . . . . . . . . . . . . . 1932 9.656ex_SensorMSDROD.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1932 9.657ex_SensorMSPressure.nxc . . . . . . . . . . . . . . . . . . . . . . . 1932 9.658ex_SensorMSPressureRaw.nxc . . . . . . . . . . . . . . . . . . . . . 1932 9.659ex_SensorNormalized.nxc . . . . . . . . . . . . . . . . . . . . . . . 1933 9.660ex_SensorRaw.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1933 9.661ex_SensorScaled.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1933 9.662ex_SensorTemperature.nxc . . . . . . . . . . . . . . . . . . . . . . . 1933 9.663ex_SensorType.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1933 9.664ex_SensorUS.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1933 9.665ex_SensorValue.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1934 9.666ex_SensorValueBool.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1934 9.667ex_SensorValueRaw.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1934 9.668ex_SetAbortFlag.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1934 9.669ex_SetACCLNxSensitivity.nxc . . . . . . . . . . . . . . . . . . . . . 1935 9.670ex_SetBatteryState.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1935 9.671ex_SetBluetoothState.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1935 9.672ex_SetBTInputBuffer.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1935 9.673ex_SetBTInputBufferInPtr.nxc . . . . . . . . . . . . . . . . . . . . . 1935 9.674ex_SetBTInputBufferOutPtr.nxc . . . . . . . . . . . . . . . . . . . . 1936 9.675ex_SetBTOutputBuffer.nxc . . . . . . . . . . . . . . . . . . . . . . . 1936 9.676ex_SetBTOutputBufferInPtr.nxc . . . . . . . . . . . . . . . . . . . . 1936 9.677ex_SetBTOutputBufferOutPtr.nxc . . . . . . . . . . . . . . . . . . . 1936 9.678ex_SetButtonLongPressCount.nxc . . . . . . . . . . . . . . . . . . . 1936 9.679ex_SetButtonLongReleaseCount.nxc . . . . . . . . . . . . . . . . . . 1936 9.680ex_SetButtonPressCount.nxc . . . . . . . . . . . . . . . . . . . . . . 1937 9.681ex_SetButtonReleaseCount.nxc . . . . . . . . . . . . . . . . . . . . . 1937 9.682ex_SetButtonShortReleaseCount.nxc . . . . . . . . . . . . . . . . . . 1937 9.683ex_SetButtonState.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1937 9.684ex_SetCommandFlags.nxc . . . . . . . . . . . . . . . . . . . . . . . 1937 9.685ex_SetCustomSensorActiveStatus.nxc . . . . . . . . . . . . . . . . . 1937

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

liii

9.686ex_SetCustomSensorPercentFullScale.nxc . . . . . . . . . . . . . . . 1938 9.687ex_SetCustomSensorZeroOffset.nxc . . . . . . . . . . . . . . . . . . 1938 9.688ex_setdisplaycontrast.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1938 9.689ex_SetDisplayDisplay.nxc . . . . . . . . . . . . . . . . . . . . . . . 1938 9.690ex_SetDisplayEraseMask.nxc . . . . . . . . . . . . . . . . . . . . . 1938 9.691ex_SetDisplayFlags.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1938 9.692ex_setdisplayfont.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1939 9.693ex_SetDisplayNormal.nxc . . . . . . . . . . . . . . . . . . . . . . . 1940 9.694ex_SetDisplayPopup.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1940 9.695ex_SetDisplayTextLinesCenterFlags.nxc . . . . . . . . . . . . . . . . 1940 9.696ex_SetDisplayUpdateMask.nxc . . . . . . . . . . . . . . . . . . . . . 1940 9.697ex_SetHSFlags.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1940 9.698ex_SetHSInputBuffer.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1941 9.699ex_SetHSInputBufferInPtr.nxc . . . . . . . . . . . . . . . . . . . . . 1941 9.700ex_SetHSInputBufferOutPtr.nxc . . . . . . . . . . . . . . . . . . . . 1941 9.701ex_sethsmode.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1941 9.702ex_SetHSOutputBuffer.nxc . . . . . . . . . . . . . . . . . . . . . . . 1941 9.703ex_SetHSOutputBufferInPtr.nxc . . . . . . . . . . . . . . . . . . . . 1941 9.704ex_SetHSOutputBufferOutPtr.nxc . . . . . . . . . . . . . . . . . . . 1942 9.705ex_SetHSSpeed.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1942 9.706ex_SetHSState.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1942 9.707ex_sethtcolor2mode.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1942 9.708ex_sethtirseeker2mode.nxc . . . . . . . . . . . . . . . . . . . . . . . 1942 9.709ex_SetInput.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1942 9.710ex_SetLongAbort.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1943 9.711ex_SetMotorPwnFreq.nxc . . . . . . . . . . . . . . . . . . . . . . . 1943 9.712ex_SetOnBrickProgramPointer.nxc . . . . . . . . . . . . . . . . . . . 1943 9.713ex_setoutput.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1944 9.714ex_SetSensor.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1944 9.715ex_setsensorboolean.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1944 9.716ex_setsensorcolorblue.nxc . . . . . . . . . . . . . . . . . . . . . . . 1944

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

liv

9.717ex_setsensorcolorfull.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1944 9.718ex_setsensorcolorgreen.nxc . . . . . . . . . . . . . . . . . . . . . . . 1944 9.719ex_setsensorcolornone.nxc . . . . . . . . . . . . . . . . . . . . . . . 1944 9.720ex_setsensorcolorred.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1945 9.721ex_SetSensorDigiPinsDirection.nxc . . . . . . . . . . . . . . . . . . 1945 9.722ex_SetSensorDigiPinsOutputLevel.nxc . . . . . . . . . . . . . . . . . 1945 9.723ex_SetSensorDigiPinsStatus.nxc . . . . . . . . . . . . . . . . . . . . 1945 9.724ex_SetSensorEMeter.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1945 9.725ex_setsensorhteopd.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1945 9.726ex_SetSensorHTGyro.nxc . . . . . . . . . . . . . . . . . . . . . . . 1946 9.727ex_SetSensorHTMagnet.nxc . . . . . . . . . . . . . . . . . . . . . . 1946 9.728ex_SetSensorLight.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1946 9.729ex_SetSensorLowspeed.nxc . . . . . . . . . . . . . . . . . . . . . . 1946 9.730ex_SetSensorMode.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1946 9.731ex_setsensormsdrod.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1946 9.732ex_setsensormspressure.nxc . . . . . . . . . . . . . . . . . . . . . . 1947 9.733ex_SetSensorSound.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1947 9.734ex_SetSensorTemperature.nxc . . . . . . . . . . . . . . . . . . . . . 1947 9.735ex_SetSensorTouch.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1947 9.736ex_SetSensorType.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1947 9.737ex_SetSensorUltrasonic.nxc . . . . . . . . . . . . . . . . . . . . . . 1947 9.738ex_setsleeptime.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1948 9.739ex_SetSleepTimeout.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1948 9.740ex_SetSleepTimer.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1948 9.741ex_SetSoundDuration.nxc . . . . . . . . . . . . . . . . . . . . . . . 1948 9.742ex_SetSoundFlags.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1948 9.743ex_SetSoundFrequency.nxc . . . . . . . . . . . . . . . . . . . . . . . 1948 9.744ex_SetSoundMode.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1949 9.745ex_SetSoundModuleState.nxc . . . . . . . . . . . . . . . . . . . . . 1949 9.746ex_SetSoundSampleRate.nxc . . . . . . . . . . . . . . . . . . . . . . 1949 9.747ex_SetSoundVolume.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1949

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

lv

9.748ex_SetUIButton.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1949 9.749ex_SetUIState.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1949 9.750ex_SetUSBInputBuffer.nxc . . . . . . . . . . . . . . . . . . . . . . . 1950 9.751ex_SetUSBInputBufferInPtr.nxc . . . . . . . . . . . . . . . . . . . . 1950 9.752ex_SetUSBInputBufferOutPtr.nxc . . . . . . . . . . . . . . . . . . . 1950 9.753ex_SetUSBOutputBuffer.nxc . . . . . . . . . . . . . . . . . . . . . . 1950 9.754ex_SetUSBOutputBufferInPtr.nxc . . . . . . . . . . . . . . . . . . . 1950 9.755ex_SetUSBOutputBufferOutPtr.nxc . . . . . . . . . . . . . . . . . . 1950 9.756ex_SetUSBPollBuffer.nxc . . . . . . . . . . . . . . . . . . . . . . . 1951 9.757ex_SetUSBPollBufferInPtr.nxc . . . . . . . . . . . . . . . . . . . . . 1951 9.758ex_SetUSBPollBufferOutPtr.nxc . . . . . . . . . . . . . . . . . . . . 1951 9.759ex_SetUsbState.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1951 9.760ex_SetVMRunState.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1951 9.761ex_SetVolume.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1951 9.762ex_sign.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1952 9.763ex_sin_cos.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1952 9.764ex_sind_cosd.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1952 9.765ex_sinh.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1953 9.766ex_SizeOf.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1953 9.767ex_SleepNow.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1954 9.768ex_sleeptime.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1954 9.769ex_SleepTimeout.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1954 9.770ex_SleepTimer.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1954 9.771ex_SoundDuration.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1954 9.772ex_SoundFlags.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1954 9.773ex_SoundFrequency.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1955 9.774ex_SoundMode.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1955 9.775ex_SoundSampleRate.nxc . . . . . . . . . . . . . . . . . . . . . . . 1955 9.776ex_SoundState.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1955 9.777ex_SoundVolume.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1955 9.778ex_sprintf.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1955

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

lvi

9.779ex_sqrt.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1956 9.780ex_StartTask.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1956 9.781ex_Stop.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1956 9.782ex_StopAllTasks.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1956 9.783ex_StopSound.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1956 9.784ex_StopTask.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1956 9.785ex_StrCat.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1957 9.786ex_StrCatOld.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1957 9.787ex_strcmp.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1957 9.788ex_strcpy.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1957 9.789ex_StrIndex.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1957 9.790ex_string.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1958 9.791ex_StrLen.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1958 9.792ex_StrLenOld.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1959 9.793ex_strncat.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1959 9.794ex_strncmp.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1959 9.795ex_strncpy.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1959 9.796ex_StrReplace.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1959 9.797ex_StrToByteArray.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1960 9.798ex_strtod.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1960 9.799ex_strtol.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1960 9.800ex_StrToNum.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1960 9.801ex_strtoul.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1960 9.802ex_SubStr.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1961 9.803ex_syscall.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1961 9.804ex_SysColorSensorRead.nxc . . . . . . . . . . . . . . . . . . . . . . 1961 9.805ex_syscommbtcheckstatus.nxc . . . . . . . . . . . . . . . . . . . . . 1962 9.806ex_syscommbtconnection.nxc . . . . . . . . . . . . . . . . . . . . . 1962 9.807ex_SysCommBTOnOff.nxc . . . . . . . . . . . . . . . . . . . . . . . 1962 9.808ex_syscommbtwrite.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1963 9.809ex_syscommexecutefunction.nxc . . . . . . . . . . . . . . . . . . . . 1963

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

lvii

9.810ex_SysCommHSCheckStatus.nxc . . . . . . . . . . . . . . . . . . . 1963 9.811ex_SysCommHSControl.nxc . . . . . . . . . . . . . . . . . . . . . . 1964 9.812ex_SysCommHSRead.nxc . . . . . . . . . . . . . . . . . . . . . . . 1964 9.813ex_SysCommHSWrite.nxc . . . . . . . . . . . . . . . . . . . . . . . 1964 9.814ex_syscommlscheckstatus.nxc . . . . . . . . . . . . . . . . . . . . . 1965 9.815ex_syscommlsread.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1965 9.816ex_syscommlswrite.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1965 9.817ex_syscommlswriteex.nxc . . . . . . . . . . . . . . . . . . . . . . . 1965 9.818ex_SysComputeCalibValue.nxc . . . . . . . . . . . . . . . . . . . . . 1966 9.819ex_sysdataloggettimes.nxc . . . . . . . . . . . . . . . . . . . . . . . 1966 9.820ex_SysDatalogWrite.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1966 9.821ex_sysdisplayexecutefunction.nxc . . . . . . . . . . . . . . . . . . . 1967 9.822ex_sysdrawcircle.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1967 9.823ex_SysDrawEllipse.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1967 9.824ex_sysdrawfont.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1968 9.825ex_sysdrawgraphic.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1968 9.826ex_sysdrawgraphicarray.nxc . . . . . . . . . . . . . . . . . . . . . . 1968 9.827ex_sysdrawline.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1969 9.828ex_sysdrawpoint.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1970 9.829ex_sysdrawpolygon.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1970 9.830ex_sysdrawrect.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1970 9.831ex_sysdrawtext.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1971 9.832ex_sysleclose.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1971 9.833ex_sysledelete.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1971 9.834ex_syslendrst.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1972 9.835ex_syslendnext.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1972 9.836ex_sysleopenappend.nxc . . . . . . . . . . . . . . . . . . . . . . . 1972 9.837ex_sysleopenread.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1972 9.838ex_sysleopenreadlinear.nxc . . . . . . . . . . . . . . . . . . . . . . 1973 9.839ex_sysleopenwrite.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1973 9.840ex_sysleopenwritelinear.nxc . . . . . . . . . . . . . . . . . . . . . . 1973

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

lviii

9.841ex_sysleopenwritenonlinear.nxc . . . . . . . . . . . . . . . . . . . . 1974 9.842ex_sysleread.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1974 9.843ex_syslerename.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1974 9.844ex_sysleresize.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1975 9.845ex_sysleresolvehandle.nxc . . . . . . . . . . . . . . . . . . . . . . 1975 9.846ex_sysleseek.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1976 9.847ex_syslewrite.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1976 9.848ex_sysgetstarttick.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1976 9.849ex_sysiomapread.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1977 9.850ex_sysiomapreadbyid.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1977 9.851ex_sysiomapwrite.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1977 9.852ex_sysiomapwritebyid.nxc . . . . . . . . . . . . . . . . . . . . . . . 1977 9.853ex_syskeepalive.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1978 9.854ex_syslistles.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1978 9.855ex_sysloaderexecutefunction.nxc . . . . . . . . . . . . . . . . . . . . 1978 9.856ex_sysmemorymanager.nxc . . . . . . . . . . . . . . . . . . . . . . . 1979 9.857ex_sysmessageread.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1979 9.858ex_sysmessagewrite.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1980 9.859ex_sysrandomnumber.nxc . . . . . . . . . . . . . . . . . . . . . . . 1980 9.860ex_sysreadbutton.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1980 9.861ex_SysReadLastResponse.nxc . . . . . . . . . . . . . . . . . . . . . 1980 9.862ex_SysReadSemData.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1981 9.863ex_syssetscreenmode.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1981 9.864ex_SysSetSleepTimeout.nxc . . . . . . . . . . . . . . . . . . . . . . 1981 9.865ex_syssoundgetstate.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1982 9.866ex_syssoundplayle.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1982 9.867ex_syssoundplaytone.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1982 9.868ex_syssoundsetstate.nxc . . . . . . . . . . . . . . . . . . . . . . . . 1982 9.869ex_SysUpdateCalibCacheInfo.nxc . . . . . . . . . . . . . . . . . . . 1983 9.870ex_SysWriteSemData.nxc . . . . . . . . . . . . . . . . . . . . . . . 1983 9.871ex_tan.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1983

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CONTENTS

lix

9.872ex_tand.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1984 9.873ex_tanh.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1985 9.874ex_TextOut.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1985 9.875ex_tolower.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1985 9.876ex_toupper.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1985 9.877ex_trunc.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1985 9.878ex_UIButton.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1986 9.879ex_UIState.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1986 9.880ex_UiUsbState.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1986 9.881ex_UnattenVar.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1986 9.882ex_USBInputBufferInPtr.nxc . . . . . . . . . . . . . . . . . . . . . . 1987 9.883ex_USBInputBufferOutPtr.nxc . . . . . . . . . . . . . . . . . . . . . 1987 9.884ex_USBOutputBufferInPtr.nxc . . . . . . . . . . . . . . . . . . . . . 1987 9.885ex_USBOutputBufferOutPtr.nxc . . . . . . . . . . . . . . . . . . . . 1987 9.886ex_USBPollBufferInPtr.nxc . . . . . . . . . . . . . . . . . . . . . . 1987 9.887ex_USBPollBufferOutPtr.nxc . . . . . . . . . . . . . . . . . . . . . . 1987 9.888ex_UsbState.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1988 9.889ex_VMRunState.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1988 9.890ex_Volume.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1988 9.891ex_wait.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1988 9.892ex_Write.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1988 9.893ex_WriteBytes.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1988 9.894ex_WriteBytesEx.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1989 9.895ex_writei2cregister.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1989 9.896ex_WriteLn.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1989 9.897ex_WriteLnString.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1989 9.898ex_writenrlinkbytes.nxc . . . . . . . . . . . . . . . . . . . . . . . . . 1989 9.899ex_WriteString.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1989 9.900ex_yield.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1990 9.901glBoxDemo.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1990 9.902glCircleDemo.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1991

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

1 NXC Programmers Guide

9.903glRotateDemo.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . 1991 9.904glScaleDemo.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1992 9.905glTranslateDemo.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . 1993 9.906util_battery_1.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1994 9.907util_battery_2.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1995 9.908util_rpm.nxc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1995

NXC Programmers Guide


March 13, 2011

by John Hansen Introduction The NXC Language

Introduction

NXC stands for Not eXactly C. It is a simple language for programming the LEGO MINDSTORMS NXT product. The NXT has a bytecode interpreter (provided by LEGO), which can be used to execute programs. The NXC compiler translates a source program into NXT bytecodes, which can then be executed on the target itself. Although the preprocessor and control structures of NXC are very similar to C, NXC is not a general-purpose programming language - there are many restrictions that stem from limitations of the NXT bytecode interpreter. Logically, NXC is dened as two separate pieces. The NXC language describes the syntax to be used in writing programs. The NXC Application Programming Interface (API) describes the system functions, constants, and macros that can be used by programs. This API is dened in a special le known as a "header le" which is, by default, automatically included when compiling a program. This document describes both the NXC language and the NXC API. In short, it provides the information needed to write NXC programs. Since there are different interfaces for NXC, this document does not describe how to use any specic NXC implementation (such as the command-line compiler or Bricx Command Center). Refer to
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3 The NXC Language

the documentation provided with the NXC tool, such as the NXC User Manual, for information specic to that implementation. For up-to-date information and documentation for NXC, visit the NXC website at http://bricxcc.sourceforge.net/nxc/.

The NXC Language

This section describes the NXC language. This includes the lexical rules used by the compiler, the structure of programs, statements and expressions, and the operation of the preprocessor. NXC is a case-sensitive language, just like C and C++, which means the identier "xYz" is not the same identier as "Xyz". Similarly, the "if" statement begins with the keyword "if" but "iF", "If", or "IF" are all just valid identiers - not keywords. Lexical Rules Program Structure Statements Expressions The Preprocessor

3.1

Lexical Rules

The lexical rules describe how NXC breaks a source le into individual tokens. This includes the way comments are written, the handling of whitespace, and valid characters for identiers. Comments Whitespace Numerical Constants String Constants Character Constants Identiers and Keywords

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.1

Lexical Rules

3.1.1

Comments

Two forms of comments are supported in NXC. The rst are traditional C comments. They begin with / and end with /. These comments are allowed to span multiple lines, but they cannot be nested.
/* this is a comment */ /* this is a two line comment */ /* another comment... /* trying to nest... ending the inner comment...*/ this text is no longer a comment! */

The second form of comments supported in NXC begins with // and continues to the end of the current line. These are sometimes known as C++ style comments.
// a single line comment

As you might guess, the compiler ignores comments. Their only purpose is to allow the programmer to document the source code. 3.1.2 Whitespace

Whitespace consists of all spaces, tabs, and newlines. It is used to separate tokens and to make a program more readable. As long as the tokens are distinguishable, adding or subtracting whitespace has no effect on the meaning of a program. For example, the following lines of code both have the same meaning:
x=2; x = 2 ;

Some of the C++ operators consist of multiple characters. In order to preserve these tokens, whitespace cannot appear within them. In the example below, the rst line uses a right shift operator (>>), but in the second line the added space causes the > symbols to be interpreted as two separate tokens and thus results in a compiler error.
x = 1 >> 4; // set x to 1 right shifted by 4 bits x = 1 > > 4; // error

3.1.3

Numerical Constants

Numerical constants may be written in either decimal or hexadecimal form. Decimal constants consist of one or more decimal digits. Decimal constants may optionally include a decimal point along with one or more decimal digits following the decimal point. Hexadecimal constants start with 0x or 0X followed by one or more hexadecimal digits.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.1

Lexical Rules

x = 10; // set x to 10 x = 0x10; // set x to 16 (10 hex) f = 10.5; // set f to 10.5

3.1.4

String Constants

String constants in NXC, just as in C, are delimited with double quote characters. NXC has a string data type that makes strings easier to use than in C. Behind the scenes, a string is automatically converted into an array of bytes, with the last byte in the array being a zero. The nal zero byte is generally referred to as the null terminator.
TextOut(0, LCD_LINE1, "testing");

3.1.5

Character Constants

Character constants in NXC are delimited with single quote characters and may contain a single ASCII character. The value of a character constant is the numeric ASCII value of the character.
char ch = a; // ch == 97

3.1.6

Identiers and Keywords

Identiers are used for variable, task, function, and subroutine names. The rst character of an identier must be an upper or lower case letter or the underscore (_). Remaining characters may be letters, numbers, and underscores. A number of tokens are reserved for use in the NXC language itself. These are called keywords and may not be used as identiers. A complete list of keywords appears below: The asm statement bool The break statement byte The case label char const The continue statement

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.1

Lexical Rules

The default label The do statement The if-else statement enum The false condition oat The for statement The goto statement The if statement The inline keyword int long mutex The priority statement The repeat statement The return statement The safecall keyword short The start statement The stop statement string Structures The sub keyword The switch statement Tasks The true condition typedef unsigned
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.1

Lexical Rules

The until statement The void keyword The while statement 3.1.6.1 const

The const keyword is used to alter a variable declaration so that the variable cannot have its value changed after it is initialized. The initialization must occur at the point of the variable declaration.
const int myConst = 23; // declare and initialize constant integer task main() { int x = myConst; // this works fine myConst++; // compiler error - you cannot modify a constants value }

3.1.6.2

enum

The enum keyword is used to create an enumerated type named name. The syntax is show below.
enum [name] {name-list} var-list;

The enumerated type consists of the elements in name-list. The var-list argument is optional, and can be used to create instances of the type along with the declaration. For example, the following code creates an enumerated type for colors:
enum ColorT {red, orange, yellow, green, blue, indigo, violet};

In the above example, the effect of the enumeration is to introduce several new constants named red, orange, yellow, etc. By default, these constants are assigned consecutive integer values starting at zero. You can change the values of those constants, as shown by the next example:
enum ColorT { red = 10, blue = 15, green };

In the above example, green has a value of 16. Once you have dened an enumerated type you can use it to declare variables just like you use any native type. Here are a few examples of using the enum keyword:
// values start from 0 and increment upward by 1 enum { ONE, TWO, THREE }; // optional equal sign with constant expression for the value enum { SMALL=10, MEDIUM=100, LARGE=1000 }; // names without equal sign increment by one from last names value enum { FRED=1, WILMA, BARNEY, BETTY }; // optional named type (like a typedef)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.1

Lexical Rules

enum TheSeasons { SPRING, SUMMER, FALL, WINTER }; // optional variable at end enum Days { saturday, // saturday = 0 by default sunday = 0x0, // sunday = 0 as well monday, // monday = 1 tuesday, // tuesday = 2 wednesday, // etc. thursday, friday } today; // Variable today has type Days Days tomorrow; task main() { TheSeasons test = FALL; today = monday; tomorrow = today+1; NumOut(0, LCD_LINE1, THREE); NumOut(0, LCD_LINE2, MEDIUM); NumOut(0, LCD_LINE3, FRED); NumOut(0, LCD_LINE4, SPRING); NumOut(0, LCD_LINE5, friday); NumOut(0, LCD_LINE6, today); NumOut(0, LCD_LINE7, test); NumOut(0, LCD_LINE8, tomorrow); Wait(SEC_5); }

3.1.6.3

typedef

A typedef declaration introduces a name that, within its scope, becomes a synonym for the type given by the type-declaration portion of the declaration.
typedef type-declaration synonym;

You can use typedef declarations to construct shorter or more meaningful names for types already dened by the language or for types that you have declared. Typedef names allow you to encapsulate implementation details that may change. A typedef declaration does not introduce a new type - it introduces a new name for an existing type. Here are a few examples of how to use the typedef keyword:
typedef char FlagType; const FlagType x; typedef char CHAR; // Character type. CHAR ch; typedef unsigned long ulong; ulong ul; // Equivalent to "unsigned long ul;"

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.2

Program Structure

3.2

Program Structure

An NXC program is composed of code blocks and variables. There are two distinct types of code blocks: tasks and functions. Each type of code block has its own unique features, but they share a common structure. The maximum number of code blocks of both tasks and functions combined is 256. Code Order Tasks Functions Variables Structures Arrays 3.2.1 Code Order

Code order has two aspects: the order in which the code appears in the source code le and the order in which it is executed at runtime. The rst will be referred to as the lexical order and the second as the runtime order. The lexical order is important to the NXC compiler, but not to the NXT brick. This means that the order in which you write your task and function denitions has no effect on the runtime order. The rules controlling runtime order are: 1. There must be a task called main and this task will always run rst. 2. The time at which any other task will run is determined by the API functions documented in Command module functions section. 3. A function will run whenever it is called from another block of code. This last rule may seem trivial, but it has important consequences when multiple tasks are running. If a task calls a function that is already in the midst of running because it was called rst by another task, unpredictable behavior and results may ensue. Tasks can share functions by treating them as shared resources and using mutexes to prevent one task from calling the function while another task is using it. The The safecall keyword keyword (see Functions) may be used to simplify the coding. The rules for lexical ordering are: 1. Any identier naming a task or function must be known to the compiler before it is used in a code block.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.2

Program Structure

2. A task or function denition makes its naming identier known to the compiler. 3. A task or function declaration also makes a naming identier known to the compiler. 4. Once a task or function is dened it cannot be redened or declared. 5. Once a task or function is declared it cannot be redeclared. Sometimes you will run into situations where is impossible or inconvenient to order the task and function denitions so the compiler knows every task or function name before it sees that name used in a code block. You can work around this by inserting task or function declarations of the form task name(); return_type name(argument_list); before the code block where the rst usage occurs. The argument_list must match the list of formal arguments given later in the functions actual denition. 3.2.2 Tasks

Since the NXT supports multi-threading, a task in NXC directly corresponds to an NXT thread. Tasks are dened using the task keyword with the syntax shown in the code sample below.
task name() { // the tasks code is placed here }

The name of the task may be any legal identier. A program must always have at least one task - named "main" - which is started whenever the program is run. The body of a task consists of a list of statements. You can start and stop tasks with the start and stop statements, which are discussed below. However, the primary mechanism for starting dependant tasks is scheduling them with either the Precedes or the Follows API function. The StopAllTasks API function stops all currently running tasks. You can also stop all tasks using the Stop function. A task can stop itself via the ExitTo function. Finally, a task will stop itself simply by reaching the end of its body. In the code sample below, the main task schedules a music task, a movement task, and a controller task before exiting and allowing these three tasks to start executing concurrently. The controller task waits ten seconds before stopping the music task, and then waits another ve seconds before stopping all tasks to end the program.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.2

Program Structure

10

task music() { while (true) { PlayTone(TONE_A4, MS_500); Wait(MS_600); } } task movement() { while (true) { OnFwd(OUT_A, Random(100)); Wait(Random(SEC_1)); } } task controller() { Wait(SEC_10); stop music; Wait(SEC_5); StopAllTasks(); } task main() { Precedes(music, movement, controller); }

3.2.3

Functions

It is often helpful to group a set of statements together into a single function, which your code can then call as needed. NXC supports functions with arguments and return values. Functions are dened using the syntax below.
[safecall] [inline] return_type name(argument_list) { // body of the function }

The return type is the type of data returned. In the C programming language, functions must specify the type of data they return. Functions that do not return data simply return void. Additional details about the keywords safecall, inline, and void can be found below. The safecall keyword The inline keyword The void keyword The argument list of a function may be empty, or may contain one or more argument denitions. An argument is dened by a type followed by a name. Commas separate
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.2

Program Structure

11

multiple arguments. All values are represented as bool, char, byte, int, short, long, unsigned int, unsigned long, oat, string, struct types, or arrays of any type. NXC supports specifying a default value for function arguments that are not struct or array types. Simply add an equal sign followed by the default value. Specifying a default value makes the argument optional when you call the function. All optional arguments must be at the end of the argument list.
int foo(int x, int y = 20) { return x*y; } task main() { NumOut(0, LCD_LINE1, foo(10)); outputs 200 NumOut(0, LCD_LINE2, foo(10, 5)); outputs 50 Wait(SEC_10); // wait 10 seconds }

NXC also supports passing arguments by value, by constant value, by reference, and by constant reference. These four modes for passing parameters into a function are discussed below. When arguments are passed by value from the calling function or task to the called function the compiler must allocate a temporary variable to hold the argument. There are no restrictions on the type of value that may be used. However, since the function is working with a copy of the actual argument, the caller will not see any changes the called function makes to the value. In the example below, the function foo attempts to set the value of its argument to 2. This is perfectly legal, but since foo is working on a copy of the original argument, the variable y from the main task remains unchanged.
void foo(int x) { x = 2; } task main() { int y = 1; // y is now equal to 1 foo(y); // y is still equal to 1! }

The second type of argument, const arg_type, is also passed by value. If the function is an inline function then arguments of this kind can sometimes be treated by the compiler as true constant values and can be evaluated at compile-time. If the function is not inline then the compiler treats the argument as if it were a constant reference, allowing you to pass either constants or variables. Being able to fully evaluate function arguments at compile-time can be important since some NXC API functions only work with true constant arguments.
void foo(const int x) { PlayTone(x, MS_500); x = 1; // error - cannot modify argument Wait(SEC_1);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.2

Program Structure

12

} task main() { int x = TONE_A4; foo(TONE_A5); // ok foo(4*TONE_A3); // expression is still constant foo(x); // x is not a constant but is okay }

The third type, arg_type &, passes arguments by reference rather than by value. This allows the called function to modify the value and have those changes be available in the calling function after the called function returns. However, only variables may be used when calling a function using arg_type & arguments:
void foo(int &x) { x = 2; } task main() { int y = 1;

// y is equal to 1

foo(y); // y is now equal to 2 foo(2); // error - only variables allowed }

The fourth type, const arg_type &, is interesting. It is also passed by reference, but with the restriction that the called function is not allowed to modify the value. Because of this restriction, the compiler is able to pass anything, not just variables, to functions using this type of argument. Due to NXT rmware restrictions, passing an argument by reference in NXC is not as optimal as it is in C. A copy of the argument is still made but the compiler will enforce the restriction that the value may not be modied inside the called function. Functions must be invoked with the correct number and type of arguments. The code example below shows several different legal and illegal calls to function foo.
void foo(int bar, const int baz) { // do something here... } task main() { int x; // declare variable x foo(1, 2); // ok foo(x, 2); // ok foo(2); // error - wrong number of arguments! }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.2

Program Structure

13

3.2.3.1

The safecall keyword

An optional keyword that can be specied prior to the return type of a function is the safecall keyword. If a function is marked as safecall then the compiler will synchronize the execution of this function across multiple threads by wrapping each call to the function in Acquire and Release calls. If a second thread tries to call a safecall function while another thread is executing it the second thread will have to wait until the function returns to the rst thread. The code example below shows how you can use the safecall keyword to make a function synchronize its execution when it is shared between multiple threads.
safecall void foo(unsigned int frequency) { PlayTone(frequency, SEC_1); Wait(SEC_1); } task task1() { while(true) { foo(TONE_A4); Yield(); } } task task2() { while(true) { foo(TONE_A5); Yield(); } task main() { Precedes(task1, task2); }

3.2.3.2

The inline keyword

You can optionally mark NXC functions as inline functions. This means that each call to the function will create another copy of the functions code. Unless used judiciously, inline functions can lead to excessive code size. If a function is not marked as inline then an actual NXT subroutine is created and the call to the function in NXC code will result in a subroutine call to the NXT subroutine. The total number of non-inline functions (aka subroutines) and tasks must not exceed 256. The code example below shows how you can use the inline keyword to make a function emit its code at the point where it is called rather than requiring a subroutine call.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.2

Program Structure

14

inline void foo(unsigned int frequency) { PlayTone(frequency, SEC_1); Wait(SEC_1); } task main() { foo(TONE_A4); foo(TONE_B4); foo(TONE_C5); foo(TONE_D5); }

In this case task main will contain 4 PlayTone calls and 4 Wait calls rather than 4 calls to the foo subroutine since it was expanded inline. 3.2.3.3 The void keyword

The void keyword allows you to dene a function that returns no data. Functions that do not return any value are sometimes referred to as procedures or subroutines. The sub keyword is an alias for void. Both of these keywords can only be used when declaring or dening a function. Unlike C you cannot use void when declaring a variable type. In NQC the void keyword was used to declare inline functions that could have arguments but could not return a value. In NXC void functions are not automatically inline as they were in NQC. To make a function inline you have to use the inline keyword prior to the function return type as described in the Functions section above. The sub keyword 3.2.3.3.1 The sub keyword returns no data. The sub keyword allows you to dene a function that

Functions that do not return any value are sometimes referred to as procedures or subroutines. The sub keyword is an alias for void. Both of these keywords can only be used when declaring or dening a function. In NQC you used this keyword to dene a true subroutine which could have no arguments and return no value. For the sake of C compatibility it is preferrable to use the void keyword if you want to dene a function that does not return a value. 3.2.4 Variables

All variables in NXC are dened using one of the types listed below:

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.2

Program Structure

15

bool byte char int short long unsigned oat mutex string Structures Arrays Variables are declared using the keyword(s) for the desired type, followed by a commaseparated list of variable names and terminated by a semicolon (;). Optionally, an initial value for each variable may be specied using an equals sign (=) after the variable name. Several examples appear below:
int x; // declare x bool y,z; // declare y and z long a=1,b; // declare a and b, initialize a to 1 float f=1.15, g; // declare f and g, initialize f int data[10]; // an array of 10 zeros in data bool flags[] = {true, true, false, false}; string msg = "hello world";

Global variables are declared at the program scope (outside of any code block). Once declared, they may be used within all tasks, functions, and subroutines. Their scope begins at declaration and ends at the end of the program. Local variables may be declared within tasks and functions. Such variables are only accessible within the code block in which they are dened. Specically, their scope begins with their declaration and ends at the end of their code block. In the case of local variables, a compound statement (a group of statements bracketed by { and }) is considered a block:
int x; // x is global

task main() { int y; // y is local to task main x = y; // ok { // begin compound statement int z; // local z declared

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.2

Program Structure

16

y = z; // ok } y = z; // error - z no longer in scope } task foo() { x = 1; // ok y = 2; // error - y is not global }

3.2.4.1

bool

In NXC the bool type is an unsigned 8-bit value. Normally you would only store a zero or one in a variable of this type but it can store values from zero to UCHAR_MAX.
bool flag=true;

3.2.4.2

byte

In NXC the byte type is an unsigned 8-bit value. This type can store values from zero to UCHAR_MAX. You can also dene an unsigned 8-bit variable using the unsigned keyword followed by the char type.
byte x=12; unsigned char b = 0xE2;

3.2.4.3

char

In NXC the char type is a signed 8-bit value. This type can store values from SCHAR_MIN to SCHAR_MAX. The char type is often used to store the ASCII value of a single character. Use Character Constants page has more details about this usage.
char ch=12; char test = A;

3.2.4.4

int

In NXC the int type is a signed 16-bit value. This type can store values from INT_MIN to INT_MAX. To declare an unsigned 16bit value you have to use the unsigned keyword followed by the int type. The range of values that can be stored in an unsigned int variable is from zero to UINT_MAX.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.2

Program Structure

17

int x = 0xfff; int y = -23; unsigned int z = 62043;

3.2.4.5

short

In NXC the short type is a signed 16-bit value. This type can store values from SHRT_MIN to SHRT_MAX. This is an alias for the int type.
short x = 0xfff; short y = -23;

3.2.4.6

long

In NXC the long type is a signed 32-bit value. This type can store values from LONG_MIN to LONG_MAX. To declare an unsigned 16-bit value you have to use the unsigned keyword followed by the int type. The range of values that can be stored in an unsigned int variable is from zero to ULONG_MAX.
long x = 2147000000; long y = -88235; unsigned long b = 0xdeadbeef;

3.2.4.7

unsigned

The unsigned keyword is used to modify the char, int, and long types in order to dene unsigned versions of these types. The unsigned types can store the full 8-, 16-, and 32-bits of data without requiring that one of the bits be used to represent the sign of the value. This doubles the range of positive values that can be stored in each of these variable types.
unsigned char uc = 0xff; unsigned int ui = 0xffff; unsigned long ul = 0xffffffff;

3.2.4.8

oat

In NXC the oat type is a 32-bit IEEE 754 single precision oating point representation. This is a binary format that occupies 32 bits (4 bytes) and its signicand has a precision of 24 bits (about 7 decimal digits). Floating point arithmetic will be slower than integer operations but if you need to easily store decimal values the oat type is your best option. The standard NXT rmware

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.2

Program Structure

18

provides the sqrt function which benets from the ability to use the oat type. In the enhanced NBC/NXC rmware there are many more native opcodes from the standard C math library which are designed to work with oats.
float pi = 3.14159; float e = 2.71828; float s2 = 1.4142;

3.2.4.9

mutex

In NXC the mutex type is a 32-bit value that is used to synchronize access to resources shared across multiple threads. For this reason there is never a reason to declare a mutex variable inside a task or a function. It is designed for global variables that all tasks or functions can Acquire or Release in order to obtain exclusive access to a resource that other tasks or functions are also trying to use.
mutex motorMutex; task t1() { while (true) { Acquire(motorMutex); // use the motor(s) protected by this mutex. Release(motorMutex); Wait(MS_500); } } task t2() { while (true) { Acquire(motorMutex); // use the motor(s) protected by this mutex. Release(motorMutex); Wait(MS_200); } } task main() { Precedes(t1, t2); }

3.2.4.10

string

In NXC the string type is provided for easily dening and manipulating strings which consist of an array of byte with a 0 or null value at the end of the array. You can write strings to the NXC mailboxes, to les, and to the LCD, for example. You can initialize string variables using constant strings. See String Constants for additional details.
string msg = "Testing"; string ff = "Fred Flintstone";

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.2

Program Structure

19

3.2.5

Structures

NXC supports user-dened aggregate types known as structs. These are declared very much like you declare structs in a C program.
struct car { string car_type; int manu_year; }; struct person { string name; int age; car vehicle; }; person myPerson;

After you have dened the structure type you can use the new type to declare a variable or nested within another structure type declaration. Members (or elds) within the struct are accessed using a dot notation.
myPerson.age = 40; anotherPerson = myPerson; fooBar.car_type = "honda"; fooBar.manu_year = anotherPerson.age;

You can assign structs of the same type but the compiler will complain if the types do not match. 3.2.6 Arrays

NXC also support arrays. Arrays are declared the same way as ordinary variables, but with an open and close bracket following the variable name.
int my_array[]; // declare an array with 0 elements

To declare arrays with more than one dimension simply add more pairs of square brackets. The maximum number of dimensions supported in NXC is 4.
bool my_array[][]; // declare a 2-dimensional array

Arrays of up to two dimensions may be initialized at the point of declaration using the following syntax:
int X[] = {1, 2, 3, 4}, Y[]={10, 10}; // 2 arrays int matrix[][] = {{1, 2, 3}, {4, 5, 6}}; string cars[] = {"honda", "ford", "chevy"};

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.2

Program Structure

20

The elements of an array are identied by their position within the array (called an index). The rst element has an index of 0, the second has index 1, and so on. For example:
my_array[0] = 123; // set first element to 123 my_array[1] = my_array[2]; // copy third into second

You may also initialize local arrays or arrays with multiple dimensions using the ArrayInit function. The following example shows how to initialize a two-dimensional array using ArrayInit. It also demonstrates some of the supported array API functions and expressions.
task main() { int myArray[][]; int myVector[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; byte fooArray[][][]; ArrayInit(myArray, myVector, 10); // 10 vectors ArrayInit(fooArray, myArray, 2); // 2 myArrays fooArray[1] = myArray; myArray[1][4] = 34; int ax[], ay[]; ArrayBuild(ax, 5, 7); ArrayBuild(ay, 2, 10, 6, 43); int axlen = ArrayLen(ax); ArraySubset(ax, ay, 1, 2); // ax = {10, 6} if (ax == ay) { // compare two arrays NumOut(0, LCD_LINE1, myArray[1][4]); } }

NXC also supports specifying an initial size for both global and local arrays. The compiler automatically generates the required code to correctly initialize the array to zeros. If an array declaration includes both a size and a set of initial values the size is ignored in favor of the specied values.
task main() { int myArray[10][10]; int myVector[10]; //ArrayInit(myVector, 0, 10); // 10 zeros in myVector //ArrayInit(myArray, myVector, 10); // 10 vectors myArray }

The calls to ArrayInit are not required since we specied the initial sizes in the preceding array declarations, which means the arrays were already initialized to all zeros. In fact, the myVector array declaration is not needed unless we have a use for myVector other than initializing myArray.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.3

Statements

21

3.3

Statements

The body of a code block (task or function) is composed of statements. Statements are terminated with a semi-colon (;), as you have seen in the example code above. Variable Declaration Assignment Control Structures The asm statement Other NXC Statements 3.3.1 Variable Declaration

Variable declaration, which has already been discussed, is one type of statement. Its purpose is to declare a local variable (with optional initialization) for use within the code block. The syntax for a variable declaration is shown below.
arg_type variables;

Here arg_type must be one of the types supported by NXC. Following the type are variable names, which must be a comma-separated list of identiers with optional initial values as shown in the code fragment below.
name[=expression]

Arrays of variables may also be declared:


int array[n][=initializer];

You can also dene variables using user-dened aggregate structure types.
struct TPerson { int age; string name; }; TPerson bob; // cannot be initialized at declaration

3.3.2

Assignment

Once declared, variables may be assigned the value of an expression using the syntax shown in the code sample below.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.3

Statements

22

variable assign_operator expression;

There are nine different assignment operators. The most basic operator, =, simply assigns the value of the expression to the variable. The other operators modify the variables value in some other way as shown in the table below. Operator = += -= = /= %= &= |= = ||= +-= >>= <<= Action Set variable to expression Add expression to variable Subtract expression from variable Multiple variable by expression Divide variable by expression Set variable to remainder after dividing by expression Bitwise AND expression into variable Bitwise OR expression into variable Bitwise exclusive OR into variable Set variable to absolute value of expression Set variable to sign (-1,+1,0) of expression Right shift variable by expression Left shift variable by expression Table 3. Operators The code sample below shows a few of the different types of operators that you can use in NXC expressions.
x = 2; // set x to 2 y = 7; // set y to 7 x += y; // x is 9, y is still 7

3.3.3

Control Structures

An NXC task or function usually contains a collection of nested control structures. There are several types described below. The compound statement The if statement The if-else statement The while statement

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.3

Statements

23

The do statement The for statement The repeat statement The switch statement The goto statement The until statement 3.3.3.1 The compound statement

The simplest control structure is a compound statement. This is a list of statements enclosed within curly braces ({ and }):
{ x = 1; y = 2; }

Although this may not seem very signicant, it plays a crucial role in building more complicated control structures. Many control structures expect a single statement as their body. By using a compound statement, the same control structure can be used to control multiple statements. 3.3.3.2 The if statement

The if statement evaluates a condition. If the condition is true, it executes one statement (the consequence). The value of a condition is considered to be false only when it evaluates to zero. If it evaluates to any non-zero value, it is true. The syntax for an if statement is shown below.
if (condition) consequence

The condition of an if-statement must be enclosed in parentheses, as shown in the code sample below. The compound statement in the last example allows two statements to execute as a consequence of the condition being true.
if (x==1) y = 2; if (x==1) { y = 1; z = 2; }

3.3.3.3

The if-else statement

The if-else statement evaluates a condition.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.3

Statements

24

If the condition is true, it executes one statement (the consequence). A second statement (the alternative), preceded by the keyword else, is executed if the condition is false. The value of a condition is considered to be false only when it evaluates to zero. If it evaluates to any non-zero value, it is true. The syntax for an if-else statement is shown below.
if (condition) consequence else alternative

The condition of an if-statement must be enclosed in parentheses, as shown in the code sample below. The compound statement in the last example allows two statements to execute as a consequence of the condition being true as well as two which execute when the condition is false.
if (x==1) y = 3; else y = 4; if (x==1) { y = 1; z = 2; } else { y = 3; z = 5; }

3.3.3.4

The while statement

The while statement is used to construct a conditional loop. The condition is evaluated, and if true the body of the loop is executed, then the condition is tested again. This process continues until the condition becomes false (or a break statement is executed). The syntax for a while loop appears in the code fragment below.
while (condition) body

Because the body of a while statement must be a single statement, it is very common to use a compound statement as the body. The sample below illustrates this usage pattern.
while(x < 10) { x = x+1; y = y*2; }

3.3.3.5

The do statement

A variant of the while loop is the do-while loop. The syntax for this control structure is shown below.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.3

Statements

25

do body while (condition)

The difference between a while loop and a do-while loop is that the do-while loop always executes the body at least once, whereas the while loop may not execute it at all.
do { x = x+1; y = y*2; } while(x < 10);

3.3.3.6

The for statement

Another kind of loop is the for loop. This type of loop allows automatic initialization and incrmementation of a counter variable. It uses the syntax shown below.
for(statement1 ; condition ; statement2) body

A for loop always executes statement1, and then it repeatedly checks the condition. While the condition remains true, it executes the body followed by statement2. The for loop is equivalent to the code shown below.
statement1; while(condition) { body statement2; }

Frequently, statement1 sets a loop counter variable to its starting value. The condition is generally a relational statement that checks the counter variable against a termination value, and statement2 increments or decrements the counter value. Here is an example of how to use the for loop:
for (int i=0; i<8; i++) { NumOut(0, LCD_LINE1-i*8, i); }

3.3.3.7

The repeat statement

The repeat statement executes a loop a specied number of times. This control structure is not included in the set of Standard C looping constructs. NXC inherits this statement from NQC. The syntax is shown below.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.3

Statements

26

repeat (expression) body

The expression determines how many times the body will be executed. Note: the expression following the repeat keyword is evaluated a single time and then the body is repeated that number of times. This is different from both the while and do-while loops which evaluate their condition each time through the loop. Here is an example of how to use the repeat loop:
int i=0; repeat (8) { NumOut(0, LCD_LINE1-i*8, i++); }

3.3.3.8

The switch statement

A switch statement executes one of several different code sections depending on the value of an expression. One or more case labels precede each code section. Each case must be a constant and unique within the switch statement. The switch statement evaluates the expression, and then looks for a matching case label. It will execute any statements following the matching case until either a break statement or the end of the switch is reached. A single default label may also be used - it will match any value not already appearing in a case label. A switch statement uses the syntax shown below.
switch (expression) body

Additional information about the case and default labels and the break statement can be found below. The case label The default label The break statement A typical switch statement might look like this:
switch(x) { case 1: // do something when x is 1 break; case 2: case 3: // do something else when x is 2 or 3 break; default: // do this when x is not 1, 2, or 3 break; }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.3

Statements

27

NXC also supports using string types in the switch expression and constant strings in case labels. 3.3.3.8.1 itself. The case label The case label in a switch statement is not a statement in

It is a label that precedes a list of statements. Multiple case labels can precede the same statement. The case label has the syntax shown below.
case constant_expression :

The switch statement page contains an example of how to use the case label. 3.3.3.8.2 The default label The default label in a switch statement is not a statement in itself. It is a label that precedes a list of statements. There can be only one default label within a switch statement. The default label has the syntax shown below.
default :

The switch statement page contains an example of how to use the default label. 3.3.3.9 The goto statement

The goto statement forces a program to jump to the specied location. Statements in a program can be labeled by preceding them with an identier and a colon. A goto statement then species the label that the program should jump to. You can only branch to a label within the current function or task, not from one function or task to another. Here is an example of an innite loop that increments a variable:
my_loop: x++; goto my_loop;

The goto statement should be used sparingly and cautiously. In almost every case, control structures such as if, while, and switch make a program much more readable and maintainable than using goto. 3.3.3.10 The until statement

NXC also denes an until macro for compatibility with NQC. This construct provides a convenient alternative to the while loop. The actual denition of until is shown below.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.3

Statements

28

#define until(c)

while(!(c))

In other words, until will continue looping until the condition becomes true. It is most often used in conjunction with an empty body statement or a body which simply yields to other tasks:
until(EVENT_OCCURS); // wait for some event to occur

3.3.4

The asm statement

The asm statement is used to dene many of the NXC API calls. The syntax of the statement is shown below.
asm { one or more lines of NBC assembly language }

The statement simply emits the body of the statement as NeXT Byte Codes (NBC) code and passes it directly to the NBC compilers backend. The asm statement can often be used to optimize code so that it executes as fast as possible on the NXT rmware. The following example shows an asm block containing variable declarations, labels, and basic NBC statements as well as comments.
asm { //

jmp __lbl00D5 dseg segment sl0000 slong sl0005 slong bGTTrue byte dseg ends mov sl0000, 0x0 mov sl0005, sl0000 mov sl0000, 0x1 cmp GT, bGTTrue, sl0005, sl0000 set bGTTrue, FALSE brtst EQ, __lbl00D5, bGTTrue __lbl00D5:

A few NXC keywords have meaning only within an asm statement. These keywords provide a means for returning string or scalar values from asm statements and for using temporary variables of byte, word, long, and oat types.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.3

Statements

29

ASM Keyword __RETURN__, __RETURNS__ __RETURNU__ __RETURNF__ __RETVAL__ __GENRETVAL__ __URETVAL__ __STRRETVAL__ __FLTRETVAL__ __STRBUFFER__

__STRTMPBUFFER__ __TMPBYTE__ __TMPWORD__ __TMPLONG__ __TMPULONG__ __TMPFLOAT__ __I__ __J__ __IncI__ __IncJ__ __DecI__ __DecJ__ __ResetI__ __ResetJ__ __THREADNAME__ __LINE__ __FILE__ __VER__

Meaning Used to return a signed value other than __RETVAL__ or __STRRETVAL__ Used to return an unsigned value. Used to return a oating point value. Writing to this 4-byte signed value returns it to the calling program Writing to this generic value returns it to the calling program Writing to this 4-byte unsigned value returns it to the calling program Writing to this string value returns it to the calling program Writing to this 4-byte oating point value returns it to the calling program This is primary string buffer which can be used to store intermediate string values. This is a secondary string buffer. Use this temporary variable to write and return single byte signed values Use this temporary variable to write and return 2-byte signed values Use this temporary variable to write and return 4-byte signed values Use this temporary variable to write and return 4-byte unsigned values Use this temporary variable to write and return 4-byte oating point values A local counter variable A second local counter variable Increment the local counter variable named I Increment the local counter variable named J Decrement the local counter variable named I Deccrement the local counter variable named J Reset the local counter variable named I to zero Reset the local counter variable named J to zero The current thread name The current line number The current le name The product version number

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.3

Statements

30

Table 4. ASM Keywords The asm block statement and these special ASM keywords are used throughout the NXC API. You can have a look at the NXCDefs.h header le for several examples of how they are used. To keep the main NXC code as "C-like" as possible and for the sake of better readability NXC asm block statements can be wrapped in preprocessor macros and placed in custom header les which are included using #include. The following example demonstrates using a macro wrapper around an asm block.
#define SetMotorSpeed(port, cc, thresh, fast, slow) \ asm { \ set theSpeed, fast \ brcmp cc, EndIfOut__I__, SV, thresh \ set theSpeed, slow \ EndIfOut__I__: \ OnFwd(port, theSpeed) \ __IncI__ \ }

3.3.5

Other NXC Statements

NXC supports a few other statement types. The other NXC statements are described below. The function call statement The start statement The stop statement The priority statement The break statement The continue statement The return statement Many expressions are not legal statements. A notable exception are expressions using increment (++) or decrement (--) operators.
x++;

The empty statement (just a bare semicolon) is also a legal statement. 3.3.5.1 The function call statement

A function call can also be a statement of the following form:

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.3

Statements

31

name(arguments);

The arguments list is a comma-separated list of expressions. The number and type of arguments supplied must match the denition of the function itself. Optionally, the return value may be assigned to a variable. 3.3.5.2 The start statement

You can start a task with the start statement. This statement can be used with both the standard and enhanced NBC/NXC rmwares. The resulting operation is a native opcode in the enhanced rmware but it requires special compiler-generated subroutines in order to work with the standard rmware.
start task_name;

3.3.5.3

The stop statement

You can stop a task with the stop statement. The stop statement is only supported if you are running the enhanced NBC/NXC rmware on your NXT.
stop task_name;

3.3.5.4

The priority statement

You can adjust the priority of a task using the priority statement. Setting task priorities also requires the enhanced NBC/NXC rmware. A tasks priority is simply the number of operations it will try to execute before yielding to another task. This usually is 20 operations.
priority task_name, new_priority;

3.3.5.5

The break statement

Within loops (such as a while loop) you can use the break statement to exit the loop immediately. It only exits out of the innermost loop
break;

The break statement is also a critical component of most switch statements. It prevents code in subsequent code sections from being executed, which is usually a programmers intent, by immediately exiting the switch statement. Missing break statements in a switch are a frequent source of hard-to-nd bugs.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.4

Expressions

32

Here is an example of how to use the break statement:


while (x<100) { x = get_new_x(); if (button_pressed()) break; process(x); }

3.3.5.6

The continue statement

Within loops you can use the continue statement to skip to the top of the next iteration of the loop without executing any of the code in the loop that follows the continue statement.
continue;

Here is an example of how to use the continue statement:


while (x<100) { ch = get_char(); if (ch != s) continue; process(ch); }

3.3.5.7

The return statement

If you want a function to return a value or to return before it reaches the end of its code, use a return statement. An expression may optionally follow the return keyword and, when present, is the value returned by the function. The type of the expression must be compatible with the return type of the function.
return [expression];

3.4

Expressions

Values are the most primitive type of expressions. More complicated expressions are formed from values using various operators. Numerical constants in the NXT are represented as integers or oating point values. The type depends on the value of the constant. NXC internally uses 32 bit oating point math for constant expression evaluation. Numeric constants are written as either decimal (e.g. 123, 3.14) or hexadecimal (e.g. 0xABC). Presently, there is very

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.4

Expressions

33

little range checking on constants, so using a value larger than expected may produce unusual results. Two special values are predened: true and false. The value of false is zero (0), while the value of true is one (1). The same values hold for relational operators (e.g. <): when the relation is false the value is 0, otherwise the value is 1. Values may be combined using operators. NXC operators are listed here in order of precedence from highest to lowest.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.4

Expressions

34

Operator abs() sign() ++, --

++, --

! , /, %

+, <<, >> <, >, <=, >= ==, != &

| && || ?:

Description Absolute value Sign of operand Postx increment/decrement Prex increment/decrement Unary minus Bitwise negation (unary) Logical negation Multiplication, division, modulus Addition, subtraction Bitwise shift left and right relational operators equal to, not equal to Bitwise AND Bitwise exclusive OR Bitwise inclusive OR Logical AND Logical OR Ternary conditional value

Associativity n/a n/a left

Restriction

Example abs(x) sign(x)

variables only

x++

right

variables only

++x

right right

-x 123

right left

!x xy

left left left left left left left left left right

x+y x << 4 x<y x == 1 x&y xy x|y x && y x || y x==1 ? y : z

Table 5. Expression Operators Where needed, parentheses are used to change the order of evaluation:
x = 2 + 3 * 4; // set x to 14 y = (2 + 3) * 4; // set y to 20

Conditions
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.4

Expressions

35

3.4.1

Conditions

Comparing two expressions forms a condition. A condition may be negated with the logical negation operator, or two conditions combined with the logical AND and logical OR operators. Like most modern computer languages, NXC supports something called "short-circuit" evaluation of conditions. This means that if the entire value of the conditional can be logically determined by only evaluating the left hand term of the condition, then the right hand term will not be evaluated. The table below summarizes the different types of conditions. Condition Expr Expr1 == expr2 Expr1 != expr2 Expr1 < expr2 Expr1 <= expr2 Expr1 > expr2 Expr1 >= expr2 ! condition Cond1 && cond2 Cond1 || cond2 Meaning true if expr is not equal to 0 true if expr1 equals expr2 true if expr1 is not equal to expr2 true if one expr1 is less than expr2 true if expr1 is less than or equal to expr2 true if expr1 is greater than expr2 true if expr1 is greater than or equal to expr2 logical negation of a condition - true if condition is false logical AND of two conditions (true if and only if both conditions are true) logical OR of two conditions (true if and only if at least one of the conditions are true) Table 6. Conditions There are also two special constant conditions which can be used anywhere that the above conditions are allowed. They are listed below. The true condition The false condition You can use conditions in NXC control structures, such as the if-statement and the while or until statements, to specify exactly how you want your program to behave. 3.4.1.1 The true condition

The keyword true has a value of one. It represents a condition that is always true.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.5

The Preprocessor

36

3.4.1.2

The false condition

The keyword false has a value of zero. It represents a condition that is always false.

3.5

The Preprocessor

NXC also includes a preprocessor that is modeled after the Standard C preprocessor. The C preprocessor processes a source code le before the compiler does. It handles such tasks as including code from other les, conditionally including or excluding blocks of code, stripping comments, dening simple and parameterized macros, and expanding macros wherever they are encountered in the source code. The NXC preprocessor implements the following standard preprocessor directives: #include, #dene, #ifdef, #ifndef, #endif, #if, #elif, #undef, ##, #line, #error, and #pragma. It also supports two non-standard directives: #download and #import. Its implementation is close to a standard C preprocessors, so most preprocessor directives should work as C programmers expect in NXC. Any signicant deviations are explained below. include dene ## (Concatenation) Conditional Compilation import download 3.5.1 #include

The #include command works as in Standard C, with the caveat that the lename must be enclosed in double quotes. There is no notion of a system include path, so enclosing a lename in angle brackets is forbidden.
#include "foo.h" // ok #include <foo.h> // error!

NXC programs can begin with #include "NXCDefs.h" but they dont need to. This standard header le includes many important constants and macros, which form the core NXC API. NXC no longer require that you manually include the NXCDefs.h header le. Unless you specically tell the compiler to ignore the standard system les, this header le is included automatically.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.5

The Preprocessor

37

3.5.2

#dene

The #dene command is used for macro substitution. Redenition of a macro will result in a compiler warning. Macros are normally restricted to one line because the newline character at the end of the line acts as a terminator. However, you can write multiline macros by instructing the preprocessor to ignore the newline character. This is accomplished by escaping the newline character with a backslash (\). The backslash character must be the very last character in the line or it will not extend the macro denition to the next line. The code sample below shows how to write a multi-line preprocessor macro.
#define foo(x) do { bar(x); \\ baz(x); } while(false)

The #undef directive may be used to remove a macros denition. 3.5.3 ## (Concatenation)

The ## directive works similar to the C preprocessor. It is replaced by nothing, which causes tokens on either side to be concatenated together. Because it acts as a separator initially, it can be used within macro functions to produce identiers via combination with parameter values.
#define ELEMENT_OUT(n) \ NumOut(0, LCD_LINE##n, b##n) bool b1 = false; bool b2 = true; task main() { ELEMENT_OUT(1); ELEMENT_OUT(2); Wait(SEC_2); }

This is the same as writing


bool b1 = false; bool b2 = true; task main() { NumOut(0, LCD_LINE1, b1); NumOut(0, LCD_LINE2, b2); Wait(SEC_2); }

3.5.4

Conditional Compilation

Conditional compilation works similar to the C preprocessors conditional compilation.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

3.5

The Preprocessor

38

The following preprocessor directives may be used: Directive #ifdef symbol #ifndef symbol #else #endif #if condition #elif Meaning If symbol is dened then compile the following code If symbol is not dened then compile the following code Switch from compiling to not compiling and vice versa Return to previous compiling state If the condition evaluates to true then compile the following code Same as #else but used with #if Table 7. Conditional compilation directives See the NXTDefs.h and NXCDefs.h header les for many examples of how to use conditional compilation. 3.5.5 #import

The #import directive lets you dene a global byte array variable in your NXC program that contains the contents of the imported le. Like #include, this directive is followed by a lename enclosed in double quote characters. Following the lename you may optionally include a format string for constructing the name of the variable you want to dene using this directive.
#import "myfile.txt" data

By default, the format string is s which means that the name of the le without any le extension will be the name of the variable. For instance, if the format string "data" were not specied in the example above, then the name of the byte array variable would be "myle". In this case the name of the byte array variable will be "data". The #import directive is often used in conjunction with the GraphicArrayOut and GraphicArrayOutEx API functions. 3.5.6 #download

The #download directive works in conjunction with the compilers built-in download capability. It lets you tell the compiler to download a specied auxiliary le in addition to the .rxe le produced from your source code. If the le extension matches a type of source code that the compiler knows how to compile (such as .rs or .nbc) then the compiler will rst compile the source before downloading the resulting binary. The name of the le to
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

4 Todo List

39

download (and optionally compile) is enclosed in double quote characters immediately following this directive. If the compiler is only told to compile the original source code then the #download directive is ignored.
#download "myfile.rs" #download "mypicture.ric"

Todo List

Global <globalScope>::StopSound() ?.

Global <globalScope>::SysComputeCalibValue(ComputeCalibValueType &args) gure out what this function is intended for

Global <globalScope>::SysDatalogGetTimes(DatalogGetTimesType &args) gure out what this function is intended for

Global <globalScope>::SysDatalogWrite(DatalogWriteType &args) gure out what this function is intended for

Global <globalScope>::SysUpdateCalibCacheInfo(UpdateCalibCacheInfoType &args) gure out what this function is intended for

Global CommHSControlType::Result values?

Global ComputeCalibValueType::Name ?.

Global ComputeCalibValueType::RawVal ?.

Global ComputeCalibValueType::Result ?.

Global UpdateCalibCacheInfoType::Name ?.

Global UpdateCalibCacheInfoType::Result ?.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

5 Deprecated List

40

Deprecated List

Global <globalScope>::Acos(_X) Use acos() instead.

Global <globalScope>::AcosD(_X) Use acosd() instead.

Global <globalScope>::Asin(_X) Use asin() instead.

Global <globalScope>::AsinD(_X) Use asind() instead.

Global <globalScope>::Atan(_X) Use atan() instead.

Global <globalScope>::Atan2(_Y, _X) Use atan2() instead.

Global <globalScope>::Atan2D(_Y, _X) Use atan2d() instead.

Global <globalScope>::AtanD(_X) Use atand() instead.

Global <globalScope>::Ceil(_X) Use ceil() instead.

Global <globalScope>::Cos(_X) Use cos() instead.

Global <globalScope>::CosD(_X) Use cosd() instead.

Global <globalScope>::Cosh(_X) Use cosh() instead.

Global <globalScope>::CoshD(_X) Use coshd() instead.

Global <globalScope>::Exp(_X) Use exp() instead.

Global <globalScope>::Floor(_X) Use oor() instead.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

5 Deprecated List

41

Global <globalScope>::Frac(_X) Use frac() instead.

Global <globalScope>::Log(_X) Use log() instead.

Global <globalScope>::Log10(_X) Use log10() instead.

Global <globalScope>::MulDiv32(_A, _B, _C) Use muldiv32() instead.

Global <globalScope>::Pow(_Base, _Exponent) Use pow() instead.

Global <globalScope>::Sin(_X) Use sin() instead.

Global <globalScope>::SinD(_X) Use sind() instead.

Global <globalScope>::Sinh(_X) Use sinh() instead.

Global <globalScope>::SinhD(_X) Use sinhd() instead.

Global <globalScope>::Sqrt(_X) Use sqrt() instead.

Global <globalScope>::Tan(_X) Use tan() instead.

Global <globalScope>::TanD(_X) Use tand() instead.

Global <globalScope>::Tanh(_X) Use tanh() instead.

Global <globalScope>::TanhD(_X) Use tanhd() instead.

Global <globalScope>::Trunc(_X) Use trunc() instead.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6 Module Documentation

42

6
6.1

Module Documentation
NXT Firmware Modules

Documentation common to all NXT rmware modules. Modules Input module


Constants and functions related to the Input module.

Output module
Constants and functions related to the Output module.

Display module
Constants and functions related to the Display module.

Sound module
Constants and functions related to the Sound module.

Low Speed module


Constants and functions related to the Low Speed module.

Command module
Constants and functions related to the Command module.

IOCtrl module
Constants and functions related to the IOCtrl module.

Comm module
Constants and functions related to the Comm module.

Button module
Constants and functions related to the Button module.

Ui module
Constants and functions related to the Ui module.

Loader module
Constants and functions related to the Loader module.

NXT rmware module names


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.2

Input module

43

Constant string names for all the NXT rmware modules.

NXT rmware module IDs


Constant numeric IDs for all the NXT rmware modules.

6.1.1

Detailed Description

Documentation common to all NXT rmware modules.

6.2

Input module

Constants and functions related to the Input module. Modules Input module types
Types used by various input module functions.

Input module functions


Functions for accessing and modifying input module features.

Input module constants


Constants that are part of the NXT rmwares Input module.

6.2.1

Detailed Description

Constants and functions related to the Input module. The NXT input module encompasses all sensor inputs except for digital I2C (LowSpeed) sensors. There are four sensors, which internally are numbered 0, 1, 2, and 3. This is potentially confusing since they are externally labeled on the NXT as sensors 1, 2, 3, and 4. To help mitigate this confusion, the sensor port names S1, S2, S3, and S4 have been dened. See Input port constants. These sensor names may be used in any function that requires a sensor port as an argument. Alternatively, the NBC port name constants IN_1, IN_2, IN_3, and IN_4 may also be used when a sensor port is required, although this is not recommended. See NBC Input port constants. Sensor value names SENSOR_1, SENSOR_2, SENSOR_3, and SENSOR_4 have also been dened. These names may also be used whenever a program wishes to read the current value of the analog sensor:
x = SENSOR_1; // read sensor and store value in x

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.3

Input module constants

44

6.3

Input module constants

Constants that are part of the NXT rmwares Input module. Modules Input port constants
Input port constants are used when calling NXC sensor control API functions.

NBC Input port constants


Input port constants are used when calling sensor control API functions.

Input eld constants


Constants for use with SetInput() and GetInput().

Input port digital pin constants


Constants for use when directly controlling or reading a ports digital pin state.

Color sensor array indices


Constants for use with color sensor value arrays to index RGB and blank return values.

Color values
Constants for use with the ColorValue returned by the color sensor in full color mode.

Color calibration state constants


Constants for use with the color calibration state function.

Color calibration constants


Constants for use with the color calibration functions.

Input module IOMAP offsets


Constant offsets into the Input module IOMAP structure.

Sensor types and modes


Constants that are used for dening sensor types and modes.

Denes #dene INPUT_CUSTOMINACTIVE 0x00 #dene INPUT_CUSTOM9V 0x01 #dene INPUT_CUSTOMACTIVE 0x02 #dene INPUT_INVALID_DATA 0x01

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.4

Sensor types and modes

45

6.3.1

Detailed Description

Constants that are part of the NXT rmwares Input module. 6.3.2 6.3.2.1 Dene Documentation #dene INPUT_CUSTOM9V 0x01 Custom sensor 9V 6.3.2.2 #dene INPUT_CUSTOMACTIVE 0x02 Custom sensor active 6.3.2.3 #dene INPUT_CUSTOMINACTIVE 0x00 Custom sensor inactive 6.3.2.4 #dene INPUT_INVALID_DATA 0x01 Invalid data ag

6.4

Sensor types and modes

Constants that are used for dening sensor types and modes. Modules Sensor type constants
Use sensor type constants to congure an input port for a specic type of sensor.

Sensor mode constants


Use sensor mode constants to congure an input port for the desired sensor mode.

Combined sensor type and mode constants


Use the combined sensor type and mode constants to congure both the sensor mode and type in a single function call.

NBC sensor type constants


Use sensor type constants to congure an input port for a specic type of sensor.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.4

Sensor types and modes

46

NBC sensor mode constants


Use sensor mode constants to congure an input port for the desired sensor mode.

6.4.1

Detailed Description

Constants that are used for dening sensor types and modes. The sensor ports on the NXT are capable of interfacing to a variety of different sensors. It is up to the program to tell the NXT what kind of sensor is attached to each port. Calling SetSensorType congures a sensors type. There are 16 sensor types, each corresponding to a specic type of LEGO RCX or NXT sensor. Two of these types are for NXT I2C digital sensors, either 9V powered or unpowered, and a third is used to congure port S4 as a high-speed RS-485 serial port. A seventeenth type (SENSOR_TYPE_CUSTOM) is for use with custom analog sensors. And an eighteenth type (SENSOR_TYPE_NONE) is used to indicate that no sensor has been congured, effectively turning off the specied port. In general, a program should congure the type to match the actual sensor. If a sensor port is congured as the wrong type, the NXT may not be able to read it accurately. Use either the Sensor type constants or the NBC sensor type constants. The NXT allows a sensor to be congured in different modes. The sensor mode determines how a sensors raw value is processed. Some modes only make sense for certain types of sensors, for example SENSOR_MODE_ROTATION is useful only with rotation sensors. Call SetSensorMode to set the sensor mode. The possible modes are shown below. Use either the Sensor mode constants or the NBC sensor mode constants. When using the NXT, it is common to set both the type and mode at the same time. The SetSensor function makes this process a little easier by providing a single function to call and a set of standard type/mode combinations. Use the Combined sensor type and mode constants. The NXT provides a boolean conversion for all sensors - not just touch sensors. This boolean conversion is normally based on preset thresholds for the raw value. A "low" value (less than 460) is a boolean value of 1. A high value (greater than 562) is a boolean value of 0. This conversion can be modied: a slope value between 0 and 31 may be added to a sensors mode when calling SetSensorMode. If the sensors value changes more than the slope value during a certain time (3ms), then the sensors boolean state will change. This allows the boolean state to reect rapid changes in the raw value. A rapid increase will result in a boolean value of 0, a rapid decrease is a boolean value of 1. Even when a sensor is congured for some other mode (i.e. SENSOR_MODE_PERCENT), the boolean conversion will still be carried out.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.5

Output module

47

6.5

Output module

Constants and functions related to the Output module. Modules Output module types
Types used by various output module functions.

Output module functions


Functions for accessing and modifying output module features.

Output module constants


Constants that are part of the NXT rmwares Output module.

6.5.1

Detailed Description

Constants and functions related to the Output module. The NXT output module encompasses all the motor outputs. Nearly all of the NXC API functions dealing with outputs take either a single output or a set of outputs as their rst argument. Depending on the function call, the output or set of outputs may be a constant or a variable containing an appropriate output port value. The constants OUT_A, OUT_B, and OUT_C are used to identify the three outputs. Unlike NQC, adding individual outputs together does not combine multiple outputs. Instead, the NXC API provides predened combinations of outputs: OUT_AB, OUT_AC, OUT_BC, and OUT_ABC. Manually combining outputs involves creating an array and adding two or more of the three individual output constants to the array. Output power levels can range 0 (lowest) to 100 (highest). Negative power levels reverse the direction of rotation (i.e., forward at a power level of -100 actually means reverse at a power level of 100). The outputs each have several elds that dene the current state of the output port. These elds are dened in the Output eld constants section.

6.6

Output module constants

Constants that are part of the NXT rmwares Output module. Modules Output port constants
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.6

Output module constants

48

Output port constants are used when calling motor control API functions.

PID constants
PID constants are for adjusting the Proportional, Integral, and Derivative motor controller parameters.

Output port update ag constants


Use these constants to specify which motor values need to be updated.

Tachometer counter reset ags


Use these constants to specify which of the three tachometer counters should be reset.

Output port mode constants


Use these constants to congure the desired mode for the specied motor(s): coast, motoron, brake, or regulated.

Output port option constants


Use these constants to congure the desired options for the specied motor(s): hold at limit and ramp down to limit.

Output regulation option constants


Use these constants to congure the desired options for position regulation.

Output port run state constants


Use these constants to congure the desired run state for the specied motor(s): idle, rampup, running, rampdown, or hold.

Output port regulation mode constants


Use these constants to congure the desired regulation mode for the specied motor(s): none, speed regulation, multi-motor synchronization, or position regulation (requires the enhanced NBC/NXC rmware version 1.31+).

Output eld constants


Constants for use with SetOutput() and GetOutput().

Output module IOMAP offsets


Constant offsets into the Output module IOMAP structure.

6.6.1

Detailed Description

Constants that are part of the NXT rmwares Output module.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.7

Command module

49

6.7

Command module

Constants and functions related to the Command module. Modules Command module types
Types used by various Command module functions.

Command module functions


Functions for accessing and modifying Command module features.

Command module constants


Constants that are part of the NXT rmwares Command module.

6.7.1

Detailed Description

Constants and functions related to the Command module. The NXT command module encompasses support for the execution of user programs via the NXT virtual machine. It also implements the direct command protocol support that enables the NXT to respond to USB or Bluetooth requests from other devices such as a PC or another NXT brick.

6.8

Command module constants

Constants that are part of the NXT rmwares Command module. Modules Array operation constants
Constants for use with the NXC ArrayOp function and the NBC arrop statement.

System Call function constants


Constants for use in the SysCall() function or NBC syscall statement.

Time constants
Constants for use with the Wait() function.

VM state constants
Constants dening possible VM states.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.8

Command module constants

50

Fatal errors
Constants dening various fatal error conditions.

General errors
Constants dening general error conditions.

Communications specic errors


Constants dening communication error conditions.

Remote control (direct commands) errors


Constants dening errors that can occur during remote control (RC) direct command operations.

Program status constants


Constants dening various states of the command module virtual machine.

Command module IOMAP offsets


Constant offsets into the Command module IOMAP structure.

Denes 6.8.1 #dene STAT_MSG_EMPTY_MAILBOX 64 #dene STAT_COMM_PENDING 32 #dene POOL_MAX_SIZE 32768 #dene NO_ERR 0 Detailed Description

Constants that are part of the NXT rmwares Command module. 6.8.2 6.8.2.1 Dene Documentation #dene NO_ERR 0 Successful execution of the specied command Examples: ex_SysColorSensorRead.nxc, ex_syscommbtconnection.nxc, ex_SysCommBTOnOff.nxc, ex_SysCommHSRead.nxc, ex_SysCommHSWrite.nxc,

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.9

Comm module

51

ex_syscommlswriteex.nxc, ex_SysComputeCalibValue.nxc, ex_SysDatalogWrite.nxc, ex_sysleopenappend.nxc, ex_sysleopenread.nxc, ex_sysleopenreadlinear.nxc, ex_sysleopenwrite.nxc, ex_sysleopenwritelinear.nxc, ex_sysleopenwritenonlinear.nxc, ex_sysleread.nxc, ex_sysleresize.nxc, ex_sysleseek.nxc, ex_syslewrite.nxc, ex_sysiomapread.nxc, ex_sysiomapreadbyid.nxc, ex_syslistles.nxc, ex_sysmessageread.nxc, and ex_SysReadLastResponse.nxc.

6.8.2.2

#dene POOL_MAX_SIZE 32768 Maximum size of memory pool, in bytes

6.8.2.3

#dene STAT_COMM_PENDING 32 Pending setup operation in progress

6.8.2.4

#dene STAT_MSG_EMPTY_MAILBOX 64 Specied mailbox contains no new messages

6.9

Comm module

Constants and functions related to the Comm module. Modules Comm module types
Types used by various Comm module functions.

Comm module functions


Functions for accessing and modifying Comm module features.

Comm module constants


Constants that are part of the NXT rmwares Comm module.

6.9.1

Detailed Description

Constants and functions related to the Comm module. The NXT comm module encompasses support for all forms of Bluetooth, USB, and HiSpeed communication.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.10

Button module

52

You can use the Bluetooth communication methods to send information to other devices connected to the NXT brick. The NXT rmware also implements a message queuing or mailbox system which you can access using these methods. Communication via Bluetooth uses a master/slave connection system. One device must be designated as the master device before you run a program using Bluetooth. If the NXT is the master device then you can congure up to three slave devices using connection 1, 2, and 3 on the NXT brick. If your NXT is a slave device then connection 0 on the brick must be reserved for the master device. Programs running on the master NXT brick can send packets of data to any connected slave devices using the BluetoothWrite method. Slave devices write response packets to the message queuing system where they wait for the master device to poll for the response. Using the direct command protocol, a master device can send messages to slave NXT bricks in the form of text strings addressed to a particular mailbox. Each mailbox on the slave NXT brick is a circular message queue holding up to ve messages. Each message can be up to 58 bytes long. To send messages from a master NXT brick to a slave brick, use BluetoothWrite on the master brick to send a MessageWrite direct command packet to the slave. Then, you can use ReceiveMessage on the slave brick to read the message. The slave NXT brick must be running a program when an incoming message packet is received. Otherwise, the slave NXT brick ignores the message and the message is dropped.

6.10

Button module

Constants and functions related to the Button module. Modules Button module types
Types used by various Button module functions.

Button module functions


Functions for accessing and modifying Button module features.

Button module constants


Constants that are part of the NXT rmwares Button module.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.11

IOCtrl module

53

6.10.1

Detailed Description

Constants and functions related to the Button module. The NXT button module encompasses support for the 4 buttons on the NXT brick.

6.11

IOCtrl module

Constants and functions related to the IOCtrl module. Modules IOCtrl module types
Types used by various IOCtrl module functions.

IOCtrl module functions


Functions for accessing and modifying IOCtrl module features.

IOCtrl module constants


Constants that are part of the NXT rmwares IOCtrl module.

6.11.1

Detailed Description

Constants and functions related to the IOCtrl module. The NXT ioctrl module encompasses low-level communication between the two processors that control the NXT. The NXC API exposes two functions that are part of this module.

6.12

Loader module

Constants and functions related to the Loader module. Modules Loader module types
Types used by various Loader module functions.

Loader module functions


Functions for accessing and modifying Loader module features.

Loader module constants


Constants that are part of the NXT rmwares Loader module.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.13

Sound module

54

6.12.1

Detailed Description

Constants and functions related to the Loader module. The NXT loader module encompasses support for the NXT le system. The NXT supports creating les, opening existing les, reading, writing, renaming, and deleting les. Files in the NXT le system must adhere to the 15.3 naming convention for a maximum lename length of 19 characters. While multiple les can be opened simultaneously, a maximum of 4 les can be open for writing at any given time. When accessing les on the NXT, errors can occur. The NXC API denes several constants that dene possible result codes. They are listed in the Loader module error codes section.

6.13

Sound module

Constants and functions related to the Sound module. Modules Sound module types
Types used by various sound module functions.

Sound module functions


Functions for accessing and modifying sound module features.

Sound module constants


Constants that are part of the NXT rmwares Sound module.

6.13.1

Detailed Description

Constants and functions related to the Sound module. The NXT sound module encompasses all sound output features. The NXT provides support for playing basic tones as well as two different types of les. Sound les (.rso) are like .wav les. They contain thousands of sound samples that digitally represent an analog waveform. With sounds les the NXT can speak or play music or make just about any sound imaginable. Melody les are like MIDI les. They contain multiple tones with each tone being dened by a frequency and duration pair. When played on the NXT a melody le sounds like a pure sine-wave tone generator playing back a series of notes. While not as fancy as sound les, melody les are usually much smaller than sound les.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.14

Ui module

55

When a sound or a le is played on the NXT, execution of the program does not wait for the previous playback to complete. To play multiple tones or les sequentially it is necessary to wait for the previous tone or le playback to complete rst. This can be done via the Wait API function or by using the sound state value within a while loop. The NXC API denes frequency and duration constants which may be used in calls to PlayTone or PlayToneEx. Frequency constants start with TONE_A3 (the A pitch in octave 3) and go to TONE_B7 (the B pitch in octave 7). Duration constants start with MS_1 (1 millisecond) and go up to MIN_1 (60000 milliseconds) with several constants in between. See NBCCommon.h for the complete list.

6.14

Ui module

Constants and functions related to the Ui module. Modules Ui module types


Types used by various Ui module functions.

Ui module functions
Functions for accessing and modifying Ui module features.

Ui module constants
Constants that are part of the NXT rmwares Ui module.

6.14.1

Detailed Description

Constants and functions related to the Ui module. The NXT UI module encompasses support for various aspects of the user interface for the NXT brick.

6.15

Low Speed module

Constants and functions related to the Low Speed module. Modules LowSpeed module types
Types used by various low speed module functions.

LowSpeed module functions


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.15

Low Speed module

56

Functions for accessing and modifying low speed module features.

LowSpeed module constants


Constants that are part of the NXT rmwares LowSpeed module.

6.15.1

Detailed Description

Constants and functions related to the Low Speed module. The NXT low speed module encompasses support for digital I2C sensor communication. Use the lowspeed (aka I2C) communication methods to access devices that use the I2C protocol on the NXT bricks four input ports. You must set the input ports Type property to SENSOR_TYPE_LOWSPEED or SENSOR_TYPE_LOWSPEED_9V on a given port before using an I2C device on that port. Use SENSOR_TYPE_LOWSPEED_9V if your device requires 9V power from the NXT brick. Remember that you also need to set the input ports InvalidDataField property to true after setting TypeField to a new value, and then wait in a loop for the NXT rmware to set InvalidDataField back to false. This process ensures that the rmware has time to properly initialize the port, including the 9V power lines, if applicable. Some digital devices might need additional time to initialize after power up. The SetSensorLowspeed API function sets the specied port to SENSOR_TYPE_LOWSPEED_9V and calls ResetSensor to perform the InvalidDataField reset loop described above. When communicating with I2C devices, the NXT rmware uses a master/slave setup in which the NXT brick is always the master device. This means that the rmware is responsible for controlling the write and read operations. The NXT rmware maintains write and read buffers for each port, and the three main Lowspeed (I2C) methods described below enable you to access these buffers. A call to LowspeedWrite starts an asynchronous transaction between the NXT brick and a digital I2C device. The program continues to run while the rmware manages sending bytes from the write buffer and reading the response bytes from the device. Because the NXT is the master device, you must also specify the number of bytes to expect from the device in response to each write operation. You can exchange up to 16 bytes in each direction per transaction. After you start a write transaction with LowspeedWrite, use LowspeedStatus in a loop to check the status of the port. If LowspeedStatus returns a status code of 0 and a count of bytes available in the read buffer, the system is ready for you to use LowspeedRead to copy the data from the read buffer into the buffer you provide. Note that any of these calls might return various status codes at any time. A status code of 0 means the port is idle and the last transaction (if any) did not result in any errors.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.16

Display module

57

Negative status codes and the positive status code 32 indicate errors. There are a few possible errors per call. Valid low speed return values include NO_ERR as well as the error codes listed in the Communications specic errors section.

6.16

Display module

Constants and functions related to the Display module. Modules Display module types
Types used by various display module functions.

Display module functions


Functions for accessing and modifying display module features.

Display module constants


Constants that are part of the NXT rmwares Display module.

6.16.1

Detailed Description

Constants and functions related to the Display module. The NXT display module encompasses support for drawing to the NXT LCD. The NXT supports drawing points, lines, rectangles, and circles on the LCD. It supports drawing graphic icon les on the screen as well as text and numbers. With the enhanced NBC/NXC rmware you can also draw ellipses and polygons as well as text and numbers using custom RIC-based font les. Also, all of the drawing operations have several drawing options for how the shapes are drawn to the LCD. The LCD screen has its origin (0, 0) at the bottom left-hand corner of the screen with the positive Y-axis extending upward and the positive X-axis extending toward the right. The NXC API provides constants for use in the NumOut and TextOut functions which make it possible to specify LCD line numbers between 1 and 8 with line 1 being at the top of the screen and line 8 being at the bottom of the screen. These constants (LCD_LINE1, LCD_LINE2, LCD_LINE3, LCD_LINE4, LCD_LINE5, LCD_LINE6, LCD_LINE7, LCD_LINE8) should be used as the Y coordinate in NumOut and TextOut calls. Values of Y other than these constants will be adjusted so that text and numbers are on one of 8 xed line positions.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

58

6.17

HiTechnic API Functions

Functions for accessing and modifying HiTechnic devices. Modules HiTechnic device constants
Constants that are for use with HiTechnic devices.

Functions int SensorHTGyro (const byte &port, int offset=0)


Read HiTechnic Gyro sensor.

int SensorHTMagnet (const byte &port, int offset=0)


Read HiTechnic Magnet sensor.

int SensorHTEOPD (const byte &port)


Read HiTechnic EOPD sensor.

void SetSensorHTEOPD (const byte &port, bool bStandard)


Set sensor as HiTechnic EOPD.

void SetSensorHTGyro (const byte &port)


Set sensor as HiTechnic Gyro.

void SetSensorHTMagnet (const byte &port)


Set sensor as HiTechnic Magnet.

int SensorHTColorNum (const byte &port)


Read HiTechnic color sensor color number.

int SensorHTCompass (const byte &port)


Read HiTechnic compass.

int SensorHTIRSeekerDir (const byte &port)


Read HiTechnic IRSeeker direction.

int SensorHTIRSeeker2Addr (const byte &port, const byte reg)


Read HiTechnic IRSeeker2 register.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

59

int SensorHTIRSeeker2DCDir (const byte &port)


Read HiTechnic IRSeeker2 DC direction.

int SensorHTIRSeeker2ACDir (const byte &port)


Read HiTechnic IRSeeker2 AC direction.

char SetHTColor2Mode (const byte &port, byte mode)


Set HiTechnic Color2 mode.

char SetHTIRSeeker2Mode (const byte &port, const byte mode)


Set HiTechnic IRSeeker2 mode.

bool ReadSensorHTAccel (const byte port, int &x, int &y, int &z)
Read HiTechnic acceleration values.

bool ReadSensorHTColor (const byte port, byte &ColorNum, byte &Red, byte &Green, byte &Blue)
Read HiTechnic Color values.

bool ReadSensorHTIRSeeker (const byte port, byte &dir, byte &s1, byte &s3, byte &s5, byte &s7, byte &s9)
Read HiTechnic IRSeeker values.

bool ReadSensorHTNormalizedColor (const byte port, byte &ColorIdx, byte &Red, byte &Green, byte &Blue)
Read HiTechnic Color normalized values.

bool ReadSensorHTRawColor (const byte port, unsigned int &Red, unsigned int &Green, unsigned int &Blue)
Read HiTechnic Color raw values.

bool ReadSensorHTColor2Active (byte port, byte &ColorNum, byte &Red, byte &Green, byte &Blue, byte &White)
Read HiTechnic Color2 active values.

bool ReadSensorHTNormalizedColor2Active (const byte port, byte &ColorIdx, byte &Red, byte &Green, byte &Blue)
Read HiTechnic Color2 normalized active values.

bool ReadSensorHTRawColor2 (const byte port, unsigned int &Red, unsigned int &Green, unsigned int &Blue, unsigned int &White)
Read HiTechnic Color2 raw values.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

60

bool ReadSensorHTIRReceiver (const byte port, char &pfdata[ ])


Read HiTechnic IRReceiver Power Function bytes.

bool ReadSensorHTIRReceiverEx (const byte port, const byte offset, char &pfchar)
Read HiTechnic IRReceiver Power Function value.

bool ReadSensorHTIRSeeker2AC (const byte port, byte &dir, byte &s1, byte &s3, byte &s5, byte &s7, byte &s9)
Read HiTechnic IRSeeker2 AC values.

bool ReadSensorHTIRSeeker2DC (const byte port, byte &dir, byte &s1, byte &s3, byte &s5, byte &s7, byte &s9, byte &avg)
Read HiTechnic IRSeeker2 DC values.

char ResetSensorHTAngle (const byte port, const byte mode)


Reset HiTechnic Angle sensor.

bool ReadSensorHTAngle (const byte port, int &Angle, long &AccAngle, int &RPM)
Read HiTechnic Angle sensor values.

void ReadSensorHTTouchMultiplexer (const byte port, byte &t1, byte &t2, byte &t3, byte &t4)
Read HiTechnic touch multiplexer.

char HTIRTrain (const byte port, const byte channel, const byte func)
HTIRTrain function.

char HTPFComboDirect (const byte port, const byte channel, const byte outa, const byte outb)
HTPFComboDirect function.

char HTPFComboPWM (const byte port, const byte channel, const byte outa, const byte outb)
HTPFComboPWM function.

char HTPFRawOutput (const byte port, const byte nibble0, const byte nibble1, const byte nibble2)
HTPFRawOutput function.

char HTPFRepeat (const byte port, const byte count, const unsigned int delay)
HTPFRepeat function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

61

char HTPFSingleOutputCST (const byte port, const byte channel, const byte out, const byte func)
HTPFSingleOutputCST function.

char HTPFSingleOutputPWM (const byte port, const byte channel, const byte out, const byte func)
HTPFSingleOutputPWM function.

char HTPFSinglePin (const byte port, const byte channel, const byte out, const byte pin, const byte func, bool cont)
HTPFSinglePin function.

char HTPFTrain (const byte port, const byte channel, const byte func)
HTPFTrain function.

void HTRCXSetIRLinkPort (const byte port)


HTRCXSetIRLinkPort function.

int HTRCXBatteryLevel (void)


HTRCXBatteryLevel function.

int HTRCXPoll (const byte src, const byte value)


HTRCXPoll function Send the Poll command to an RCX to read a signed 2-byte value at the specied source and value combination.

int HTRCXPollMemory (const unsigned int address)


HTRCXPollMemory function.

void HTRCXAddToDatalog (const byte src, const unsigned int value)


HTRCXAddToDatalog function.

void HTRCXClearAllEvents (void)


HTRCXClearAllEvents function.

void HTRCXClearCounter (const byte counter)


HTRCXClearCounter function.

void HTRCXClearMsg (void)


HTRCXClearMsg function.

void HTRCXClearSensor (const byte port)


HTRCXClearSensor function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

62

void HTRCXClearSound (void)


HTRCXClearSound function.

void HTRCXClearTimer (const byte timer)


HTRCXClearTimer function.

void HTRCXCreateDatalog (const unsigned int size)


HTRCXCreateDatalog function.

void HTRCXDecCounter (const byte counter)


HTRCXDecCounter function.

void HTRCXDeleteSub (const byte s)


HTRCXDeleteSub function.

void HTRCXDeleteSubs (void)


HTRCXDeleteSubs function.

void HTRCXDeleteTask (const byte t)


HTRCXDeleteTask function.

void HTRCXDeleteTasks (void)


HTRCXDeleteTasks function.

void HTRCXDisableOutput (const byte outputs)


HTRCXDisableOutput function.

void HTRCXEnableOutput (const byte outputs)


HTRCXEnableOutput function.

void HTRCXEvent (const byte src, const unsigned int value)


HTRCXEvent function.

void HTRCXFloat (const byte outputs)


HTRCXFloat function.

void HTRCXFwd (const byte outputs)


HTRCXFwd function.

void HTRCXIncCounter (const byte counter)


HTRCXIncCounter function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

63

void HTRCXInvertOutput (const byte outputs)


HTRCXInvertOutput function.

void HTRCXMuteSound (void)


HTRCXMuteSound function.

void HTRCXObvertOutput (const byte outputs)


HTRCXObvertOutput function.

void HTRCXOff (const byte outputs)


HTRCXOff function.

void HTRCXOn (const byte outputs)


HTRCXOn function.

void HTRCXOnFor (const byte outputs, const unsigned int ms)


HTRCXOnFor function.

void HTRCXOnFwd (const byte outputs)


HTRCXOnFwd function.

void HTRCXOnRev (const byte outputs)


HTRCXOnRev function.

void HTRCXPBTurnOff (void)


HTRCXPBTurnOff function.

void HTRCXPing (void)


HTRCXPing function.

void HTRCXPlaySound (const byte snd)


HTRCXPlaySound function.

void HTRCXPlayTone (const unsigned int freq, const byte duration)


HTRCXPlayTone function.

void HTRCXPlayToneVar (const byte varnum, const byte duration)


HTRCXPlayToneVar function.

void HTRCXRemote (unsigned int cmd)


HTRCXRemote function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

64

void HTRCXRev (const byte outputs)


HTRCXRev function.

void HTRCXSelectDisplay (const byte src, const unsigned int value)


HTRCXSelectDisplay function.

void HTRCXSelectProgram (const byte prog)


HTRCXSelectProgram function.

void HTRCXSendSerial (const byte rst, const byte count)


HTRCXSendSerial function.

void HTRCXSetDirection (const byte outputs, const byte dir)


HTRCXSetDirection function.

void HTRCXSetEvent (const byte evt, const byte src, const byte type)
HTRCXSetEvent function.

void HTRCXSetGlobalDirection (const byte outputs, const byte dir)


HTRCXSetGlobalDirection function.

void HTRCXSetGlobalOutput (const byte outputs, const byte mode)


HTRCXSetGlobalOutput function.

void HTRCXSetMaxPower (const byte outputs, const byte pwrsrc, const byte pwrval)
HTRCXSetMaxPower function.

void HTRCXSetMessage (const byte msg)


HTRCXSetMessage function.

void HTRCXSetOutput (const byte outputs, const byte mode)


HTRCXSetOutput function.

void HTRCXSetPower (const byte outputs, const byte pwrsrc, const byte pwrval)
HTRCXSetPower function.

void HTRCXSetPriority (const byte p)


HTRCXSetPriority function.

void HTRCXSetSensorMode (const byte port, const byte mode)


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

65

HTRCXSetSensorMode function.

void HTRCXSetSensorType (const byte port, const byte type)


HTRCXSetSensorType function.

void HTRCXSetSleepTime (const byte t)


HTRCXSetSleepTime function.

void HTRCXSetTxPower (const byte pwr)


HTRCXSetTxPower function.

void HTRCXSetWatch (const byte hours, const byte minutes)


HTRCXSetWatch function.

void HTRCXStartTask (const byte t)


HTRCXStartTask function.

void HTRCXStopAllTasks (void)


HTRCXStopAllTasks function.

void HTRCXStopTask (const byte t)


HTRCXStopTask function.

void HTRCXToggle (const byte outputs)


HTRCXToggle function.

void HTRCXUnmuteSound (void)


HTRCXUnmuteSound function.

void HTScoutCalibrateSensor (void)


HTScoutCalibrateSensor function.

void HTScoutMuteSound (void)


HTScoutMuteSound function.

void HTScoutSelectSounds (const byte grp)


HTScoutSelectSounds function.

void HTScoutSendVLL (const byte src, const unsigned int value)


HTScoutSendVLL function.

void HTScoutSetEventFeedback (const byte src, const unsigned int value)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

66

HTScoutSetEventFeedback function.

void HTScoutSetLight (const byte x)


HTScoutSetLight function.

void HTScoutSetScoutMode (const byte mode)


HTScoutSetScoutMode function.

void HTScoutSetSensorClickTime (const byte src, const unsigned int value)


HTScoutSetSensorClickTime function.

void HTScoutSetSensorHysteresis (const byte src, const unsigned int value)


HTScoutSetSensorHysteresis function.

void HTScoutSetSensorLowerLimit (const byte src, const unsigned int value)


HTScoutSetSensorLowerLimit function.

void HTScoutSetSensorUpperLimit (const byte src, const unsigned int value)


HTScoutSetSensorUpperLimit function.

void HTScoutUnmuteSound (void)


HTScoutUnmuteSound function.

6.17.1

Detailed Description

Functions for accessing and modifying HiTechnic devices. 6.17.2 6.17.2.1 Function Documentation char HTIRTrain (const byte port, const byte channel, const byte func) [inline]

HTIRTrain function. Control an IR Train receiver set to the specied channel using the HiTechnic iRLink device. Valid func values are TRAIN_FUNC_STOP, TRAIN_FUNC_INCR_SPEED, TRAIN_FUNC_DECR_SPEED, and TRAIN_FUNC_TOGGLE_LIGHT. Valid channel values are TRAIN_CHANNEL_1 through TRAIN_CHANNEL_3 and TRAIN_CHANNEL_ALL. The port must be congured as a Lowspeed port before using this function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

67

Parameters: port The sensor port. See Input port constants. channel The IR Train channel. See IR Train channel constants. func The IR Train function. See PF/IR Train function constants Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_HTIRTrain.nxc.

6.17.2.2

char HTPFComboDirect (const byte port, const byte channel, const byte outa, const byte outb) [inline]

HTPFComboDirect function. Execute a pair of Power Function motor commands on the specied channel using the HiTechnic iRLink device. Commands for outa and outb are PF_CMD_STOP, PF_CMD_REV, PF_CMD_FWD, and PF_CMD_BRAKE. Valid channels are PF_CHANNEL_1 through PF_CHANNEL_4. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. channel The Power Function channel. See Power Function channel constants. outa The Power Function command for output A. See Power Function command constants. outb The Power Function command for output B. See Power Function command constants. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_HTPFComboDirect.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

68

6.17.2.3

char HTPFComboPWM (const byte port, const byte channel, const byte outa, const byte outb) [inline]

HTPFComboPWM function. Control the speed of both outputs on a Power Function receiver set to the specied channel using the HiTechnic iRLink device. Valid output values are PF_PWM_FLOAT, PF_PWM_FWD1, PF_PWM_FWD2, PF_PWM_FWD3, PF_PWM_FWD4, PF_PWM_FWD5, PF_PWM_FWD6, PF_PWM_FWD7, PF_PWM_BRAKE, PF_PWM_REV7, PF_PWM_REV6, PF_PWM_REV5, PF_PWM_REV4, PF_PWM_REV3, PF_PWM_REV2, and PF_PWM_REV1. Valid channels are PF_CHANNEL_1 through PF_CHANNEL_4. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. channel The Power Function channel. See Power Function channel constants. outa The Power Function PWM command for output A. See Power Function PWM option constants. outb The Power Function PWM command for output B. See Power Function PWM option constants. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_HTPFComboPWM.nxc.

6.17.2.4

char HTPFRawOutput (const byte port, const byte nibble0, const byte nibble1, const byte nibble2) [inline]

HTPFRawOutput function. Control a Power Function receiver set to the specied channel using the HiTechnic iRLink device. Build the raw data stream using the 3 nibbles (4 bit values). The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. nibble0 The rst raw data nibble. nibble1 The second raw data nibble.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

69

nibble2 The third raw data nibble. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_HTPFRawOutput.nxc.

6.17.2.5

char HTPFRepeat (const byte port, const byte count, const unsigned int delay) [inline]

HTPFRepeat function. Repeat sending the last Power Function command using the HiTechnic IRLink device. Specify the number of times to repeat the command and the number of milliseconds of delay between each repetition. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. count The number of times to repeat the command. delay The number of milliseconds to delay between each repetition. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_HTPFRepeat.nxc.

6.17.2.6

char HTPFSingleOutputCST (const byte port, const byte channel, const byte out, const byte func) [inline]

HTPFSingleOutputCST function. Control a single output on a Power Function receiver set to the specied channel using the HiTechnic iRLink device. Select the desired output using PF_OUT_A or PF_OUT_B. Valid functions are PF_CST_CLEAR1_CLEAR2, PF_CST_SET1_CLEAR2, PF_CST_CLEAR1_SET2, PF_CST_SET1_SET2, PF_CST_INCREMENT_PWM, PF_CST_DECREMENT_PWM, PF_CST_FULL_FWD, PF_CST_FULL_REV, and PF_CST_TOGGLE_DIR. Valid channels are PF_CHANNEL_1 through PF_CHANNEL_4. The port must be congured as a Lowspeed port before using this function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

70

Parameters: port The sensor port. See Input port constants. channel The Power Function channel. See Power Function channel constants. out The Power Function output. See Power Function output constants. func The Power Function CST function. See Power Function CST options constants. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_HTPFSingleOutputCST.nxc.

6.17.2.7

char HTPFSingleOutputPWM (const byte port, const byte channel, const byte out, const byte func) [inline]

HTPFSingleOutputPWM function. Control the speed of a single output on a Power Function receiver set to the specied channel using the HiTechnic iRLink device. Select the desired output using PF_OUT_A or PF_OUT_B. Valid functions are PF_PWM_FLOAT, PF_PWM_FWD1, PF_PWM_FWD2, PF_PWM_FWD3, PF_PWM_FWD4, PF_PWM_FWD5, PF_PWM_FWD6, PF_PWM_FWD7, PF_PWM_BRAKE, PF_PWM_REV7, PF_PWM_REV6, PF_PWM_REV5, PF_PWM_REV4, PF_PWM_REV3, PF_PWM_REV2, and PF_PWM_REV1. Valid channels are PF_CHANNEL_1 through PF_CHANNEL_4. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. channel The Power Function channel. See Power Function channel constants. out The Power Function output. See Power Function output constants. func The Power Function PWM function. See Power Function PWM option constants. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_HTPFSingleOutputPWM.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

71

6.17.2.8

char HTPFSinglePin (const byte port, const byte channel, const byte out, const byte pin, const byte func, bool cont) [inline]

HTPFSinglePin function. Control a single pin on a Power Function receiver set to the specied channel using the HiTechnic iRLink device. Select the desired output using PF_OUT_A or PF_OUT_B. Select the desired pin using PF_PIN_C1 or PF_PIN_C2. Valid functions are PF_FUNC_NOCHANGE, PF_FUNC_CLEAR, PF_FUNC_SET, and PF_FUNC_TOGGLE. Valid channels are PF_CHANNEL_1 through PF_CHANNEL_4. Specify whether the mode by passing true (continuous) or false (timeout) as the nal parameter. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. channel The Power Function channel. See Power Function channel constants. out The Power Function output. See Power Function output constants. pin The Power Function pin. See Power Function pin constants. func The Power Function single pin function. See Power Function single pin function constants. cont Control whether the mode is continuous or timeout. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_HTPFSinglePin.nxc.

6.17.2.9

char HTPFTrain (const byte port, const byte channel, const byte func) [inline]

HTPFTrain function. Control both outputs on a Power Function receiver set to the specied channel using the HiTechnic iRLink device as if it were an IR Train receiver. Valid function values are TRAIN_FUNC_STOP, TRAIN_FUNC_INCR_SPEED, TRAIN_FUNC_DECR_SPEED, and TRAIN_FUNC_TOGGLE_LIGHT. Valid channels are PF_CHANNEL_1 through PF_CHANNEL_4. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

72

channel The Power Function channel. See Power Function channel constants. func The Power Function train function. See PF/IR Train function constants. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_HTPFTrain.nxc.

6.17.2.10

void HTRCXAddToDatalog (const byte src, const unsigned int value) [inline]

HTRCXAddToDatalog function. Send the AddToDatalog command to an RCX. Parameters: src The RCX source. See RCX and Scout source constants. value The RCX value. Examples: ex_HTRCXAddToDatalog.nxc.

6.17.2.11

int HTRCXBatteryLevel (void) [inline]

HTRCXBatteryLevel function. Send the BatteryLevel command to an RCX to read the current battery level. Returns: The RCX battery level. Examples: ex_HTRCXBatteryLevel.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

73

6.17.2.12

void HTRCXClearAllEvents (void) [inline]

HTRCXClearAllEvents function. Send the ClearAllEvents command to an RCX. Examples: ex_HTRCXClearAllEvents.nxc.

6.17.2.13

void HTRCXClearCounter (const byte counter) [inline]

HTRCXClearCounter function. Send the ClearCounter command to an RCX. Parameters: counter The counter to clear. Examples: ex_HTRCXClearCounter.nxc.

6.17.2.14

void HTRCXClearMsg (void) [inline]

HTRCXClearMsg function. Send the ClearMsg command to an RCX. Examples: ex_HTRCXClearMsg.nxc.

6.17.2.15

void HTRCXClearSensor (const byte port) [inline]

HTRCXClearSensor function. Send the ClearSensor command to an RCX. Parameters: port The RCX port number. Examples: ex_HTRCXClearSensor.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

74

6.17.2.16

void HTRCXClearSound (void) [inline]

HTRCXClearSound function. Send the ClearSound command to an RCX. Examples: ex_HTRCXClearSound.nxc.

6.17.2.17

void HTRCXClearTimer (const byte timer) [inline]

HTRCXClearTimer function. Send the ClearTimer command to an RCX. Parameters: timer The timer to clear. Examples: ex_HTRCXClearTimer.nxc.

6.17.2.18

void HTRCXCreateDatalog (const unsigned int size) [inline]

HTRCXCreateDatalog function. Send the CreateDatalog command to an RCX. Parameters: size The new datalog size. Examples: ex_HTRCXCreateDatalog.nxc.

6.17.2.19

void HTRCXDecCounter (const byte counter) [inline]

HTRCXDecCounter function. Send the DecCounter command to an RCX. Parameters: counter The counter to decrement.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

75

Examples: ex_HTRCXDecCounter.nxc.

6.17.2.20

void HTRCXDeleteSub (const byte s) [inline]

HTRCXDeleteSub function. Send the DeleteSub command to an RCX. Parameters: s The subroutine number to delete. Examples: ex_HTRCXDeleteSub.nxc.

6.17.2.21

void HTRCXDeleteSubs (void) [inline]

HTRCXDeleteSubs function. Send the DeleteSubs command to an RCX. Examples: ex_HTRCXDeleteSubs.nxc.

6.17.2.22

void HTRCXDeleteTask (const byte t) [inline]

HTRCXDeleteTask function. Send the DeleteTask command to an RCX. Parameters: t The task number to delete. Examples: ex_HTRCXDeleteTask.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

76

6.17.2.23

void HTRCXDeleteTasks (void) [inline]

HTRCXDeleteTasks function. Send the DeleteTasks command to an RCX. Examples: ex_HTRCXDeleteTasks.nxc.

6.17.2.24

void HTRCXDisableOutput (const byte outputs) [inline]

HTRCXDisableOutput function. Send the DisableOutput command to an RCX. Parameters: outputs The RCX output(s) to disable. See RCX output constants. Examples: ex_HTRCXDisableOutput.nxc.

6.17.2.25

void HTRCXEnableOutput (const byte outputs) [inline]

HTRCXEnableOutput function. Send the EnableOutput command to an RCX. Parameters: outputs The RCX output(s) to enable. See RCX output constants. Examples: ex_HTRCXEnableOutput.nxc.

6.17.2.26

void HTRCXEvent (const byte src, const unsigned int value) [inline]

HTRCXEvent function. Send the Event command to an RCX.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

77

Parameters: src The RCX source. See RCX and Scout source constants. value The RCX value. Examples: ex_HTRCXEvent.nxc.

6.17.2.27

void HTRCXFloat (const byte outputs) [inline]

HTRCXFloat function. Send commands to an RCX to oat the specied outputs. Parameters: outputs The RCX output(s) to oat. See RCX output constants. Examples: ex_HTRCXFloat.nxc.

6.17.2.28

void HTRCXFwd (const byte outputs) [inline]

HTRCXFwd function. Send commands to an RCX to set the specied outputs to the forward direction. Parameters: outputs The RCX output(s) to set forward. See RCX output constants. Examples: ex_HTRCXFwd.nxc.

6.17.2.29

void HTRCXIncCounter (const byte counter) [inline]

HTRCXIncCounter function. Send the IncCounter command to an RCX. Parameters: counter The counter to increment.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

78

Examples: ex_HTRCXIncCounter.nxc.

6.17.2.30

void HTRCXInvertOutput (const byte outputs) [inline]

HTRCXInvertOutput function. Send the InvertOutput command to an RCX. Parameters: outputs The RCX output(s) to invert. See RCX output constants. Examples: ex_HTRCXInvertOutput.nxc.

6.17.2.31

void HTRCXMuteSound (void) [inline]

HTRCXMuteSound function. Send the MuteSound command to an RCX. Examples: ex_HTRCXMuteSound.nxc.

6.17.2.32

void HTRCXObvertOutput (const byte outputs) [inline]

HTRCXObvertOutput function. Send the ObvertOutput command to an RCX. Parameters: outputs The RCX output(s) to obvert. See RCX output constants. Examples: ex_HTRCXObvertOutput.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

79

6.17.2.33

void HTRCXOff (const byte outputs) [inline]

HTRCXOff function. Send commands to an RCX to turn off the specied outputs. Parameters: outputs The RCX output(s) to turn off. See RCX output constants. Examples: ex_HTRCXOff.nxc.

6.17.2.34

void HTRCXOn (const byte outputs) [inline]

HTRCXOn function. Send commands to an RCX to turn on the specied outputs. Parameters: outputs The RCX output(s) to turn on. See RCX output constants. Examples: ex_HTRCXOn.nxc.

6.17.2.35

void HTRCXOnFor (const byte outputs, const unsigned int ms) [inline]

HTRCXOnFor function. Send commands to an RCX to turn on the specied outputs in the forward direction for the specied duration. Parameters: outputs The RCX output(s) to turn on. See RCX output constants. ms The number of milliseconds to leave the outputs on Examples: ex_HTRCXOnFor.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

80

6.17.2.36

void HTRCXOnFwd (const byte outputs) [inline]

HTRCXOnFwd function. Send commands to an RCX to turn on the specied outputs in the forward direction. Parameters: outputs The RCX output(s) to turn on in the forward direction. See RCX output constants. Examples: ex_HTRCXOnFwd.nxc.

6.17.2.37

void HTRCXOnRev (const byte outputs) [inline]

HTRCXOnRev function. Send commands to an RCX to turn on the specied outputs in the reverse direction. Parameters: outputs The RCX output(s) to turn on in the reverse direction. See RCX output constants. Examples: ex_HTRCXOnRev.nxc.

6.17.2.38

void HTRCXPBTurnOff (void) [inline]

HTRCXPBTurnOff function. Send the PBTurnOff command to an RCX. Examples: ex_HTRCXPBTurnOff.nxc.

6.17.2.39

void HTRCXPing (void) [inline]

HTRCXPing function. Send the Ping command to an RCX.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

81

Examples: ex_HTRCXPing.nxc.

6.17.2.40

void HTRCXPlaySound (const byte snd) [inline]

HTRCXPlaySound function. Send the PlaySound command to an RCX. Parameters: snd The sound number to play. Examples: ex_HTRCXPlaySound.nxc.

6.17.2.41

void HTRCXPlayTone (const unsigned int freq, const byte duration) [inline]

HTRCXPlayTone function. Send the PlayTone command to an RCX. Parameters: freq The frequency of the tone to play. duration The duration of the tone to play. Examples: ex_HTRCXPlayTone.nxc.

6.17.2.42

void HTRCXPlayToneVar (const byte varnum, const byte duration) [inline]

HTRCXPlayToneVar function. Send the PlayToneVar command to an RCX. Parameters: varnum The variable containing the tone frequency to play. duration The duration of the tone to play.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

82

Examples: ex_HTRCXPlayToneVar.nxc.

6.17.2.43

int HTRCXPoll (const byte src, const byte value) [inline]

HTRCXPoll function Send the Poll command to an RCX to read a signed 2-byte value at the specied source and value combination. Parameters: src The RCX source. See RCX and Scout source constants. value The RCX value. Returns: The value read from the specied port and value. Examples: ex_HTRCXPoll.nxc.

6.17.2.44

int HTRCXPollMemory (const unsigned int address) [inline]

HTRCXPollMemory function. Send the PollMemory command to an RCX. Parameters: address The RCX memory address. Returns: The value read from the specied address. Examples: ex_HTRCXPollMemory.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

83

6.17.2.45

void HTRCXRemote (unsigned int cmd) [inline]

HTRCXRemote function. Send the Remote command to an RCX. Parameters: cmd The RCX IR remote command to send. See RCX IR remote constants. Examples: ex_HTRCXRemote.nxc.

6.17.2.46

void HTRCXRev (const byte outputs) [inline]

HTRCXRev function. Send commands to an RCX to set the specied outputs to the reverse direction. Parameters: outputs The RCX output(s) to reverse direction. See RCX output constants. Examples: ex_HTRCXRev.nxc.

6.17.2.47

void HTRCXSelectDisplay (const byte src, const unsigned int value) [inline]

HTRCXSelectDisplay function. Send the SelectDisplay command to an RCX. Parameters: src The RCX source. See RCX and Scout source constants. value The RCX value. Examples: ex_HTRCXSelectDisplay.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

84

6.17.2.48

void HTRCXSelectProgram (const byte prog) [inline]

HTRCXSelectProgram function. Send the SelectProgram command to an RCX. Parameters: prog The program number to select. Examples: ex_HTRCXSelectProgram.nxc.

6.17.2.49

void HTRCXSendSerial (const byte rst, const byte count) [inline]

HTRCXSendSerial function. Send the SendSerial command to an RCX. Parameters: rst The rst byte address. count The number of bytes to send. Examples: ex_HTRCXSendSerial.nxc.

6.17.2.50

void HTRCXSetDirection (const byte outputs, const byte dir) [inline]

HTRCXSetDirection function. Send the SetDirection command to an RCX to congure the direction of the specied outputs. Parameters: outputs The RCX output(s) to set direction. See RCX output constants. dir The RCX output direction. See RCX output direction constants. Examples: ex_HTRCXSetDirection.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

85

6.17.2.51

void HTRCXSetEvent (const byte evt, const byte src, const byte type) [inline]

HTRCXSetEvent function. Send the SetEvent command to an RCX. Parameters: evt The event number to set. src The RCX source. See RCX and Scout source constants. type The event type. Examples: ex_HTRCXSetEvent.nxc.

6.17.2.52

void HTRCXSetGlobalDirection (const byte outputs, const byte dir) [inline]

HTRCXSetGlobalDirection function. Send the SetGlobalDirection command to an RCX. Parameters: outputs The RCX output(s) to set global direction. See RCX output constants. dir The RCX output direction. See RCX output direction constants. Examples: ex_HTRCXSetGlobalDirection.nxc.

6.17.2.53

void HTRCXSetGlobalOutput (const byte outputs, const byte mode) [inline]

HTRCXSetGlobalOutput function. Send the SetGlobalOutput command to an RCX. Parameters: outputs The RCX output(s) to set global mode. See RCX output constants. mode The RCX output mode. See RCX output mode constants.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

86

Examples: ex_HTRCXSetGlobalOutput.nxc.

6.17.2.54

void HTRCXSetIRLinkPort (const byte port) [inline]

HTRCXSetIRLinkPort function. Set the global port in advance of using the HTRCX and HTScout API functions for sending RCX and Scout messages over the HiTechnic iRLink device. The port must be congured as a Lowspeed port before using any of the HiTechnic RCX and Scout iRLink functions. Parameters: port The sensor port. See Input port constants.

6.17.2.55

void HTRCXSetMaxPower (const byte outputs, const byte pwrsrc, const byte pwrval) [inline]

HTRCXSetMaxPower function. Send the SetMaxPower command to an RCX. Parameters: outputs The RCX output(s) to set max power. See RCX output constants. pwrsrc The RCX source. See RCX and Scout source constants. pwrval The RCX value. Examples: ex_HTRCXSetMaxPower.nxc.

6.17.2.56

void HTRCXSetMessage (const byte msg) [inline]

HTRCXSetMessage function. Send the SetMessage command to an RCX. Parameters: msg The numeric message to send. Examples: ex_HTRCXSetMessage.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

87

6.17.2.57

void HTRCXSetOutput (const byte outputs, const byte mode) [inline]

HTRCXSetOutput function. Send the SetOutput command to an RCX to congure the mode of the specied outputs Parameters: outputs The RCX output(s) to set mode. See RCX output constants. mode The RCX output mode. See RCX output mode constants. Examples: ex_HTRCXSetOutput.nxc.

6.17.2.58

void HTRCXSetPower (const byte outputs, const byte pwrsrc, const byte pwrval) [inline]

HTRCXSetPower function. Send the SetPower command to an RCX to congure the power level of the specied outputs. Parameters: outputs The RCX output(s) to set power. See RCX output constants. pwrsrc The RCX source. See RCX and Scout source constants. pwrval The RCX value. Examples: ex_HTRCXSetPower.nxc.

6.17.2.59

void HTRCXSetPriority (const byte p) [inline]

HTRCXSetPriority function. Send the SetPriority command to an RCX. Parameters: p The new task priority. Examples: ex_HTRCXSetPriority.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

88

6.17.2.60

void HTRCXSetSensorMode (const byte port, const byte mode) [inline]

HTRCXSetSensorMode function. Send the SetSensorMode command to an RCX. Parameters: port The RCX sensor port. mode The RCX sensor mode. Examples: ex_HTRCXSetSensorMode.nxc.

6.17.2.61

void HTRCXSetSensorType (const byte port, const byte type) [inline]

HTRCXSetSensorType function. Send the SetSensorType command to an RCX. Parameters: port The RCX sensor port. type The RCX sensor type. Examples: ex_HTRCXSetSensorType.nxc.

6.17.2.62

void HTRCXSetSleepTime (const byte t) [inline]

HTRCXSetSleepTime function. Send the SetSleepTime command to an RCX. Parameters: t The new sleep time value. Examples: ex_HTRCXSetSleepTime.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

89

6.17.2.63

void HTRCXSetTxPower (const byte pwr) [inline]

HTRCXSetTxPower function. Send the SetTxPower command to an RCX. Parameters: pwr The IR transmit power level. Examples: ex_HTRCXSetTxPower.nxc.

6.17.2.64

void HTRCXSetWatch (const byte hours, const byte minutes) [inline]

HTRCXSetWatch function. Send the SetWatch command to an RCX. Parameters: hours The new watch time hours value. minutes The new watch time minutes value. Examples: ex_HTRCXSetWatch.nxc.

6.17.2.65

void HTRCXStartTask (const byte t) [inline]

HTRCXStartTask function. Send the StartTask command to an RCX. Parameters: t The task number to start. Examples: ex_HTRCXStartTask.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

90

6.17.2.66

void HTRCXStopAllTasks (void) [inline]

HTRCXStopAllTasks function. Send the StopAllTasks command to an RCX. Examples: ex_HTRCXStopAllTasks.nxc.

6.17.2.67

void HTRCXStopTask (const byte t) [inline]

HTRCXStopTask function. Send the StopTask command to an RCX. Parameters: t The task number to stop. Examples: ex_HTRCXStopTask.nxc.

6.17.2.68

void HTRCXToggle (const byte outputs) [inline]

HTRCXToggle function. Send commands to an RCX to toggle the direction of the specied outputs. Parameters: outputs The RCX output(s) to toggle. See RCX output constants. Examples: ex_HTRCXToggle.nxc.

6.17.2.69

void HTRCXUnmuteSound (void) [inline]

HTRCXUnmuteSound function. Send the UnmuteSound command to an RCX. Examples: ex_HTRCXUnmuteSound.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

91

6.17.2.70

void HTScoutCalibrateSensor (void) [inline]

HTScoutCalibrateSensor function. Send the CalibrateSensor command to a Scout. Examples: ex_HTScoutCalibrateSensor.nxc.

6.17.2.71

void HTScoutMuteSound (void) [inline]

HTScoutMuteSound function. Send the MuteSound command to a Scout. Examples: ex_HTScoutMuteSound.nxc.

6.17.2.72

void HTScoutSelectSounds (const byte grp) [inline]

HTScoutSelectSounds function. Send the SelectSounds command to a Scout. Parameters: grp The Scout sound group to select. Examples: ex_HTScoutSelectSounds.nxc.

6.17.2.73

void HTScoutSendVLL (const byte src, const unsigned int value) [inline]

HTScoutSendVLL function. Send the SendVLL command to a Scout. Parameters: src The Scout source. See RCX and Scout source constants. value The Scout value. Examples: ex_HTScoutSendVLL.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

92

6.17.2.74

void HTScoutSetEventFeedback (const byte src, const unsigned int value) [inline]

HTScoutSetEventFeedback function. Scout. Parameters:

Send the SetEventFeedback command to a

src The Scout source. See RCX and Scout source constants. value The Scout value. Examples: ex_HTScoutSetEventFeedback.nxc.

6.17.2.75

void HTScoutSetLight (const byte x) [inline]

HTScoutSetLight function. Send the SetLight command to a Scout. Parameters: x Set the light on or off using this value. See Scout light constants. Examples: ex_HTScoutSetLight.nxc.

6.17.2.76

void HTScoutSetScoutMode (const byte mode) [inline]

HTScoutSetScoutMode function. Send the SetScoutMode command to a Scout. Parameters: mode Set the scout mode. See Scout mode constants. Examples: ex_HTScoutSetScoutMode.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

93

6.17.2.77

void HTScoutSetSensorClickTime (const byte src, const unsigned int value) [inline]

HTScoutSetSensorClickTime function. Send the SetSensorClickTime command to a Scout. Parameters: src The Scout source. See RCX and Scout source constants. value The Scout value. Examples: ex_HTScoutSetSensorClickTime.nxc.

6.17.2.78

void HTScoutSetSensorHysteresis (const byte src, const unsigned int value) [inline]

HTScoutSetSensorHysteresis function. Send the SetSensorHysteresis command to a Scout. Parameters: src The Scout source. See RCX and Scout source constants. value The Scout value. Examples: ex_HTScoutSetSensorHysteresis.nxc.

6.17.2.79

void HTScoutSetSensorLowerLimit (const byte src, const unsigned int value) [inline]

HTScoutSetSensorLowerLimit function. Send the SetSensorLowerLimit command to a Scout. Parameters: src The Scout source. See RCX and Scout source constants. value The Scout value.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

94

Examples: ex_HTScoutSetSensorLowerLimit.nxc.

6.17.2.80

void HTScoutSetSensorUpperLimit (const byte src, const unsigned int value) [inline]

HTScoutSetSensorUpperLimit function. Send the SetSensorUpperLimit command to a Scout. Parameters: src The Scout source. See RCX and Scout source constants. value The Scout value. Examples: ex_HTScoutSetSensorUpperLimit.nxc.

6.17.2.81

void HTScoutUnmuteSound (void) [inline]

HTScoutUnmuteSound function. Send the UnmuteSound command to a Scout. Examples: ex_HTScoutUnmuteSound.nxc.

6.17.2.82

bool ReadSensorHTAccel (const byte port, int & x, int & y, int & z) [inline]

Read HiTechnic acceleration values. Read X, Y, and Z axis acceleration values from the HiTechnic Accelerometer sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. x The output x-axis acceleration.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

95

y The output y-axis acceleration. z The output z-axis acceleration. Returns: The function call result. Examples: ex_ReadSensorHTAccel.nxc.

6.17.2.83

bool ReadSensorHTAngle (const byte port, int & Angle, long & AccAngle, int & RPM) [inline]

Read HiTechnic Angle sensor values. Read values from the HiTechnic Angle sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. Angle Current angle in degrees (0-359). AccAngle Accumulated angle in degrees (-2147483648 to 2147483647). RPM rotations per minute (-1000 to 1000). Returns: The function call result. Examples: ex_ReadSensorHTAngle.nxc.

6.17.2.84

bool ReadSensorHTColor (const byte port, byte & ColorNum, byte & Red, byte & Green, byte & Blue) [inline]

Read HiTechnic Color values. Read color number, red, green, and blue values from the HiTechnic Color sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

96

Parameters: port The sensor port. See Input port constants. ColorNum The output color number. Red The red color value. Green The green color value. Blue The blue color value. Returns: The function call result. Examples: ex_ReadSensorHTColor.nxc.

6.17.2.85

bool ReadSensorHTColor2Active (byte port, byte & ColorNum, byte & Red, byte & Green, byte & Blue, byte & White) [inline]

Read HiTechnic Color2 active values. Read color number, red, green, and blue values from the HiTechnic Color2 sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. ColorNum The output color number. Red The red color value. Green The green color value. Blue The blue color value. White The white color value. Returns: The function call result. Examples: ex_ReadSensorHTColor2Active.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

97

6.17.2.86

bool ReadSensorHTIRReceiver (const byte port, char & pfdata[ ]) [inline]

Read HiTechnic IRReceiver Power Function bytes. Read Power Function bytes from the HiTechnic IRReceiver sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. pfdata Eight bytes of power function remote IR data. Returns: The function call result. Examples: ex_ReadSensorHTIRReceiver.nxc.

6.17.2.87

bool ReadSensorHTIRReceiverEx (const byte port, const byte offset, char & pfchar) [inline]

Read HiTechnic IRReceiver Power Function value. Read a Power Function byte from the HiTechnic IRReceiver sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. offset The power function data offset. See HiTechnic IRReceiver constants. pfchar A single byte of power function remote IR data. Returns: The function call result. Examples: ex_ReadSensorHTIRReceiverEx.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

98

6.17.2.88

bool ReadSensorHTIRSeeker (const byte port, byte & dir, byte & s1, byte & s3, byte & s5, byte & s7, byte & s9) [inline]

Read HiTechnic IRSeeker values. Read direction, and ve signal strength values from the HiTechnic IRSeeker sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. dir The direction. s1 The signal strength from sensor 1. s3 The signal strength from sensor 3. s5 The signal strength from sensor 5. s7 The signal strength from sensor 7. s9 The signal strength from sensor 9. Returns: The function call result. Examples: ex_ReadSensorHTIRSeeker.nxc.

6.17.2.89

bool ReadSensorHTIRSeeker2AC (const byte port, byte & dir, byte & s1, byte & s3, byte & s5, byte & s7, byte & s9) [inline]

Read HiTechnic IRSeeker2 AC values. Read direction, and ve signal strength values from the HiTechnic IRSeeker2 sensor in AC mode. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. dir The direction. s1 The signal strength from sensor 1. s3 The signal strength from sensor 3.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

99

s5 The signal strength from sensor 5. s7 The signal strength from sensor 7. s9 The signal strength from sensor 9. Returns: The function call result. Examples: ex_ReadSensorHTIRSeeker2AC.nxc.

6.17.2.90

bool ReadSensorHTIRSeeker2DC (const byte port, byte & dir, byte & s1, byte & s3, byte & s5, byte & s7, byte & s9, byte & avg) [inline]

Read HiTechnic IRSeeker2 DC values. Read direction, ve signal strength, and average strength values from the HiTechnic IRSeeker2 sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. dir The direction. s1 The signal strength from sensor 1. s3 The signal strength from sensor 3. s5 The signal strength from sensor 5. s7 The signal strength from sensor 7. s9 The signal strength from sensor 9. avg The average signal strength. Returns: The function call result. Examples: ex_ReadSensorHTIRSeeker2DC.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

100

6.17.2.91

bool ReadSensorHTNormalizedColor (const byte port, byte & ColorIdx, byte & Red, byte & Green, byte & Blue) [inline]

Read HiTechnic Color normalized values. Read the color index and the normalized red, green, and blue values from the HiTechnic Color sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. ColorIdx The output color index. Red The normalized red color value. Green The normalized green color value. Blue The normalized blue color value. Returns: The function call result. Examples: ex_ReadSensorHTNormalizedColor.nxc.

6.17.2.92

bool ReadSensorHTNormalizedColor2Active (const byte port, byte & ColorIdx, byte & Red, byte & Green, byte & Blue) [inline]

Read HiTechnic Color2 normalized active values. Read the color index and the normalized red, green, and blue values from the HiTechnic Color2 sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. ColorIdx The output color index. Red The normalized red color value. Green The normalized green color value. Blue The normalized blue color value.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

101

Returns: The function call result. Examples: ex_ReadSensorHTNormalizedColor2Active.nxc.

6.17.2.93

bool ReadSensorHTRawColor (const byte port, unsigned int & Red, unsigned int & Green, unsigned int & Blue) [inline]

Read HiTechnic Color raw values. Read the raw red, green, and blue values from the HiTechnic Color sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. Red The raw red color value. Green The raw green color value. Blue The raw blue color value. Returns: The function call result. Examples: ex_ReadSensorHTRawColor.nxc.

6.17.2.94

bool ReadSensorHTRawColor2 (const byte port, unsigned int & Red, unsigned int & Green, unsigned int & Blue, unsigned int & White) [inline]

Read HiTechnic Color2 raw values. Read the raw red, green, and blue values from the HiTechnic Color2 sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

102

Red The raw red color value. Green The raw green color value. Blue The raw blue color value. White The raw white color value. Returns: The function call result. Examples: ex_ReadSensorHTRawColor2.nxc.

6.17.2.95

void ReadSensorHTTouchMultiplexer (const byte port, byte & t1, byte & t2, byte & t3, byte & t4) [inline]

Read HiTechnic touch multiplexer. Read touch sensor values from the HiTechnic touch multiplexer device. Parameters: port The sensor port. See Input port constants. t1 The value of touch sensor 1. t2 The value of touch sensor 2. t3 The value of touch sensor 3. t4 The value of touch sensor 4. Examples: ex_ReadSensorHTTouchMultiplexer.nxc.

6.17.2.96

char ResetSensorHTAngle (const byte port, const byte mode) [inline]

Reset HiTechnic Angle sensor. Reset the HiTechnic Angle sensor on the specied port. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

103

mode The Angle reset mode. See HiTechnic Angle sensor constants. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_ResetSensorHTAngle.nxc.

6.17.2.97

int SensorHTColorNum (const byte & port) [inline]

Read HiTechnic color sensor color number. Read the color number from the HiTechnic Color sensor on the specied port. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. Returns: The color number. Examples: ex_SensorHTColorNum.nxc.

6.17.2.98

int SensorHTCompass (const byte & port) [inline]

Read HiTechnic compass. Read the compass heading value of the HiTechnic Compass sensor on the specied port. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. Returns: The compass heading. Examples: ex_SensorHTCompass.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

104

6.17.2.99

int SensorHTEOPD (const byte & port) [inline]

Read HiTechnic EOPD sensor. Read the HiTechnic EOPD sensor on the specied port. Parameters: port The sensor port. See Input port constants. Returns: The EOPD sensor reading. Examples: ex_SensorHTEOPD.nxc.

6.17.2.100

int SensorHTGyro (const byte & port, int offset = 0) [inline]

Read HiTechnic Gyro sensor. Read the HiTechnic Gyro sensor on the specied port. The offset value should be calculated by averaging several readings with an offset of zero while the sensor is perfectly still. Parameters: port The sensor port. See Input port constants. offset The zero offset. Returns: The Gyro sensor reading. Examples: ex_HTGyroTest.nxc, and ex_SensorHTGyro.nxc.

6.17.2.101

int SensorHTIRSeeker2ACDir (const byte & port) [inline]

Read HiTechnic IRSeeker2 AC direction. Read the AC direction value from the HiTechnic IR Seeker2 on the specied port. The port must be congured as a Lowspeed port before using this function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

105

Parameters: port The sensor port. See Input port constants. Returns: The IRSeeker2 AC direction. Examples: ex_SensorHTIRSeeker2ACDir.nxc.

6.17.2.102

int SensorHTIRSeeker2Addr (const byte & port, const byte reg) [inline]

Read HiTechnic IRSeeker2 register. Read a register value from the HiTechnic IR Seeker2 on the specied port. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. reg The register address. See HiTechnic IRSeeker2 constants. Returns: The IRSeeker2 register value. Examples: ex_SensorHTIRSeeker2Addr.nxc.

6.17.2.103

int SensorHTIRSeeker2DCDir (const byte & port) [inline]

Read HiTechnic IRSeeker2 DC direction. Read the DC direction value from the HiTechnic IR Seeker2 on the specied port. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

106

Returns: The IRSeeker2 DC direction. Examples: ex_SensorHTIRSeeker2DCDir.nxc.

6.17.2.104

int SensorHTIRSeekerDir (const byte & port) [inline]

Read HiTechnic IRSeeker direction. Read the direction value of the HiTechnic IR Seeker on the specied port. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. Returns: The IRSeeker direction. Examples: ex_SensorHTIRSeekerDir.nxc.

6.17.2.105

int SensorHTMagnet (const byte & port, int offset = 0) [inline]

Read HiTechnic Magnet sensor. Read the HiTechnic Magnet sensor on the specied port. The offset value should be calculated by averaging several readings with an offset of zero while the sensor is perfectly still. Parameters: port The sensor port. See Input port constants. offset The zero offset. Returns: The Magnet sensor reading. Examples: ex_SensorHTMagnet.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.17

HiTechnic API Functions

107

6.17.2.106

char SetHTColor2Mode (const byte & port, byte mode) [inline]

Set HiTechnic Color2 mode. Set the mode of the HiTechnic Color2 sensor on the specied port. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. mode The Color2 mode. See HiTechnic Color2 constants. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_sethtcolor2mode.nxc.

6.17.2.107

char SetHTIRSeeker2Mode (const byte & port, const byte mode) [inline]

Set HiTechnic IRSeeker2 mode. Set the mode of the HiTechnic IRSeeker2 sensor on the specied port. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. mode The IRSeeker2 mode. See HiTechnic IRSeeker2 constants. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_sethtirseeker2mode.nxc, and ex_setsensorboolean.nxc.

6.17.2.108

void SetSensorHTEOPD (const byte & port, bool bStandard) [inline]

Set sensor as HiTechnic EOPD. Congure the sensor on the specied port as a HiTechnic EOPD sensor.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

108

Parameters: port The sensor port. See Input port constants. bStandard Congure in standard or long-range mode. Examples: ex_setsensorhteopd.nxc.

6.17.2.109

void SetSensorHTGyro (const byte & port) [inline]

Set sensor as HiTechnic Gyro. Congure the sensor on the specied port as a HiTechnic Gyro sensor. Parameters: port The sensor port. See Input port constants. Examples: ex_HTGyroTest.nxc, ex_SensorHTGyro.nxc, and ex_SetSensorHTGyro.nxc.

6.17.2.110

void SetSensorHTMagnet (const byte & port) [inline]

Set sensor as HiTechnic Magnet. Congure the sensor on the specied port as a HiTechnic Magnet sensor. Parameters: port The sensor port. See Input port constants. Examples: ex_SetSensorHTMagnet.nxc.

6.18

MindSensors API Functions

Functions for accessing and modifying MindSensors devices.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

109

Modules MindSensors device constants


Constants that are for use with MindSensors devices.

Functions void SetSensorMSPressure (const byte &port)


Congure a mindsensors pressure sensor.

void SetSensorMSDROD (const byte &port, bool bActive)


Congure a mindsensors DROD sensor.

void SetSensorNXTSumoEyes (const byte &port, bool bLong)


Congure a mindsensors SumoEyes sensor.

int SensorMSPressure (const byte &port)


Read mindsensors pressure sensor.

char SensorNXTSumoEyes (const byte &port)


Read mindsensors NXTSumoEyes obstacle zone.

int SensorMSCompass (const byte &port, const byte i2caddr)


Read mindsensors compass value.

int SensorMSDROD (const byte &port)


Read mindsensors DROD value.

int SensorNXTSumoEyesRaw (const byte &port)


Read mindsensors NXTSumoEyes raw value.

int SensorMSPressureRaw (const byte &port)


Read mindsensors raw pressure value.

bool ReadSensorMSAccel (const byte port, const byte i2caddr, int &x, int &y, int &z)
Read mindsensors acceleration values.

bool ReadSensorMSPlayStation (const byte port, const byte i2caddr, byte &btnset1, byte &btnset2, byte &xleft, byte &yleft, byte &xright, byte &yright)
Read mindsensors playstation controller values.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

110

bool ReadSensorMSRTClock (const byte port, byte &sec, byte &min, byte &hrs, byte &dow, byte &date, byte &month, byte &year)
Read mindsensors RTClock values.

bool ReadSensorMSTilt (const byte &port, const byte &i2caddr, byte &x, byte &y, byte &z)
Read mindsensors tilt values.

bool PFMateSend (const byte &port, const byte &i2caddr, const byte &channel, const byte &motors, const byte &cmdA, const byte &spdA, const byte &cmdB, const byte &spdB)
Send PFMate command.

bool PFMateSendRaw (const byte &port, const byte &i2caddr, const byte &channel, const byte &b1, const byte &b2)
Send raw PFMate command.

int MSReadValue (const byte port, const byte i2caddr, const byte reg, const byte numbytes)
Read a mindsensors device value.

char MSEnergize (const byte port, const byte i2caddr)


Turn on power to device.

char MSDeenergize (const byte port, const byte i2caddr)


Turn off power to device.

char MSADPAOn (const byte port, const byte i2caddr)


Turn on mindsensors ADPA mode.

char MSADPAOff (const byte port, const byte i2caddr)


Turn off mindsensors ADPA mode.

char DISTNxGP2D12 (const byte port, const byte i2caddr)


Congure DISTNx as GP2D12.

char DISTNxGP2D120 (const byte port, const byte i2caddr)


Congure DISTNx as GP2D120.

char DISTNxGP2YA02 (const byte port, const byte i2caddr)


Congure DISTNx as GP2YA02.

char DISTNxGP2YA21 (const byte port, const byte i2caddr)


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

111

Congure DISTNx as GP2YA21.

int DISTNxDistance (const byte port, const byte i2caddr)


Read DISTNx distance value.

int DISTNxMaxDistance (const byte port, const byte i2caddr)


Read DISTNx maximum distance value.

int DISTNxMinDistance (const byte port, const byte i2caddr)


Read DISTNx minimum distance value.

byte DISTNxModuleType (const byte port, const byte i2caddr)


Read DISTNx module type value.

byte DISTNxNumPoints (const byte port, const byte i2caddr)


Read DISTNx num points value.

int DISTNxVoltage (const byte port, const byte i2caddr)


Read DISTNx voltage value.

char ACCLNxCalibrateX (const byte port, const byte i2caddr)


Calibrate ACCL-Nx X-axis.

char ACCLNxCalibrateXEnd (const byte port, const byte i2caddr)


Stop calibrating ACCL-Nx X-axis.

char ACCLNxCalibrateY (const byte port, const byte i2caddr)


Calibrate ACCL-Nx Y-axis.

char ACCLNxCalibrateYEnd (const byte port, const byte i2caddr)


Stop calibrating ACCL-Nx Y-axis.

char ACCLNxCalibrateZ (const byte port, const byte i2caddr)


Calibrate ACCL-Nx Z-axis.

char ACCLNxCalibrateZEnd (const byte port, const byte i2caddr)


Stop calibrating ACCL-Nx Z-axis.

char ACCLNxResetCalibration (const byte port, const byte i2caddr)


Reset ACCL-Nx calibration.

char SetACCLNxSensitivity (const byte port, const byte i2caddr, byte slevel)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

112

Set ACCL-Nx sensitivity.

byte ACCLNxSensitivity (const byte port, const byte i2caddr)


Read ACCL-Nx sensitivity value.

int ACCLNxXOffset (const byte port, const byte i2caddr)


Read ACCL-Nx X offset value.

int ACCLNxXRange (const byte port, const byte i2caddr)


Read ACCL-Nx X range value.

int ACCLNxYOffset (const byte port, const byte i2caddr)


Read ACCL-Nx Y offset value.

int ACCLNxYRange (const byte port, const byte i2caddr)


Read ACCL-Nx Y range value.

int ACCLNxZOffset (const byte port, const byte i2caddr)


Read ACCL-Nx Z offset value.

int ACCLNxZRange (const byte port, const byte i2caddr)


Read ACCL-Nx Z range value.

char PSPNxDigital (const byte &port, const byte &i2caddr)


Congure PSPNx in digital mode.

char PSPNxAnalog (const byte &port, const byte &i2caddr)


Congure PSPNx in analog mode.

unsigned int NXTServoPosition (const byte &port, const byte &i2caddr, const byte servo)
Read NXTServo servo position value.

byte NXTServoSpeed (const byte &port, const byte &i2caddr, const byte servo)
Read NXTServo servo speed value.

byte NXTServoBatteryVoltage (const byte &port, const byte &i2caddr)


Read NXTServo battery voltage value.

char SetNXTServoSpeed (const byte &port, const byte &i2caddr, const byte servo, const byte &speed)
Set NXTServo servo motor speed.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

113

char SetNXTServoQuickPosition (const byte &port, const byte &i2caddr, const byte servo, const byte &qpos)
Set NXTServo servo motor quick position.

char SetNXTServoPosition (const byte &port, const byte &i2caddr, const byte servo, const byte &pos)
Set NXTServo servo motor position.

char NXTServoReset (const byte &port, const byte &i2caddr)


Reset NXTServo properties.

char NXTServoHaltMacro (const byte &port, const byte &i2caddr)


Halt NXTServo macro.

char NXTServoResumeMacro (const byte &port, const byte &i2caddr)


Resume NXTServo macro.

char NXTServoPauseMacro (const byte &port, const byte &i2caddr)


Pause NXTServo macro.

char NXTServoInit (const byte &port, const byte &i2caddr, const byte servo)
Initialize NXTServo servo properties.

char NXTServoGotoMacroAddress (const byte &port, const byte &i2caddr, const byte &macro)
Goto NXTServo macro address.

char NXTServoEditMacro (const byte &port, const byte &i2caddr)


Edit NXTServo macro.

char NXTServoQuitEdit (const byte &port)


Quit NXTServo macro edit mode.

char NXTHIDAsciiMode (const byte &port, const byte &i2caddr)


Set NXTHID into ASCII data mode.

char NXTHIDDirectMode (const byte &port, const byte &i2caddr)


Set NXTHID into direct data mode.

char NXTHIDTransmit (const byte &port, const byte &i2caddr)


Transmit NXTHID character.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

114

char NXTHIDLoadCharacter (const byte &port, const byte &i2caddr, const byte &modier, const byte &character)
Load NXTHID character.

char NXTPowerMeterResetCounters (const byte &port, const byte &i2caddr)


Reset NXTPowerMeter counters.

int NXTPowerMeterPresentCurrent (const byte &port, const byte &i2caddr)


Read NXTPowerMeter present current.

int NXTPowerMeterPresentVoltage (const byte &port, const byte &i2caddr)


Read NXTPowerMeter present voltage.

int NXTPowerMeterCapacityUsed (const byte &port, const byte &i2caddr)


Read NXTPowerMeter capacity used.

int NXTPowerMeterPresentPower (const byte &port, const byte &i2caddr)


Read NXTPowerMeter present power.

long NXTPowerMeterTotalPowerConsumed (const byte &port, const byte &i2caddr)


Read NXTPowerMeter total power consumed.

int NXTPowerMeterMaxCurrent (const byte &port, const byte &i2caddr)


Read NXTPowerMeter maximum current.

int NXTPowerMeterMinCurrent (const byte &port, const byte &i2caddr)


Read NXTPowerMeter minimum current.

int NXTPowerMeterMaxVoltage (const byte &port, const byte &i2caddr)


Read NXTPowerMeter maximum voltage.

int NXTPowerMeterMinVoltage (const byte &port, const byte &i2caddr)


Read NXTPowerMeter minimum voltage.

long NXTPowerMeterElapsedTime (const byte &port, const byte &i2caddr)


Read NXTPowerMeter elapsed time.

int NXTPowerMeterErrorCount (const byte &port, const byte &i2caddr)


Read NXTPowerMeter error count.

char NXTLineLeaderPowerDown (const byte &port, const byte &i2caddr)


Powerdown NXTLineLeader device.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

115

char NXTLineLeaderPowerUp (const byte &port, const byte &i2caddr)


Powerup NXTLineLeader device.

char NXTLineLeaderInvert (const byte &port, const byte &i2caddr)


Invert NXTLineLeader colors.

char NXTLineLeaderReset (const byte &port, const byte &i2caddr)


Reset NXTLineLeader color inversion.

char NXTLineLeaderSnapshot (const byte &port, const byte &i2caddr)


Take NXTLineLeader line snapshot.

char NXTLineLeaderCalibrateWhite (const byte &port, const byte &i2caddr)


Calibrate NXTLineLeader white color.

char NXTLineLeaderCalibrateBlack (const byte &port, const byte &i2caddr)


Calibrate NXTLineLeader black color.

char NXTLineLeaderSteering (const byte &port, const byte &i2caddr)


Read NXTLineLeader steering.

char NXTLineLeaderAverage (const byte &port, const byte &i2caddr)


Read NXTLineLeader average.

byte NXTLineLeaderResult (const byte &port, const byte &i2caddr)


Read NXTLineLeader result.

char SetNXTLineLeaderSetpoint (const byte &port, const byte &i2caddr, const byte &value)
Write NXTLineLeader setpoint.

char SetNXTLineLeaderKpValue (const byte &port, const byte &i2caddr, const byte &value)
Write NXTLineLeader Kp value.

char SetNXTLineLeaderKiValue (const byte &port, const byte &i2caddr, const byte &value)
Write NXTLineLeader Ki value.

char SetNXTLineLeaderKdValue (const byte &port, const byte &i2caddr, const byte &value)
Write NXTLineLeader Kd value.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

116

char SetNXTLineLeaderKpFactor (const byte &port, const byte &i2caddr, const byte &value)
Write NXTLineLeader Kp factor.

char SetNXTLineLeaderKiFactor (const byte &port, const byte &i2caddr, const byte &value)
Write NXTLineLeader Ki factor.

char SetNXTLineLeaderKdFactor (const byte &port, const byte &i2caddr, const byte &value)
Write NXTLineLeader Kd factor.

char NRLink2400 (const byte port, const byte i2caddr)


Congure NRLink in 2400 baud mode.

char NRLink4800 (const byte port, const byte i2caddr)


Congure NRLink in 4800 baud mode.

char NRLinkFlush (const byte port, const byte i2caddr)


Flush NRLink buffers.

char NRLinkIRLong (const byte port, const byte i2caddr)


Congure NRLink in IR long mode.

char NRLinkIRShort (const byte port, const byte i2caddr)


Congure NRLink in IR short mode.

char NRLinkSetPF (const byte port, const byte i2caddr)


Congure NRLink in power function mode.

char NRLinkSetRCX (const byte port, const byte i2caddr)


Congure NRLink in RCX mode.

char NRLinkSetTrain (const byte port, const byte i2caddr)


Congure NRLink in IR train mode.

char NRLinkTxRaw (const byte port, const byte i2caddr)


Congure NRLink in raw IR transmit mode.

byte NRLinkStatus (const byte port, const byte i2caddr)


Read NRLink status.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

117

char RunNRLinkMacro (const byte port, const byte i2caddr, const byte macro)
Run NRLink macro.

char WriteNRLinkBytes (const byte port, const byte i2caddr, const byte data[ ])
Write data to NRLink.

bool ReadNRLinkBytes (const byte port, const byte i2caddr, byte &data[ ])
Read data from NRLink.

char MSIRTrain (const byte port, const byte i2caddr, const byte channel, const byte func)
MSIRTrain function.

char MSPFComboDirect (const byte port, const byte i2caddr, const byte channel, const byte outa, const byte outb)
MSPFComboDirect function.

char MSPFComboPWM (const byte port, const byte i2caddr, const byte channel, const byte outa, const byte outb)
MSPFComboPWM function.

char MSPFRawOutput (const byte port, const byte i2caddr, const byte nibble0, const byte nibble1, const byte nibble2)
MSPFRawOutput function.

char MSPFRepeat (const byte port, const byte i2caddr, const byte count, const unsigned int delay)
MSPFRepeat function.

char MSPFSingleOutputCST (const byte port, const byte i2caddr, const byte channel, const byte out, const byte func)
MSPFSingleOutputCST function.

char MSPFSingleOutputPWM (const byte port, const byte i2caddr, const byte channel, const byte out, const byte func)
MSPFSingleOutputPWM function.

char MSPFSinglePin (const byte port, const byte i2caddr, const byte channel, const byte out, const byte pin, const byte func, bool cont)
MSPFSinglePin function.

char MSPFTrain (const byte port, const byte i2caddr, const byte channel, const byte func)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

118

MSPFTrain function.

void MSRCXSetNRLinkPort (const byte port, const byte i2caddr)


MSRCXSetIRLinkPort function.

int MSRCXBatteryLevel (void)


MSRCXBatteryLevel function.

int MSRCXPoll (const byte src, const byte value)


MSRCXPoll function.

int MSRCXPollMemory (const unsigned int address)


MSRCXPollMemory function.

void MSRCXAbsVar (const byte varnum, const byte byte src, const unsigned int value)
MSRCXAbsVar function.

void MSRCXAddToDatalog (const byte src, const unsigned int value)


MSRCXAddToDatalog function.

void MSRCXAndVar (const byte varnum, const byte src, const unsigned int value)
MSRCXAndVar function.

void MSRCXBoot (void)


MSRCXBoot function.

void MSRCXCalibrateEvent (const byte evt, const byte low, const byte hi, const byte hyst)
MSRCXCalibrateEvent function.

void MSRCXClearAllEvents (void)


MSRCXClearAllEvents function.

void MSRCXClearCounter (const byte counter)


MSRCXClearCounter function.

void MSRCXClearMsg (void)


MSRCXClearMsg function.

void MSRCXClearSensor (const byte port)


MSRCXClearSensor function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

119

void MSRCXClearSound (void)


MSRCXClearSound function.

void MSRCXClearTimer (const byte timer)


MSRCXClearTimer function.

void MSRCXCreateDatalog (const unsigned int size)


MSRCXCreateDatalog function.

void MSRCXDecCounter (const byte counter)


MSRCXDecCounter function.

void MSRCXDeleteSub (const byte s)


MSRCXDeleteSub function.

void MSRCXDeleteSubs (void)


MSRCXDeleteSubs function.

void MSRCXDeleteTask (const byte t)


MSRCXDeleteTask function.

void MSRCXDeleteTasks (void)


MSRCXDeleteTasks function.

void MSRCXDisableOutput (const byte outputs)


MSRCXDisableOutput function.

void MSRCXDivVar (const byte varnum, const byte src, const unsigned int value)
MSRCXDivVar function.

void MSRCXEnableOutput (const byte outputs)


MSRCXEnableOutput function.

void MSRCXEvent (const byte src, const unsigned int value)


MSRCXEvent function.

void MSRCXFloat (const byte outputs)


MSRCXFloat function.

void MSRCXFwd (const byte outputs)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

120

MSRCXFwd function.

void MSRCXIncCounter (const byte counter)


MSRCXIncCounter function.

void MSRCXInvertOutput (const byte outputs)


MSRCXInvertOutput function.

void MSRCXMulVar (const byte varnum, const byte src, unsigned int value)
MSRCXMulVar function.

void MSRCXMuteSound (void)


MSRCXMuteSound function.

void MSRCXObvertOutput (const byte outputs)


MSRCXObvertOutput function.

void MSRCXOff (const byte outputs)


MSRCXOff function.

void MSRCXOn (const byte outputs)


MSRCXOn function.

void MSRCXOnFor (const byte outputs, const unsigned int ms)


MSRCXOnFor function.

void MSRCXOnFwd (const byte outputs)


MSRCXOnFwd function.

void MSRCXOnRev (const byte outputs)


MSRCXOnRev function.

void MSRCXOrVar (const byte varnum, const byte src, const unsigned int value)
MSRCXOrVar function.

void MSRCXPBTurnOff (void)


MSRCXPBTurnOff function.

void MSRCXPing (void)


MSRCXPing function.

void MSRCXPlaySound (const byte snd)


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

121

MSRCXPlaySound function.

void MSRCXPlayTone (const unsigned int freq, const byte duration)


MSRCXPlayTone function.

void MSRCXPlayToneVar (const byte varnum, const byte duration)


MSRCXPlayToneVar function.

void MSRCXRemote (unsigned int cmd)


MSRCXRemote function.

void MSRCXReset (void)


MSRCXReset function.

void MSRCXRev (const byte outputs)


MSRCXRev function.

void MSRCXSelectDisplay (const byte src, const unsigned int value)


MSRCXSelectDisplay function.

void MSRCXSelectProgram (const byte prog)


MSRCXSelectProgram function.

void MSRCXSendSerial (const byte rst, const byte count)


MSRCXSendSerial function.

void MSRCXSet (const byte dstsrc, const byte dstval, const byte src, unsigned int value)
MSRCXSet function.

void MSRCXSetDirection (const byte outputs, const byte dir)


MSRCXSetDirection function.

void MSRCXSetEvent (const byte evt, const byte src, const byte type)
MSRCXSetEvent function.

void MSRCXSetGlobalDirection (const byte outputs, const byte dir)


MSRCXSetGlobalDirection function.

void MSRCXSetGlobalOutput (const byte outputs, const byte mode)


MSRCXSetGlobalOutput function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

122

void MSRCXSetMaxPower (const byte outputs, const byte pwrsrc, const byte pwrval)
MSRCXSetMaxPower function.

void MSRCXSetMessage (const byte msg)


MSRCXSetMessage function.

void MSRCXSetOutput (const byte outputs, const byte mode)


MSRCXSetOutput function.

void MSRCXSetPower (const byte outputs, const byte pwrsrc, const byte pwrval)
MSRCXSetPower function.

void MSRCXSetPriority (const byte p)


MSRCXSetPriority function.

void MSRCXSetSensorMode (const byte port, const byte mode)


MSRCXSetSensorMode function.

void MSRCXSetSensorType (const byte port, const byte type)


MSRCXSetSensorType function.

void MSRCXSetSleepTime (const byte t)


MSRCXSetSleepTime function.

void MSRCXSetTxPower (const byte pwr)


MSRCXSetTxPower function.

void MSRCXSetUserDisplay (const byte src, const unsigned int value, const byte precision)
MSRCXSetUserDisplay function.

void MSRCXSetVar (const byte varnum, const byte src, const unsigned int value)
MSRCXSetVar function.

void MSRCXSetWatch (const byte hours, const byte minutes)


MSRCXSetWatch function.

void MSRCXSgnVar (const byte varnum, const byte src, const unsigned int value)
MSRCXSgnVar function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

123

void MSRCXStartTask (const byte t)


MSRCXStartTask function.

void MSRCXStopAllTasks (void)


MSRCXStopAllTasks function.

void MSRCXStopTask (const byte t)


MSRCXStopTask function.

void MSRCXSubVar (const byte varnum, const byte src, const unsigned int value)
MSRCXSubVar function.

void MSRCXSumVar (const byte varnum, const byte src, const unsigned int value)
MSRCXSumVar function.

void MSRCXToggle (const byte outputs)


MSRCXToggle function.

void MSRCXUnlock (void)


MSRCXUnlock function.

void MSRCXUnmuteSound (void)


MSRCXUnmuteSound function.

void MSScoutCalibrateSensor (void)


MSScoutCalibrateSensor function.

void MSScoutMuteSound (void)


MSScoutMuteSound function.

void MSScoutSelectSounds (const byte grp)


MSScoutSelectSounds function.

void MSScoutSendVLL (const byte src, const unsigned int value)


MSScoutSendVLL function.

void MSScoutSetCounterLimit (const byte ctr, const byte src, const unsigned int value)
MSScoutSetCounterLimit function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

124

void MSScoutSetEventFeedback (const byte src, const unsigned int value)


MSScoutSetEventFeedback function.

void MSScoutSetLight (const byte x)


MSScoutSetLight function.

void MSScoutSetScoutMode (const byte mode)


MSScoutSetScoutMode function.

void MSScoutSetScoutRules (const byte m, const byte t, const byte l, const byte tm, const byte fx)
MSScoutSetScoutRules function.

void MSScoutSetSensorClickTime (const byte src, const unsigned int value)


MSScoutSetSensorClickTime function.

void MSScoutSetSensorHysteresis (const byte src, const unsigned int value)


MSScoutSetSensorHysteresis function.

void MSScoutSetSensorLowerLimit (const byte src, const unsigned int value)


MSScoutSetSensorLowerLimit function.

void MSScoutSetSensorUpperLimit (const byte src, const unsigned int value)


MSScoutSetSensorUpperLimit function.

void MSScoutSetTimerLimit (const byte tmr, const byte src, const unsigned int value)
MSScoutSetTimerLimit function.

void MSScoutUnmuteSound (void)


MSScoutUnmuteSound function.

6.18.1

Detailed Description

Functions for accessing and modifying MindSensors devices. 6.18.2 6.18.2.1 Function Documentation char ACCLNxCalibrateX (const byte port, const byte i2caddr) [inline]

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

125

Calibrate ACCL-Nx X-axis. Calibrate the mindsensors ACCL-Nx sensor X-axis. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_ACCLNxCalibrateX.nxc.

6.18.2.2

char ACCLNxCalibrateXEnd (const byte port, const byte i2caddr) [inline]

Stop calibrating ACCL-Nx X-axis. Stop calibrating the mindsensors ACCL-Nx sensor X-axis. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_ACCLNxCalibrateXEnd.nxc.

6.18.2.3

char ACCLNxCalibrateY (const byte port, const byte i2caddr) [inline]

Calibrate ACCL-Nx Y-axis. Calibrate the mindsensors ACCL-Nx sensor Y-axis. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

126

i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_ACCLNxCalibrateY.nxc.

6.18.2.4

char ACCLNxCalibrateYEnd (const byte port, const byte i2caddr) [inline]

Stop calibrating ACCL-Nx Y-axis. Stop calibrating the mindsensors ACCL-Nx sensor Y-axis. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_ACCLNxCalibrateYEnd.nxc.

6.18.2.5

char ACCLNxCalibrateZ (const byte port, const byte i2caddr) [inline]

Calibrate ACCL-Nx Z-axis. Calibrate the mindsensors ACCL-Nx sensor Z-axis. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

127

Examples: ex_ACCLNxCalibrateZ.nxc.

6.18.2.6

char ACCLNxCalibrateZEnd (const byte port, const byte i2caddr) [inline]

Stop calibrating ACCL-Nx Z-axis. Stop calibrating the mindsensors ACCL-Nx sensor Z-axis. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_ACCLNxCalibrateZEnd.nxc.

6.18.2.7

char ACCLNxResetCalibration (const byte port, const byte i2caddr) [inline]

Reset ACCL-Nx calibration. Reset the mindsensors ACCL-Nx sensor calibration to factory settings. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_ACCLNxResetCalibration.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

128

6.18.2.8

byte ACCLNxSensitivity (const byte port, const byte i2caddr) [inline]

Read ACCL-Nx sensitivity value. Read the mindsensors ACCL-Nx sensitivity value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The sensitivity value. Examples: ex_ACCLNxSensitivity.nxc.

6.18.2.9

int ACCLNxXOffset (const byte port, const byte i2caddr) [inline]

Read ACCL-Nx X offset value. Read the mindsensors ACCL-Nx sensors X offset value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The X offset value. Examples: ex_ACCLNxXOffset.nxc.

6.18.2.10

int ACCLNxXRange (const byte port, const byte i2caddr) [inline]

Read ACCL-Nx X range value. Read the mindsensors ACCL-Nx sensors X range value. The port must be congured as a Lowspeed port before using this function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

129

Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The X range value. Examples: ex_ACCLNxXRange.nxc.

6.18.2.11

int ACCLNxYOffset (const byte port, const byte i2caddr) [inline]

Read ACCL-Nx Y offset value. Read the mindsensors ACCL-Nx sensors Y offset value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The Y offset value. Examples: ex_ACCLNxYOffset.nxc.

6.18.2.12

int ACCLNxYRange (const byte port, const byte i2caddr) [inline]

Read ACCL-Nx Y range value. Read the mindsensors ACCL-Nx sensors Y range value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

130

Returns: The Y range value. Examples: ex_ACCLNxYRange.nxc.

6.18.2.13

int ACCLNxZOffset (const byte port, const byte i2caddr) [inline]

Read ACCL-Nx Z offset value. Read the mindsensors ACCL-Nx sensors Z offset value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The Z offset value. Examples: ex_ACCLNxZOffset.nxc.

6.18.2.14

int ACCLNxZRange (const byte port, const byte i2caddr) [inline]

Read ACCL-Nx Z range value. Read the mindsensors ACCL-Nx sensors Z range value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The Z range value. Examples: ex_ACCLNxZRange.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

131

6.18.2.15

int DISTNxDistance (const byte port, const byte i2caddr) [inline]

Read DISTNx distance value. Read the mindsensors DISTNx sensors distance value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The distance value. Examples: ex_DISTNxDistance.nxc.

6.18.2.16

char DISTNxGP2D12 (const byte port, const byte i2caddr) [inline]

Congure DISTNx as GP2D12. Congure the mindsensors DISTNx sensor as GP2D12. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_DISTNxGP2D12.nxc.

6.18.2.17

char DISTNxGP2D120 (const byte port, const byte i2caddr) [inline]

Congure DISTNx as GP2D120. Congure the mindsensors DISTNx sensor as GP2D120. The port must be congured as a Lowspeed port before using this function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

132

Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_DISTNxGP2D120.nxc.

6.18.2.18

char DISTNxGP2YA02 (const byte port, const byte i2caddr) [inline]

Congure DISTNx as GP2YA02. Congure the mindsensors DISTNx sensor as GP2YA02. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_DISTNxGP2YA02.nxc.

6.18.2.19

char DISTNxGP2YA21 (const byte port, const byte i2caddr) [inline]

Congure DISTNx as GP2YA21. Congure the mindsensors DISTNx sensor as GP2YA21. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

133

i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_DISTNxGP2YA21.nxc.

6.18.2.20

int DISTNxMaxDistance (const byte port, const byte i2caddr) [inline]

Read DISTNx maximum distance value. Read the mindsensors DISTNx sensors maximum distance value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The maximum distance value. Examples: ex_DISTNxMaxDistance.nxc.

6.18.2.21

int DISTNxMinDistance (const byte port, const byte i2caddr) [inline]

Read DISTNx minimum distance value. Read the mindsensors DISTNx sensors minimum distance value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

134

Returns: The distance value. Examples: ex_DISTNxMinDistance.nxc.

6.18.2.22

byte DISTNxModuleType (const byte port, const byte i2caddr) [inline]

Read DISTNx module type value. Read the mindsensors DISTNx sensors module type value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The module type value. Examples: ex_DISTNxModuleType.nxc.

6.18.2.23

byte DISTNxNumPoints (const byte port, const byte i2caddr) [inline]

Read DISTNx num points value. Read the mindsensors DISTNx sensors num points value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The num points value. Examples: ex_DISTNxNumPoints.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

135

6.18.2.24

int DISTNxVoltage (const byte port, const byte i2caddr) [inline]

Read DISTNx voltage value. Read the mindsensors DISTNx sensors voltage value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The voltage value. Examples: ex_DISTNxVoltage.nxc.

6.18.2.25

char MSADPAOff (const byte port, const byte i2caddr) [inline]

Turn off mindsensors ADPA mode. Turn ADPA mode off for the mindsensors device on the specied port. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_MSADPAOff.nxc.

6.18.2.26

char MSADPAOn (const byte port, const byte i2caddr) [inline]

Turn on mindsensors ADPA mode. Turn ADPA mode on for the mindsensors device on the specied port. The port must be congured as a Lowspeed port before using this function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

136

Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_MSADPAOn.nxc.

6.18.2.27

char MSDeenergize (const byte port, const byte i2caddr) [inline]

Turn off power to device. Turn power off for the mindsensors device on the specied port. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_MSDeenergize.nxc.

6.18.2.28

char MSEnergize (const byte port, const byte i2caddr) [inline]

Turn on power to device. Turn the power on for the mindsensors device on the specied port. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

137

Examples: ex_MSEnergize.nxc.

6.18.2.29

char MSIRTrain (const byte port, const byte i2caddr, const byte channel, const byte func) [inline]

MSIRTrain function. Control an IR Train receiver set to the specied channel using the mindsensors NRLink device. Valid function values are TRAIN_FUNC_STOP, TRAIN_FUNC_INCR_SPEED, TRAIN_FUNC_DECR_SPEED, and TRAIN_FUNC_TOGGLE_LIGHT. Valid channels are TRAIN_CHANNEL_1 through TRAIN_CHANNEL_3 and TRAIN_CHANNEL_ALL. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. channel The IR Train channel. See IR Train channel constants. func The IR Train function. See PF/IR Train function constants Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_MSIRTrain.nxc.

6.18.2.30

char MSPFComboDirect (const byte port, const byte i2caddr, const byte channel, const byte outa, const byte outb) [inline]

MSPFComboDirect function. Execute a pair of Power Function motor commands on the specied channel using the mindsensors NRLink device. Commands for outa and outb are PF_CMD_STOP, PF_CMD_REV, PF_CMD_FWD, and PF_CMD_BRAKE. Valid channels are PF_CHANNEL_1 through PF_CHANNEL_4. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

138

i2caddr The sensor I2C address. See sensor documentation for this value. channel The Power Function channel. See Power Function channel constants. outa The Power Function command for output A. See Power Function command constants. outb The Power Function command for output B. See Power Function command constants. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_MSPFComboDirect.nxc.

6.18.2.31

char MSPFComboPWM (const byte port, const byte i2caddr, const byte channel, const byte outa, const byte outb) [inline]

MSPFComboPWM function. Control the speed of both outputs on a Power Function receiver set to the specied channel using the mindsensors NRLink device. Valid output values are PF_PWM_FLOAT, PF_PWM_FWD1, PF_PWM_FWD2, PF_PWM_FWD3, PF_PWM_FWD4, PF_PWM_FWD5, PF_PWM_FWD6, PF_PWM_FWD7, PF_PWM_BRAKE, PF_PWM_REV7, PF_PWM_REV6, PF_PWM_REV5, PF_PWM_REV4, PF_PWM_REV3, PF_PWM_REV2, and PF_PWM_REV1. Valid channels are PF_CHANNEL_1 through PF_CHANNEL_4. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. channel The Power Function channel. See Power Function channel constants. outa The Power Function PWM command for output A. See Power Function PWM option constants. outb The Power Function PWM command for output B. See Power Function PWM option constants. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_MSPFComboPWM.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

139

6.18.2.32

char MSPFRawOutput (const byte port, const byte i2caddr, const byte nibble0, const byte nibble1, const byte nibble2) [inline]

MSPFRawOutput function. Control a Power Function receiver set to the specied channel using the mindsensors NRLink device. Build the raw data stream using the 3 nibbles (4 bit values). The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. nibble0 The rst raw data nibble. nibble1 The second raw data nibble. nibble2 The third raw data nibble. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_MSPFRawOutput.nxc.

6.18.2.33

char MSPFRepeat (const byte port, const byte i2caddr, const byte count, const unsigned int delay) [inline]

MSPFRepeat function. Repeat sending the last Power Function command using the mindsensors NRLink device. Specify the number of times to repeat the command and the number of milliseconds of delay between each repetition. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. count The number of times to repeat the command. delay The number of milliseconds to delay between each repetition. Returns: The function call result. NO_ERR or Communications specic errors.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

140

Examples: ex_MSPFRepeat.nxc.

6.18.2.34

char MSPFSingleOutputCST (const byte port, const byte i2caddr, const byte channel, const byte out, const byte func) [inline]

MSPFSingleOutputCST function. Control a single output on a Power Function receiver set to the specied channel using the mindsensors NRLink device. Select the desired output using PF_OUT_A or PF_OUT_B. Valid functions are PF_CST_CLEAR1_CLEAR2, PF_CST_SET1_CLEAR2, PF_CST_CLEAR1_SET2, PF_CST_SET1_SET2, PF_CST_INCREMENT_PWM, PF_CST_DECREMENT_PWM, PF_CST_FULL_FWD, PF_CST_FULL_REV, and PF_CST_TOGGLE_DIR. Valid channels are PF_CHANNEL_1 through PF_CHANNEL_4. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. channel The Power Function channel. See Power Function channel constants. out The Power Function output. See Power Function output constants. func The Power Function CST function. See Power Function CST options constants. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_MSPFSingleOutputCST.nxc.

6.18.2.35

char MSPFSingleOutputPWM (const byte port, const byte i2caddr, const byte channel, const byte out, const byte func) [inline]

MSPFSingleOutputPWM function. Control the speed of a single output on a Power Function receiver set to the specied channel using the mindsensors NRLink device. Select the desired output using PF_OUT_A or PF_OUT_B. Valid functions

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

141

are PF_PWM_FLOAT, PF_PWM_FWD1, PF_PWM_FWD2, PF_PWM_FWD3, PF_PWM_FWD4, PF_PWM_FWD5, PF_PWM_FWD6, PF_PWM_FWD7, PF_PWM_BRAKE, PF_PWM_REV7, PF_PWM_REV6, PF_PWM_REV5, PF_PWM_REV4, PF_PWM_REV3, PF_PWM_REV2, and PF_PWM_REV1. Valid channels are PF_CHANNEL_1 through PF_CHANNEL_4. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. channel The Power Function channel. See Power Function channel constants. out The Power Function output. See Power Function output constants. func The Power Function PWM function. See Power Function PWM option constants. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_MSPFSingleOutputPWM.nxc.

6.18.2.36

char MSPFSinglePin (const byte port, const byte i2caddr, const byte channel, const byte out, const byte pin, const byte func, bool cont) [inline]

MSPFSinglePin function. Control a single pin on a Power Function receiver set to the specied channel using the mindsensors NRLink device. Select the desired output using PF_OUT_A or PF_OUT_B. Select the desired pin using PF_PIN_C1 or PF_PIN_C2. Valid functions are PF_FUNC_NOCHANGE, PF_FUNC_CLEAR, PF_FUNC_SET, and PF_FUNC_TOGGLE. Valid channels are PF_CHANNEL_1 through PF_CHANNEL_4. Specify whether the mode by passing true (continuous) or false (timeout) as the nal parameter. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. channel The Power Function channel. See Power Function channel constants.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

142

out The Power Function output. See Power Function output constants. pin The Power Function pin. See Power Function pin constants. func The Power Function single pin function. See Power Function single pin function constants. cont Control whether the mode is continuous or timeout. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_MSPFSinglePin.nxc.

6.18.2.37

char MSPFTrain (const byte port, const byte i2caddr, const byte channel, const byte func) [inline]

MSPFTrain function. Control both outputs on a Power Function receiver set to the specied channel using the mindsensors NRLink device as if it were an IR Train receiver. Valid function values are TRAIN_FUNC_STOP, TRAIN_FUNC_INCR_SPEED, TRAIN_FUNC_DECR_SPEED, and TRAIN_FUNC_TOGGLE_LIGHT. Valid channels are PF_CHANNEL_1 through PF_CHANNEL_4. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. channel The Power Function channel. See Power Function channel constants. func The Power Function train function. See PF/IR Train function constants. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_MSPFTrain.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

143

6.18.2.38

void MSRCXAbsVar (const byte varnum, const byte byte src, const unsigned int value) [inline]

MSRCXAbsVar function. Send the AbsVar command to an RCX. Parameters: varnum The variable number to change. src The RCX source. See RCX and Scout source constants. value The RCX value. Examples: ex_MSRCXAbsVar.nxc.

6.18.2.39

void MSRCXAddToDatalog (const byte src, const unsigned int value) [inline]

MSRCXAddToDatalog function. Send the AddToDatalog command to an RCX. Parameters: src The RCX source. See RCX and Scout source constants. value The RCX value. Examples: ex_MSRCXAddToDatalog.nxc.

6.18.2.40

void MSRCXAndVar (const byte varnum, const byte src, const unsigned int value) [inline]

MSRCXAndVar function. Send the AndVar command to an RCX. Parameters: varnum The variable number to change. src The RCX source. See RCX and Scout source constants. value The RCX value.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

144

Examples: ex_MSRCXAndVar.nxc.

6.18.2.41

int MSRCXBatteryLevel (void) [inline]

MSRCXBatteryLevel function. Send the BatteryLevel command to an RCX to read the current battery level. Returns: The RCX battery level. Examples: ex_MSRCXBatteryLevel.nxc.

6.18.2.42

void MSRCXBoot (void) [inline]

MSRCXBoot function. Send the Boot command to an RCX. Examples: ex_MSRCXBoot.nxc.

6.18.2.43

void MSRCXCalibrateEvent (const byte evt, const byte low, const byte hi, const byte hyst) [inline]

MSRCXCalibrateEvent function. Send the CalibrateEvent command to an RCX. Parameters: evt The event number. low The low threshold. hi The high threshold. hyst The hysterisis value. Examples: ex_MSRCXCalibrateEvent.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

145

6.18.2.44

void MSRCXClearAllEvents (void) [inline]

MSRCXClearAllEvents function. Send the ClearAllEvents command to an RCX. Examples: ex_MSRCXClearAllEvents.nxc.

6.18.2.45

void MSRCXClearCounter (const byte counter) [inline]

MSRCXClearCounter function. Send the ClearCounter command to an RCX. Parameters: counter The counter to clear. Examples: ex_MSRCXClearCounter.nxc.

6.18.2.46

void MSRCXClearMsg (void) [inline]

MSRCXClearMsg function. Send the ClearMsg command to an RCX. Examples: ex_MSRCXClearMsg.nxc.

6.18.2.47

void MSRCXClearSensor (const byte port) [inline]

MSRCXClearSensor function. Send the ClearSensor command to an RCX. Parameters: port The RCX port number. Examples: ex_MSRCXClearSensor.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

146

6.18.2.48

void MSRCXClearSound (void) [inline]

MSRCXClearSound function. Send the ClearSound command to an RCX. Examples: ex_MSRCXClearSound.nxc.

6.18.2.49

void MSRCXClearTimer (const byte timer) [inline]

MSRCXClearTimer function. Send the ClearTimer command to an RCX. Parameters: timer The timer to clear. Examples: ex_MSRCXClearTimer.nxc.

6.18.2.50

void MSRCXCreateDatalog (const unsigned int size) [inline]

MSRCXCreateDatalog function. Send the CreateDatalog command to an RCX. Parameters: size The new datalog size. Examples: ex_MSRCXCreateDatalog.nxc.

6.18.2.51

void MSRCXDecCounter (const byte counter) [inline]

MSRCXDecCounter function. Send the DecCounter command to an RCX. Parameters: counter The counter to decrement.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

147

Examples: ex_MSRCXDecCounter.nxc.

6.18.2.52

void MSRCXDeleteSub (const byte s) [inline]

MSRCXDeleteSub function. Send the DeleteSub command to an RCX. Parameters: s The subroutine number to delete. Examples: ex_MSRCXDeleteSub.nxc.

6.18.2.53

void MSRCXDeleteSubs (void) [inline]

MSRCXDeleteSubs function. Send the DeleteSubs command to an RCX. Examples: ex_MSRCXDeleteSubs.nxc.

6.18.2.54

void MSRCXDeleteTask (const byte t) [inline]

MSRCXDeleteTask function. Send the DeleteTask command to an RCX. Parameters: t The task number to delete. Examples: ex_MSRCXDeleteTask.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

148

6.18.2.55

void MSRCXDeleteTasks (void) [inline]

MSRCXDeleteTasks function. Send the DeleteTasks command to an RCX. Examples: ex_MSRCXDeleteTasks.nxc.

6.18.2.56

void MSRCXDisableOutput (const byte outputs) [inline]

MSRCXDisableOutput function. Send the DisableOutput command to an RCX. Parameters: outputs The RCX output(s) to disable. See RCX output constants. Examples: ex_MSRCXDisableOutput.nxc.

6.18.2.57

void MSRCXDivVar (const byte varnum, const byte src, const unsigned int value) [inline]

MSRCXDivVar function. Send the DivVar command to an RCX. Parameters: varnum The variable number to change. src The RCX source. See RCX and Scout source constants. value The RCX value. Examples: ex_MSRCXDivVar.nxc.

6.18.2.58

void MSRCXEnableOutput (const byte outputs) [inline]

MSRCXEnableOutput function. Send the EnableOutput command to an RCX.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

149

Parameters: outputs The RCX output(s) to enable. See RCX output constants. Examples: ex_MSRCXEnableOutput.nxc.

6.18.2.59

void MSRCXEvent (const byte src, const unsigned int value) [inline]

MSRCXEvent function. Send the Event command to an RCX. Parameters: src The RCX source. See RCX and Scout source constants. value The RCX value. Examples: ex_MSRCXEvent.nxc.

6.18.2.60

void MSRCXFloat (const byte outputs) [inline]

MSRCXFloat function. Send commands to an RCX to oat the specied outputs. Parameters: outputs The RCX output(s) to oat. See RCX output constants. Examples: ex_MSRCXFloat.nxc.

6.18.2.61

void MSRCXFwd (const byte outputs) [inline]

MSRCXFwd function. Send commands to an RCX to set the specied outputs to the forward direction.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

150

Parameters: outputs The RCX output(s) to set forward. See RCX output constants. Examples: ex_MSRCXFwd.nxc.

6.18.2.62

void MSRCXIncCounter (const byte counter) [inline]

MSRCXIncCounter function. Send the IncCounter command to an RCX. Parameters: counter The counter to increment. Examples: ex_MSRCXIncCounter.nxc.

6.18.2.63

void MSRCXInvertOutput (const byte outputs) [inline]

MSRCXInvertOutput function. Send the InvertOutput command to an RCX. Parameters: outputs The RCX output(s) to invert. See RCX output constants. Examples: ex_MSRCXInvertOutput.nxc.

6.18.2.64

void MSRCXMulVar (const byte varnum, const byte src, unsigned int value) [inline]

MSRCXMulVar function. Send the MulVar command to an RCX. Parameters: varnum The variable number to change.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

151

src The RCX source. See RCX and Scout source constants. value The RCX value. Examples: ex_MSRCXMulVar.nxc.

6.18.2.65

void MSRCXMuteSound (void) [inline]

MSRCXMuteSound function. Send the MuteSound command to an RCX. Examples: ex_MSRCXMuteSound.nxc.

6.18.2.66

void MSRCXObvertOutput (const byte outputs) [inline]

MSRCXObvertOutput function. Send the ObvertOutput command to an RCX. Parameters: outputs The RCX output(s) to obvert. See RCX output constants. Examples: ex_MSRCXObvertOutput.nxc.

6.18.2.67

void MSRCXOff (const byte outputs) [inline]

MSRCXOff function. Send commands to an RCX to turn off the specied outputs. Parameters: outputs The RCX output(s) to turn off. See RCX output constants. Examples: ex_MSRCXOff.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

152

6.18.2.68

void MSRCXOn (const byte outputs) [inline]

MSRCXOn function. Send commands to an RCX to turn on the specied outputs. Parameters: outputs The RCX output(s) to turn on. See RCX output constants. Examples: ex_MSRCXOn.nxc.

6.18.2.69

void MSRCXOnFor (const byte outputs, const unsigned int ms) [inline]

MSRCXOnFor function. Send commands to an RCX to turn on the specied outputs in the forward direction for the specied duration. Parameters: outputs The RCX output(s) to turn on. See RCX output constants. ms The number of milliseconds to leave the outputs on Examples: ex_MSRCXOnFor.nxc.

6.18.2.70

void MSRCXOnFwd (const byte outputs) [inline]

MSRCXOnFwd function. Send commands to an RCX to turn on the specied outputs in the forward direction. Parameters: outputs The RCX output(s) to turn on in the forward direction. See RCX output constants. Examples: ex_MSRCXOnFwd.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

153

6.18.2.71

void MSRCXOnRev (const byte outputs) [inline]

MSRCXOnRev function. Send commands to an RCX to turn on the specied outputs in the reverse direction. Parameters: outputs The RCX output(s) to turn on in the reverse direction. See RCX output constants. Examples: ex_MSRCXOnRev.nxc.

6.18.2.72

void MSRCXOrVar (const byte varnum, const byte src, const unsigned int value) [inline]

MSRCXOrVar function. Send the OrVar command to an RCX. Parameters: varnum The variable number to change. src The RCX source. See RCX and Scout source constants. value The RCX value. Examples: ex_MSRCXOrVar.nxc.

6.18.2.73

void MSRCXPBTurnOff (void) [inline]

MSRCXPBTurnOff function. Send the PBTurnOff command to an RCX. Examples: ex_MSRCXPBTurnOff.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

154

6.18.2.74

void MSRCXPing (void) [inline]

MSRCXPing function. Send the Ping command to an RCX. Examples: ex_MSRCXPing.nxc.

6.18.2.75

void MSRCXPlaySound (const byte snd) [inline]

MSRCXPlaySound function. Send the PlaySound command to an RCX. Parameters: snd The sound number to play. Examples: ex_MSRCXPlaySound.nxc.

6.18.2.76

void MSRCXPlayTone (const unsigned int freq, const byte duration) [inline]

MSRCXPlayTone function. Send the PlayTone command to an RCX. Parameters: freq The frequency of the tone to play. duration The duration of the tone to play. Examples: ex_MSRCXPlayTone.nxc.

6.18.2.77

void MSRCXPlayToneVar (const byte varnum, const byte duration) [inline]

MSRCXPlayToneVar function. Send the PlayToneVar command to an RCX.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

155

Parameters: varnum The variable containing the tone frequency to play. duration The duration of the tone to play. Examples: ex_MSRCXPlayToneVar.nxc.

6.18.2.78

int MSRCXPoll (const byte src, const byte value) [inline]

MSRCXPoll function. Send the Poll command to an RCX to read a signed 2-byte value at the specied source and value combination. Parameters: src The RCX source. See RCX and Scout source constants. value The RCX value. Returns: The value read from the specied port and value. Examples: ex_MSRCXPoll.nxc.

6.18.2.79

int MSRCXPollMemory (const unsigned int address) [inline]

MSRCXPollMemory function. Send the PollMemory command to an RCX. Parameters: address The RCX memory address. Returns: The value read from the specied address. Examples: ex_MSRCXPollMemory.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

156

6.18.2.80

void MSRCXRemote (unsigned int cmd) [inline]

MSRCXRemote function. Send the Remote command to an RCX. Parameters: cmd The RCX IR remote command to send. See RCX IR remote constants. Examples: ex_MSRCXRemote.nxc.

6.18.2.81

void MSRCXReset (void) [inline]

MSRCXReset function. Send the Reset command to an RCX. Examples: ex_MSRCXReset.nxc.

6.18.2.82

void MSRCXRev (const byte outputs) [inline]

MSRCXRev function. Send commands to an RCX to set the specied outputs to the reverse direction. Parameters: outputs The RCX output(s) to reverse direction. See RCX output constants. Examples: ex_MSRCXRev.nxc.

6.18.2.83

void MSRCXSelectDisplay (const byte src, const unsigned int value) [inline]

MSRCXSelectDisplay function. Send the SelectDisplay command to an RCX.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

157

Parameters: src The RCX source. See RCX and Scout source constants. value The RCX value. Examples: ex_MSRCXSelectDisplay.nxc.

6.18.2.84

void MSRCXSelectProgram (const byte prog) [inline]

MSRCXSelectProgram function. Send the SelectProgram command to an RCX. Parameters: prog The program number to select. Examples: ex_MSRCXSelectProgram.nxc.

6.18.2.85

void MSRCXSendSerial (const byte rst, const byte count) [inline]

MSRCXSendSerial function. Send the SendSerial command to an RCX. Parameters: rst The rst byte address. count The number of bytes to send. Examples: ex_MSRCXSendSerial.nxc.

6.18.2.86

void MSRCXSet (const byte dstsrc, const byte dstval, const byte src, unsigned int value) [inline]

MSRCXSet function. Send the Set command to an RCX.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

158

Parameters: dstsrc The RCX destination source. See RCX and Scout source constants. dstval The RCX destination value. src The RCX source. See RCX and Scout source constants. value The RCX value. Examples: ex_MSRCXSet.nxc.

6.18.2.87

void MSRCXSetDirection (const byte outputs, const byte dir) [inline]

MSRCXSetDirection function. Send the SetDirection command to an RCX to congure the direction of the specied outputs. Parameters: outputs The RCX output(s) to set direction. See RCX output constants. dir The RCX output direction. See RCX output direction constants. Examples: ex_MSRCXSetDirection.nxc.

6.18.2.88

void MSRCXSetEvent (const byte evt, const byte src, const byte type) [inline]

MSRCXSetEvent function. Send the SetEvent command to an RCX. Parameters: evt The event number to set. src The RCX source. See RCX and Scout source constants. type The event type. Examples: ex_MSRCXSetEvent.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

159

6.18.2.89

void MSRCXSetGlobalDirection (const byte outputs, const byte dir) [inline]

MSRCXSetGlobalDirection function. Send the SetGlobalDirection command to an RCX. Parameters: outputs The RCX output(s) to set global direction. See RCX output constants. dir The RCX output direction. See RCX output direction constants. Examples: ex_MSRCXSetGlobalDirection.nxc.

6.18.2.90

void MSRCXSetGlobalOutput (const byte outputs, const byte mode) [inline]

MSRCXSetGlobalOutput function. Send the SetGlobalOutput command to an RCX. Parameters: outputs The RCX output(s) to set global mode. See RCX output constants. mode The RCX output mode. See RCX output mode constants. Examples: ex_MSRCXSetGlobalOutput.nxc.

6.18.2.91

void MSRCXSetMaxPower (const byte outputs, const byte pwrsrc, const byte pwrval) [inline]

MSRCXSetMaxPower function. Send the SetMaxPower command to an RCX. Parameters: outputs The RCX output(s) to set max power. See RCX output constants. pwrsrc The RCX source. See RCX and Scout source constants. pwrval The RCX value.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

160

Examples: ex_MSRCXSetMaxPower.nxc.

6.18.2.92

void MSRCXSetMessage (const byte msg) [inline]

MSRCXSetMessage function. Send the SetMessage command to an RCX. Parameters: msg The numeric message to send. Examples: ex_MSRCXSetMessage.nxc.

6.18.2.93

void MSRCXSetNRLinkPort (const byte port, const byte i2caddr) [inline]

MSRCXSetIRLinkPort function. Set the global port in advance of using the MSRCX and MSScout API functions for sending RCX and Scout messages over the mindsensors NRLink device. The port must be congured as a Lowspeed port before using any of the mindsensors RCX and Scout NRLink functions. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Examples: ex_MSRCXSetNRLinkPort.nxc.

6.18.2.94

void MSRCXSetOutput (const byte outputs, const byte mode) [inline]

MSRCXSetOutput function. Send the SetOutput command to an RCX to congure the mode of the specied outputs

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

161

Parameters: outputs The RCX output(s) to set mode. See RCX output constants. mode The RCX output mode. See RCX output mode constants. Examples: ex_MSRCXSetOutput.nxc.

6.18.2.95

void MSRCXSetPower (const byte outputs, const byte pwrsrc, const byte pwrval) [inline]

MSRCXSetPower function. Send the SetPower command to an RCX to congure the power level of the specied outputs. Parameters: outputs The RCX output(s) to set power. See RCX output constants. pwrsrc The RCX source. See RCX and Scout source constants. pwrval The RCX value. Examples: ex_MSRCXSetPower.nxc.

6.18.2.96

void MSRCXSetPriority (const byte p) [inline]

MSRCXSetPriority function. Send the SetPriority command to an RCX. Parameters: p The new task priority. Examples: ex_MSRCXSetPriority.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

162

6.18.2.97

void MSRCXSetSensorMode (const byte port, const byte mode) [inline]

MSRCXSetSensorMode function. Send the SetSensorMode command to an RCX. Parameters: port The RCX sensor port. mode The RCX sensor mode. Examples: ex_MSRCXSetSensorMode.nxc.

6.18.2.98

void MSRCXSetSensorType (const byte port, const byte type) [inline]

MSRCXSetSensorType function. Send the SetSensorType command to an RCX. Parameters: port The RCX sensor port. type The RCX sensor type. Examples: ex_MSRCXSetSensorType.nxc.

6.18.2.99

void MSRCXSetSleepTime (const byte t) [inline]

MSRCXSetSleepTime function. Send the SetSleepTime command to an RCX. Parameters: t The new sleep time value. Examples: ex_MSRCXSetSleepTime.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

163

6.18.2.100

void MSRCXSetTxPower (const byte pwr) [inline]

MSRCXSetTxPower function. Send the SetTxPower command to an RCX. Parameters: pwr The IR transmit power level. Examples: ex_MSRCXSetTxPower.nxc.

6.18.2.101

void MSRCXSetUserDisplay (const byte src, const unsigned int value, const byte precision) [inline]

MSRCXSetUserDisplay function. Send the SetUserDisplay command to an RCX. Parameters: src The RCX source. See RCX and Scout source constants. value The RCX value. precision The number of digits of precision. Examples: ex_MSRCXSetUserDisplay.nxc.

6.18.2.102

void MSRCXSetVar (const byte varnum, const byte src, const unsigned int value) [inline]

MSRCXSetVar function. Send the SetVar command to an RCX. Parameters: varnum The variable number to change. src The RCX source. See RCX and Scout source constants. value The RCX value. Examples: ex_MSRCXSetVar.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

164

6.18.2.103

void MSRCXSetWatch (const byte hours, const byte minutes) [inline]

MSRCXSetWatch function. Send the SetWatch command to an RCX. Parameters: hours The new watch time hours value. minutes The new watch time minutes value. Examples: ex_MSRCXSetWatch.nxc.

6.18.2.104

void MSRCXSgnVar (const byte varnum, const byte src, const unsigned int value) [inline]

MSRCXSgnVar function. Send the SgnVar command to an RCX. Parameters: varnum The variable number to change. src The RCX source. See RCX and Scout source constants. value The RCX value. Examples: ex_MSRCXSgnVar.nxc.

6.18.2.105

void MSRCXStartTask (const byte t) [inline]

MSRCXStartTask function. Send the StartTask command to an RCX. Parameters: t The task number to start. Examples: ex_MSRCXStartTask.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

165

6.18.2.106

void MSRCXStopAllTasks (void) [inline]

MSRCXStopAllTasks function. Send the StopAllTasks command to an RCX. Examples: ex_MSRCXStopAllTasks.nxc.

6.18.2.107

void MSRCXStopTask (const byte t) [inline]

MSRCXStopTask function. Send the StopTask command to an RCX. Parameters: t The task number to stop. Examples: ex_MSRCXStopTask.nxc.

6.18.2.108

void MSRCXSubVar (const byte varnum, const byte src, const unsigned int value) [inline]

MSRCXSubVar function. Send the SubVar command to an RCX. Parameters: varnum The variable number to change. src The RCX source. See RCX and Scout source constants. value The RCX value. Examples: ex_MSRCXSubVar.nxc.

6.18.2.109

void MSRCXSumVar (const byte varnum, const byte src, const unsigned int value) [inline]

MSRCXSumVar function. Send the SumVar command to an RCX.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

166

Parameters: varnum The variable number to change. src The RCX source. See RCX and Scout source constants. value The RCX value. Examples: ex_MSRCXSumVar.nxc.

6.18.2.110

void MSRCXToggle (const byte outputs) [inline]

MSRCXToggle function. Send commands to an RCX to toggle the direction of the specied outputs. Parameters: outputs The RCX output(s) to toggle. See RCX output constants. Examples: ex_MSRCXToggle.nxc.

6.18.2.111

void MSRCXUnlock (void) [inline]

MSRCXUnlock function. Send the Unlock command to an RCX. Examples: ex_MSRCXUnlock.nxc.

6.18.2.112

void MSRCXUnmuteSound (void) [inline]

MSRCXUnmuteSound function. Send the UnmuteSound command to an RCX. Examples: ex_MSRCXUnmuteSound.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

167

6.18.2.113

int MSReadValue (const byte port, const byte i2caddr, const byte reg, const byte numbytes) [inline]

Read a mindsensors device value. Read a one, two, or four byte value from a mindsensors sensor. The value must be stored with the least signcant byte (LSB) rst (i.e., little endian). Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. reg The device register to read. numbytes The number of bytes to read. Only 1, 2 or 4 byte values are supported. Returns: The function call result. Examples: ex_MSReadValue.nxc.

6.18.2.114

void MSScoutCalibrateSensor (void) [inline]

MSScoutCalibrateSensor function. Send the CalibrateSensor command to a Scout. Examples: ex_MSScoutCalibrateSensor.nxc.

6.18.2.115

void MSScoutMuteSound (void) [inline]

MSScoutMuteSound function. Send the MuteSound command to a Scout. Examples: ex_MSScoutMuteSound.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

168

6.18.2.116

void MSScoutSelectSounds (const byte grp) [inline]

MSScoutSelectSounds function. Send the SelectSounds command to a Scout. Parameters: grp The Scout sound group to select. Examples: ex_MSScoutSelectSounds.nxc.

6.18.2.117

void MSScoutSendVLL (const byte src, const unsigned int value) [inline]

MSScoutSendVLL function. Send the SendVLL command to a Scout. Parameters: src The Scout source. See RCX and Scout source constants. value The Scout value. Examples: ex_MSScoutSendVLL.nxc.

6.18.2.118

void MSScoutSetCounterLimit (const byte ctr, const byte src, const unsigned int value) [inline]

MSScoutSetCounterLimit function. Send the SetCounterLimit command to a Scout. Parameters: ctr The counter for which to set the limit. src The Scout source. See RCX and Scout source constants. value The Scout value. Examples: ex_MSScoutSetCounterLimit.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

169

6.18.2.119

void MSScoutSetEventFeedback (const byte src, const unsigned int value) [inline]

MSScoutSetEventFeedback function. Scout. Parameters:

Send the SetEventFeedback command to a

src The Scout source. See RCX and Scout source constants. value The Scout value. Examples: ex_MSScoutSetEventFeedback.nxc.

6.18.2.120

void MSScoutSetLight (const byte x) [inline]

MSScoutSetLight function. Send the SetLight command to a Scout. Parameters: x Set the light on or off using this value. See Scout light constants. Examples: ex_MSScoutSetLight.nxc.

6.18.2.121

void MSScoutSetScoutMode (const byte mode) [inline]

MSScoutSetScoutMode function. Send the SetScoutMode command to a Scout. Parameters: mode Set the scout mode. See Scout mode constants. Examples: ex_MSScoutSetScoutMode.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

170

6.18.2.122

void MSScoutSetScoutRules (const byte m, const byte t, const byte l, const byte tm, const byte fx) [inline]

MSScoutSetScoutRules function. Send the SetScoutRules command to a Scout. Parameters: m Scout motion rule. See Scout motion rule constants. t Scout touch rule. See Scout touch rule constants. l Scout light rule. See Scout light rule constants. tm Scout transmit rule. See Scout transmit rule constants. fx Scout special effects rule. See Scout special effect constants. Examples: ex_MSScoutSetScoutRules.nxc.

6.18.2.123

void MSScoutSetSensorClickTime (const byte src, const unsigned int value) [inline]

MSScoutSetSensorClickTime function. Send the SetSensorClickTime command to a Scout. Parameters: src The Scout source. See RCX and Scout source constants. value The Scout value. Examples: ex_MSScoutSetSensorClickTime.nxc.

6.18.2.124

void MSScoutSetSensorHysteresis (const byte src, const unsigned int value) [inline]

MSScoutSetSensorHysteresis function. Send the SetSensorHysteresis command to a Scout.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

171

Parameters: src The Scout source. See RCX and Scout source constants. value The Scout value. Examples: ex_MSScoutSetSensorHysteresis.nxc.

6.18.2.125

void MSScoutSetSensorLowerLimit (const byte src, const unsigned int value) [inline]

MSScoutSetSensorLowerLimit function. Send the SetSensorLowerLimit command to a Scout. Parameters: src The Scout source. See RCX and Scout source constants. value The Scout value. Examples: ex_MSScoutSetSensorLowerLimit.nxc.

6.18.2.126

void MSScoutSetSensorUpperLimit (const byte src, const unsigned int value) [inline]

MSScoutSetSensorUpperLimit function. Send the SetSensorUpperLimit command to a Scout. Parameters: src The Scout source. See RCX and Scout source constants. value The Scout value. Examples: ex_MSScoutSetSensorUpperLimit.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

172

6.18.2.127

void MSScoutSetTimerLimit (const byte tmr, const byte src, const unsigned int value) [inline]

MSScoutSetTimerLimit function. Send the SetTimerLimit command to a Scout. Parameters: tmr The timer for which to set a limit. src The Scout source. See RCX and Scout source constants. value The Scout value. Examples: ex_MSScoutSetTimerLimit.nxc.

6.18.2.128

void MSScoutUnmuteSound (void) [inline]

MSScoutUnmuteSound function. Send the UnmuteSound command to a Scout. Examples: ex_MSScoutUnmuteSound.nxc.

6.18.2.129

char NRLink2400 (const byte port, const byte i2caddr) [inline]

Congure NRLink in 2400 baud mode. Congure the mindsensors NRLink device in 2400 baud mode. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_NRLink2400.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

173

6.18.2.130

char NRLink4800 (const byte port, const byte i2caddr) [inline]

Congure NRLink in 4800 baud mode. Congure the mindsensors NRLink device in 4800 baud mode. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_NRLink4800.nxc.

6.18.2.131

char NRLinkFlush (const byte port, const byte i2caddr) [inline]

Flush NRLink buffers. Flush the mindsensors NRLink device buffers. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_NRLinkFlush.nxc.

6.18.2.132

char NRLinkIRLong (const byte port, const byte i2caddr) [inline]

Congure NRLink in IR long mode. Congure the mindsensors NRLink device in IR long mode. The port must be congured as a Lowspeed port before using this function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

174

Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_NRLinkIRLong.nxc.

6.18.2.133

char NRLinkIRShort (const byte port, const byte i2caddr) [inline]

Congure NRLink in IR short mode. Congure the mindsensors NRLink device in IR short mode. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_NRLinkIRShort.nxc.

6.18.2.134

char NRLinkSetPF (const byte port, const byte i2caddr) [inline]

Congure NRLink in power function mode. Congure the mindsensors NRLink device in power function mode. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

175

Returns: The function call result. Examples: ex_NRLinkSetPF.nxc.

6.18.2.135

char NRLinkSetRCX (const byte port, const byte i2caddr) [inline]

Congure NRLink in RCX mode. Congure the mindsensors NRLink device in RCX mode. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_NRLinkSetRCX.nxc.

6.18.2.136

char NRLinkSetTrain (const byte port, const byte i2caddr) [inline]

Congure NRLink in IR train mode. Congure the mindsensors NRLink device in IR train mode. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_NRLinkSetTrain.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

176

6.18.2.137

byte NRLinkStatus (const byte port, const byte i2caddr) [inline]

Read NRLink status. Read the status of the mindsensors NRLink device. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The mindsensors NRLink status. Examples: ex_NRLinkStatus.nxc.

6.18.2.138

char NRLinkTxRaw (const byte port, const byte i2caddr) [inline]

Congure NRLink in raw IR transmit mode. Congure the mindsensors NRLink device in raw IR transmit mode. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_NRLinkTxRaw.nxc.

6.18.2.139

char NXTHIDAsciiMode (const byte & port, const byte & i2caddr) [inline]

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

177

Set NXTHID into ASCII data mode. Set the NXTHID device into ASCII data mode. Only printable characters can be transmitted in this mode. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTHID.nxc.

6.18.2.140

char NXTHIDDirectMode (const byte & port, const byte & i2caddr) [inline]

Set NXTHID into direct data mode. Set the NXTHID device into direct data mode. Any character can be transmitted while in this mode. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTHID.nxc.

6.18.2.141

char NXTHIDLoadCharacter (const byte & port, const byte & i2caddr, const byte & modier, const byte & character) [inline]

Load NXTHID character. Load a character into the NXTHID device. The port must be congured as a Lowspeed port before using this function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

178

Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. modier The key modier. See the MindSensors NXTHID modier keys group. character The character. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTHID.nxc.

6.18.2.142

char NXTHIDTransmit (const byte & port, const byte & i2caddr) [inline]

Transmit NXTHID character. Transmit a single character to a computer using the NXTHID device. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTHID.nxc.

6.18.2.143

char NXTLineLeaderAverage (const byte & port, const byte & i2caddr) [inline]

Read NXTLineLeader average. Read the mindsensors NXTLineLeader devices average value. The average is a weighted average of the bits set to 1 based on the position.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

179

The left most bit has a weight of 10, second bit has a weight of 20, and so forth. When all 8 sensors are over a black surface the average will be 45. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The NXTLineLeader average value. Examples: ex_NXTLineLeader.nxc.

6.18.2.144

char NXTLineLeaderCalibrateBlack (const byte & port, const byte & i2caddr) [inline]

Calibrate NXTLineLeader black color. Store calibration data for the black color. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTLineLeader.nxc.

6.18.2.145

char NXTLineLeaderCalibrateWhite (const byte & port, const byte & i2caddr) [inline]

Calibrate NXTLineLeader white color. Store calibration data for the white color. The port must be congured as a Lowspeed port before using this function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

180

Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTLineLeader.nxc.

6.18.2.146

char NXTLineLeaderInvert (const byte & port, const byte & i2caddr) [inline]

Invert NXTLineLeader colors. Invert color sensing so that the device can detect a white line on a black background. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTLineLeader.nxc.

6.18.2.147

char NXTLineLeaderPowerDown (const byte & port, const byte & i2caddr) [inline]

Powerdown NXTLineLeader device. Put the NXTLineLeader to sleep so that it does not consume power when it is not required. The device wakes up on its own when any I2C communication happens or you can specically wake it up by using the NXTLineLeaderPowerUp command. The port must be congured as a Lowspeed port before using this function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

181

Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTLineLeader.nxc.

6.18.2.148

char NXTLineLeaderPowerUp (const byte & port, const byte & i2caddr) [inline]

Powerup NXTLineLeader device. Wake up the NXTLineLeader device so that it can be used. The device can be put to sleep using the NXTLineLeaderPowerDown command. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTLineLeader.nxc.

6.18.2.149

char NXTLineLeaderReset (const byte & port, const byte & i2caddr) [inline]

Reset NXTLineLeader color inversion. Reset the NXTLineLeader color detection back to its default state (black line on a white background). The port must be congured as a Lowspeed port before using this function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

182

Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTLineLeader.nxc.

6.18.2.150

byte NXTLineLeaderResult (const byte & port, const byte & i2caddr) [inline]

Read NXTLineLeader result. Read the mindsensors NXTLineLeader devices result value. This is a single byte showing the 8 sensors readings. Each bit corresponding to the sensor where the line is seen is set to 1, otherwise it is set to 0. When all 8 sensors are over a black surface the result will be 255 (b11111111). The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The NXTLineLeader result value. Examples: ex_NXTLineLeader.nxc.

6.18.2.151

char NXTLineLeaderSnapshot (const byte & port, const byte & i2caddr) [inline]

Take NXTLineLeader line snapshot. Takes a snapshot of the line under the sensor and tracks that position in subsequent tracking operations. This function also will set color inversion if it sees a white line on a black background. The port must be congured as a Lowspeed port before using this function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

183

Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTLineLeader.nxc.

6.18.2.152

char NXTLineLeaderSteering (const byte & port, const byte & i2caddr) [inline]

Read NXTLineLeader steering. Read the mindsensors NXTLineLeader devices steering value. This is the power returned by the sensor to correct your course. Add this value to your left motor and subtract it from your right motor. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The NXTLineLeader steering value. Examples: ex_NXTLineLeader.nxc.

6.18.2.153

int NXTPowerMeterCapacityUsed (const byte & port, const byte & i2caddr) [inline]

Read NXTPowerMeter capacity used. Read the mindsensors NXTPowerMeter devices capacity used since the last reset command. The port must be congured as a Lowspeed port before using this function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

184

Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The NXTPowerMeter capacity used value. Examples: ex_NXTPowerMeter.nxc.

6.18.2.154

long NXTPowerMeterElapsedTime (const byte & port, const byte & i2caddr) [inline]

Read NXTPowerMeter elapsed time. Read the mindsensors NXTPowerMeter devices elapsed time since the last reset command. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The NXTPowerMeter elapsed time value. Examples: ex_NXTPowerMeter.nxc.

6.18.2.155

int NXTPowerMeterErrorCount (const byte & port, const byte & i2caddr) [inline]

Read NXTPowerMeter error count. Read the mindsensors NXTPowerMeter devices error count value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

185

i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The NXTPowerMeter error count value. Examples: ex_NXTPowerMeter.nxc.

6.18.2.156

int NXTPowerMeterMaxCurrent (const byte & port, const byte & i2caddr) [inline]

Read NXTPowerMeter maximum current. Read the mindsensors NXTPowerMeter devices maximum current value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The NXTPowerMeter maximum current value. Examples: ex_NXTPowerMeter.nxc.

6.18.2.157

int NXTPowerMeterMaxVoltage (const byte & port, const byte & i2caddr) [inline]

Read NXTPowerMeter maximum voltage. Read the mindsensors NXTPowerMeter devices maximum voltage value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

186

Returns: The NXTPowerMeter maximum voltage value. Examples: ex_NXTPowerMeter.nxc.

6.18.2.158

int NXTPowerMeterMinCurrent (const byte & port, const byte & i2caddr) [inline]

Read NXTPowerMeter minimum current. Read the mindsensors NXTPowerMeter devices minimum current value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The NXTPowerMeter minimum current value. Examples: ex_NXTPowerMeter.nxc.

6.18.2.159

int NXTPowerMeterMinVoltage (const byte & port, const byte & i2caddr) [inline]

Read NXTPowerMeter minimum voltage. Read the mindsensors NXTPowerMeter devices minimum voltage value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The NXTPowerMeter minimum voltage value.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

187

Examples: ex_NXTPowerMeter.nxc.

6.18.2.160

int NXTPowerMeterPresentCurrent (const byte & port, const byte & i2caddr) [inline]

Read NXTPowerMeter present current. Read the mindsensors NXTPowerMeter devices present current value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The NXTPowerMeter present current. Examples: ex_NXTPowerMeter.nxc.

6.18.2.161

int NXTPowerMeterPresentPower (const byte & port, const byte & i2caddr) [inline]

Read NXTPowerMeter present power. Read the mindsensors NXTPowerMeter devices present power value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The NXTPowerMeter present power value. Examples: ex_NXTPowerMeter.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

188

6.18.2.162

int NXTPowerMeterPresentVoltage (const byte & port, const byte & i2caddr) [inline]

Read NXTPowerMeter present voltage. Read the mindsensors NXTPowerMeter devices present voltage value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The NXTPowerMeter present voltage. Examples: ex_NXTPowerMeter.nxc.

6.18.2.163

char NXTPowerMeterResetCounters (const byte & port, const byte & i2caddr) [inline]

Reset NXTPowerMeter counters. Reset the NXTPowerMeter counters back to zero. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTPowerMeter.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

189

6.18.2.164

long NXTPowerMeterTotalPowerConsumed (const byte & port, const byte & i2caddr) [inline]

Read NXTPowerMeter total power consumed. Read the mindsensors NXTPowerMeter devices total power consumed since the last reset command. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The NXTPowerMeter total power consumed value. Examples: ex_NXTPowerMeter.nxc.

6.18.2.165

byte NXTServoBatteryVoltage (const byte & port, const byte & i2caddr) [inline]

Read NXTServo battery voltage value. Read the mindsensors NXTServo devices battery voltage value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The battery level. Examples: ex_NXTServo.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

190

6.18.2.166

char NXTServoEditMacro (const byte & port, const byte & i2caddr) [inline]

Edit NXTServo macro. Put the NXTServo device into macro edit mode. This operation changes the I2C address of the device to 0x40. Macros are written to EEPROM addresses between 0x21 and 0xFF. Use NXTServoQuitEdit to return the device to its normal operation mode. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible result values. Examples: ex_NXTServo.nxc.

6.18.2.167

char NXTServoGotoMacroAddress (const byte & port, const byte & i2caddr, const byte & macro) [inline]

Goto NXTServo macro address. Run the macro found at the specied EEPROM macro address. This command re-initializes the macro environment. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. macro The EEPROM macro address. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible result values. Examples: ex_NXTServo.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

191

6.18.2.168

char NXTServoHaltMacro (const byte & port, const byte & i2caddr) [inline]

Halt NXTServo macro. Halt a macro executing on the NXTServo device. This command re-initializes the macro environment. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible result values. Examples: ex_NXTServo.nxc.

6.18.2.169

char NXTServoInit (const byte & port, const byte & i2caddr, const byte servo) [inline]

Initialize NXTServo servo properties. Store the initial speed and position properties of the servo motor n. Current speed and position values of the nth servo is read from the servo speed register and servo position register and written to permanent memory. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. servo The servo number. See MindSensors NXTServo servo numbers group. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible result values. Examples: ex_NXTServo.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

192

6.18.2.170

char NXTServoPauseMacro (const byte & port, const byte & i2caddr) [inline]

Pause NXTServo macro. Pause a macro executing on the NXTServo device. This command will pause the currently executing macro, and save the environment for subsequent resumption. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible result values. Examples: ex_NXTServo.nxc.

6.18.2.171

unsigned int NXTServoPosition (const byte & port, const byte & i2caddr, const byte servo) [inline]

Read NXTServo servo position value. Read the mindsensors NXTServo devices servo position value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. servo The servo number. See MindSensors NXTServo servo numbers group. Returns: The specied servos position value. Examples: ex_NXTServo.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

193

6.18.2.172

char NXTServoQuitEdit (const byte & port) [inline]

Quit NXTServo macro edit mode. Stop editing NXTServo device macro EEPROM memory. Use NXTServoEditMacro to start editing a macro. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible result values. Examples: ex_NXTServo.nxc.

6.18.2.173

char NXTServoReset (const byte & port, const byte & i2caddr) [inline]

Reset NXTServo properties. Reset NXTServo device properties to factory defaults. Initial position = 1500. Initial speed = 0. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible result values. Examples: ex_NXTServo.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

194

6.18.2.174

char NXTServoResumeMacro (const byte & port, const byte & i2caddr) [inline]

Resume NXTServo macro. Resume a macro executing on the NXTServo device. This command resumes executing a macro where it was paused last, using the same environment. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible result values. Examples: ex_NXTServo.nxc.

6.18.2.175

byte NXTServoSpeed (const byte & port, const byte & i2caddr, const byte servo) [inline]

Read NXTServo servo speed value. Read the mindsensors NXTServo devices servo speed value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. servo The servo number. See MindSensors NXTServo servo numbers group. Returns: The specied servos speed value. Examples: ex_NXTServo.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

195

6.18.2.176

bool PFMateSend (const byte & port, const byte & i2caddr, const byte & channel, const byte & motors, const byte & cmdA, const byte & spdA, const byte & cmdB, const byte & spdB) [inline]

Send PFMate command. Send a PFMate command to the power function IR receiver. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. channel The power function IR receiver channel. See the PFMate channel constants group. motors The motor(s) to control. See the PFMate motor constants group. cmdA The power function command for motor A. spdA The power function speed for motor A. cmdB The power function command for motor B. spdB The power function speed for motor B. Returns: The function call result. Examples: ex_PFMate.nxc.

6.18.2.177

bool PFMateSendRaw (const byte & port, const byte & i2caddr, const byte & channel, const byte & b1, const byte & b2) [inline]

Send raw PFMate command. Send a raw PFMate command to the power function IR receiver. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

196

channel The power function IR receiver channel. See the PFMate channel constants group. b1 Raw byte 1. b2 Raw byte 2. Returns: The function call result. Examples: ex_PFMate.nxc.

6.18.2.178

char PSPNxAnalog (const byte & port, const byte & i2caddr) [inline]

Congure PSPNx in analog mode. Congure the mindsensors PSPNx device in analog mode. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_PSPNxAnalog.nxc.

6.18.2.179

char PSPNxDigital (const byte & port, const byte & i2caddr) [inline]

Congure PSPNx in digital mode. Congure the mindsensors PSPNx device in digital mode. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

197

i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_PSPNxDigital.nxc.

6.18.2.180

bool ReadNRLinkBytes (const byte port, const byte i2caddr, byte & data[ ]) [inline]

Read data from NRLink. Read data from the mindsensors NRLink device on the specied port. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. data A byte array that will contain the data read from the device on output. Returns: The function call result. Examples: ex_ReadNRLinkBytes.nxc.

6.18.2.181

bool ReadSensorMSAccel (const byte port, const byte i2caddr, int & x, int & y, int & z) [inline]

Read mindsensors acceleration values. Read X, Y, and Z axis acceleration values from the mindsensors Accelerometer sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

198

i2caddr The sensor I2C address. See sensor documentation for this value. x The output x-axis acceleration. y The output y-axis acceleration. z The output z-axis acceleration. Returns: The function call result. Examples: ex_ReadSensorMSAccel.nxc.

6.18.2.182

bool ReadSensorMSPlayStation (const byte port, const byte i2caddr, byte & btnset1, byte & btnset2, byte & xleft, byte & yleft, byte & xright, byte & yright) [inline]

Read mindsensors playstation controller values. Read playstation controller values from the mindsensors playstation sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. btnset1 The button set 1 values. See MindSensors PSP-Nx button set 1 constants. btnset2 The button set 2 values. See MindSensors PSP-Nx button set 2 constants. xleft The left joystick x value. yleft The left joystick y value. xright The right joystick x value. yright The right joystick y value. Returns: The function call result. Examples: ex_ReadSensorMSPlayStation.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

199

6.18.2.183

bool ReadSensorMSRTClock (const byte port, byte & sec, byte & min, byte & hrs, byte & dow, byte & date, byte & month, byte & year) [inline]

Read mindsensors RTClock values. Read real-time clock values from the Mindsensors RTClock sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. sec The seconds. min The minutes. hrs The hours. dow The day of week number. date The day. month The month. year The year. Returns: The function call result. Examples: ex_ReadSensorMSRTClock.nxc.

6.18.2.184

bool ReadSensorMSTilt (const byte & port, const byte & i2caddr, byte & x, byte & y, byte & z) [inline]

Read mindsensors tilt values. Read X, Y, and Z axis tilt values from the mindsensors tilt sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

200

x The output x-axis tilt. y The output y-axis tilt. z The output z-axis tilt. Returns: The function call result. Examples: ex_ReadSensorMSTilt.nxc.

6.18.2.185

char RunNRLinkMacro (const byte port, const byte i2caddr, const byte macro) [inline]

Run NRLink macro. Run the specied mindsensors NRLink device macro. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. macro The address of the macro to execute. Returns: The function call result. Examples: ex_RunNRLinkMacro.nxc.

6.18.2.186

int SensorMSCompass (const byte & port, const byte i2caddr) [inline]

Read mindsensors compass value. Return the Mindsensors Compass sensor value. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

201

Returns: The mindsensors compass value Examples: ex_SensorMSCompass.nxc.

6.18.2.187

int SensorMSDROD (const byte & port) [inline]

Read mindsensors DROD value. Return the Mindsensors DROD sensor value. Parameters: port The sensor port. See Input port constants. Returns: The mindsensors DROD value Examples: ex_SensorMSDROD.nxc.

6.18.2.188

int SensorMSPressure (const byte & port) [inline]

Read mindsensors pressure sensor. Read the pressure sensor value of the mindsensors pressure sensor on the specied port. Parameters: port The sensor port. See Input port constants. Returns: The pressure reading. Examples: ex_SensorMSPressure.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

202

6.18.2.189

int SensorMSPressureRaw (const byte & port) [inline]

Read mindsensors raw pressure value. Return the Mindsensors pressure sensor raw value. Parameters: port The sensor port. See Input port constants. Returns: The mindsensors raw pressure value Examples: ex_SensorMSPressureRaw.nxc.

6.18.2.190

char SensorNXTSumoEyes (const byte & port)

Read mindsensors NXTSumoEyes obstacle zone. Return the Mindsensors NXTSumoEyes sensor obstacle zone value. The port should be congured for the NXTSumoEyes device using SetSensorNXTSumoEyes before calling this function. Parameters: port The sensor port. See Input port constants. Returns: The mindsensors NXTSumoEyes obstacle zone value. NXTSumoEyes constants. Examples: ex_NXTSumoEyes.nxc. See MindSensors

6.18.2.191

int SensorNXTSumoEyesRaw (const byte & port) [inline]

Read mindsensors NXTSumoEyes raw value. Return the Mindsensors NXTSumoEyes raw sensor value. The port should be congured for the NXTSumoEyes device using SetSensorNXTSumoEyes before calling this function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

203

Parameters: port The sensor port. See Input port constants. Returns: The mindsensors NXTSumoEyes raw value Examples: ex_NXTSumoEyes.nxc.

6.18.2.192

char SetACCLNxSensitivity (const byte port, const byte i2caddr, byte slevel) [inline]

Set ACCL-Nx sensitivity. Reset the mindsensors ACCL-Nx sensor calibration to factory settings. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. slevel The sensitivity level. See MindSensors ACCL-Nx sensitivity level constants. Returns: The function call result. Examples: ex_SetACCLNxSensitivity.nxc.

6.18.2.193

char SetNXTLineLeaderKdFactor (const byte & port, const byte & i2caddr, const byte & value) [inline]

Write NXTLineLeader Kd factor. Write a Kd divisor factor to the NXTLineLeader device. Value ranges between 1 and 255. Change this value if you need more granularities in Kd value. The port must be congured as a Lowspeed port before using this function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

204

Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. value The new Kd factor (1..255). Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTLineLeader.nxc.

6.18.2.194

char SetNXTLineLeaderKdValue (const byte & port, const byte & i2caddr, const byte & value) [inline]

Write NXTLineLeader Kd value. Write a Kd value to the NXTLineLeader device. This value divided by PID Factor for Kd is the Derivative value for the PID control. Suggested value is 8 with a divisor factor of 32 (which is also a factory default), start with this value, and tune it to meet your needs. Value ranges between 0 and 255. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. value The new Kd value (0..255). Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTLineLeader.nxc.

6.18.2.195

char SetNXTLineLeaderKiFactor (const byte & port, const byte & i2caddr, const byte & value) [inline]

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

205

Write NXTLineLeader Ki factor. Write a Ki divisor factor to the NXTLineLeader device. Value ranges between 1 and 255. Change this value if you need more granularities in Ki value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. value The new Ki factor (1..255). Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTLineLeader.nxc.

6.18.2.196

char SetNXTLineLeaderKiValue (const byte & port, const byte & i2caddr, const byte & value) [inline]

Write NXTLineLeader Ki value. Write a Ki value to the NXTLineLeader device. This value divided by PID Factor for Ki is the Integral value for the PID control. Suggested value is 0 with a divisor factor of 32 (which is also a factory default), start with this value, and tune it to meet your needs. Value ranges between 0 and 255. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. value The new Ki value (0..255). Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTLineLeader.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

206

6.18.2.197

char SetNXTLineLeaderKpFactor (const byte & port, const byte & i2caddr, const byte & value) [inline]

Write NXTLineLeader Kp factor. Write a Kp divisor factor to the NXTLineLeader device. Value ranges between 1 and 255. Change this value if you need more granularities in Kp value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. value The new Kp factor (1..255). Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTLineLeader.nxc.

6.18.2.198

char SetNXTLineLeaderKpValue (const byte & port, const byte & i2caddr, const byte & value) [inline]

Write NXTLineLeader Kp value. Write a Kp value to the NXTLineLeader device. This value divided by PID Factor for Kp is the Proportional value for the PID control. Suggested value is 25 with a divisor factor of 32 (which is also a factory default), start with this value, and tune it to meet your needs. Value ranges between 0 and 255. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. value The new Kp value (0..255). Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

207

Examples: ex_NXTLineLeader.nxc.

6.18.2.199

char SetNXTLineLeaderSetpoint (const byte & port, const byte & i2caddr, const byte & value) [inline]

Write NXTLineLeader setpoint. Write a new setpoint value to the NXTLineLeader device. The Set Point is a value you can ask sensor to maintain the average to. The default value is 45, whereby the line is maintained in center of the sensor. If you need to maintain line towards left of the sensor, set the Set Point to a lower value (minimum: 10). If you need it to be towards on the right of the sensor, set it to higher value (maximum: 80). Set point is also useful while tracking an edge of dark and light areas. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. value The new setpoint value (10..80). Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTLineLeader.nxc.

6.18.2.200

char SetNXTServoPosition (const byte & port, const byte & i2caddr, const byte servo, const byte & pos) [inline]

Set NXTServo servo motor position. Set the position of a servo motor controlled by the NXTServo device. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

208

servo The servo number. See MindSensors NXTServo servo numbers group. pos The servo position. See MindSensors NXTServo position constants group. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible result values. Examples: ex_NXTServo.nxc.

6.18.2.201

char SetNXTServoQuickPosition (const byte & port, const byte & i2caddr, const byte servo, const byte & qpos) [inline]

Set NXTServo servo motor quick position. Set the quick position of a servo motor controlled by the NXTServo device. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. servo The servo number. See MindSensors NXTServo servo numbers group. qpos The servo quick position. See MindSensors NXTServo quick position constants group. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible result values. Examples: ex_NXTServo.nxc.

6.18.2.202

char SetNXTServoSpeed (const byte & port, const byte & i2caddr, const byte servo, const byte & speed) [inline]

Set NXTServo servo motor speed. Set the speed of a servo motor controlled by the NXTServo device. The port must be congured as a Lowspeed port before using this function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.18

MindSensors API Functions

209

Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. servo The servo number. See MindSensors NXTServo servo numbers group. speed The servo speed. (0..255) Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible result values. Examples: ex_NXTServo.nxc.

6.18.2.203

void SetSensorMSDROD (const byte & port, bool bActive) [inline]

Congure a mindsensors DROD sensor. Congure the specied port for a mindsensors DROD sensor. Parameters: port The port to congure. See Input port constants. bActive A ag indicating whether to congure the sensor in active or inactive mode. Examples: ex_setsensormsdrod.nxc.

6.18.2.204

void SetSensorMSPressure (const byte & port) [inline]

Congure a mindsensors pressure sensor. Congure the specied port for a mindsensors pressure sensor. Parameters: port The port to congure. See Input port constants. Examples: ex_setsensormspressure.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.19

Codatex API Functions

210

6.18.2.205

void SetSensorNXTSumoEyes (const byte & port, bool bLong) [inline]

Congure a mindsensors SumoEyes sensor. Congure the specied port for a mindsensors SumoEyes sensor. Parameters: port The port to congure. See Input port constants. bLong A ag indicating whether to congure the sensor in long range or short range mode. Examples: ex_NXTSumoEyes.nxc.

6.18.2.206

char WriteNRLinkBytes (const byte port, const byte i2caddr, const byte data[ ]) [inline]

Write data to NRLink. Write data to the mindsensors NRLink device on the specied port. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. data A byte array containing the data to write. Returns: The function call result. Examples: ex_writenrlinkbytes.nxc.

6.19

Codatex API Functions

Functions for accessing and modifying Codatex devices.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.19

Codatex API Functions

211

Modules Codatex device constants


Constants that are for use with Codatex devices.

Functions bool RFIDInit (const byte &port)


RFIDInit function.

bool RFIDMode (const byte &port, const byte &mode)


RFIDMode function.

byte RFIDStatus (const byte &port)


RFIDStatus function.

bool RFIDRead (const byte &port, byte &output[ ])


RFIDRead function.

bool RFIDStop (const byte &port)


RFIDStop function.

bool RFIDReadSingle (const byte &port, byte &output[ ])


RFIDReadSingle function.

bool RFIDReadContinuous (const byte &port, byte &output[ ])


RFIDReadContinuous function.

6.19.1

Detailed Description

Functions for accessing and modifying Codatex devices. 6.19.2 6.19.2.1 Function Documentation bool RFIDInit (const byte & port) [inline]

RFIDInit function. Initialize the Codatex RFID sensor.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.19

Codatex API Functions

212

Parameters: port The port to which the Codatex RFID sensor is attached. See the Input port constants group. You may use a constant or a variable. Returns: The boolean function call result. Examples: ex_RFIDInit.nxc.

6.19.2.2

bool RFIDMode (const byte & port, const byte & mode) [inline]

RFIDMode function. Congure the Codatex RFID sensor mode. Parameters: port The port to which the Codatex RFID sensor is attached. See the Input port constants group. You may use a constant or a variable. mode The RFID sensor mode. See the Codatex RFID sensor modes group. Returns: The boolean function call result. Examples: ex_RFIDMode.nxc.

6.19.2.3

bool RFIDRead (const byte & port, byte & output[ ]) [inline]

RFIDRead function. Read the Codatex RFID sensor value. Parameters: port The port to which the Codatex RFID sensor is attached. See the Input port constants group. You may use a constant or a variable. output The ve bytes of RFID data. Returns: The boolean function call result.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.19

Codatex API Functions

213

Examples: ex_RFIDRead.nxc.

6.19.2.4

bool RFIDReadContinuous (const byte & port, byte & output[ ]) [inline]

RFIDReadContinuous function. Set the Codatex RFID sensor into continuous mode, if necessary, and read the RFID data. Parameters: port The port to which the Codatex RFID sensor is attached. See the Input port constants group. You may use a constant or a variable. output The ve bytes of RFID data. Returns: The boolean function call result. Examples: ex_RFIDReadContinuous.nxc.

6.19.2.5

bool RFIDReadSingle (const byte & port, byte & output[ ]) [inline]

RFIDReadSingle function. Set the Codatex RFID sensor into single mode and read the RFID data. Parameters: port The port to which the Codatex RFID sensor is attached. See the Input port constants group. You may use a constant or a variable. output The ve bytes of RFID data. Returns: The boolean function call result. Examples: ex_RFIDReadSingle.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.20

RIC Macro Wrappers

214

6.19.2.6

byte RFIDStatus (const byte & port) [inline]

RFIDStatus function. Read the Codatex RFID sensor status. Parameters: port The port to which the Codatex RFID sensor is attached. See the Input port constants group. You may use a constant or a variable. Returns: The RFID sensor status. Examples: ex_RFIDStatus.nxc.

6.19.2.7

bool RFIDStop (const byte & port) [inline]

RFIDStop function. Stop the Codatex RFID sensor. Parameters: port The port to which the Codatex RFID sensor is attached. See the Input port constants group. You may use a constant or a variable. Returns: The boolean function call result. Examples: ex_RFIDStop.nxc.

6.20

RIC Macro Wrappers

Macro wrappers for use in dening RIC byte arrays. Denes #dene RICSetValue(_data, _idx, _newval) _data[(_idx)] = (_newval)&0xFF; _data[(_idx)+1] = (_newval)>>8

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.20

RIC Macro Wrappers

215

Set the value of an element in an RIC data array.

#dene RICImgPoint(_X, _Y) (_X)&0xFF, (_X)>>8, (_Y)&0xFF, (_Y)>>8


Output an RIC ImgPoint structure.

#dene RICImgRect(_Pt, _W, _H) _Pt, (_W)&0xFF, (_W)>>8, (_H)&0xFF, (_H)>>8


Output an RIC ImgRect structure.

#dene RICOpDescription(_Options, _Width, _Height) 8, 0, 0, 0, (_Options)&0xFF, (_Options)>>8, (_Width)&0xFF, (_Width)>>8, (_Height)&0xFF, (_Height)>>8
Output an RIC Description opcode.

#dene RICOpCopyBits(_CopyOptions, _DataAddr, _SrcRect, _DstPoint) 18, 0, 3, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, (_DataAddr)&0xFF, (_DataAddr)>>8, _SrcRect, _DstPoint
Output an RIC CopyBits opcode.

#dene RICOpPixel(_CopyOptions, _Point, _Value) 10, 0, 4, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, _Point, (_Value)&0xFF, (_Value)>>8
Output an RIC Pixel opcode.

#dene RICOpLine(_CopyOptions, _Point1, _Point2) 12, 0, 5, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, _Point1, _Point2


Output an RIC Line opcode.

#dene RICOpRect(_CopyOptions, _Point, _Width, _Height) 12, 0, 6, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, _Point, (_Width)&0xFF, (_Width)>>8, (_Height)&0xFF, (_Height)>>8
Output an RIC Rect opcode.

#dene RICOpCircle(_CopyOptions, _Point, _Radius) 10, 0, 7, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, _Point, (_Radius)&0xFF, (_Radius)>>8
Output an RIC Circle opcode.

#dene RICOpNumBox(_CopyOptions, _Point, _Value) 10, 0, 8, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, _Point, (_Value)&0xFF, (_Value)>>8
Output an RIC NumBox opcode.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.20

RIC Macro Wrappers

216

#dene RICOpSprite(_DataAddr, _Rows, _BytesPerRow, _SpriteData) Rows_BytesPerRow)+((_Rows_BytesPerRow)%2)+8)&0xFF, Rows_BytesPerRow)+((_Rows_BytesPerRow)%2)+8)>>8, 1, 0, DataAddr)&0xFF, (_DataAddr)>>8, (_Rows)&0xFF, (_Rows)>>8, BytesPerRow)&0xFF, (_BytesPerRow)>>8, _SpriteData
Output an RIC Sprite opcode.

((_((_(_(_-

#dene RICSpriteData(...) __VA_ARGS__


Output RIC sprite data.

#dene RICOpVarMap(_DataAddr, _MapCount, _MapFunction) ((_MapCount4)+6)&0xFF, ((_MapCount4)+6)>>8, 2, 0, (_DataAddr)&0xFF, (_DataAddr)>>8, (_MapCount)&0xFF, (_MapCount)>>8, _MapFunction
Output an RIC VarMap opcode.

#dene RICMapElement(_Domain, _Range) Domain)>>8, (_Range)&0xFF, (_Range)>>8


Output an RIC map element.

(_Domain)&0xFF,

(_-

#dene RICMapFunction(_MapElement,...) _MapElement, __VA_ARGS__


Output an RIC VarMap function.

#dene RICArg(_arg) ((_arg)|0x1000)


Output an RIC parameterized argument.

#dene RICMapArg(_mapidx, mapidx)&0xF)<<8))

_arg)

((_arg)|0x1000|(((_-

Output an RIC parameterized and mapped argument.

#dene RICOpPolygon(_CopyOptions, _Count, _ThePoints) ((_Count4)+6)&0xFF, ((_Count4)+6)>>8, 10, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, (_Count)&0xFF, (_Count)>>8, _ThePoints
Output an RIC Polygon opcode.

#dene RICPolygonPoints(_pPoint1, _pPoint2,...) _pPoint1, _pPoint2, __VA_ARGS__


Output RIC polygon points.

#dene RICOpEllipse(_CopyOptions, _Point, _RadiusX, _RadiusY) 12, 0, 9, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, _Point, (_RadiusX)&0xFF, (_RadiusX)>>8, (_RadiusY)&0xFF, (_RadiusY)>>8
Output an RIC Ellipse opcode.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.20

RIC Macro Wrappers

217

6.20.1

Detailed Description

Macro wrappers for use in dening RIC byte arrays. 6.20.2 6.20.2.1 Dene Documentation #dene RICArg(_arg) ((_arg)|0x1000)

Output an RIC parameterized argument. Parameters: _arg The argument that you want to parameterize. Examples: ex_dispgaoutex.nxc.

6.20.2.2

#dene RICImgPoint(_X, _Y) (_X)&0xFF, (_X)>>8, (_Y)&0xFF, (_Y)>>8

Output an RIC ImgPoint structure. Parameters: _X The X coordinate. _Y The Y coordinate. Examples: ex_dispgaout.nxc, ex_dispgaoutex.nxc, and ex_sysdrawgraphicarray.nxc.

6.20.2.3

#dene RICImgRect(_Pt, _W, _H) _Pt, (_W)&0xFF, (_W)>>8, (_H)&0xFF, (_H)>>8

Output an RIC ImgRect structure. Parameters: _Pt An ImgPoint. See RICImgPoint.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.20

RIC Macro Wrappers

218

_W The rectangle width. _H The rectangle height. Examples: ex_dispgaout.nxc, ex_dispgaoutex.nxc, and ex_sysdrawgraphicarray.nxc.

6.20.2.4

#dene RICMapArg(_mapidx, _arg) ((_arg)|0x1000|(((_mapidx)&0xF)<<8))

Output an RIC parameterized and mapped argument. Parameters: _mapidx The varmap data address. _arg The parameterized argument you want to pass through a varmap.

6.20.2.5

#dene RICMapElement(_Domain, _Range) (_Domain)&0xFF, (_Domain)>>8, (_Range)&0xFF, (_Range)>>8

Output an RIC map element. Parameters: _Domain The map element domain. _Range The map element range.

6.20.2.6

#dene RICMapFunction(_MapElement, ...) _MapElement, __VA_ARGS__

Output an RIC VarMap function. Parameters: _MapElement An entry in the varmap function. At least 2 elements are required. See RICMapElement.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.20

RIC Macro Wrappers

219

6.20.2.7

#dene RICOpCircle(_CopyOptions, _Point, _Radius) 10, 0, 7, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, _Point, (_Radius)&0xFF, (_Radius)>>8

Output an RIC Circle opcode. Parameters: _CopyOptions Circle copy options. See Drawing option constants. _Point The circles center point. See RICImgPoint. _Radius The circles radius.

6.20.2.8

#dene RICOpCopyBits(_CopyOptions, _DataAddr, _SrcRect, _DstPoint) 18, 0, 3, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, (_DataAddr)&0xFF, (_DataAddr)>>8, _SrcRect, _DstPoint

Output an RIC CopyBits opcode. Parameters: _CopyOptions CopyBits copy options. See Drawing option constants. _DataAddr The address of the sprite from which to copy data. _SrcRect The rectangular portion of the sprite to copy. See RICImgRect. _DstPoint The LCD coordinate to which to copy the data. See RICImgPoint. Examples: ex_dispgaout.nxc, ex_dispgaoutex.nxc, and ex_sysdrawgraphicarray.nxc.

6.20.2.9

#dene RICOpDescription(_Options, _Width, _Height) 8, 0, 0, 0, (_Options)&0xFF, (_Options)>>8, (_Width)&0xFF, (_Width)>>8, (_Height)&0xFF, (_Height)>>8

Output an RIC Description opcode. Parameters: _Options RIC options. _Width The total RIC width.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.20

RIC Macro Wrappers

220

_Height The total RIC height. Examples: ex_dispgaoutex.nxc.

6.20.2.10

#dene RICOpEllipse(_CopyOptions, _Point, _RadiusX, _RadiusY) 12, 0, 9, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, _Point, (_RadiusX)&0xFF, (_RadiusX)>>8, (_RadiusY)&0xFF, (_RadiusY)>>8

Output an RIC Ellipse opcode. Parameters: _CopyOptions Ellipse copy options. See Drawing option constants. _Point The center of the ellipse. See RICImgPoint. _RadiusX The x-axis radius of the ellipse. _RadiusY The y-axis radius of the ellipse.

6.20.2.11

#dene RICOpLine(_CopyOptions, _Point1, _Point2) 12, 0, 5, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, _Point1, _Point2

Output an RIC Line opcode. Parameters: _CopyOptions Line copy options. See Drawing option constants. _Point1 The starting point of the line. See RICImgPoint. _Point2 The ending point of the line. See RICImgPoint.

6.20.2.12

#dene RICOpNumBox(_CopyOptions, _Point, _Value) 10, 0, 8, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, _Point, (_Value)&0xFF, (_Value)>>8

Output an RIC NumBox opcode.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.20

RIC Macro Wrappers

221

Parameters: _CopyOptions NumBox copy options. See Drawing option constants. _Point The numbox bottom left corner. See RICImgPoint. _Value The number to draw.

6.20.2.13

#dene RICOpPixel(_CopyOptions, _Point, _Value) 10, 0, 4, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, _Point, (_Value)&0xFF, (_Value)>>8

Output an RIC Pixel opcode. Parameters: _CopyOptions Pixel copy options. See Drawing option constants. _Point The pixel coordinate. See RICImgPoint. _Value The pixel value (unused).

6.20.2.14

#dene RICOpPolygon(_CopyOptions, _Count, _ThePoints) ((_Count4)+6)&0xFF, ((_Count4)+6)>>8, 10, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, (_Count)&0xFF, (_Count)>>8, _ThePoints

Output an RIC Polygon opcode. Parameters: _CopyOptions Polygon copy options. See Drawing option constants. _Count The number of points in the polygon. _ThePoints The list of polygon points. See RICPolygonPoints.

6.20.2.15

#dene RICOpRect(_CopyOptions, _Point, _Width, _Height) 12, 0, 6, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, _Point, (_Width)&0xFF, (_Width)>>8, (_Height)&0xFF, (_Height)>>8

Output an RIC Rect opcode.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.20

RIC Macro Wrappers

222

Parameters: _CopyOptions Rect copy options. See Drawing option constants. _Point The rectangles top left corner. See RICImgPoint. _Width The rectangles width. _Height The rectangles height.

6.20.2.16

#dene RICOpSprite(_DataAddr, _Rows, _BytesPerRow, _SpriteData) ((_Rows_BytesPerRow)+((_Rows_BytesPerRow)%2)+8)&0xFF, ((_Rows_BytesPerRow)+((_Rows_BytesPerRow)%2)+8)>>8, 1, 0, (_DataAddr)&0xFF, (_DataAddr)>>8, (_Rows)&0xFF, (_Rows)>>8, (_BytesPerRow)&0xFF, (_BytesPerRow)>>8, _SpriteData

Output an RIC Sprite opcode. Parameters: _DataAddr The address of the sprite. _Rows The number of rows of data. _BytesPerRow The number of bytes per row. _SpriteData The actual sprite data. See RICSpriteData. Examples: ex_dispgaout.nxc, ex_dispgaoutex.nxc, and ex_sysdrawgraphicarray.nxc.

6.20.2.17

#dene RICOpVarMap(_DataAddr, _MapCount, _MapFunction) ((_MapCount4)+6)&0xFF, ((_MapCount4)+6)>>8, 2, 0, (_DataAddr)&0xFF, (_DataAddr)>>8, (_MapCount)&0xFF, (_MapCount)>>8, _MapFunction

Output an RIC VarMap opcode. Parameters: _DataAddr The address of the varmap. _MapCount The number of points in the function. _MapFunction The denition of the varmap function. See RICMapFunction.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.21

NXT rmware module names

223

6.20.2.18

#dene RICPolygonPoints(_pPoint1, _pPoint2, ...) _pPoint1, _pPoint2, __VA_ARGS__

Output RIC polygon points. Parameters: _pPoint1 The rst polygon point. See RICImgPoint. _pPoint2 The second polygon point (at least 3 points are required). See RICImgPoint.

6.20.2.19

#dene RICSetValue(_data, _idx, _newval) _data[(_idx)] = (_newval)&0xFF; _data[(_idx)+1] = (_newval)>>8

Set the value of an element in an RIC data array. Parameters: _data The RIC data array _idx The array index to update _newval The new value to write into the RIC data array

6.20.2.20

#dene RICSpriteData( ...) __VA_ARGS__

Output RIC sprite data. Examples: ex_dispgaout.nxc, ex_dispgaoutex.nxc, and ex_sysdrawgraphicarray.nxc.

6.21

NXT rmware module names

Constant string names for all the NXT rmware modules. Denes #dene CommandModuleName "Command.mod" #dene IOCtrlModuleName "IOCtrl.mod"
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.21

NXT rmware module names

224

6.21.1

#dene LoaderModuleName "Loader.mod" #dene SoundModuleName "Sound.mod" #dene ButtonModuleName "Button.mod" #dene UIModuleName "Ui.mod" #dene InputModuleName "Input.mod" #dene OutputModuleName "Output.mod" #dene LowSpeedModuleName "Low Speed.mod" #dene DisplayModuleName "Display.mod" #dene CommModuleName "Comm.mod" Detailed Description

Constant string names for all the NXT rmware modules. 6.21.2 6.21.2.1 Dene Documentation #dene ButtonModuleName "Button.mod" The button module name 6.21.2.2 #dene CommandModuleName "Command.mod" The command module name Examples: ex_sysiomapread.nxc.

6.21.2.3

#dene CommModuleName "Comm.mod" The Comm module name

6.21.2.4

#dene DisplayModuleName "Display.mod" The display module name

6.21.2.5

#dene InputModuleName "Input.mod" The input module name.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.22

NXT rmware module IDs

225

6.21.2.6

#dene IOCtrlModuleName "IOCtrl.mod" The IOCtrl module name

6.21.2.7

#dene LoaderModuleName "Loader.mod" The Loader module name

6.21.2.8

#dene LowSpeedModuleName "Low Speed.mod" The low speed module name

6.21.2.9

#dene OutputModuleName "Output.mod" The output module name

6.21.2.10

#dene SoundModuleName "Sound.mod" The sound module name

Examples: ex_sysiomapwrite.nxc.

6.21.2.11

#dene UIModuleName "Ui.mod" The Ui module name

6.22

NXT rmware module IDs

Constant numeric IDs for all the NXT rmware modules. Denes #dene CommandModuleID 0x00010001 #dene IOCtrlModuleID 0x00060001 #dene LoaderModuleID 0x00090001 #dene SoundModuleID 0x00080001 #dene ButtonModuleID 0x00040001 #dene UIModuleID 0x000C0001

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.22

NXT rmware module IDs

226

6.22.1

#dene InputModuleID 0x00030001 #dene OutputModuleID 0x00020001 #dene LowSpeedModuleID 0x000B0001 #dene DisplayModuleID 0x000A0001 #dene CommModuleID 0x00050001 Detailed Description

Constant numeric IDs for all the NXT rmware modules. 6.22.2 6.22.2.1 Dene Documentation #dene ButtonModuleID 0x00040001 The button module ID 6.22.2.2 #dene CommandModuleID 0x00010001 The command module ID Examples: ex_reladdressof.nxc, RemoteIOMapWriteBytes.nxc, sysiomapreadbyid.nxc. ex_RemoteIOMapRead.nxc, ex_RemoteIOMapWriteValue.nxc, ex_and ex_-

6.22.2.3

#dene CommModuleID 0x00050001 The Comm module ID

6.22.2.4

#dene DisplayModuleID 0x000A0001 The display module ID

6.22.2.5

#dene InputModuleID 0x00030001 The input module ID

6.22.2.6

#dene IOCtrlModuleID 0x00060001 The IOCtrl module ID

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.23

Miscellaneous NBC/NXC constants

227

6.22.2.7

#dene LoaderModuleID 0x00090001 The Loader module ID

6.22.2.8

#dene LowSpeedModuleID 0x000B0001 The low speed module ID

6.22.2.9

#dene OutputModuleID 0x00020001 The output module ID

6.22.2.10

#dene SoundModuleID 0x00080001 The sound module ID

Examples: ex_sysiomapwritebyid.nxc.

6.22.2.11

#dene UIModuleID 0x000C0001 The Ui module ID

6.23

Miscellaneous NBC/NXC constants

Miscellaneous constants for use in NBC and NXC. Modules Type aliases
Short type aliases indicating signed/unsigned and bit count for each type.

Property constants
Use these constants for specifying the property for the GetProperty and SetProperty direct commands.

Data type limits


Constants that dene various data type limits.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.23

Miscellaneous NBC/NXC constants

228

Denes 6.23.1 #dene TRUE 1 #dene FALSE 0 #dene NA 0xFFFF #dene PI 3.141593 #dene RADIANS_PER_DEGREE PI/180 #dene DEGREES_PER_RADIAN 180/PI Detailed Description

Miscellaneous constants for use in NBC and NXC. 6.23.2 6.23.2.1 Dene Documentation #dene DEGREES_PER_RADIAN 180/PI Used for converting from radians to degrees 6.23.2.2 #dene FALSE 0 A false value 6.23.2.3 #dene NA 0xFFFF The specied argument does not apply (aka unwired) Examples: ex_ArrayMax.nxc, ex_ArrayMean.nxc, ex_ArrayMin.nxc, ex_ArrayOp.nxc, ex_ArraySort.nxc, ex_ArrayStd.nxc, ex_ArraySum.nxc, and ex_ArraySumSqr.nxc.

6.23.2.4

#dene PI 3.141593 A constant for PI

Examples: ex_dispfnout.nxc, and ex_string.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.24

Third-party NXT devices

229

6.23.2.5

#dene RADIANS_PER_DEGREE PI/180 Used for converting from degrees to radians

Examples: ex_sin_cos.nxc.

6.23.2.6

#dene TRUE 1 A true value

Examples: ex_syscommbtconnection.nxc.

6.24

Third-party NXT devices

Documentation for NXT devices made by companies other than LEGO such as HiTechnic, mindsensors.com, and CodaTex. Modules RCX constants
Constants that are for use with devices that communicate with the RCX or Scout programmable bricks via IR such as the HiTechnic IRLink or the MindSensors nRLink.

HiTechnic/mindsensors Power Function/IR Train constants


Constants that are for use with the HiTechnic IRLink or mindsensors nRLink in Power Function or IR Train mode.

HiTechnic API Functions


Functions for accessing and modifying HiTechnic devices.

MindSensors API Functions


Functions for accessing and modifying MindSensors devices.

Codatex API Functions


Functions for accessing and modifying Codatex devices.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.25

Standard-C API functions

230

6.24.1

Detailed Description

Documentation for NXT devices made by companies other than LEGO such as HiTechnic, mindsensors.com, and CodaTex.

6.25

Standard-C API functions

Documentation for various Standard-C library routines. Modules cmath API


Standard C cmath API functions.

cstdio API
Standard C cstdio API functions.

cstdlib API
Standard C cstdlib API functions and types.

cstring API
Standard C cstring API functions.

ctype API
Standard C ctype API functions.

6.25.1

Detailed Description

Documentation for various Standard-C library routines.

6.26

A simple 3D graphics library

Documentation for a simple 3D graphics library. Modules Graphics library begin modes
Constants that are used to specify the polygon surface begin mode.

Graphics library actions


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.26

A simple 3D graphics library

231

Constants that are used to specify a graphics library action.

Graphics library settings


Constants that are used to congure the graphics library settings.

Graphics library cull mode


Constants to use when setting the graphics library cull mode.

Functions void glInit ()


Initialize graphics library.

void glSet (int glType, int glValue)


Set graphics library options.

int glBeginObject ()
Begin dening an object.

void glEndObject ()
Stop dening an object.

void glObjectAction (int glObjectId, int glAction, int glValue)


Perform an object action.

void glAddVertex (int glX, int glY, int glZ)


Add a vertex to an object.

void glBegin (int glBeginMode)


Begin a new polygon for the current object.

void glEnd ()
Finish a polygon for the current object.

void glBeginRender ()
Begin a new render.

void glCallObject (int glObjectId)


Call a graphic object.

void glFinishRender ()

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.26

A simple 3D graphics library

232

Finish the current render.

void glSetAngleX (int glValue)


Set the X axis angle.

void glAddToAngleX (int glValue)


Add to the X axis angle.

void glSetAngleY (int glValue)


Set the Y axis angle.

void glAddToAngleY (int glValue)


Add to the Y axis angle.

void glSetAngleZ (int glValue)


Set the Z axis angle.

void glAddToAngleZ (int glValue)


Add to the Z axis angle.

int glSin32768 (int glAngle)


Table-based sine scaled by 32768.

int glCos32768 (int glAngle)


Table-based cosine scaled by 32768.

int glBox (int glMode, int glSizeX, int glSizeY, int glSizeZ)
Create a 3D box.

int glCube (int glMode, int glSize)


Create a 3D cube.

int glPyramid (int glMode, int glSizeX, int glSizeY, int glSizeZ)
Create a 3D pyramid.

6.26.1

Detailed Description

Documentation for a simple 3D graphics library. The library code was written by Arno van der Vegt.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.26

A simple 3D graphics library

233

6.26.2 6.26.2.1

Function Documentation void glAddToAngleX (int glValue) [inline]

Add to the X axis angle. Add the specied value to the existing X axis angle. Parameters: glValue The value to add to the X axis angle. Examples: glBoxDemo.nxc, and glCircleDemo.nxc.

6.26.2.2

void glAddToAngleY (int glValue) [inline]

Add to the Y axis angle. Add the specied value to the existing Y axis angle. Parameters: glValue The value to add to the Y axis angle. Examples: glBoxDemo.nxc, eDemo.nxc. glCircleDemo.nxc, glScaleDemo.nxc, and glTranslat-

6.26.2.3

void glAddToAngleZ (int glValue) [inline]

Add to the Z axis angle. Add the specied value to the existing Z axis angle. Parameters: glValue The value to add to the Z axis angle.

6.26.2.4

void glAddVertex (int glX, int glY, int glZ) [inline]

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.26

A simple 3D graphics library

234

Add a vertex to an object. Add a vertex to an object currently being dened. This function should only be used between glBegin and glEnd which are themselves nested within a glBeginObject and glEndObject pair. Parameters: glX The X axis coordinate. glY The Y axis coordinate. glZ The Z axis coordinate.

6.26.2.5

void glBegin (int glBeginMode) [inline]

Begin a new polygon for the current object. Start dening a polygon surface for the current graphics object using the specied begin mode. Parameters: glBeginMode The desired mode. See Graphics library begin modes.

6.26.2.6

int glBeginObject () [inline]

Begin dening an object. Start the process of dening a graphics library object using low level functions such as glBegin, glAddVertex, and glEnd. Returns: The object index of the new object being created.

6.26.2.7

void glBeginRender () [inline]

Begin a new render. Start the process of rendering the existing graphic objects. Examples: glBoxDemo.nxc, glCircleDemo.nxc, glRotateDemo.nxc, glScaleDemo.nxc, and glTranslateDemo.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.26

A simple 3D graphics library

235

6.26.2.8

int glBox (int glMode, int glSizeX, int glSizeY, int glSizeZ) [inline]

Create a 3D box. Dene a 3D box using the specied begin mode for all faces. The center of the box is at the origin of the XYZ axis with width, height, and depth specied via the glSizeX, glSizeY, and glSizeZ parameters. Parameters: glMode The begin mode for each surface. See Graphics library begin modes. glSizeX The X axis size (width). glSizeY The Y axis size (height). glSizeZ The Z axis size (depth). Examples: glBoxDemo.nxc, glCircleDemo.nxc, glRotateDemo.nxc, glScaleDemo.nxc, and glTranslateDemo.nxc.

6.26.2.9

void glCallObject (int glObjectId) [inline]

Call a graphic object. Tell the graphics library that you want it to include the specied object in the render. Parameters: glObjectId The desired object id. Examples: glBoxDemo.nxc, glCircleDemo.nxc, glRotateDemo.nxc, glScaleDemo.nxc, and glTranslateDemo.nxc.

6.26.2.10

int glCos32768 (int glAngle) [inline]

Table-based cosine scaled by 32768. Return the cosine of the specied angle in degrees. The result is scaled by 32768.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.26

A simple 3D graphics library

236

Parameters: glAngle The angle in degrees. Returns: The cosine value scaled by 32768.

6.26.2.11

int glCube (int glMode, int glSize) [inline]

Create a 3D cube. Dene a 3D cube using the specied begin mode for all faces. The center of the box is at the origin of the XYZ axis with equal width, height, and depth specied via the glSize parameter. Parameters: glMode The begin mode for each surface. See Graphics library begin modes. glSize The cubes width, height, and depth. Examples: glBoxDemo.nxc.

6.26.2.12

void glEnd () [inline]

Finish a polygon for the current object. Stop dening a polgyon surface for the current graphics object. 6.26.2.13 void glEndObject () [inline]

Stop dening an object. Finish the process of dening a graphics library object. Call this function after you have completed the object denition. 6.26.2.14 void glFinishRender () [inline]

Finish the current render. Rotate the vertex list, clear the screen, and draw the rendered objects to the LCD.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.26

A simple 3D graphics library

237

Examples: glBoxDemo.nxc, glCircleDemo.nxc, glRotateDemo.nxc, glScaleDemo.nxc, and glTranslateDemo.nxc.

6.26.2.15

void glInit () [inline]

Initialize graphics library. Setup all the necessary data for the graphics library to function. Call this function before any other graphics library routine. Examples: glBoxDemo.nxc, glCircleDemo.nxc, glRotateDemo.nxc, glScaleDemo.nxc, and glTranslateDemo.nxc.

6.26.2.16

void glObjectAction (int glObjectId, int glAction, int glValue) [inline]

Perform an object action. Execute the specied action on the specied object. Parameters: glObjectId The object id. glAction The action to perform on the object. See Graphics library actions. glValue The setting value. Examples: glBoxDemo.nxc, eDemo.nxc. glRotateDemo.nxc, glScaleDemo.nxc, and glTranslat-

6.26.2.17

int glPyramid (int glMode, int glSizeX, int glSizeY, int glSizeZ) [inline]

Create a 3D pyramid. Dene a 3D pyramid using the specied begin mode for all faces. The center of the pyramid is at the origin of the XYZ axis with width, height, and depth specied via the glSizeX, glSizeY, and glSizeZ parameters.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.26

A simple 3D graphics library

238

Parameters: glMode glSizeX glSizeY glSizeZ The begin mode for each surface. See Graphics library begin modes. The X axis size (width). The Y axis size (height). The Z axis size (depth).

6.26.2.18

void glSet (int glType, int glValue) [inline]

Set graphics library options. Adjust graphic library settings for circle size and cull mode. Parameters: glType The setting type. See Graphics library settings. glValue The setting value. For culling modes see Graphics library cull mode. Examples: glCircleDemo.nxc, and glTranslateDemo.nxc.

6.26.2.19

void glSetAngleX (int glValue) [inline]

Set the X axis angle. Set the X axis angle to the specied value. Parameters: glValue The new X axis angle. Examples: glBoxDemo.nxc, glCircleDemo.nxc, glRotateDemo.nxc, glScaleDemo.nxc, and glTranslateDemo.nxc.

6.26.2.20

void glSetAngleY (int glValue) [inline]

Set the Y axis angle. Set the Y axis angle to the specied value. Parameters: glValue The new Y axis angle.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.27

Type aliases

239

6.26.2.21

void glSetAngleZ (int glValue) [inline]

Set the Z axis angle. Set the Z axis angle to the specied value. Parameters: glValue The new Z axis angle.

6.26.2.22

int glSin32768 (int glAngle) [inline]

Table-based sine scaled by 32768. Return the sine of the specied angle in degrees. The result is scaled by 32768. Parameters: glAngle The angle in degrees. Returns: The sine value scaled by 32768.

6.27

Type aliases

Short type aliases indicating signed/unsigned and bit count for each type. Denes 6.27.1 #dene u8 unsigned char #dene s8 char #dene u16 unsigned int #dene s16 int #dene u32 unsigned long #dene s32 long Detailed Description

Short type aliases indicating signed/unsigned and bit count for each type.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.28

Input port constants

240

6.27.2 6.27.2.1

Dene Documentation #dene s16 int Signed 16 bit type

6.27.2.2

#dene s32 long Signed 32 bit type

6.27.2.3

#dene s8 char Signed 8 bit type

6.27.2.4

#dene u16 unsigned int Unsigned 16 bit type

6.27.2.5

#dene u32 unsigned long Unsigned 32 bit type

6.27.2.6

#dene u8 unsigned char Unsigned 8 bit type

6.28

Input port constants

Input port constants are used when calling NXC sensor control API functions. Denes 6.28.1 #dene S1 0 #dene S2 1 #dene S3 2 #dene S4 3 Detailed Description

Input port constants are used when calling NXC sensor control API functions.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.28

Input port constants

241

6.28.2 6.28.2.1

Dene Documentation #dene S1 0 Input port 1

Examples: ex_ACCLNxCalibrateX.nxc, ex_ACCLNxCalibrateXEnd.nxc, ex_ACCLNxCalibrateY.nxc, ex_ACCLNxCalibrateYEnd.nxc, ex_ACCLNxCalibrateZ.nxc, ex_ACCLNxCalibrateZEnd.nxc, ex_ACCLNxResetCalibration.nxc, ex_ACCLNxSensitivity.nxc, ex_ACCLNxXOffset.nxc, ex_ACCLNxXRange.nxc, ex_ACCLNxYOffset.nxc, ex_ACCLNxYRange.nxc, ex_ACCLNxZOffset.nxc, ex_ACCLNxZRange.nxc, ex_ClearSensor.nxc, ex_ColorADRaw.nxc, ex_ColorBoolean.nxc, ex_ColorCalibration.nxc, ex_ColorCalibrationState.nxc, ex_ColorCalLimits.nxc, ex_ColorSensorRaw.nxc, ex_ColorSensorValue.nxc, ex_CongureTemperatureSensor.nxc, ex_CustomSensorActiveStatus.nxc, ex_CustomSensorPercentFullScale.nxc, ex_CustomSensorZeroOffset.nxc, ex_DISTNxDistance.nxc, ex_DISTNxGP2D12.nxc, ex_DISTNxGP2D120.nxc, ex_DISTNxGP2YA02.nxc, ex_DISTNxGP2YA21.nxc, ex_DISTNxMaxDistance.nxc, ex_DISTNxMinDistance.nxc, ex_DISTNxModuleType.nxc, ex_DISTNxNumPoints.nxc, ex_DISTNxVoltage.nxc, ex_GetInput.nxc, ex_GetLSInputBuffer.nxc, ex_GetLSOutputBuffer.nxc, ex_HTIRTrain.nxc, ex_HTPFComboDirect.nxc, ex_HTPFComboPWM.nxc, ex_HTPFRawOutput.nxc, ex_HTPFRepeat.nxc, ex_HTPFSingleOutputCST.nxc, ex_HTPFSingleOutputPWM.nxc, ex_HTPFSinglePin.nxc, ex_HTPFTrain.nxc, ex_HTRCXAddToDatalog.nxc, ex_HTRCXClearSensor.nxc, ex_HTRCXSetIRLinkPort.nxc, ex_HTRCXSetSensorMode.nxc, ex_HTRCXSetSensorType.nxc, ex_I2CBytesReady.nxc, ex_I2CCheckStatus.nxc, ex_i2cdeviceid.nxc, ex_i2cdeviceinfo.nxc, ex_I2CRead.nxc, ex_I2CSendCommand.nxc, ex_I2CStatus.nxc, ex_i2cvendorid.nxc, ex_i2cversion.nxc, ex_I2CWrite.nxc, ex_LowspeedBytesReady.nxc, ex_LowspeedCheckStatus.nxc, ex_LowspeedRead.nxc, ex_LowspeedStatus.nxc, ex_LowspeedWrite.nxc, ex_LSChannelState.nxc, ex_LSErrorType.nxc, ex_LSInputBufferBytesToRx.nxc, ex_LSInputBufferInPtr.nxc, ex_LSInputBufferOutPtr.nxc, ex_LSMode.nxc, ex_LSOutputBufferBytesToRx.nxc, ex_LSOutputBufferInPtr.nxc, ex_LSOutputBufferOutPtr.nxc, ex_MSADPAOff.nxc, ex_MSADPAOn.nxc, ex_MSDeenergize.nxc, ex_MSEnergize.nxc, ex_MSIRTrain.nxc, ex_MSPFComboDirect.nxc, ex_MSPFComboPWM.nxc, ex_MSPFRawOutput.nxc, ex_MSPFRepeat.nxc, ex_MSPFSingleOutputCST.nxc, ex_MSPFSingleOutputPWM.nxc, ex_MSPFSinglePin.nxc, ex_MSPFTrain.nxc, ex_MSRCXAddToDatalog.nxc, ex_MSRCXClearSensor.nxc, ex_MSRCXSetNRLinkPort.nxc, ex_MSRCXSetSensorMode.nxc, ex_MSRCXSetSensorType.nxc, ex_MSRCXSumVar.nxc, ex_MSReadValue.nxc, ex_NRLink2400.nxc, ex_-

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.28

Input port constants

242

NRLink4800.nxc, ex_NRLinkFlush.nxc, ex_NRLinkIRLong.nxc, ex_NRLinkIRShort.nxc, ex_NRLinkSetPF.nxc, ex_NRLinkSetRCX.nxc, ex_NRLinkSetTrain.nxc, ex_NRLinkStatus.nxc, ex_NRLinkTxRaw.nxc, ex_NXTHID.nxc, ex_NXTLineLeader.nxc, ex_NXTPowerMeter.nxc, ex_NXTServo.nxc, ex_NXTSumoEyes.nxc, ex_PFMate.nxc, ex_PSPNxAnalog.nxc, ex_PSPNxDigital.nxc, ex_readi2cregister.nxc, ex_ReadNRLinkBytes.nxc, ex_ReadSensorColorEx.nxc, ex_ReadSensorColorRaw.nxc, ex_ReadSensorEMeter.nxc, ex_ReadSensorHTAccel.nxc, ex_ReadSensorHTColor.nxc, ex_ReadSensorHTColor2Active.nxc, ex_ReadSensorHTIRReceiver.nxc, ex_ReadSensorHTIRReceiverEx.nxc, ex_ReadSensorHTIRSeeker2AC.nxc, ex_ReadSensorHTIRSeeker2DC.nxc, ex_ReadSensorHTNormalizedColor.nxc, ex_ReadSensorHTNormalizedColor2Active.nxc, ex_ReadSensorHTRawColor.nxc, ex_ReadSensorHTRawColor2.nxc, ex_ReadSensorHTTouchMultiplexer.nxc, ex_ReadSensorMSAccel.nxc, ex_ReadSensorMSPlayStation.nxc, ex_ReadSensorMSRTClock.nxc, ex_ReadSensorMSTilt.nxc, ex_ReadSensorUSEx.nxc, ex_RemoteLowspeedRead.nxc, ex_RemoteLowspeedWrite.nxc, ex_RemoteResetScaledValue.nxc, ex_RemoteSetInputMode.nxc, ex_RFIDInit.nxc, ex_RFIDMode.nxc, ex_RFIDRead.nxc, ex_RFIDReadContinuous.nxc, ex_RFIDReadSingle.nxc, ex_RFIDStatus.nxc, ex_RFIDStop.nxc, ex_RunNRLinkMacro.nxc, ex_Sensor.nxc, ex_SensorBoolean.nxc, ex_SensorDigiPinsDirection.nxc, ex_SensorDigiPinsOutputLevel.nxc, ex_SensorDigiPinsStatus.nxc, ex_SensorHTColorNum.nxc, ex_SensorHTCompass.nxc, ex_SensorHTEOPD.nxc, ex_SensorHTGyro.nxc, ex_SensorHTIRSeeker2ACDir.nxc, ex_SensorHTIRSeeker2Addr.nxc, ex_SensorHTIRSeeker2DCDir.nxc, ex_SensorHTIRSeekerDir.nxc, ex_SensorHTMagnet.nxc, ex_SensorInvalid.nxc, ex_SensorMode.nxc, ex_SensorMSCompass.nxc, ex_SensorMSDROD.nxc, ex_SensorMSPressure.nxc, ex_SensorMSPressureRaw.nxc, ex_SensorNormalized.nxc, ex_SensorRaw.nxc, ex_SensorScaled.nxc, ex_SensorTemperature.nxc, ex_SensorType.nxc, ex_SensorValue.nxc, ex_SensorValueBool.nxc, ex_SensorValueRaw.nxc, ex_SetACCLNxSensitivity.nxc, ex_SetCustomSensorActiveStatus.nxc, ex_SetCustomSensorPercentFullScale.nxc, ex_SetCustomSensorZeroOffset.nxc, ex_sethtcolor2mode.nxc, ex_sethtirseeker2mode.nxc, ex_SetInput.nxc, ex_SetSensor.nxc, ex_setsensorboolean.nxc, ex_setsensorcolorblue.nxc, ex_setsensorcolorfull.nxc, ex_setsensorcolorgreen.nxc, ex_setsensorcolornone.nxc, ex_setsensorcolorred.nxc, ex_SetSensorDigiPinsDirection.nxc, ex_SetSensorDigiPinsOutputLevel.nxc, ex_SetSensorDigiPinsStatus.nxc, ex_SetSensorEMeter.nxc, ex_setsensorhteopd.nxc, ex_SetSensorHTGyro.nxc, ex_SetSensorHTMagnet.nxc, ex_SetSensorLight.nxc, ex_SetSensorLowspeed.nxc, ex_SetSensorMode.nxc, ex_setsensormsdrod.nxc, ex_setsensormspressure.nxc, ex_SetSensorSound.nxc, ex_SetSensorTemperature.nxc, ex_SetSensorTouch.nxc, ex_SetSensorType.nxc, ex_SetSensorUltrasonic.nxc, ex_SysColorSensorRead.nxc, ex_syscommlscheckstatus.nxc, ex_syscommlsread.nxc, ex_syscommlswrite.nxc, ex_syscommlswriteex.nxc,
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.29

Sensor type constants

243

ex_SysComputeCalibValue.nxc, writenrlinkbytes.nxc.

ex_writei2cregister.nxc,

and

ex_-

6.28.2.2

#dene S2 1 Input port 2

6.28.2.3

#dene S3 2 Input port 3

6.28.2.4

#dene S4 3 Input port 4

Examples: ex_I2CBytes.nxc, ex_ReadSensorHTAngle.nxc, ex_ResetSensorHTAngle.nxc, and ex_SensorUS.nxc.

6.29

Sensor type constants

Use sensor type constants to congure an input port for a specic type of sensor. Denes #dene SENSOR_TYPE_NONE IN_TYPE_NO_SENSOR #dene SENSOR_TYPE_TOUCH IN_TYPE_SWITCH #dene SENSOR_TYPE_TEMPERATURE IN_TYPE_TEMPERATURE #dene SENSOR_TYPE_LIGHT IN_TYPE_REFLECTION #dene SENSOR_TYPE_ROTATION IN_TYPE_ANGLE #dene SENSOR_TYPE_LIGHT_ACTIVE IN_TYPE_LIGHT_ACTIVE #dene SENSOR_TYPE_LIGHT_INACTIVE IN_TYPE_LIGHT_INACTIVE #dene SENSOR_TYPE_SOUND_DB IN_TYPE_SOUND_DB #dene SENSOR_TYPE_SOUND_DBA IN_TYPE_SOUND_DBA #dene SENSOR_TYPE_CUSTOM IN_TYPE_CUSTOM #dene SENSOR_TYPE_LOWSPEED IN_TYPE_LOWSPEED #dene SENSOR_TYPE_LOWSPEED_9V IN_TYPE_LOWSPEED_9V #dene SENSOR_TYPE_HIGHSPEED IN_TYPE_HISPEED #dene SENSOR_TYPE_COLORFULL IN_TYPE_COLORFULL #dene SENSOR_TYPE_COLORRED IN_TYPE_COLORRED

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.29

Sensor type constants

244

#dene SENSOR_TYPE_COLORGREEN IN_TYPE_COLORGREEN #dene SENSOR_TYPE_COLORBLUE IN_TYPE_COLORBLUE #dene SENSOR_TYPE_COLORNONE IN_TYPE_COLORNONE 6.29.1 Detailed Description

Use sensor type constants to congure an input port for a specic type of sensor. See also: SetSensorType() 6.29.2 6.29.2.1 Dene Documentation #dene SENSOR_TYPE_COLORBLUE IN_TYPE_COLORBLUE NXT 2.0 color sensor with blue light 6.29.2.2 #dene SENSOR_TYPE_COLORFULL IN_TYPE_COLORFULL NXT 2.0 color sensor in full color mode 6.29.2.3 #dene SENSOR_TYPE_COLORGREEN IN_TYPE_COLORGREEN NXT 2.0 color sensor with green light 6.29.2.4 #dene SENSOR_TYPE_COLORNONE IN_TYPE_COLORNONE NXT 2.0 color sensor with no light 6.29.2.5 #dene SENSOR_TYPE_COLORRED IN_TYPE_COLORRED NXT 2.0 color sensor with red light 6.29.2.6 #dene SENSOR_TYPE_CUSTOM IN_TYPE_CUSTOM NXT custom sensor

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.29

Sensor type constants

245

6.29.2.7

#dene SENSOR_TYPE_HIGHSPEED IN_TYPE_HISPEED NXT Hi-speed port (only S4)

6.29.2.8

#dene SENSOR_TYPE_LIGHT IN_TYPE_REFLECTION RCX light sensor

6.29.2.9

#dene SENSOR_TYPE_LIGHT_ACTIVE IN_TYPE_LIGHT_ACTIVE NXT light sensor with light

6.29.2.10

#dene SENSOR_TYPE_LIGHT_INACTIVE IN_TYPE_LIGHT_INACTIVE NXT light sensor without light

6.29.2.11

#dene SENSOR_TYPE_LOWSPEED IN_TYPE_LOWSPEED NXT I2C digital sensor

Examples: ex_RemoteSetInputMode.nxc.

6.29.2.12

#dene SENSOR_TYPE_LOWSPEED_9V IN_TYPE_LOWSPEED_9V NXT I2C digital sensor with 9V power

6.29.2.13

#dene SENSOR_TYPE_NONE IN_TYPE_NO_SENSOR No sensor congured

6.29.2.14

#dene SENSOR_TYPE_ROTATION IN_TYPE_ANGLE RCX rotation sensor

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.30

Sensor mode constants

246

6.29.2.15

#dene SENSOR_TYPE_SOUND_DB IN_TYPE_SOUND_DB NXT sound sensor with dB scaling

Examples: ex_SetInput.nxc.

6.29.2.16

#dene SENSOR_TYPE_SOUND_DBA IN_TYPE_SOUND_DBA NXT sound sensor with dBA scaling

6.29.2.17

#dene SENSOR_TYPE_TEMPERATURE IN_TYPE_TEMPERATURE RCX temperature sensor

6.29.2.18

#dene SENSOR_TYPE_TOUCH IN_TYPE_SWITCH NXT or RCX touch sensor

Examples: ex_HTRCXSetSensorType.nxc, SetSensorType.nxc. ex_MSRCXSetSensorType.nxc, and ex_-

6.30

Sensor mode constants

Use sensor mode constants to congure an input port for the desired sensor mode. Denes #dene SENSOR_MODE_RAW IN_MODE_RAW #dene SENSOR_MODE_BOOL IN_MODE_BOOLEAN #dene SENSOR_MODE_EDGE IN_MODE_TRANSITIONCNT #dene SENSOR_MODE_PULSE IN_MODE_PERIODCOUNTER #dene SENSOR_MODE_PERCENT IN_MODE_PCTFULLSCALE #dene SENSOR_MODE_CELSIUS IN_MODE_CELSIUS #dene SENSOR_MODE_FAHRENHEIT IN_MODE_FAHRENHEIT #dene SENSOR_MODE_ROTATION IN_MODE_ANGLESTEP

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.30

Sensor mode constants

247

6.30.1

Detailed Description

Use sensor mode constants to congure an input port for the desired sensor mode. See also: SetSensorMode() 6.30.2 6.30.2.1 Dene Documentation #dene SENSOR_MODE_BOOL IN_MODE_BOOLEAN Boolean value (0 or 1) Examples: ex_HTRCXSetSensorMode.nxc, and ex_MSRCXSetSensorMode.nxc.

6.30.2.2

#dene SENSOR_MODE_CELSIUS IN_MODE_CELSIUS RCX temperature sensor value in degrees celcius

6.30.2.3

#dene SENSOR_MODE_EDGE IN_MODE_TRANSITIONCNT Counts the number of boolean transitions

6.30.2.4

#dene SENSOR_MODE_FAHRENHEIT IN_MODE_FAHRENHEIT RCX temperature sensor value in degrees fahrenheit

6.30.2.5

#dene SENSOR_MODE_PERCENT IN_MODE_PCTFULLSCALE Scaled value from 0 to 100

6.30.2.6

#dene SENSOR_MODE_PULSE IN_MODE_PERIODCOUNTER Counts the number of boolean periods

6.30.2.7

#dene SENSOR_MODE_RAW IN_MODE_RAW Raw value from 0 to 1023

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.31

Combined sensor type and mode constants

248

Examples: ex_RemoteSetInputMode.nxc, and ex_SetSensorMode.nxc.

6.30.2.8

#dene SENSOR_MODE_ROTATION IN_MODE_ANGLESTEP RCX rotation sensor (16 ticks per revolution)

6.31

Combined sensor type and mode constants

Use the combined sensor type and mode constants to congure both the sensor mode and type in a single function call. Denes #dene _SENSOR_CFG(_type, _mode) (((_type)<<8)+(_mode)) #dene SENSOR_TOUCH _SENSOR_CFG(SENSOR_TYPE_TOUCH, SENSOR_MODE_BOOL) #dene SENSOR_LIGHT _SENSOR_CFG(SENSOR_TYPE_LIGHT, SENSOR_MODE_PERCENT) #dene SENSOR_ROTATION _SENSOR_CFG(SENSOR_TYPE_ROTATION, SENSOR_MODE_ROTATION) #dene SENSOR_CELSIUS _SENSOR_CFG(SENSOR_TYPE_TEMPERATURE, SENSOR_MODE_CELSIUS) #dene SENSOR_FAHRENHEIT _SENSOR_CFG(SENSOR_TYPE_TEMPERATURE, SENSOR_MODE_FAHRENHEIT) #dene SENSOR_PULSE _SENSOR_CFG(SENSOR_TYPE_TOUCH, SENSOR_MODE_PULSE) #dene SENSOR_EDGE _SENSOR_CFG(SENSOR_TYPE_TOUCH, SENSOR_MODE_EDGE) #dene SENSOR_NXTLIGHT _SENSOR_CFG(SENSOR_TYPE_LIGHT_ACTIVE, SENSOR_MODE_PERCENT) #dene SENSOR_SOUND _SENSOR_CFG(SENSOR_TYPE_SOUND_DB, SENSOR_MODE_PERCENT) #dene SENSOR_LOWSPEED_9V _SENSOR_CFG(SENSOR_TYPE_LOWSPEED_9V, SENSOR_MODE_RAW) #dene SENSOR_LOWSPEED _SENSOR_CFG(SENSOR_TYPE_LOWSPEED, SENSOR_MODE_RAW) #dene SENSOR_COLORFULL _SENSOR_CFG(SENSOR_TYPE_COLORFULL, SENSOR_MODE_RAW) #dene SENSOR_COLORRED _SENSOR_CFG(SENSOR_TYPE_COLORRED, SENSOR_MODE_PERCENT)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.31

Combined sensor type and mode constants

249

#dene SENSOR_COLORGREEN _SENSOR_CFG(SENSOR_TYPE_COLORGREEN, SENSOR_MODE_PERCENT) #dene SENSOR_COLORBLUE _SENSOR_CFG(SENSOR_TYPE_COLORBLUE, SENSOR_MODE_PERCENT) #dene SENSOR_COLORNONE _SENSOR_CFG(SENSOR_TYPE_COLORNONE, SENSOR_MODE_PERCENT) 6.31.1 Detailed Description

Use the combined sensor type and mode constants to congure both the sensor mode and type in a single function call. See also: SetSensor() 6.31.2 6.31.2.1 Dene Documentation #dene _SENSOR_CFG(_type, _mode) (((_type)<<8)+(_mode)) Macro for dening SetSensor combined type and mode constants 6.31.2.2 #dene SENSOR_CELSIUS _SENSOR_CFG(SENSOR_TYPE_TEMPERATURE, SENSOR_MODE_CELSIUS) RCX temperature sensor in celcius mode 6.31.2.3 #dene SENSOR_COLORBLUE _SENSOR_CFG(SENSOR_TYPE_COLORBLUE, SENSOR_MODE_PERCENT) NXT 2.0 color sensor (blue) in percent mode 6.31.2.4 #dene SENSOR_COLORFULL _SENSOR_CFG(SENSOR_TYPE_COLORFULL, SENSOR_MODE_RAW) NXT 2.0 color sensor (full) in raw mode 6.31.2.5 #dene SENSOR_COLORGREEN _SENSOR_CFG(SENSOR_TYPE_COLORGREEN, SENSOR_MODE_PERCENT) NXT 2.0 color sensor (green) in percent mode

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.31

Combined sensor type and mode constants

250

6.31.2.6

#dene SENSOR_COLORNONE _SENSOR_CFG(SENSOR_TYPE_COLORNONE, SENSOR_MODE_PERCENT) NXT 2.0 color sensor (none) in percent mode

6.31.2.7

#dene SENSOR_COLORRED _SENSOR_CFG(SENSOR_TYPE_COLORRED, SENSOR_MODE_PERCENT) NXT 2.0 color sensor (red) in percent mode

6.31.2.8

#dene SENSOR_EDGE _SENSOR_CFG(SENSOR_TYPE_TOUCH, SENSOR_MODE_EDGE) Touch sensor in edge mode

6.31.2.9

#dene SENSOR_FAHRENHEIT _SENSOR_CFG(SENSOR_TYPE_TEMPERATURE, SENSOR_MODE_FAHRENHEIT) RCX temperature sensor in fahrenheit mode

6.31.2.10

#dene SENSOR_LIGHT _SENSOR_CFG(SENSOR_TYPE_LIGHT, SENSOR_MODE_PERCENT) RCX Light sensor in percent mode

6.31.2.11

#dene SENSOR_LOWSPEED _SENSOR_CFG(SENSOR_TYPE_LOWSPEED, SENSOR_MODE_RAW) NXT I2C sensor without 9V power in raw mode

6.31.2.12

#dene SENSOR_LOWSPEED_9V _SENSOR_CFG(SENSOR_TYPE_LOWSPEED_9V, SENSOR_MODE_RAW) NXT I2C sensor with 9V power in raw mode

6.31.2.13

#dene SENSOR_NXTLIGHT _SENSOR_CFG(SENSOR_TYPE_LIGHT_ACTIVE, SENSOR_MODE_PERCENT) NXT light sensor in active mode

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.32

Input module types

251

6.31.2.14

#dene SENSOR_PULSE _SENSOR_CFG(SENSOR_TYPE_TOUCH, SENSOR_MODE_PULSE) Touch sensor in pulse mode

6.31.2.15

#dene SENSOR_ROTATION _SENSOR_CFG(SENSOR_TYPE_ROTATION, SENSOR_MODE_ROTATION) RCX rotation sensor in rotation mode

6.31.2.16

#dene SENSOR_SOUND _SENSOR_CFG(SENSOR_TYPE_SOUND_DB, SENSOR_MODE_PERCENT) NXT sound sensor (dB) in percent mode

6.31.2.17

#dene SENSOR_TOUCH _SENSOR_CFG(SENSOR_TYPE_TOUCH, SENSOR_MODE_BOOL) Touch sensor in boolean mode

Examples: ex_SetSensor.nxc.

6.32

Input module types

Types used by various input module functions. Data Structures struct ColorSensorReadType
Parameters for the ColorSensorRead system call.

struct InputValuesType
Parameters for the RemoteGetInputValues function.

6.32.1

Detailed Description

Types used by various input module functions.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.33

Input module functions

252

6.33

Input module functions

Functions for accessing and modifying input module features. Modules Basic analog sensor value names
Read analog sensor values using these names.

Functions void SetSensorType (const byte &port, byte type)


Set sensor type.

void SetSensorMode (const byte &port, byte mode)


Set sensor mode.

void ClearSensor (const byte &port)


Clear a sensor value.

void ResetSensor (const byte &port)


Reset the sensor port.

void SetSensor (const byte &port, const unsigned int cong)


Set sensor conguration.

void SetSensorTouch (const byte &port)


Congure a touch sensor.

void SetSensorLight (const byte &port, bool bActive=true)


Congure a light sensor.

void SetSensorSound (const byte &port, bool bdBScaling=true)


Congure a sound sensor.

void SetSensorLowspeed (const byte &port, bool bIsPowered=true)


Congure an I2C sensor.

void SetSensorUltrasonic (const byte &port)


Congure an ultrasonic sensor.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.33

Input module functions

253

void SetSensorEMeter (const byte &port)


Congure an EMeter sensor.

void SetSensorTemperature (const byte &port)


Congure a temperature sensor.

void SetSensorColorFull (const byte &port)


Congure an NXT 2.0 full color sensor.

void SetSensorColorRed (const byte &port)


Congure an NXT 2.0 red light sensor.

void SetSensorColorGreen (const byte &port)


Congure an NXT 2.0 green light sensor.

void SetSensorColorBlue (const byte &port)


Congure an NXT 2.0 blue light sensor.

void SetSensorColorNone (const byte &port)


Congure an NXT 2.0 no light sensor.

variant GetInput (const byte &port, const byte eld)


Get an input eld value.

void SetInput (const byte &port, const int eld, variant value)
Set an input eld value.

unsigned int Sensor (const byte &port)


Read sensor scaled value.

bool SensorBoolean (const byte port)


Read sensor boolean value.

byte SensorDigiPinsDirection (const byte port)


Read sensor digital pins direction.

byte SensorDigiPinsOutputLevel (const byte port)


Read sensor digital pins output level.

byte SensorDigiPinsStatus (const byte port)


Read sensor digital pins status.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.33

Input module functions

254

bool SensorInvalid (const byte &port)


Read sensor invalid data ag.

byte SensorMode (const byte &port)


Read sensor mode.

unsigned int SensorNormalized (const byte &port)


Read sensor normalized value.

unsigned int SensorRaw (const byte &port)


Read sensor raw value.

unsigned int SensorScaled (const byte &port)


Read sensor scaled value.

byte SensorType (const byte &port)


Read sensor type.

unsigned int SensorValue (const byte &port)


Read sensor scaled value.

bool SensorValueBool (const byte port)


Read sensor boolean value.

unsigned int SensorValueRaw (const byte &port)


Read sensor raw value.

byte CustomSensorActiveStatus (byte port)


Get the custom sensor active status.

byte CustomSensorPercentFullScale (byte port)


Get the custom sensor percent full scale.

unsigned int CustomSensorZeroOffset (byte port)


Get the custom sensor zero offset.

void SetCustomSensorActiveStatus (byte port, byte activeStatus)


Set active status.

void SetCustomSensorPercentFullScale (byte port, byte pctFullScale)


Set percent full scale.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.33

Input module functions

255

void SetCustomSensorZeroOffset (byte port, int zeroOffset)


Set custom zero offset.

void SetSensorBoolean (byte port, bool value)


Set sensor boolean value.

void SetSensorDigiPinsDirection (byte port, byte direction)


Set digital pins direction.

void SetSensorDigiPinsOutputLevel (byte port, byte outputLevel)


Set digital pins output level.

void SetSensorDigiPinsStatus (byte port, byte status)


Set digital pins status.

void SysColorSensorRead (ColorSensorReadType &args)


Read LEGO color sensor.

int ReadSensorColorEx (const byte &port, int &colorval, unsigned int &raw[ ], unsigned int &norm[ ], int &scaled[ ])
Read LEGO color sensor extra.

int ReadSensorColorRaw (const byte &port, unsigned int &rawVals[ ])


Read LEGO color sensor raw values.

unsigned int ColorADRaw (byte port, byte color)


Read a LEGO color sensor AD raw value.

bool ColorBoolean (byte port, byte color)


Read a LEGO color sensor boolean value.

long ColorCalibration (byte port, byte point, byte color)


Read a LEGO color sensor calibration point value.

byte ColorCalibrationState (byte port)


Read LEGO color sensor calibration state.

unsigned int ColorCalLimits (byte port, byte point)


Read a LEGO color sensor calibration limit value.

unsigned int ColorSensorRaw (byte port, byte color)


Read a LEGO color sensor raw value.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.33

Input module functions

256

unsigned int ColorSensorValue (byte port, byte color)


Read a LEGO color sensor scaled value.

6.33.1

Detailed Description

Functions for accessing and modifying input module features. 6.33.2 6.33.2.1 Function Documentation void ClearSensor (const byte & port) [inline]

Clear a sensor value. Clear the value of a sensor - only affects sensors that are congured to measure a cumulative quantity such as rotation or a pulse count. Parameters: port The port to clear. See Input port constants. Examples: ex_ClearSensor.nxc.

6.33.2.2

unsigned int ColorADRaw (byte port, byte color) [inline]

Read a LEGO color sensor AD raw value. This function lets you directly access a specic LEGO color sensor AD raw value. Both the port and the color index must be constants. Parameters: port The sensor port. See Input port constants. color The color index. See Color sensor array indices. Returns: The AD raw value. Warning: This function requires an NXT 2.0 compatible rmware.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.33

Input module functions

257

Examples: ex_ColorADRaw.nxc.

6.33.2.3

bool ColorBoolean (byte port, byte color) [inline]

Read a LEGO color sensor boolean value. This function lets you directly access a specic LEGO color sensor boolean value. Both the port and the color index must be constants. Parameters: port The sensor port. See Input port constants. color The color index. See Color sensor array indices. Returns: The boolean value. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_ColorBoolean.nxc.

6.33.2.4

long ColorCalibration (byte port, byte point, byte color) [inline]

Read a LEGO color sensor calibration point value. This function lets you directly access a specic LEGO color calibration point value. The port, point, and color index must be constants. Parameters: port The sensor port. See Input port constants. point The calibration point. See Color calibration constants. color The color index. See Color sensor array indices. Returns: The calibration point value.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.33

Input module functions

258

Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_ColorCalibration.nxc.

6.33.2.5

byte ColorCalibrationState (byte port) [inline]

Read LEGO color sensor calibration state. This function lets you directly access the LEGO color calibration state. The port must be a constant. Parameters: port The sensor port. See Input port constants. Returns: The calibration state. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_ColorCalibrationState.nxc.

6.33.2.6

unsigned int ColorCalLimits (byte port, byte point) [inline]

Read a LEGO color sensor calibration limit value. This function lets you directly access a specic LEGO color calibration limit value. The port and the point must be constants. Parameters: port The sensor port. See Input port constants. point The calibration point. See Color calibration constants. Returns: The calibration limit value.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.33

Input module functions

259

Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_ColorCalLimits.nxc.

6.33.2.7

unsigned int ColorSensorRaw (byte port, byte color) [inline]

Read a LEGO color sensor raw value. This function lets you directly access a specic LEGO color sensor raw value. Both the port and the color index must be constants. Parameters: port The sensor port. See Input port constants. color The color index. See Color sensor array indices. Returns: The raw value. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_ColorSensorRaw.nxc.

6.33.2.8

unsigned int ColorSensorValue (byte port, byte color) [inline]

Read a LEGO color sensor scaled value. This function lets you directly access a specic LEGO color sensor scaled value. Both the port and the color index must be constants. Parameters: port The sensor port. See Input port constants. color The color index. See Color sensor array indices. Returns: The scaled value.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.33

Input module functions

260

Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_ColorSensorValue.nxc.

6.33.2.9

byte CustomSensorActiveStatus (byte port) [inline]

Get the custom sensor active status. Return the custom sensor active status value of a sensor. Parameters: port The sensor port. See Input port constants. Returns: The custom sensor active status. Examples: ex_CustomSensorActiveStatus.nxc.

6.33.2.10

byte CustomSensorPercentFullScale (byte port) [inline]

Get the custom sensor percent full scale. Return the custom sensor percent full scale value of a sensor. Parameters: port The sensor port. See Input port constants. Returns: The custom sensor percent full scale. Examples: ex_CustomSensorPercentFullScale.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.33

Input module functions

261

6.33.2.11

unsigned int CustomSensorZeroOffset (byte port) [inline]

Get the custom sensor zero offset. Return the custom sensor zero offset value of a sensor. Parameters: port The sensor port. See Input port constants. Returns: The custom sensor zero offset. Examples: ex_CustomSensorZeroOffset.nxc.

6.33.2.12

variant GetInput (const byte & port, const byte eld) [inline]

Get an input eld value. Return the value of the specied eld of a sensor on the specied port. Parameters: port The sensor port. See Input port constants. A constant or a variable may be used (no expressions). eld An input eld constant. See Input eld constants. Returns: The input eld value. Examples: ex_GetInput.nxc.

6.33.2.13

int ReadSensorColorEx (const byte & port, int & colorval, unsigned int & raw[ ], unsigned int & norm[ ], int & scaled[ ]) [inline]

Read LEGO color sensor extra. This function lets you read the LEGO color sensor. It returns the color value, and three arrays containing raw, normalized, and scaled color values for red, green, blue, and none indices.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.33

Input module functions

262

Parameters: port The sensor port. See Input port constants. colorval The color value. See Color values. raw An array containing four raw color values. See Color sensor array indices. norm An array containing four normalized color values. See Color sensor array indices. scaled An array containing four scaled color values. See Color sensor array indices. Returns: The function call result. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_ReadSensorColorEx.nxc.

6.33.2.14

int ReadSensorColorRaw (const byte & port, unsigned int & rawVals[ ]) [inline]

Read LEGO color sensor raw values. This function lets you read the LEGO color sensor. It returns an array containing raw color values for red, green, blue, and none indices. Parameters: port The sensor port. See Input port constants. rawVals An array containing four raw color values. See Color sensor array indices. Returns: The function call result. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_ReadSensorColorRaw.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.33

Input module functions

263

6.33.2.15

void ResetSensor (const byte & port) [inline]

Reset the sensor port. Sets the invalid data ag on the specied port and waits for it to become valid again. After changing the type or the mode of a sensor port you must call this function to give the rmware time to recongure the sensor port. Parameters: port The port to reset. See Input port constants. Examples: ex_ResetSensor.nxc.

6.33.2.16

unsigned int Sensor (const byte & port) [inline]

Read sensor scaled value. Return the processed sensor reading for a sensor on the specied port. This is the same value that is returned by the sensor value names (e.g. SENSOR_1). Parameters: port The sensor port. See Input port constants. A variable whose value is the desired sensor port may also be used. Returns: The sensors scaled value. Examples: ex_Sensor.nxc, and ex_SysComputeCalibValue.nxc.

6.33.2.17

bool SensorBoolean (const byte port) [inline]

Read sensor boolean value. Return the boolean value of a sensor on the specied port. Boolean conversion is either done based on preset cutoffs, or a slope parameter specied by calling SetSensorMode. Parameters: port The sensor port. See Input port constants. Must be a constant.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.33

Input module functions

264

Returns: The sensors boolean value. Examples: ex_SensorBoolean.nxc.

6.33.2.18

byte SensorDigiPinsDirection (const byte port) [inline]

Read sensor digital pins direction. Return the digital pins direction value of a sensor on the specied port. Parameters: port The sensor port. See Input port constants. Must be a constant. Returns: The sensors digital pins direction. Examples: ex_SensorDigiPinsDirection.nxc.

6.33.2.19

byte SensorDigiPinsOutputLevel (const byte port) [inline]

Read sensor digital pins output level. Return the digital pins output level value of a sensor on the specied port. Parameters: port The sensor port. See Input port constants. Must be a constant. Returns: The sensors digital pins output level. Examples: ex_SensorDigiPinsOutputLevel.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.33

Input module functions

265

6.33.2.20

byte SensorDigiPinsStatus (const byte port) [inline]

Read sensor digital pins status. Return the digital pins status value of a sensor on the specied port. Parameters: port The sensor port. See Input port constants. Must be a constant. Returns: The sensors digital pins status. Examples: ex_SensorDigiPinsStatus.nxc.

6.33.2.21

bool SensorInvalid (const byte & port) [inline]

Read sensor invalid data ag. Return the value of the InvalidData ag of a sensor on the specied port. Parameters: port The sensor port. See Input port constants. A variable whose value is the desired sensor port may also be used. Returns: The sensors invalid data ag. Examples: ex_SensorInvalid.nxc.

6.33.2.22

byte SensorMode (const byte & port) [inline]

Read sensor mode. Return the mode of a sensor on the specied port. Parameters: port The sensor port. See Input port constants. A variable whose value is the desired sensor port may also be used.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.33

Input module functions

266

Returns: The sensors mode. See Sensor mode constants. Examples: ex_SensorMode.nxc.

6.33.2.23

unsigned int SensorNormalized (const byte & port) [inline]

Read sensor normalized value. Return the normalized value of a sensor on the specied port. Parameters: port The sensor port. See Input port constants. A variable whose value is the desired sensor port may also be used. Returns: The sensors normalized value. Examples: ex_SensorNormalized.nxc.

6.33.2.24

unsigned int SensorRaw (const byte & port) [inline]

Read sensor raw value. Return the raw value of a sensor on the specied port. Parameters: port The sensor port. See Input port constants. A variable whose value is the desired sensor port may also be used. Returns: The sensors raw value. Examples: ex_SensorRaw.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.33

Input module functions

267

6.33.2.25

unsigned int SensorScaled (const byte & port) [inline]

Read sensor scaled value. Return the processed sensor reading for a sensor on the specied port. This is the same value that is returned by the sensor value names (e.g. SENSOR_1) or the Sensor function. Parameters: port The sensor port. See Input port constants. A variable whose value is the desired sensor port may also be used. Returns: The sensors scaled value. Examples: ex_SensorScaled.nxc.

6.33.2.26

byte SensorType (const byte & port) [inline]

Read sensor type. Return the type of a sensor on the specied port. Parameters: port The sensor port. See Input port constants. A variable whose value is the desired sensor port may also be used. Returns: The sensors type. See Sensor type constants. Examples: ex_SensorType.nxc.

6.33.2.27

unsigned int SensorValue (const byte & port) [inline]

Read sensor scaled value. Return the processed sensor reading for a sensor on the specied port. This is the same value that is returned by the sensor value names (e.g. SENSOR_1) or the Sensor function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.33

Input module functions

268

Parameters: port The sensor port. See Input port constants. A variable whose value is the desired sensor port may also be used. Returns: The sensors scaled value. Examples: ex_SensorValue.nxc.

6.33.2.28

bool SensorValueBool (const byte port) [inline]

Read sensor boolean value. Return the boolean value of a sensor on the specied port. Boolean conversion is either done based on preset cutoffs, or a slope parameter specied by calling SetSensorMode. Parameters: port The sensor port. See Input port constants. Must be a constant. Returns: The sensors boolean value. Examples: ex_SensorValueBool.nxc.

6.33.2.29

unsigned int SensorValueRaw (const byte & port) [inline]

Read sensor raw value. Return the raw value of a sensor on the specied port. Parameters: port The sensor port. See Input port constants. A variable whose value is the desired sensor port may also be used. Returns: The sensors raw value. Examples: ex_SensorValueRaw.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.33

Input module functions

269

6.33.2.30

void SetCustomSensorActiveStatus (byte port, byte activeStatus) [inline]

Set active status. Sets the active status value of a custom sensor. Parameters: port The sensor port. See Input port constants. activeStatus The new active status value. Examples: ex_SetCustomSensorActiveStatus.nxc.

6.33.2.31

void SetCustomSensorPercentFullScale (byte port, byte pctFullScale) [inline]

Set percent full scale. Sets the percent full scale value of a custom sensor. Parameters: port The sensor port. See Input port constants. pctFullScale The new percent full scale value. Examples: ex_SetCustomSensorPercentFullScale.nxc.

6.33.2.32

void SetCustomSensorZeroOffset (byte port, int zeroOffset) [inline]

Set custom zero offset. Sets the zero offset value of a custom sensor. Parameters: port The sensor port. See Input port constants. zeroOffset The new zero offset value. Examples: ex_SetCustomSensorZeroOffset.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.33

Input module functions

270

6.33.2.33

void SetInput (const byte & port, const int eld, variant value) [inline]

Set an input eld value. Set the specied eld of the sensor on the specied port to the value provided. Parameters: port The sensor port. See Input port constants. A constant or a variable may be used (no expressions). eld An input eld constant. See Input eld constants. value The new value, which may be any valid expression. Examples: ex_SetInput.nxc.

6.33.2.34

void SetSensor (const byte & port, const unsigned int cong) [inline]

Set sensor conguration. Set the type and mode of the given sensor to the specied conguration, which must be a special constant containing both type and mode information. See also: SetSensorType(), SetSensorMode(), and ResetSensor() Parameters: port The port to congure. See Input port constants. cong The conguration constant containing both the type and mode. See Combined sensor type and mode constants. Examples: ex_SetSensor.nxc.

6.33.2.35

void SetSensorBoolean (byte port, bool value) [inline]

Set sensor boolean value. Sets the boolean value of a sensor.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.33

Input module functions

271

Parameters: port The sensor port. See Input port constants. value The new boolean value.

6.33.2.36

void SetSensorColorBlue (const byte & port) [inline]

Congure an NXT 2.0 blue light sensor. Congure the sensor on the specied port as an NXT 2.0 color sensor in blue light mode. Requires an NXT 2.0 compatible rmware. Parameters: port The port to congure. See Input port constants. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_setsensorcolorblue.nxc.

6.33.2.37

void SetSensorColorFull (const byte & port) [inline]

Congure an NXT 2.0 full color sensor. Congure the sensor on the specied port as an NXT 2.0 color sensor in full color mode. Requires an NXT 2.0 compatible rmware. Parameters: port The port to congure. See Input port constants. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_setsensorcolorfull.nxc, and ex_SysColorSensorRead.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.33

Input module functions

272

6.33.2.38

void SetSensorColorGreen (const byte & port) [inline]

Congure an NXT 2.0 green light sensor. Congure the sensor on the specied port as an NXT 2.0 color sensor in green light mode. Requires an NXT 2.0 compatible rmware. Parameters: port The port to congure. See Input port constants. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_setsensorcolorgreen.nxc.

6.33.2.39

void SetSensorColorNone (const byte & port) [inline]

Congure an NXT 2.0 no light sensor. Congure the sensor on the specied port as an NXT 2.0 color sensor in no light mode. Requires an NXT 2.0 compatible rmware. Parameters: port The port to congure. See Input port constants. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_setsensorcolornone.nxc.

6.33.2.40

void SetSensorColorRed (const byte & port) [inline]

Congure an NXT 2.0 red light sensor. Congure the sensor on the specied port as an NXT 2.0 color sensor in red light mode. Requires an NXT 2.0 compatible rmware.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.33

Input module functions

273

Parameters: port The port to congure. See Input port constants. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_setsensorcolorred.nxc.

6.33.2.41

void SetSensorDigiPinsDirection (byte port, byte direction) [inline]

Set digital pins direction. Sets the digital pins direction value of a sensor. Parameters: port The sensor port. See Input port constants. direction The new digital pins direction value. Examples: ex_SetSensorDigiPinsDirection.nxc.

6.33.2.42

void SetSensorDigiPinsOutputLevel (byte port, byte outputLevel) [inline]

Set digital pins output level. Sets the digital pins output level value of a sensor. Parameters: port The sensor port. See Input port constants. outputLevel The new digital pins output level value. Examples: ex_SetSensorDigiPinsOutputLevel.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.33

Input module functions

274

6.33.2.43

void SetSensorDigiPinsStatus (byte port, byte status) [inline]

Set digital pins status. Sets the digital pins status value of a sensor. Parameters: port The sensor port. See Input port constants. status The new digital pins status value. Examples: ex_SetSensorDigiPinsStatus.nxc.

6.33.2.44

void SetSensorEMeter (const byte & port) [inline]

Congure an EMeter sensor. Congure the sensor on the specied port as an EMeter sensor. Parameters: port The port to congure. See Input port constants. Examples: ex_SetSensorEMeter.nxc.

6.33.2.45

void SetSensorLight (const byte & port, bool bActive = true) [inline]

Congure a light sensor. Congure the sensor on the specied port as an NXT light sensor. Parameters: port The port to congure. See Input port constants. bActive A boolean ag indicating whether to congure the port as an active or inactive light sensor. The default value for this optional parameter is true. Examples: ex_SetSensorLight.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.33

Input module functions

275

6.33.2.46

void SetSensorLowspeed (const byte & port, bool bIsPowered = true) [inline]

Congure an I2C sensor. Congure the sensor on the specied port as an I2C digital sensor for either powered (9 volt) or unpowered devices. Parameters: port The port to congure. See Input port constants. bIsPowered A boolean ag indicating whether to congure the port for powered or unpowered I2C devices. The default value for this optional parameter is true. Examples: ex_HTRCXSetIRLinkPort.nxc, ex_i2cdeviceid.nxc, ex_i2cdeviceinfo.nxc, ex_i2cvendorid.nxc, ex_i2cversion.nxc, ex_NXTHID.nxc, ex_NXTLineLeader.nxc, ex_NXTPowerMeter.nxc, ex_NXTServo.nxc, ex_PFMate.nxc, ex_ReadSensorHTAngle.nxc, ex_ResetSensorHTAngle.nxc, and ex_SetSensorLowspeed.nxc.

6.33.2.47

void SetSensorMode (const byte & port, byte mode) [inline]

Set sensor mode. Set a sensors mode, which should be one of the predened sensor mode constants. A slope parameter for boolean conversion, if desired, may be added to the mode. After changing the type or the mode of a sensor port you must call ResetSensor to give the rmware time to recongure the sensor port. See also: SetSensorType(), SetSensor() Parameters: port The port to congure. See Input port constants. mode The desired sensor mode. See Sensor mode constants. Examples: ex_SetSensorMode.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.33

Input module functions

276

6.33.2.48

void SetSensorSound (const byte & port, bool bdBScaling = true) [inline]

Congure a sound sensor. Congure the sensor on the specied port as a sound sensor. Parameters: port The port to congure. See Input port constants. bdBScaling A boolean ag indicating whether to congure the port as a sound sensor with dB or dBA scaling. The default value for this optional parameter is true, meaning dB scaling. Examples: ex_SetSensorSound.nxc.

6.33.2.49

void SetSensorTemperature (const byte & port) [inline]

Congure a temperature sensor. Congure the sensor on the specied port as a temperature sensor. Use this to setup the temperature sensor rather than SetSensorLowspeed so that the sensor is properly congured in 12-bit conversion mode. Parameters: port The port to congure. See Input port constants. Examples: ex_SetSensorTemperature.nxc.

6.33.2.50

void SetSensorTouch (const byte & port) [inline]

Congure a touch sensor. Congure the sensor on the specied port as a touch sensor. Parameters: port The port to congure. See Input port constants. Examples: ex_ReadSensorHTTouchMultiplexer.nxc, and ex_SetSensorTouch.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.33

Input module functions

277

6.33.2.51

void SetSensorType (const byte & port, byte type) [inline]

Set sensor type. Set a sensors type, which must be one of the predened sensor type constants. After changing the type or the mode of a sensor port you must call ResetSensor to give the rmware time to recongure the sensor port. See also: SetSensorMode(), SetSensor() Parameters: port The port to congure. See Input port constants. type The desired sensor type. See Sensor type constants. Examples: ex_SetSensorType.nxc.

6.33.2.52

void SetSensorUltrasonic (const byte & port) [inline]

Congure an ultrasonic sensor. Congure the sensor on the specied port as an ultrasonic sensor. Parameters: port The port to congure. See Input port constants. Examples: ex_SetSensorUltrasonic.nxc.

6.33.2.53

void SysColorSensorRead (ColorSensorReadType & args) [inline]

Read LEGO color sensor. This function lets you read the LEGO color sensor given the parameters you pass in via the ColorSensorReadType structure. Parameters: args The ColorSensorReadType structure containing the required parameters.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.34

Basic analog sensor value names

278

Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_SysColorSensorRead.nxc.

6.34

Basic analog sensor value names

Read analog sensor values using these names. Denes 6.34.1 #dene SENSOR_1 Sensor(S1) #dene SENSOR_2 Sensor(S2) #dene SENSOR_3 Sensor(S3) #dene SENSOR_4 Sensor(S4) Detailed Description

Read analog sensor values using these names. Returns the current scaled value of the sensor on the specied port. 6.34.2 6.34.2.1 Dene Documentation #dene SENSOR_1 Sensor(S1) Read the value of the analog sensor on port S1 6.34.2.2 #dene SENSOR_2 Sensor(S2) Read the value of the analog sensor on port S2 6.34.2.3 #dene SENSOR_3 Sensor(S3) Read the value of the analog sensor on port S3 6.34.2.4 #dene SENSOR_4 Sensor(S4) Read the value of the analog sensor on port S4

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.35

Output module types

279

6.35

Output module types

Types used by various output module functions. Data Structures struct OutputStateType
Parameters for the RemoteGetOutputState function.

6.35.1

Detailed Description

Types used by various output module functions.

6.36

Output module functions

Functions for accessing and modifying output module features. Functions void SetMotorPwnFreq (byte n)
Set motor regulation frequency.

void SetMotorRegulationTime (byte n)


Set regulation time.

void SetMotorRegulationOptions (byte n)


Set regulation options.

void OnFwdSyncPID (byte outputs, char pwr, char turnpct, byte p, byte i, byte d)
Run motors forward synchronised with PID factors.

void OnFwdSyncExPID (byte outputs, char pwr, char turnpct, const byte reset, byte p, byte i, byte d)
Run motors forward synchronised and reset counters with PID factors.

void OnRevSyncPID (byte outputs, char pwr, char turnpct, byte p, byte i, byte d)
Run motors backward synchronised with PID factors.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

280

void OnRevSyncExPID (byte outputs, char pwr, char turnpct, const byte reset, byte p, byte i, byte d)
Run motors backward synchronised and reset counters with PID factors.

void OnFwdRegPID (byte outputs, char pwr, byte regmode, byte p, byte i, byte d)
Run motors forward regulated with PID factors.

void OnFwdRegExPID (byte outputs, char pwr, byte regmode, const byte reset, byte p, byte i, byte d)
Run motors forward regulated and reset counters with PID factors.

void OnRevRegPID (byte outputs, char pwr, byte regmode, byte p, byte i, byte d)
Run motors reverse regulated with PID factors.

void OnRevRegExPID (byte outputs, char pwr, byte regmode, const byte reset, byte p, byte i, byte d)
Run motors backward regulated and reset counters with PID factors.

void Off (byte outputs)


Turn motors off.

void OffEx (byte outputs, const byte reset)


Turn motors off and reset counters.

void Coast (byte outputs)


Coast motors.

void CoastEx (byte outputs, const byte reset)


Coast motors and reset counters.

void Float (byte outputs)


Float motors.

void OnFwd (byte outputs, char pwr)


Run motors forward.

void OnFwdEx (byte outputs, char pwr, const byte reset)


Run motors forward and reset counters.

void OnRev (byte outputs, char pwr)


Run motors backward.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

281

void OnRevEx (byte outputs, char pwr, const byte reset)


Run motors backward and reset counters.

void OnFwdReg (byte outputs, char pwr, byte regmode)


Run motors forward regulated.

void OnFwdRegEx (byte outputs, char pwr, byte regmode, const byte reset)
Run motors forward regulated and reset counters.

void OnRevReg (byte outputs, char pwr, byte regmode)


Run motors forward regulated.

void OnRevRegEx (byte outputs, char pwr, byte regmode, const byte reset)
Run motors backward regulated and reset counters.

void OnFwdSync (byte outputs, char pwr, char turnpct)


Run motors forward synchronised.

void OnFwdSyncEx (byte outputs, char pwr, char turnpct, const byte reset)
Run motors forward synchronised and reset counters.

void OnRevSync (byte outputs, char pwr, char turnpct)


Run motors backward synchronised.

void OnRevSyncEx (byte outputs, char pwr, char turnpct, const byte reset)
Run motors backward synchronised and reset counters.

void RotateMotor (byte outputs, char pwr, long angle)


Rotate motor.

void RotateMotorPID (byte outputs, char pwr, long angle, byte p, byte i, byte d)
Rotate motor with PID factors.

void RotateMotorEx (byte outputs, char pwr, long angle, char turnpct, bool sync, bool stop)
Rotate motor.

void RotateMotorExPID (byte outputs, char pwr, long angle, char turnpct, bool sync, bool stop, byte p, byte i, byte d)
Rotate motor.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

282

void ResetTachoCount (byte outputs)


Reset tachometer counter.

void ResetBlockTachoCount (byte outputs)


Reset block-relative counter.

void ResetRotationCount (byte outputs)


Reset program-relative counter.

void ResetAllTachoCounts (byte outputs)


Reset all tachometer counters.

void SetOutput (byte outputs, byte eld1, variant val1,..., byte eldN, variant valN)
Set output elds.

variant GetOutput (byte output, const byte eld)


Get output eld value.

byte MotorMode (byte output)


Get motor mode.

char MotorPower (byte output)


Get motor power level.

char MotorActualSpeed (byte output)


Get motor actual speed.

long MotorTachoCount (byte output)


Get motor tachometer counter.

long MotorTachoLimit (byte output)


Get motor tachometer limit.

byte MotorRunState (byte output)


Get motor run state.

char MotorTurnRatio (byte output)


Get motor turn ratio.

byte MotorRegulation (byte output)


Get motor regulation mode.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

283

bool MotorOverload (byte output)


Get motor overload status.

byte MotorRegPValue (byte output)


Get motor P value.

byte MotorRegIValue (byte output)


Get motor I value.

byte MotorRegDValue (byte output)


Get motor D value.

long MotorBlockTachoCount (byte output)


Get motor block-relative counter.

long MotorRotationCount (byte output)


Get motor program-relative counter.

byte MotorOutputOptions (byte output)


Get motor options.

byte MotorMaxSpeed (byte output)


Get motor max speed.

byte MotorMaxAcceleration (byte output)


Get motor max acceleration.

byte MotorPwnFreq ()
Get motor regulation frequency.

byte MotorRegulationTime ()
Get motor regulation time.

byte MotorRegulationOptions ()
Get motor regulation options.

void PosRegEnable (byte output, byte p=PID_3, byte i=PID_1, byte d=PID_1)
Enable absolute position regulation with PID factors.

void PosRegSetAngle (byte output, long angle)


Change the current value for set angle.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

284

void PosRegAddAngle (byte output, long angle_add)


Add to the current value for set angle.

void PosRegSetMax (byte output, byte max_speed, byte max_acceleration)


Set maximum limits.

6.36.1

Detailed Description

Functions for accessing and modifying output module features. 6.36.2 6.36.2.1 Function Documentation void Coast (byte outputs) [inline]

Coast motors. Turn off the specied outputs, making them coast to a stop. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. Examples: ex_coast.nxc.

6.36.2.2

void CoastEx (byte outputs, const byte reset) [inline]

Coast motors and reset counters. Turn off the specied outputs, making them coast to a stop. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

285

reset Position counters reset control. It must be a constant, see Tachometer counter reset ags. Examples: ex_coastex.nxc.

6.36.2.3

void Float (byte outputs) [inline]

Float motors. Make outputs oat. Float is an alias for Coast. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. Examples: ex_oat.nxc.

6.36.2.4

variant GetOutput (byte output, const byte eld) [inline]

Get output eld value. Get the value of the specied eld for the specied output. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. eld Output port eld to access, this should be a constant, see Output eld constants. Returns: The requested output eld value. Examples: ex_getoutput.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

286

6.36.2.5

char MotorActualSpeed (byte output) [inline]

Get motor actual speed. Get the actual speed value of the specied output. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. Returns: The actual speed value of the specied output. Examples: ex_motoractualspeed.nxc.

6.36.2.6

long MotorBlockTachoCount (byte output) [inline]

Get motor block-relative counter. Get the block-relative position counter value of the specied output. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. Returns: The block-relative position counter value of the specied output. Examples: ex_motorblocktachocount.nxc.

6.36.2.7

byte MotorMaxAcceleration (byte output) [inline]

Get motor max acceleration. Get the max acceleration value of the specied output. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

287

Returns: The max acceleration value of the specied output. Examples: ex_PosReg.nxc.

6.36.2.8

byte MotorMaxSpeed (byte output) [inline]

Get motor max speed. Get the max speed value of the specied output. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. Returns: The max speed value of the specied output. Examples: ex_PosReg.nxc.

6.36.2.9

byte MotorMode (byte output) [inline]

Get motor mode. Get the mode of the specied output. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. Returns: The mode of the specied output. Examples: ex_motormode.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

288

6.36.2.10

byte MotorOutputOptions (byte output) [inline]

Get motor options. Get the options value of the specied output. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. Returns: The options value of the specied output. Examples: ex_motoroutputoptions.nxc.

6.36.2.11

bool MotorOverload (byte output) [inline]

Get motor overload status. Get the overload value of the specied output. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. Returns: The overload value of the specied output. Examples: ex_motoroverload.nxc.

6.36.2.12

char MotorPower (byte output) [inline]

Get motor power level. Get the power level of the specied output. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

289

Returns: The power level of the specied output. Examples: ex_motorpower.nxc.

6.36.2.13

byte MotorPwnFreq () [inline]

Get motor regulation frequency. Get the current motor regulation frequency in milliseconds. Returns: The motor regulation frequency. Examples: ex_motorpwnfreq.nxc.

6.36.2.14

byte MotorRegDValue (byte output) [inline]

Get motor D value. Get the derivative PID value of the specied output. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. Returns: The derivative PID value of the specied output. Examples: ex_motorregdvalue.nxc.

6.36.2.15

byte MotorRegIValue (byte output) [inline]

Get motor I value. Get the integral PID value of the specied output.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

290

Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. Returns: The integral PID value of the specied output. Examples: ex_motorregivalue.nxc.

6.36.2.16

byte MotorRegPValue (byte output) [inline]

Get motor P value. Get the proportional PID value of the specied output. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. Returns: The proportional PID value of the specied output. Examples: ex_motorregpvalue.nxc.

6.36.2.17

byte MotorRegulation (byte output) [inline]

Get motor regulation mode. Get the regulation value of the specied output. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. Returns: The regulation value of the specied output. Examples: ex_motorregulation.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

291

6.36.2.18

byte MotorRegulationOptions () [inline]

Get motor regulation options. Get the current motor regulation options. Returns: The motor regulation options. Examples: ex_PosReg.nxc.

6.36.2.19

byte MotorRegulationTime () [inline]

Get motor regulation time. Get the current motor regulation time in milliseconds. Returns: The motor regulation time. Examples: ex_PosReg.nxc.

6.36.2.20

long MotorRotationCount (byte output) [inline]

Get motor program-relative counter. Get the program-relative position counter value of the specied output. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. Returns: The program-relative position counter value of the specied output. Examples: ex_motorrotationcount.nxc, and util_rpm.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

292

6.36.2.21

byte MotorRunState (byte output) [inline]

Get motor run state. Get the RunState value of the specied output, see Output port run state constants. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. Returns: The RunState value of the specied output. Examples: ex_motorrunstate.nxc.

6.36.2.22

long MotorTachoCount (byte output) [inline]

Get motor tachometer counter. Get the tachometer count value of the specied output. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. Returns: The tachometer count value of the specied output. Examples: ex_motortachocount.nxc.

6.36.2.23

long MotorTachoLimit (byte output) [inline]

Get motor tachometer limit. Get the tachometer limit value of the specied output. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

293

Returns: The tachometer limit value of the specied output. Examples: ex_motortacholimit.nxc.

6.36.2.24

char MotorTurnRatio (byte output) [inline]

Get motor turn ratio. Get the turn ratio value of the specied output. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. Returns: The turn ratio value of the specied output. Examples: ex_motorturnratio.nxc.

6.36.2.25

void Off (byte outputs) [inline]

Turn motors off. Turn the specied outputs off (with braking). Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. Examples: ex_off.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

294

6.36.2.26

void OffEx (byte outputs, const byte reset) [inline]

Turn motors off and reset counters. Turn the specied outputs off (with braking). Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. reset Position counters reset control. It must be a constant, see Tachometer counter reset ags. Examples: ex_offex.nxc.

6.36.2.27

void OnFwd (byte outputs, char pwr) [inline]

Run motors forward. Set outputs to forward direction and turn them on. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. Examples: ex_onfwd.nxc, ex_yield.nxc, and util_rpm.nxc.

6.36.2.28

void OnFwdEx (byte outputs, char pwr, const byte reset) [inline]

Run motors forward and reset counters. Set outputs to forward direction and turn them on.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

295

Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. reset Position counters reset control. It must be a constant, see Tachometer counter reset ags. Examples: ex_onfwdex.nxc.

6.36.2.29

void OnFwdReg (byte outputs, char pwr, byte regmode) [inline]

Run motors forward regulated. Run the specied outputs forward using the specied regulation mode. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. regmode Regulation mode, see Output port regulation mode constants. Examples: ex_onfwdreg.nxc.

6.36.2.30

void OnFwdRegEx (byte outputs, char pwr, byte regmode, const byte reset) [inline]

Run motors forward regulated and reset counters. Run the specied outputs forward using the specied regulation mode. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

296

single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. regmode Regulation mode, see Output port regulation mode constants. reset Position counters reset control. It must be a constant, see Tachometer counter reset ags. Examples: ex_onfwdregex.nxc.

6.36.2.31

void OnFwdRegExPID (byte outputs, char pwr, byte regmode, const byte reset, byte p, byte i, byte d) [inline]

Run motors forward regulated and reset counters with PID factors. Run the specied outputs forward using the specied regulation mode. Specify proportional, integral, and derivative factors. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. regmode Regulation mode, see Output port regulation mode constants. reset Position counters reset control. It must be a constant, see Tachometer counter reset ags. p Proportional factor used by the rmwares PID motor control algorithm. See PID constants. i Integral factor used by the rmwares PID motor control algorithm. See PID constants. d Derivative factor used by the rmwares PID motor control algorithm. See PID constants. Examples: ex_onfwdregexpid.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

297

6.36.2.32

void OnFwdRegPID (byte outputs, char pwr, byte regmode, byte p, byte i, byte d) [inline]

Run motors forward regulated with PID factors. Run the specied outputs forward using the specied regulation mode. Specify proportional, integral, and derivative factors. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. regmode Regulation mode, see Output port regulation mode constants. p Proportional factor used by the rmwares PID motor control algorithm. See PID constants. i Integral factor used by the rmwares PID motor control algorithm. See PID constants. d Derivative factor used by the rmwares PID motor control algorithm. See PID constants. Examples: ex_onfwdregpid.nxc.

6.36.2.33

void OnFwdSync (byte outputs, char pwr, char turnpct) [inline]

Run motors forward synchronised. Run the specied outputs forward with regulated synchronization using the specied turn ratio. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. turnpct Turn ratio, -100 to 100. The direction of your vehicle will depend on its construction.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

298

Examples: ex_onfwdsync.nxc.

6.36.2.34

void OnFwdSyncEx (byte outputs, char pwr, char turnpct, const byte reset) [inline]

Run motors forward synchronised and reset counters. Run the specied outputs forward with regulated synchronization using the specied turn ratio. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. turnpct Turn ratio, -100 to 100. The direction of your vehicle will depend on its construction. reset Position counters reset control. It must be a constant, see Tachometer counter reset ags. Examples: ex_onfwdsyncex.nxc.

6.36.2.35

void OnFwdSyncExPID (byte outputs, char pwr, char turnpct, const byte reset, byte p, byte i, byte d) [inline]

Run motors forward synchronised and reset counters with PID factors. Run the specied outputs forward with regulated synchronization using the specied turn ratio. Specify proportional, integral, and derivative factors. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

299

turnpct Turn ratio, -100 to 100. The direction of your vehicle will depend on its construction. reset Position counters reset control. It must be a constant, see Tachometer counter reset ags. p Proportional factor used by the rmwares PID motor control algorithm. See PID constants. i Integral factor used by the rmwares PID motor control algorithm. See PID constants. d Derivative factor used by the rmwares PID motor control algorithm. See PID constants. Examples: ex_onfwdsyncexpid.nxc.

6.36.2.36

void OnFwdSyncPID (byte outputs, char pwr, char turnpct, byte p, byte i, byte d) [inline]

Run motors forward synchronised with PID factors. Run the specied outputs forward with regulated synchronization using the specied turn ratio. Specify proportional, integral, and derivative factors. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. turnpct Turn ratio, -100 to 100. The direction of your vehicle will depend on its construction. p Proportional factor used by the rmwares PID motor control algorithm. See PID constants. i Integral factor used by the rmwares PID motor control algorithm. See PID constants. d Derivative factor used by the rmwares PID motor control algorithm. See PID constants. Examples: ex_onfwdsyncpid.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

300

6.36.2.37

void OnRev (byte outputs, char pwr) [inline]

Run motors backward. Set outputs to reverse direction and turn them on. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. Examples: ex_onrev.nxc.

6.36.2.38

void OnRevEx (byte outputs, char pwr, const byte reset) [inline]

Run motors backward and reset counters. Set outputs to reverse direction and turn them on. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. reset Position counters reset control. It must be a constant, see Tachometer counter reset ags. Examples: ex_onrevex.nxc.

6.36.2.39

void OnRevReg (byte outputs, char pwr, byte regmode) [inline]

Run motors forward regulated. Run the specied outputs in reverse using the specied regulation mode.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

301

Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. regmode Regulation mode, see Output port regulation mode constants. Examples: ex_onrevreg.nxc.

6.36.2.40

void OnRevRegEx (byte outputs, char pwr, byte regmode, const byte reset) [inline]

Run motors backward regulated and reset counters. Run the specied outputs in reverse using the specied regulation mode. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. regmode Regulation mode, see Output port regulation mode constants. reset Position counters reset control. It must be a constant, see Tachometer counter reset ags. Examples: ex_onrevregex.nxc.

6.36.2.41

void OnRevRegExPID (byte outputs, char pwr, byte regmode, const byte reset, byte p, byte i, byte d) [inline]

Run motors backward regulated and reset counters with PID factors. Run the specied outputs in reverse using the specied regulation mode. Specify proportional, integral, and derivative factors.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

302

Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. regmode Regulation mode, see Output port regulation mode constants. reset Position counters reset control. It must be a constant, see Tachometer counter reset ags. p Proportional factor used by the rmwares PID motor control algorithm. See PID constants. i Integral factor used by the rmwares PID motor control algorithm. See PID constants. d Derivative factor used by the rmwares PID motor control algorithm. See PID constants. Examples: ex_onrevregexpid.nxc.

6.36.2.42

void OnRevRegPID (byte outputs, char pwr, byte regmode, byte p, byte i, byte d) [inline]

Run motors reverse regulated with PID factors. Run the specied outputs in reverse using the specied regulation mode. Specify proportional, integral, and derivative factors. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. regmode Regulation mode, see Output port regulation mode constants. p Proportional factor used by the rmwares PID motor control algorithm. See PID constants. i Integral factor used by the rmwares PID motor control algorithm. See PID constants. d Derivative factor used by the rmwares PID motor control algorithm. See PID constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

303

Examples: ex_onrevregpid.nxc.

6.36.2.43

void OnRevSync (byte outputs, char pwr, char turnpct) [inline]

Run motors backward synchronised. Run the specied outputs in reverse with regulated synchronization using the specied turn ratio. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. turnpct Turn ratio, -100 to 100. The direction of your vehicle will depend on its construction. Examples: ex_onrevsync.nxc.

6.36.2.44

void OnRevSyncEx (byte outputs, char pwr, char turnpct, const byte reset) [inline]

Run motors backward synchronised and reset counters. Run the specied outputs in reverse with regulated synchronization using the specied turn ratio. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. turnpct Turn ratio, -100 to 100. The direction of your vehicle will depend on its construction. reset Position counters reset control. It must be a constant, see Tachometer counter reset ags.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

304

Examples: ex_onrevsyncex.nxc.

6.36.2.45

void OnRevSyncExPID (byte outputs, char pwr, char turnpct, const byte reset, byte p, byte i, byte d) [inline]

Run motors backward synchronised and reset counters with PID factors. Run the specied outputs in reverse with regulated synchronization using the specied turn ratio. Specify proportional, integral, and derivative factors. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. turnpct Turn ratio, -100 to 100. The direction of your vehicle will depend on its construction. reset Position counters reset control. It must be a constant, see Tachometer counter reset ags. p Proportional factor used by the rmwares PID motor control algorithm. See PID constants. i Integral factor used by the rmwares PID motor control algorithm. See PID constants. d Derivative factor used by the rmwares PID motor control algorithm. See PID constants. Examples: ex_onrevsyncexpid.nxc.

6.36.2.46

void OnRevSyncPID (byte outputs, char pwr, char turnpct, byte p, byte i, byte d) [inline]

Run motors backward synchronised with PID factors. Run the specied outputs in reverse with regulated synchronization using the specied turn ratio. Specify proportional, integral, and derivative factors.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

305

Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. turnpct Turn ratio, -100 to 100. The direction of your vehicle will depend on its construction. p Proportional factor used by the rmwares PID motor control algorithm. See PID constants. i Integral factor used by the rmwares PID motor control algorithm. See PID constants. d Derivative factor used by the rmwares PID motor control algorithm. See PID constants. Examples: ex_onrevsyncpid.nxc.

6.36.2.47

void PosRegAddAngle (byte output, long angle_add) [inline]

Add to the current value for set angle. Add an offset to the current set position. Returns immediately, but keep regulating. Parameters: output Desired output port. Can be a constant or a variable, see Output port constants. angle_add Value to add to the current set position, in degree. Can be negative. Can be greater than 360 degree to make several turns. Examples: ex_PosReg.nxc.

6.36.2.48

void PosRegEnable (byte output, byte p = PID_3, byte i = PID_1, byte d = PID_1) [inline]

Enable absolute position regulation with PID factors. Enable absolute position regulation on the specied output. Motor is kept regulated as long as this is enabled. Optionally specify proportional, integral, and derivative factors.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

306

Parameters: output Desired output port. Can be a constant or a variable, see Output port constants. p Proportional factor used by the rmwares PID motor control algorithm. See PID constants. Default value is PID_3. i Integral factor used by the rmwares PID motor control algorithm. See PID constants. Default value is PID_1. d Derivative factor used by the rmwares PID motor control algorithm. See PID constants. Default value is PID_1. Examples: ex_PosReg.nxc.

6.36.2.49

void PosRegSetAngle (byte output, long angle) [inline]

Change the current value for set angle. Make the absolute position regulation going toward the new provided angle. Returns immediately, but keep regulating. Parameters: output Desired output port. Can be a constant or a variable, see Output port constants. angle New set position, in degree. The 0 angle corresponds to the position of the motor when absolute position regulation was rst enabled. Can be negative. Can be greater than 360 degree to make several turns. Examples: ex_PosReg.nxc.

6.36.2.50

void PosRegSetMax (byte output, byte max_speed, byte max_acceleration) [inline]

Set maximum limits. Set maximum speed and acceleration. Parameters: output Desired output port. Can be a constant or a variable, see Output port constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

307

max_speed Maximum speed, or 0 to disable speed limiting. max_acceleration Maximum acceleration, or 0 to disable acceleration limiting. The max_speed parameter should not be 0 if this is not 0. Examples: ex_PosReg.nxc.

6.36.2.51

void ResetAllTachoCounts (byte outputs) [inline]

Reset all tachometer counters. Reset all three position counters and reset the current tachometer limit goal for the specied outputs. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. For multiple outputs at the same time you need to add single output port values into a byte array and pass the array instead of a single numeric value. Examples: ex_resetalltachocounts.nxc.

6.36.2.52

void ResetBlockTachoCount (byte outputs) [inline]

Reset block-relative counter. Reset the block-relative position counter for the specied outputs. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. For multiple outputs at the same time you need to add single output port values into a byte array and pass the array instead of a single numeric value. Examples: ex_resetblocktachocount.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

308

6.36.2.53

void ResetRotationCount (byte outputs) [inline]

Reset program-relative counter. Reset the program-relative position counter for the specied outputs. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. For multiple outputs at the same time you need to add single output port values into a byte array and pass the array instead of a single numeric value. Examples: ex_resetrotationcount.nxc.

6.36.2.54

void ResetTachoCount (byte outputs) [inline]

Reset tachometer counter. Reset the tachometer count and tachometer limit goal for the specied outputs. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. For multiple outputs at the same time you need to add single output port values into a byte array and pass the array instead of a single numeric value. Examples: ex_resettachocount.nxc.

6.36.2.55

void RotateMotor (byte outputs, char pwr, long angle) [inline]

Rotate motor. Run the specied outputs forward for the specied number of degrees. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

309

pwr Output power, 0 to 100. Can be negative to reverse direction. angle Angle limit, in degree. Can be negative to reverse direction. Examples: ex_rotatemotor.nxc.

6.36.2.56

void RotateMotorEx (byte outputs, char pwr, long angle, char turnpct, bool sync, bool stop) [inline]

Rotate motor. Run the specied outputs forward for the specied number of degrees. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. angle Angle limit, in degree. Can be negative to reverse direction. turnpct Turn ratio, -100 to 100. The direction of your vehicle will depend on its construction. sync Synchronise two motors. Should be set to true if a non-zero turn percent is specied or no turning will occur. stop Specify whether the motor(s) should brake at the end of the rotation. Examples: ex_rotatemotorex.nxc.

6.36.2.57

void RotateMotorExPID (byte outputs, char pwr, long angle, char turnpct, bool sync, bool stop, byte p, byte i, byte d) [inline]

Rotate motor. Run the specied outputs forward for the specied number of degrees. Specify proportional, integral, and derivative factors. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

310

single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. angle Angle limit, in degree. Can be negative to reverse direction. turnpct Turn ratio, -100 to 100. The direction of your vehicle will depend on its construction. sync Synchronise two motors. Should be set to true if a non-zero turn percent is specied or no turning will occur. stop Specify whether the motor(s) should brake at the end of the rotation. p Proportional factor used by the rmwares PID motor control algorithm. See PID constants. i Integral factor used by the rmwares PID motor control algorithm. See PID constants. d Derivative factor used by the rmwares PID motor control algorithm. See PID constants. Examples: ex_rotatemotorexpid.nxc.

6.36.2.58

void RotateMotorPID (byte outputs, char pwr, long angle, byte p, byte i, byte d) [inline]

Rotate motor with PID factors. Run the specied outputs forward for the specied number of degrees. Specify proportional, integral, and derivative factors. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. angle Angle limit, in degree. Can be negative to reverse direction. p Proportional factor used by the rmwares PID motor control algorithm. See PID constants. i Integral factor used by the rmwares PID motor control algorithm. See PID constants. d Derivative factor used by the rmwares PID motor control algorithm. See PID constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.36

Output module functions

311

Examples: ex_rotatemotorpid.nxc.

6.36.2.59

void SetMotorPwnFreq (byte n) [inline]

Set motor regulation frequency. Set the motor regulation frequency in milliseconds. By default this is set to 100ms. Parameters: n The motor regulation frequency. Examples: ex_SetMotorPwnFreq.nxc.

6.36.2.60

void SetMotorRegulationOptions (byte n) [inline]

Set regulation options. Set the motor regulation options. Parameters: n The motor regulation options. Examples: ex_PosReg.nxc.

6.36.2.61

void SetMotorRegulationTime (byte n) [inline]

Set regulation time. Set the motor regulation time in milliseconds. By default this is set to 100ms. Parameters: n The motor regulation time. Examples: ex_PosReg.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.37

Display module types

312

6.36.2.62

void SetOutput (byte outputs, byte eld1, variant val1, ..., byte eldN, variant valN) [inline]

Set output elds. Set the specied eld of the outputs to the value provided. The eld must be a valid output eld constant. This function takes a variable number of eld/value pairs. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. For multiple outputs at the same time you need to add single output port values into a byte array and pass the array instead of a single numeric value. eld1 The 1st output port eld to access, this should be a constant, see Output eld constants. val1 Value to set for the 1st eld. eldN The Nth output port eld to access, this should be a constant, see Output eld constants. valN The value to set for the Nth eld. Examples: ex_setoutput.nxc.

6.37

Display module types

Types used by various display module functions. Data Structures struct LocationType
A point on the NXT LCD screen.

struct SizeType
Width and height dimensions for the DrawRect system call.

struct DrawTextType
Parameters for the DrawText system call.

struct DrawPointType
Parameters for the DrawPoint system call.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.38

Display module functions

313

struct DrawLineType
Parameters for the DrawLine system call.

struct DrawCircleType
Parameters for the DrawCircle system call.

struct DrawRectType
Parameters for the DrawRect system call.

struct DrawGraphicType
Parameters for the DrawGraphic system call.

struct SetScreenModeType
Parameters for the SetScreenMode system call.

struct DisplayExecuteFunctionType
Parameters for the DisplayExecuteFunction system call.

struct DrawGraphicArrayType
Parameters for the DrawGraphicArray system call.

struct DrawPolygonType
Parameters for the DrawPolygon system call.

struct DrawEllipseType
Parameters for the DrawEllipse system call.

struct DrawFontType
Parameters for the DrawFont system call.

6.37.1

Detailed Description

Types used by various display module functions.

6.38

Display module functions

Functions for accessing and modifying display module features.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.38

Display module functions

314

Functions void ResetScreen ()


Reset LCD screen.

char CircleOut (int x, int y, byte radius, unsigned long options=DRAW_OPT_NORMAL)


Draw a circle.

char LineOut (int x1, int y1, int x2, int y2, unsigned long options=DRAW_OPT_NORMAL)
Draw a line.

char PointOut (int x, int y, unsigned long options=DRAW_OPT_NORMAL)


Draw a point.

char RectOut (int x, int y, int width, int height, unsigned long options=DRAW_OPT_NORMAL)
Draw a rectangle.

char TextOut (int x, int y, string str, unsigned long options=DRAW_OPT_NORMAL)


Draw text.

char NumOut (int x, int y, variant value, unsigned long options=DRAW_OPT_NORMAL)


Draw a number.

char EllipseOut (int x, int y, byte radiusX, byte radiusY, unsigned long options=DRAW_OPT_NORMAL)
Draw an ellipse.

char PolyOut (LocationType points[ ], unsigned long options=DRAW_OPT_NORMAL)


Draw a polygon.

char FontTextOut (int x, int y, string lename, string str, unsigned long options=DRAW_OPT_NORMAL)
Draw text with font.

char FontNumOut (int x, int y, string lename, variant value, unsigned long options=DRAW_OPT_NORMAL)
Draw a number with font.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.38

Display module functions

315

char GraphicOut (int x, int y, string lename, unsigned long options=DRAW_OPT_NORMAL)


Draw a graphic image.

char GraphicArrayOut (int x, int y, byte data[ ], unsigned long options=DRAW_OPT_NORMAL)


Draw a graphic image from byte array.

char GraphicOutEx (int x, int y, string lename, byte vars[ ], unsigned long options=DRAW_OPT_NORMAL)
Draw a graphic image with parameters.

char GraphicArrayOutEx (int x, int y, byte data[ ], byte vars[ ], unsigned long options=DRAW_OPT_NORMAL)
Draw a graphic image from byte array with parameters.

void GetDisplayNormal (const byte x, const byte line, unsigned int cnt, byte &data[ ])
Read pixel data from the normal display buffer.

void SetDisplayNormal (const byte x, const byte line, unsigned int cnt, byte data[ ])
Write pixel data to the normal display buffer.

void GetDisplayPopup (const byte x, const byte line, unsigned int cnt, byte &data[ ])
Read pixel data from the popup display buffer.

void SetDisplayPopup (const byte x, const byte line, unsigned int cnt, byte data[ ])
Write pixel data to the popup display buffer.

unsigned long DisplayEraseMask ()


Read the display erase mask value.

unsigned long DisplayUpdateMask ()


Read the display update mask value.

unsigned long DisplayFont ()


Read the display font memory address.

unsigned long DisplayDisplay ()

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.38

Display module functions

316

Read the display memory address.

byte DisplayFlags ()
Read the display ags.

byte DisplayTextLinesCenterFlags ()
Read the display text lines center ags.

void SysDrawText (DrawTextType &args)


Draw text.

void SysDrawPoint (DrawPointType &args)


Draw a point.

void SysDrawLine (DrawLineType &args)


Draw a line.

void SysDrawCircle (DrawCircleType &args)


Draw a circle.

void SysDrawRect (DrawRectType &args)


Draw a rectangle.

void SysDrawGraphic (DrawGraphicType &args)


Draw a graphic (RIC le).

void SysSetScreenMode (SetScreenModeType &args)


Set the screen mode.

void SysDisplayExecuteFunction (DisplayExecuteFunctionType &args)


Execute any Display module command.

byte DisplayContrast ()
Read the display contrast setting.

void SysDrawGraphicArray (DrawGraphicArrayType &args)


Draw a graphic image from a byte array.

void SysDrawPolygon (DrawPolygonType &args)


Draw a polygon.

void SysDrawEllipse (DrawEllipseType &args)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.38

Display module functions

317

Draw an ellipse.

void SysDrawFont (DrawFontType &args)


Draw text using a custom font.

void ClearScreen ()
Clear LCD screen.

void ClearLine (byte line)


Clear a line on the LCD screen.

void SetDisplayFont (unsigned long fontaddr)


Set the display font memory address.

void SetDisplayDisplay (unsigned long dispaddr)


Set the display memory address.

void SetDisplayEraseMask (unsigned long eraseMask)


Set the display erase mask.

void SetDisplayFlags (byte ags)


Set the display ags.

void SetDisplayTextLinesCenterFlags (byte ctrFlags)


Set the display text lines center ags.

void SetDisplayUpdateMask (unsigned long updateMask)


Set the display update mask.

void SetDisplayContrast (byte contrast)


Set the display contrast.

6.38.1

Detailed Description

Functions for accessing and modifying display module features. 6.38.2 6.38.2.1 Function Documentation char CircleOut (int x, int y, byte radius, unsigned long options = DRAW_OPT_NORMAL) [inline]

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.38

Display module functions

318

Draw a circle. This function lets you draw a circle on the screen with its center at the specied x and y location, using the specied radius. Optionally specify drawing options. If this argument is not specied it defaults to DRAW_OPT_NORMAL. Valid display option constants are listed in the Drawing option constants group. See also: SysDrawCircle, DrawCircleType Parameters: x The x value for the center of the circle. y The y value for the center of the circle. radius The radius of the circle. options The optional drawing options. Returns: The result of the drawing operation. Examples: ex_CircleOut.nxc, and ex_le_system.nxc.

6.38.2.2

void ClearLine (byte line) [inline]

Clear a line on the LCD screen. This function lets you clear a single line on the NXT LCD. Parameters: line The line you want to clear. See Line number constants. Examples: ex_clearline.nxc.

6.38.2.3

void ClearScreen () [inline]

Clear LCD screen. This function lets you clear the NXT LCD to a blank screen.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.38

Display module functions

319

Examples: ex_ClearScreen.nxc, ex_dispftout.nxc, ex_dispgout.nxc, ex_getmemoryinfo.nxc, ex_PolyOut.nxc, ex_ReadSensorHTAngle.nxc, ex_SetAbortFlag.nxc, ex_SetLongAbort.nxc, ex_string.nxc, ex_sysdrawpolygon.nxc, and ex_sysmemorymanager.nxc.

6.38.2.4

byte DisplayContrast () [inline]

Read the display contrast setting. This function lets you read the current display contrast setting. Returns: The current display contrast (byte). Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Examples: ex_contrast.nxc.

6.38.2.5

unsigned long DisplayDisplay () [inline]

Read the display memory address. This function lets you read the current display memory address. Returns: The current display memory address. Examples: ex_DisplayDisplay.nxc, and ex_dispmisc.nxc.

6.38.2.6

unsigned long DisplayEraseMask () [inline]

Read the display erase mask value. This function lets you read the current display erase mask value.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.38

Display module functions

320

Returns: The current display erase mask value. Examples: ex_DisplayEraseMask.nxc, and ex_dispmisc.nxc.

6.38.2.7

byte DisplayFlags () [inline]

Read the display ags. This function lets you read the current display ags. Valid ag values are listed in the Display ags group. Returns: The current display ags. Examples: ex_DisplayFlags.nxc, and ex_dispmisc.nxc.

6.38.2.8

unsigned long DisplayFont () [inline]

Read the display font memory address. This function lets you read the current display font memory address. Returns: The current display font memory address. Examples: ex_addressof.nxc, setdisplayfont.nxc. ex_addressofex.nxc, ex_displayfont.nxc, and ex_-

6.38.2.9

byte DisplayTextLinesCenterFlags () [inline]

Read the display text lines center ags. This function lets you read the current display text lines center ags.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.38

Display module functions

321

Returns: The current display text lines center ags. Examples: ex_DisplayTextLinesCenterFlags.nxc, and ex_dispmisc.nxc.

6.38.2.10

unsigned long DisplayUpdateMask () [inline]

Read the display update mask value. This function lets you read the current display update mask value. Returns: The current display update mask. Examples: ex_DisplayUpdateMask.nxc, and ex_dispmisc.nxc.

6.38.2.11

char EllipseOut (int x, int y, byte radiusX, byte radiusY, unsigned long options = DRAW_OPT_NORMAL) [inline]

Draw an ellipse. This function lets you draw an ellipse on the screen with its center at the specied x and y location, using the specied radii. Optionally specify drawing options. If this argument is not specied it defaults to DRAW_OPT_NORMAL. Valid display option constants are listed in the Drawing option constants group. See also: SysDrawEllipse, DrawEllipseType Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: x The x value for the center of the ellipse. y The y value for the center of the ellipse. radiusX The x axis radius.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.38

Display module functions

322

radiusY The y axis radius. options The optional drawing options. Returns: The result of the drawing operation. Examples: ex_EllipseOut.nxc.

6.38.2.12

char FontNumOut (int x, int y, string lename, variant value, unsigned long options = DRAW_OPT_NORMAL) [inline]

Draw a number with font. Draw a numeric value on the screen at the specied x and y location using a custom RIC font. Optionally specify drawing options. If this argument is not specied it defaults to DRAW_OPT_NORMAL. Valid display option constants are listed in the Drawing option constants group. See the Font drawing option constants for options specic to the font drawing functions. See also: FontTextOut, SysDrawFont, DrawFontType Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: x The x value for the start of the number output. y The y value for the start of the number output. lename The lename of the RIC font. value The value to output to the LCD screen. Any numeric type is supported. options The optional drawing options. Returns: The result of the drawing operation. Examples: ex_dispfnout.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.38

Display module functions

323

6.38.2.13

char FontTextOut (int x, int y, string lename, string str, unsigned long options = DRAW_OPT_NORMAL) [inline]

Draw text with font. Draw a text value on the screen at the specied x and y location using a custom RIC font. Optionally specify drawing options. If this argument is not specied it defaults to DRAW_OPT_NORMAL. Valid display option constants are listed in the Drawing option constants group. See the Font drawing option constants for options specic to the font drawing functions. See also: FontNumOut, SysDrawFont, DrawFontType Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: x The x value for the start of the text output. y The y value for the start of the text output. lename The lename of the RIC font. str The text to output to the LCD screen. options The optional drawing options. Returns: The result of the drawing operation. Examples: ex_dispftout.nxc.

6.38.2.14

void GetDisplayNormal (const byte x, const byte line, unsigned int cnt, byte & data[ ]) [inline]

Read pixel data from the normal display buffer. Read "cnt" bytes from the normal display memory into the data array. Start reading from the specied x, line coordinate. Each byte of data read from screen memory is a vertical strip of 8 bits at the desired location. Each bit represents a single pixel on the LCD screen. Use TEXTLINE_1 through TEXTLINE_8 for the "line" parameter.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.38

Display module functions

324

Parameters: x The desired x position from which to read pixel data. line The desired line from which to read pixel data. cnt The number of bytes of pixel data to read. data The array of bytes into which pixel data is read. Examples: ex_GetDisplayNormal.nxc.

6.38.2.15

void GetDisplayPopup (const byte x, const byte line, unsigned int cnt, byte & data[ ]) [inline]

Read pixel data from the popup display buffer. Read "cnt" bytes from the popup display memory into the data array. Start reading from the specied x, line coordinate. Each byte of data read from screen memory is a vertical strip of 8 bits at the desired location. Each bit represents a single pixel on the LCD screen. Use TEXTLINE_1 through TEXTLINE_8 for the "line" parameter. Parameters: x The desired x position from which to read pixel data. line The desired line from which to read pixel data. cnt The number of bytes of pixel data to read. data The array of bytes into which pixel data is read. Examples: ex_GetDisplayPopup.nxc.

6.38.2.16

char GraphicArrayOut (int x, int y, byte data[ ], unsigned long options = DRAW_OPT_NORMAL) [inline]

Draw a graphic image from byte array. Draw a graphic image byte array on the screen at the specied x and y location. Optionally specify drawing options. If this argument is not specied it defaults to DRAW_OPT_NORMAL. Valid display option constants are listed in the Drawing option constants group. If the le cannot be found then nothing will be drawn and no errors will be reported.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.38

Display module functions

325

See also: SysDrawGraphicArray, DrawGraphicArrayType Parameters: x The x value for the position of the graphic image. y The y value for the position of the graphic image. data The byte array of the RIC graphic image. options The optional drawing options. Returns: The result of the drawing operation. Examples: ex_dispgaout.nxc.

6.38.2.17

char GraphicArrayOutEx (int x, int y, byte data[ ], byte vars[ ], unsigned long options = DRAW_OPT_NORMAL) [inline]

Draw a graphic image from byte array with parameters. Draw a graphic image byte array on the screen at the specied x and y location using an array of parameters. Optionally specify drawing options. If this argument is not specied it defaults to DRAW_OPT_NORMAL. Valid display option constants are listed in the Drawing option constants group. If the le cannot be found then nothing will be drawn and no errors will be reported. See also: SysDrawGraphicArray, DrawGraphicArrayType Parameters: x The x value for the position of the graphic image. y The y value for the position of the graphic image. data The byte array of the RIC graphic image. vars The byte array of parameters. options The optional drawing options. Returns: The result of the drawing operation.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.38

Display module functions

326

Examples: ex_dispgaoutex.nxc.

6.38.2.18

char GraphicOut (int x, int y, string lename, unsigned long options = DRAW_OPT_NORMAL) [inline]

Draw a graphic image. Draw a graphic image le on the screen at the specied x and y location. Optionally specify drawing options. If this argument is not specied it defaults to DRAW_OPT_NORMAL. Valid display option constants are listed in the Drawing option constants group. If the le cannot be found then nothing will be drawn and no errors will be reported. See also: SysDrawGraphic, DrawGraphicType Parameters: x The x value for the position of the graphic image. y The y value for the position of the graphic image. lename The lename of the RIC graphic image. options The optional drawing options. Returns: The result of the drawing operation. Examples: ex_dispgout.nxc, and ex_GraphicOut.nxc.

6.38.2.19

char GraphicOutEx (int x, int y, string lename, byte vars[ ], unsigned long options = DRAW_OPT_NORMAL) [inline]

Draw a graphic image with parameters. Draw a graphic image le on the screen at the specied x and y location using an array of parameters. Optionally specify drawing options. If this argument is not specied it defaults to DRAW_OPT_NORMAL. Valid display option constants are listed in the Drawing option constants group. If the le cannot be found then nothing will be drawn and no errors will be reported.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.38

Display module functions

327

See also: SysDrawGraphic, DrawGraphicType Parameters: x The x value for the position of the graphic image. y The y value for the position of the graphic image. lename The lename of the RIC graphic image. vars The byte array of parameters. options The optional drawing options. Returns: The result of the drawing operation. Examples: ex_dispgoutex.nxc, and ex_GraphicOutEx.nxc.

6.38.2.20

char LineOut (int x1, int y1, int x2, int y2, unsigned long options = DRAW_OPT_NORMAL) [inline]

Draw a line. This function lets you draw a line on the screen from x1, y1 to x2, y2. Optionally specify drawing options. If this argument is not specied it defaults to DRAW_OPT_NORMAL. Valid display option constants are listed in the Drawing option constants group. See also: SysDrawLine, DrawLineType Parameters: x1 The x value for the start of the line. y1 The y value for the start of the line. x2 The x value for the end of the line. y2 The y value for the end of the line. options The optional drawing options. Returns: The result of the drawing operation. Examples: ex_LineOut.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.38

Display module functions

328

6.38.2.21

char NumOut (int x, int y, variant value, unsigned long options = DRAW_OPT_NORMAL) [inline]

Draw a number. Draw a numeric value on the screen at the specied x and y location. The y value must be a multiple of 8. Valid line number constants are listed in the Line number constants group. Optionally specify drawing options. If this argument is not specied it defaults to DRAW_OPT_NORMAL. Valid display option constants are listed in the Drawing option constants group. See also: SysDrawText, DrawTextType Parameters: x The x value for the start of the number output. y The text line number for the number output. value The value to output to the LCD screen. Any numeric type is supported. options The optional drawing options. Returns: The result of the drawing operation. Examples: ex_ArrayBuild.nxc, ex_ArrayMax.nxc, ex_ArrayMean.nxc, ex_ArrayMin.nxc, ex_ArrayOp.nxc, ex_ArraySort.nxc, ex_ArrayStd.nxc, ex_ArraySum.nxc, ex_ArraySumSqr.nxc, ex_atof.nxc, ex_atoi.nxc, ex_atol.nxc, ex_buttonpressed.nxc, ex_contrast.nxc, ex_ctype.nxc, ex_dispgaout.nxc, ex_dispgout.nxc, ex_dispmisc.nxc, ex_div.nxc, ex_ndrstle.nxc, ex_ndnextle.nxc, ex_FlattenVar.nxc, ex_getchar.nxc, ex_getmemoryinfo.nxc, ex_HTGyroTest.nxc, ex_isnan.nxc, ex_labs.nxc, ex_ldiv.nxc, ex_memcmp.nxc, ex_motoroutputoptions.nxc, ex_NumOut.nxc, ex_NXTLineLeader.nxc, ex_NXTPowerMeter.nxc, ex_NXTServo.nxc, ex_NXTSumoEyes.nxc, ex_Pos.nxc, ex_ReadSensorHTAngle.nxc, ex_reladdressof.nxc, ex_SensorHTGyro.nxc, ex_SetAbortFlag.nxc, ex_SetLongAbort.nxc, ex_SizeOf.nxc, ex_StrIndex.nxc, ex_string.nxc, ex_StrLenOld.nxc, ex_strtod.nxc, ex_strtol.nxc, ex_strtoul.nxc, ex_SysColorSensorRead.nxc, ex_syscommbtconnection.nxc, ex_sysdataloggettimes.nxc, ex_sysleread.nxc, ex_syslewrite.nxc, ex_sysmemorymanager.nxc, ex_SysReadLastResponse.nxc, ex_SysReadSemData.nxc, ex_SysUpdateCalibCacheInfo.nxc, ex_SysWriteSemData.nxc, and ex_UnattenVar.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.38

Display module functions

329

6.38.2.22

char PointOut (int x, int y, unsigned long options = DRAW_OPT_NORMAL) [inline]

Draw a point. This function lets you draw a point on the screen at x, y. Optionally specify drawing options. If this argument is not specied it defaults to DRAW_OPT_NORMAL. Valid display option constants are listed in the Drawing option constants group. See also: SysDrawPoint, DrawPointType Parameters: x The x value for the point. y The y value for the point. options The optional drawing options. Returns: The result of the drawing operation. Examples: ex_PointOut.nxc, ex_sin_cos.nxc, and ex_sind_cosd.nxc.

6.38.2.23

char PolyOut (LocationType points[ ], unsigned long options = DRAW_OPT_NORMAL) [inline]

Draw a polygon. This function lets you draw a polygon on the screen using an array of points. Optionally specify drawing options. If this argument is not specied it defaults to DRAW_OPT_NORMAL. Valid display option constants are listed in the Drawing option constants group. See also: SysDrawPolygon, DrawPolygonType Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: points An array of LocationType points that dene the polygon.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.38

Display module functions

330

options The optional drawing options. Returns: The result of the drawing operation. Examples: ex_PolyOut.nxc.

6.38.2.24

char RectOut (int x, int y, int width, int height, unsigned long options = DRAW_OPT_NORMAL) [inline]

Draw a rectangle. This function lets you draw a rectangle on the screen at x, y with the specied width and height. Optionally specify drawing options. If this argument is not specied it defaults to DRAW_OPT_NORMAL. Valid display option constants are listed in the Drawing option constants group. See also: SysDrawRect, DrawRectType Parameters: x The x value for the top left corner of the rectangle. y The y value for the top left corner of the rectangle. width The width of the rectangle. height The height of the rectangle. options The optional drawing options. Returns: The result of the drawing operation. Examples: ex_RectOut.nxc.

6.38.2.25

void ResetScreen () [inline]

Reset LCD screen. This function lets you restore the standard NXT running program screen.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.38

Display module functions

331

Examples: ex_ResetScreen.nxc.

6.38.2.26

void SetDisplayContrast (byte contrast) [inline]

Set the display contrast. This function lets you set the display contrast setting. Parameters: contrast The desired display contrast. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Examples: ex_contrast.nxc, and ex_setdisplaycontrast.nxc.

6.38.2.27

void SetDisplayDisplay (unsigned long dispaddr) [inline]

Set the display memory address. This function lets you set the current display memory address. Parameters: dispaddr The new display memory address. Examples: ex_dispmisc.nxc, and ex_SetDisplayDisplay.nxc.

6.38.2.28

void SetDisplayEraseMask (unsigned long eraseMask) [inline]

Set the display erase mask. This function lets you set the current display erase mask. Parameters: eraseMask The new display erase mask.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.38

Display module functions

332

Examples: ex_dispmisc.nxc, and ex_SetDisplayEraseMask.nxc.

6.38.2.29

void SetDisplayFlags (byte ags) [inline]

Set the display ags. This function lets you set the current display ags. Parameters: ags The new display ags. See Display ags. Examples: ex_dispmisc.nxc, and ex_SetDisplayFlags.nxc.

6.38.2.30

void SetDisplayFont (unsigned long fontaddr) [inline]

Set the display font memory address. This function lets you set the current display font memory address. Parameters: fontaddr The new display font memory address. Examples: ex_addressof.nxc, setdisplayfont.nxc. ex_addressofex.nxc, ex_displayfont.nxc, and ex_-

6.38.2.31

void SetDisplayNormal (const byte x, const byte line, unsigned int cnt, byte data[ ]) [inline]

Write pixel data to the normal display buffer. Write "cnt" bytes to the normal display memory from the data array. Start writing at the specied x, line coordinate. Each byte of data is a vertical strip of 8 bits at the desired location. Each bit represents a single pixel on the LCD screen. Use TEXTLINE_1 through TEXTLINE_8 for the "line" parameter.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.38

Display module functions

333

Parameters: x The desired x position where you wish to write pixel data. line The desired line where you wish to write pixel data. cnt The number of bytes of pixel data to write. data The array of bytes from which pixel data is read. Examples: ex_SetDisplayNormal.nxc.

6.38.2.32

void SetDisplayPopup (const byte x, const byte line, unsigned int cnt, byte data[ ]) [inline]

Write pixel data to the popup display buffer. Write "cnt" bytes to the popup display memory from the data array. Start writing at the specied x, line coordinate. Each byte of data is a vertical strip of 8 bits at the desired location. Each bit represents a single pixel on the LCD screen. Use TEXTLINE_1 through TEXTLINE_8 for the "line" parameter. Parameters: x The desired x position where you wish to write pixel data. line The desired line where you wish to write pixel data. cnt The number of bytes of pixel data to write. data The array of bytes from which pixel data is read. Examples: ex_SetDisplayPopup.nxc.

6.38.2.33

void SetDisplayTextLinesCenterFlags (byte ctrFlags) [inline]

Set the display text lines center ags. This function lets you set the current display text lines center ags. Parameters: ctrFlags The new display text lines center ags. Examples: ex_dispmisc.nxc, and ex_SetDisplayTextLinesCenterFlags.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.38

Display module functions

334

6.38.2.34

void SetDisplayUpdateMask (unsigned long updateMask) [inline]

Set the display update mask. This function lets you set the current display update mask. Parameters: updateMask The new display update mask. Examples: ex_dispmisc.nxc, and ex_SetDisplayUpdateMask.nxc.

6.38.2.35

void SysDisplayExecuteFunction (DisplayExecuteFunctionType & args) [inline]

Execute any Display module command. This function lets you directly execute the Display modules primary drawing function using the values specied via the DisplayExecuteFunctionType structure. Parameters: args The DisplayExecuteFunctionType structure containing the drawing parameters. Examples: ex_dispfunc.nxc, and ex_sysdisplayexecutefunction.nxc.

6.38.2.36

void SysDrawCircle (DrawCircleType & args) [inline]

Draw a circle. This function lets you draw a circle on the NXT LCD given the parameters you pass in via the DrawCircleType structure. Parameters: args The DrawCircleType structure containing the drawing parameters. Examples: ex_sysdrawcircle.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.38

Display module functions

335

6.38.2.37

void SysDrawEllipse (DrawEllipseType & args) [inline]

Draw an ellipse. This function lets you draw an ellipse on the NXT LCD given the parameters you pass in via the DrawEllipseType structure. Parameters: args The DrawEllipseType structure containing the drawing parameters. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Examples: ex_SysDrawEllipse.nxc.

6.38.2.38

void SysDrawFont (DrawFontType & args) [inline]

Draw text using a custom font. This function lets you draw text on the NXT LCD using a custom font with parameters you pass in via the DrawFontType structure. Parameters: args The DrawFontType structure containing the drawing parameters. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Examples: ex_dispftout.nxc, and ex_sysdrawfont.nxc.

6.38.2.39

void SysDrawGraphic (DrawGraphicType & args) [inline]

Draw a graphic (RIC le). This function lets you draw a graphic image (RIC le) on the NXT LCD given the parameters you pass in via the DrawGraphicType structure. Parameters: args The DrawGraphicType structure containing the drawing parameters.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.38

Display module functions

336

Examples: ex_sysdrawgraphic.nxc.

6.38.2.40

void SysDrawGraphicArray (DrawGraphicArrayType & args) [inline]

Draw a graphic image from a byte array. This function lets you draw a graphic image on the NXT LCD given the parameters you pass in via the DrawGraphicArrayType structure. Parameters: args The DrawGraphicArrayType structure containing the drawing parameters. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Examples: ex_sysdrawgraphicarray.nxc.

6.38.2.41

void SysDrawLine (DrawLineType & args) [inline]

Draw a line. This function lets you draw a line on the NXT LCD given the parameters you pass in via the DrawLineType structure. Parameters: args The DrawLineType structure containing the drawing parameters. Examples: ex_sysdrawline.nxc.

6.38.2.42

void SysDrawPoint (DrawPointType & args) [inline]

Draw a point. This function lets you draw a pixel on the NXT LCD given the parameters you pass in via the DrawPointType structure.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.38

Display module functions

337

Parameters: args The DrawPointType structure containing the drawing parameters. Examples: ex_sysdrawpoint.nxc.

6.38.2.43

void SysDrawPolygon (DrawPolygonType & args) [inline]

Draw a polygon. This function lets you draw a polygon on the NXT LCD given the parameters you pass in via the DrawPolygonType structure. Parameters: args The DrawPolygonType structure containing the drawing parameters. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Examples: ex_sysdrawpolygon.nxc.

6.38.2.44

void SysDrawRect (DrawRectType & args) [inline]

Draw a rectangle. This function lets you draw a rectangle on the NXT LCD given the parameters you pass in via the DrawRectType structure. Parameters: args The DrawRectType structure containing the drawing parameters. Examples: ex_sysdrawrect.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.38

Display module functions

338

6.38.2.45

void SysDrawText (DrawTextType & args) [inline]

Draw text. This function lets you draw text on the NXT LCD given the parameters you pass in via the DrawTextType structure. Parameters: args The DrawTextType structure containing the drawing parameters. Examples: ex_sysdrawtext.nxc.

6.38.2.46

void SysSetScreenMode (SetScreenModeType & args) [inline]

Set the screen mode. This function lets you set the screen mode of the NXT LCD given the parameters you pass in via the DrawTextType structure. Parameters: args The SetScreenModeType structure containing the screen mode parameters. Examples: ex_syssetscreenmode.nxc.

6.38.2.47

char TextOut (int x, int y, string str, unsigned long options = DRAW_OPT_NORMAL) [inline]

Draw text. Draw a text value on the screen at the specied x and y location. The y value must be a multiple of 8. Valid line number constants are listed in the Line number constants group. Optionally specify drawing options. If this argument is not specied it defaults to DRAW_OPT_NORMAL. Valid display option constants are listed in the Drawing option constants group. See also: SysDrawText, DrawTextType Parameters: x The x value for the start of the text output.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.39

Sound module types

339

y The text line number for the text output. str The text to output to the LCD screen. options The optional drawing options. Returns: The result of the drawing operation. Examples: ex_acos.nxc, ex_acosd.nxc, ex_addressof.nxc, ex_addressofex.nxc, ex_ArrayMax.nxc, ex_ArrayMean.nxc, ex_ArrayMin.nxc, ex_ArrayOp.nxc, ex_ArraySort.nxc, ex_ArrayStd.nxc, ex_ArraySum.nxc, ex_ArraySumSqr.nxc, ex_asin.nxc, ex_asind.nxc, ex_atan.nxc, ex_atan2.nxc, ex_atan2d.nxc, ex_atand.nxc, ex_clearline.nxc, ex_copy.nxc, ex_ctype.nxc, ex_DataMode.nxc, ex_delete_data_le.nxc, ex_dispgout.nxc, ex_displayfont.nxc, ex_le_system.nxc, ex_ndrstle.nxc, ex_ndnextle.nxc, ex_GetBrickDataAddress.nxc, ex_HTGyroTest.nxc, ex_i2cdeviceid.nxc, ex_i2cdeviceinfo.nxc, ex_i2cvendorid.nxc, ex_i2cversion.nxc, ex_isnan.nxc, ex_labs.nxc, ex_leftstr.nxc, ex_midstr.nxc, ex_ReadSensorHTTouchMultiplexer.nxc, ex_reladdressof.nxc, ex_rightstr.nxc, ex_RS485Receive.nxc, ex_RS485Send.nxc, ex_SetAbortFlag.nxc, ex_setdisplayfont.nxc, ex_SetLongAbort.nxc, ex_StrCatOld.nxc, ex_string.nxc, ex_StrReplace.nxc, ex_strtod.nxc, ex_strtol.nxc, ex_strtoul.nxc, ex_SubStr.nxc, ex_syscommbtconnection.nxc, ex_SysCommBTOnOff.nxc, ex_SysCommHSCheckStatus.nxc, ex_SysCommHSControl.nxc, ex_SysCommHSRead.nxc, ex_SysComputeCalibValue.nxc, ex_SysDatalogWrite.nxc, ex_syslendrst.nxc, ex_syslendnext.nxc, ex_sysleread.nxc, ex_syslistles.nxc, ex_sysmessageread.nxc, ex_tan.nxc, ex_tand.nxc, ex_TextOut.nxc, util_battery_1.nxc, util_battery_2.nxc, and util_rpm.nxc.

6.39

Sound module types

Types used by various sound module functions. Data Structures struct Tone
Type used with the PlayTones API function.

struct SoundPlayFileType
Parameters for the SoundPlayFile system call.

struct SoundPlayToneType
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.40

Sound module functions

340

Parameters for the SoundPlayTone system call.

struct SoundGetStateType
Parameters for the SoundGetState system call.

struct SoundSetStateType
Parameters for the SoundSetState system call.

6.39.1

Detailed Description

Types used by various sound module functions.

6.40

Sound module functions

Functions for accessing and modifying sound module features. Functions char PlayFile (string lename)
Play a le.

char PlayFileEx (string lename, byte volume, bool loop)


Play a le with extra options.

char PlayTone (unsigned int frequency, unsigned int duration)


Play a tone.

char PlayToneEx (unsigned int frequency, unsigned int duration, byte volume, bool loop)
Play a tone with extra options.

byte SoundState ()
Get sound module state.

byte SoundFlags ()
Get sound module ags.

byte StopSound ()
Stop sound.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.40

Sound module functions

341

unsigned int SoundFrequency ()


Get sound frequency.

unsigned int SoundDuration ()


Get sound duration.

unsigned int SoundSampleRate ()


Get sample rate.

byte SoundMode ()
Get sound mode.

byte SoundVolume ()
Get volume.

void SetSoundDuration (unsigned int duration)


Set sound duration.

void SetSoundFlags (byte ags)


Set sound module ags.

void SetSoundFrequency (unsigned int frequency)


Set sound frequency.

void SetSoundMode (byte mode)


Set sound mode.

void SetSoundModuleState (byte state)


Set sound module state.

void SetSoundSampleRate (unsigned int sampleRate)


Set sample rate.

void SetSoundVolume (byte volume)


Set sound volume.

void SysSoundPlayFile (SoundPlayFileType &args)


Play sound le.

void SysSoundPlayTone (SoundPlayToneType &args)


Play tone.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.40

Sound module functions

342

void SysSoundGetState (SoundGetStateType &args)


Get sound state.

void SysSoundSetState (SoundSetStateType &args)


Set sound state.

void PlaySound (const int &aCode)


Play a system sound.

void PlayTones (Tone tones[ ])


Play multiple tones.

6.40.1

Detailed Description

Functions for accessing and modifying sound module features. 6.40.2 6.40.2.1 Function Documentation char PlayFile (string lename) [inline]

Play a le. Play the specied le. The lename may be any valid string expression. The sound le can either be an RSO le containing PCM or compressed ADPCM samples or it can be an NXT melody (RMD) le containing frequency and duration values. Parameters: lename The name of the sound or melody le to play. Examples: ex_PlayFile.nxc.

6.40.2.2

char PlayFileEx (string lename, byte volume, bool loop) [inline]

Play a le with extra options. Play the specied le. The lename may be any valid string expression. Volume should be a number from 0 (silent) to 4 (loudest). Play the le repeatedly if loop is true. The sound le can either be an RSO le containing PCM or compressed ADPCM samples or it can be an NXT melody (RMD) le containing frequency and duration values.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.40

Sound module functions

343

Parameters: lename The name of the sound or melody le to play. volume The desired tone volume. loop A boolean ag indicating whether to play the le repeatedly. Examples: ex_PlayFileEx.nxc.

6.40.2.3

void PlaySound (const int & aCode)

Play a system sound. Play a sound that mimics the RCX system sounds using one of the RCX and Scout sound constants. aCode SOUND_CLICK SOUND_DOUBLE_BEEP SOUND_DOWN SOUND_UP SOUND_LOW_BEEP SOUND_FAST_UP Parameters: aCode The system sound to play. See RCX and Scout sound constants. Examples: ex_playsound.nxc. Resulting Sound key click sound double beep sweep down sweep up error sound fast sweep up

6.40.2.4

char PlayTone (unsigned int frequency, unsigned int duration) [inline]

Play a tone. Play a single tone of the specied frequency and duration. The frequency is in Hz (see the Tone constants group). The duration is in 1000ths of a second (see the Time constants group). The tone is played at the loudest sound level supported by the rmware and it is not looped. Parameters: frequency The desired tone frequency, in Hz.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.40

Sound module functions

344

duration The desired tone duration, in ms. Examples: alternating_tasks.nxc, ex_le_system.nxc, ex_PlayTone.nxc, and ex_yield.nxc.

6.40.2.5

char PlayToneEx (unsigned int frequency, unsigned int duration, byte volume, bool loop) [inline]

Play a tone with extra options. Play a single tone of the specied frequency, duration, and volume. The frequency is in Hz (see the Tone constants group). The duration is in 1000ths of a second (see the Time constants group). Volume should be a number from 0 (silent) to 4 (loudest). Play the tone repeatedly if loop is true. Parameters: frequency The desired tone frequency, in Hz. duration The desired tone duration, in ms. volume The desired tone volume. loop A boolean ag indicating whether to play the tone repeatedly. Examples: ex_PlayToneEx.nxc.

6.40.2.6

void PlayTones (Tone tones[ ])

Play multiple tones. Play a series of tones contained in the tones array. Each element in the array is an instance of the Tone structure, containing a frequency and a duration. Parameters: tones The array of tones to play. Examples: ex_playtones.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.40

Sound module functions

345

6.40.2.7

void SetSoundDuration (unsigned int duration) [inline]

Set sound duration. Set the sound duration. See also: SoundDuration() Parameters: duration The new sound duration Examples: ex_SetSoundDuration.nxc.

6.40.2.8

void SetSoundFlags (byte ags) [inline]

Set sound module ags. Set the sound module ags. See the SoundFlags constants group. See also: SetSoundFlags(), SysSoundSetState(), SysSoundGetState() Parameters: ags The new sound module ags Examples: ex_SetSoundFlags.nxc.

6.40.2.9

void SetSoundFrequency (unsigned int frequency) [inline]

Set sound frequency. Set the sound frequency. See also: SoundFrequency()

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.40

Sound module functions

346

Parameters: frequency The new sound frequency Examples: ex_SetSoundFrequency.nxc.

6.40.2.10

void SetSoundMode (byte mode) [inline]

Set sound mode. Set the sound mode. See the SoundMode constants group. See also: SoundMode() Parameters: mode The new sound mode Examples: ex_SetSoundMode.nxc.

6.40.2.11

void SetSoundModuleState (byte state) [inline]

Set sound module state. Set the sound module state. See the SoundState constants group. See also: SoundState(), SysSoundSetState(), SysSoundGetState() Parameters: state The new sound state Examples: ex_SetSoundModuleState.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.40

Sound module functions

347

6.40.2.12

void SetSoundSampleRate (unsigned int sampleRate) [inline]

Set sample rate. Set the sound sample rate. See also: SoundSampleRate() Parameters: sampleRate The new sample rate Examples: ex_SetSoundSampleRate.nxc.

6.40.2.13

void SetSoundVolume (byte volume) [inline]

Set sound volume. Set the sound volume. See also: SoundVolume() Parameters: volume The new volume Examples: ex_SetSoundVolume.nxc.

6.40.2.14

unsigned int SoundDuration () [inline]

Get sound duration. Return the current sound duration. See also: SetSoundDuration() Returns: The current sound duration.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.40

Sound module functions

348

Examples: ex_SoundDuration.nxc.

6.40.2.15

byte SoundFlags () [inline]

Get sound module ags. Return the current sound module ags. See the SoundFlags constants group. See also: SetSoundFlags(), SysSoundSetState(), SysSoundGetState() Returns: The current sound module ags. Examples: ex_SoundFlags.nxc.

6.40.2.16

unsigned int SoundFrequency () [inline]

Get sound frequency. Return the current sound frequency. See also: SetSoundFrequency() Returns: The current sound frequency. Examples: ex_SoundFrequency.nxc.

6.40.2.17

byte SoundMode () [inline]

Get sound mode. Return the current sound mode. See the SoundMode constants group.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.40

Sound module functions

349

See also: SetSoundMode() Returns: The current sound mode. Examples: ex_SoundMode.nxc.

6.40.2.18

unsigned int SoundSampleRate () [inline]

Get sample rate. Return the current sound sample rate. See also: SetSoundSampleRate() Returns: The current sound sample rate. Examples: ex_SoundSampleRate.nxc.

6.40.2.19

byte SoundState () [inline]

Get sound module state. Return the current sound module state. See the SoundState constants group. See also: SetSoundModuleState(), SysSoundSetState(), SysSoundGetState() Returns: The current sound module state. Examples: ex_SoundState.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.40

Sound module functions

350

6.40.2.20

byte SoundVolume () [inline]

Get volume. Return the current sound volume. See also: SetSoundVolume() Returns: The current sound volume. Examples: ex_SoundVolume.nxc.

6.40.2.21

byte StopSound () [inline]

Stop sound. Stop playing of the current tone or le. Returns: The result Todo ?. Examples: ex_StopSound.nxc.

6.40.2.22

void SysSoundGetState (SoundGetStateType & args) [inline]

Get sound state. This function lets you retrieve information about the sound module state via the SoundGetStateType structure. Parameters: args The SoundGetStateType structure containing the needed parameters. Examples: ex_syssoundgetstate.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.40

Sound module functions

351

6.40.2.23

void SysSoundPlayFile (SoundPlayFileType & args) [inline]

Play sound le. This function lets you play a sound le given the parameters you pass in via the SoundPlayFileType structure. The sound le can either be an RSO le containing PCM or compressed ADPCM samples or it can be an NXT melody (RMD) le containing frequency and duration values. Parameters: args The SoundPlayFileType structure containing the needed parameters. Examples: ex_syssoundplayle.nxc.

6.40.2.24

void SysSoundPlayTone (SoundPlayToneType & args) [inline]

Play tone. This function lets you play a tone given the parameters you pass in via the SoundPlayToneType structure. Parameters: args The SoundPlayToneType structure containing the needed parameters. Examples: ex_syssoundplaytone.nxc.

6.40.2.25

void SysSoundSetState (SoundSetStateType & args) [inline]

Set sound state. This function lets you set sound module state settings via the SoundSetStateType structure. Parameters: args The SoundSetStateType structure containing the needed parameters. Examples: ex_syssoundsetstate.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.41

LowSpeed module types

352

6.41

LowSpeed module types

Types used by various low speed module functions. Data Structures struct CommLSWriteType
Parameters for the CommLSWrite system call.

struct CommLSReadType
Parameters for the CommLSRead system call.

struct CommLSCheckStatusType
Parameters for the CommLSCheckStatus system call.

struct CommLSWriteExType
Parameters for the CommLSWriteEx system call.

6.41.1

Detailed Description

Types used by various low speed module functions.

6.42

LowSpeed module functions

Functions for accessing and modifying low speed module features. Modules Low level LowSpeed module functions
Low level functions for accessing low speed module features.

LowSpeed module system call functions


System call functions for accessing low speed module features.

Functions byte SensorUS (const byte port)


Read ultrasonic sensor value.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.42

LowSpeed module functions

353

char ReadSensorUSEx (const byte port, byte &values[ ])


Read multiple ultrasonic sensor values.

char ReadSensorEMeter (const byte &port, oat &vIn, oat &aIn, oat &vOut, oat &aOut, int &joules, oat &wIn, oat &wOut)
Read the LEGO EMeter values.

char CongureTemperatureSensor (const byte &port, const byte &cong)


Congure LEGO Temperature sensor options.

oat SensorTemperature (const byte &port)


Read the LEGO Temperature sensor value.

long LowspeedStatus (const byte port, byte &bytesready)


Get lowspeed status.

long LowspeedCheckStatus (const byte port)


Check lowspeed status.

byte LowspeedBytesReady (const byte port)


Get lowspeed bytes ready.

long LowspeedWrite (const byte port, byte retlen, byte buffer[ ])


Write lowspeed data.

long LowspeedRead (const byte port, byte buen, byte &buffer[ ])


Read lowspeed data.

long I2CStatus (const byte port, byte &bytesready)


Get I2C status.

long I2CCheckStatus (const byte port)


Check I2C status.

byte I2CBytesReady (const byte port)


Get I2C bytes ready.

long I2CWrite (const byte port, byte retlen, byte buffer[ ])


Write I2C data.

long I2CRead (const byte port, byte buen, byte &buffer[ ])


Read I2C data.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.42

LowSpeed module functions

354

long I2CBytes (const byte port, byte inbuf[ ], byte &count, byte &outbuf[ ])
Perform an I2C write/read transaction.

char ReadI2CRegister (byte port, byte i2caddr, byte reg, byte &out)
Read I2C register.

char WriteI2CRegister (byte port, byte i2caddr, byte reg, byte val)
Write I2C register.

string I2CDeviceInfo (byte port, byte i2caddr, byte info)


Read I2C device information.

string I2CVersion (byte port, byte i2caddr)


Read I2C device version.

string I2CVendorId (byte port, byte i2caddr)


Read I2C device vendor.

string I2CDeviceId (byte port, byte i2caddr)


Read I2C device identier.

long I2CSendCommand (byte port, byte i2caddr, byte cmd)


Send an I2C command.

6.42.1

Detailed Description

Functions for accessing and modifying low speed module features. 6.42.2 6.42.2.1 Function Documentation char CongureTemperatureSensor (const byte & port, const byte & cong) [inline]

Congure LEGO Temperature sensor options. Set various LEGO Temperature sensor options. Parameters: port The port to which the temperature sensor is attached. See the Input port constants group. You may use a constant or a variable.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.42

LowSpeed module functions

355

cong The temperature sensor conguration settings. See LEGO temperature sensor constants for conguration constants that can be ORed or added together. Returns: A status code indicating whether the read completed successfully or not. See CommLSReadType for possible Result values. Examples: ex_CongureTemperatureSensor.nxc.

6.42.2.2

long I2CBytes (const byte port, byte inbuf[ ], byte & count, byte & outbuf[ ]) [inline]

Perform an I2C write/read transaction. This method writes the bytes contained in the input buffer (inbuf) to the I2C device on the specied port, checks for the specied number of bytes to be ready for reading, and then tries to read the specied number (count) of bytes from the I2C device into the output buffer (outbuf). This is a higher-level wrapper around the three main I2C functions. It also maintains a "last good read" buffer and returns values from that buffer if the I2C communication transaction fails. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads. inbuf A byte array containing the address of the I2C device, the I2C device register at which to write data, and up to 14 bytes of data to be written at the specied register. count The number of bytes that should be returned by the I2C device. On output count is set to the number of bytes in outbuf. outbuf A byte array that contains the data read from the internal I2C buffer. Returns: Returns true or false indicating whether the I2C transaction succeeded or failed. See also: I2CCheckStatus, I2CWrite, I2CStatus, I2CBytesReady, I2CRead, LowspeedRead, LowspeedWrite, LowspeedCheckStatus, LowspeedBytesReady, and LowspeedStatus
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.42

LowSpeed module functions

356

Examples: ex_I2CBytes.nxc.

6.42.2.3

byte I2CBytesReady (const byte port) [inline]

Get I2C bytes ready. This method checks the number of bytes that are ready to be read on the specied port. If the last operation on this port was a successful I2CWrite call that requested response data from the device then the return value will be the number of bytes in the internal read buffer. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads. Returns: The number of bytes available to be read from the internal I2C buffer. The maximum number of bytes that can be read is 16. See also: I2CCheckStatus, I2CRead, I2CWrite, I2CStatus, LowspeedRead, LowspeedWrite, and LowspeedStatus Examples: ex_I2CBytesReady.nxc. LowspeedBytesReady,

6.42.2.4

long I2CCheckStatus (const byte port) [inline]

Check I2C status. This method checks the status of the I2C communication on the specied port. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.42

LowSpeed module functions

357

Returns: A status code indicating whether the write completed successfully or not. See CommLSCheckStatusType for possible result values. If the return value is NO_ERR then the last operation did not cause any errors. Avoid calls to I2CRead or I2CWrite while this function returns STAT_COMM_PENDING. See also: I2CStatus, I2CRead, I2CWrite, LowspeedStatus, LowspeedRead, LowspeedWrite, and LowspeedCheckStatus Examples: ex_I2CCheckStatus.nxc.

6.42.2.5

string I2CDeviceId (byte port, byte i2caddr) [inline]

Read I2C device identier. Read standard I2C device identier. The I2C device uses the specied address. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads. i2caddr The I2C device address. Returns: A string containing the device identier. Examples: ex_i2cdeviceid.nxc, ex_i2cvendorid.nxc, and ex_i2cversion.nxc.

6.42.2.6

string I2CDeviceInfo (byte port, byte i2caddr, byte info) [inline]

Read I2C device information. Read standard I2C device information: version, vendor, and device ID. The I2C device uses the specied address.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.42

LowSpeed module functions

358

Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads. i2caddr The I2C device address. info A value indicating the type of device information you are requesting. See Standard I2C constants. Returns: A string containing the requested device information. Examples: ex_i2cdeviceinfo.nxc.

6.42.2.7

long I2CRead (const byte port, byte buen, byte & buffer[ ]) [inline]

Read I2C data. Read the specied number of bytes from the I2C device on the specied port and store the bytes read in the byte array buffer provided. The maximum number of bytes that can be written or read is 16. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads. buen The initial size of the output buffer. buffer A byte array that contains the data read from the internal I2C buffer. If the return value is negative then the output buffer will be empty. Returns: A status code indicating whether the write completed successfully or not. See CommLSReadType for possible result values. If the return value is NO_ERR then the last operation did not cause any errors. See also: I2CCheckStatus, I2CWrite, I2CStatus, I2CBytesReady, LowspeedRead, LowspeedWrite, LowspeedCheckStatus, LowspeedBytesReady, and LowspeedStatus
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.42

LowSpeed module functions

359

Examples: ex_I2CRead.nxc.

6.42.2.8

long I2CSendCommand (byte port, byte i2caddr, byte cmd) [inline]

Send an I2C command. Send a command to an I2C device at the standard command register: I2C_REG_CMD. The I2C device uses the specied address. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads. i2caddr The I2C device address. cmd The command to send to the I2C device. Returns: A status code indicating whether the write completed successfully or not. See CommLSCheckStatusType for possible result values. Examples: ex_I2CSendCommand.nxc.

6.42.2.9

long I2CStatus (const byte port, byte & bytesready) [inline]

Get I2C status. This method checks the status of the I2C communication on the specied port. If the last operation on this port was a successful I2CWrite call that requested response data from the device then bytesready will be set to the number of bytes in the internal read buffer. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.42

LowSpeed module functions

360

bytesready The number of bytes available to be read from the internal I2C buffer. The maximum number of bytes that can be read is 16. Returns: A status code indicating whether the write completed successfully or not. See CommLSCheckStatusType for possible return values. If the return value is NO_ERR then the last operation did not cause any errors. Avoid calls to I2CRead or I2CWrite while I2CStatus returns STAT_COMM_PENDING. See also: I2CCheckStatus, I2CRead, I2CWrite, LowspeedStatus, LowspeedWrite, and LowspeedCheckStatus Examples: ex_I2CStatus.nxc. LowspeedRead,

6.42.2.10

string I2CVendorId (byte port, byte i2caddr) [inline]

Read I2C device vendor. Read standard I2C device vendor. The I2C device uses the specied address. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads. i2caddr The I2C device address. Returns: A string containing the device vendor. Examples: ex_i2cdeviceid.nxc, ex_i2cvendorid.nxc, and ex_i2cversion.nxc.

6.42.2.11

string I2CVersion (byte port, byte i2caddr) [inline]

Read I2C device version. Read standard I2C device version. The I2C device uses the specied address.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.42

LowSpeed module functions

361

Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads. i2caddr The I2C device address. Returns: A string containing the device version. Examples: ex_i2cdeviceid.nxc, ex_i2cvendorid.nxc, and ex_i2cversion.nxc.

6.42.2.12

long I2CWrite (const byte port, byte retlen, byte buffer[ ]) [inline]

Write I2C data. This method starts a transaction to write the bytes contained in the array buffer to the I2C device on the specied port. It also tells the I2C device the number of bytes that should be included in the response. The maximum number of bytes that can be written or read is 16. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads. retlen The number of bytes that should be returned by the I2C device. buffer A byte array containing the address of the I2C device, the I2C device register at which to write data, and up to 14 bytes of data to be written at the specied register. Returns: A status code indicating whether the write completed successfully or not. See CommLSWriteType for possible result values. If the return value is NO_ERR then the last operation did not cause any errors. See also: I2CCheckStatus, I2CRead, I2CStatus, I2CBytesReady, LowspeedRead, LowspeedWrite, LowspeedCheckStatus, LowspeedBytesReady, and LowspeedStatus
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.42

LowSpeed module functions

362

Examples: ex_I2CWrite.nxc.

6.42.2.13

byte LowspeedBytesReady (const byte port) [inline]

Get lowspeed bytes ready. This method checks the number of bytes that are ready to be read on the specied port. If the last operation on this port was a successful LowspeedWrite call that requested response data from the device then the return value will be the number of bytes in the internal read buffer. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads. Returns: The number of bytes available to be read from the internal I2C buffer. The maximum number of bytes that can be read is 16. See also: I2CCheckStatus, I2CRead, I2CWrite, I2CStatus, LowspeedRead, LowspeedWrite, and LowspeedStatus Examples: ex_LowspeedBytesReady.nxc. I2CBytesReady,

6.42.2.14

long LowspeedCheckStatus (const byte port) [inline]

Check lowspeed status. This method checks the status of the I2C communication on the specied port. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.42

LowSpeed module functions

363

Returns: A status code indicating whether the write completed successfully or not. See CommLSCheckStatusType for possible result values. If the return value is NO_ERR then the last operation did not cause any errors. Avoid calls to LowspeedRead or LowspeedWrite while LowspeedCheckStatus returns STAT_COMM_PENDING. See also: I2CCheckStatus, I2CRead, I2CWrite, I2CStatus, LowspeedRead, LowspeedWrite, and LowspeedStatus Examples: ex_LowspeedCheckStatus.nxc. I2CBytesReady,

6.42.2.15

long LowspeedRead (const byte port, byte buen, byte & buffer[ ]) [inline]

Read lowspeed data. Read the specied number of bytes from the I2C device on the specied port and store the bytes read in the byte array buffer provided. The maximum number of bytes that can be written or read is 16. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads. buen The initial size of the output buffer. buffer A byte array that contains the data read from the internal I2C buffer. If the return value is negative then the output buffer will be empty. Returns: A status code indicating whether the write completed successfully or not. See CommLSReadType for possible result values. If the return value is NO_ERR then the last operation did not cause any errors. See also: I2CCheckStatus, I2CRead, I2CWrite, I2CStatus, I2CBytesReady, LowspeedWrite, LowspeedCheckStatus, LowspeedBytesReady, and LowspeedStatus

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.42

LowSpeed module functions

364

Examples: ex_LowspeedRead.nxc.

6.42.2.16

long LowspeedStatus (const byte port, byte & bytesready) [inline]

Get lowspeed status. This method checks the status of the I2C communication on the specied port. If the last operation on this port was a successful LowspeedWrite call that requested response data from the device then bytesready will be set to the number of bytes in the internal read buffer. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads. bytesready The number of bytes available to be read from the internal I2C buffer. The maximum number of bytes that can be read is 16. Returns: A status code indicating whether the write completed successfully or not. See CommLSCheckStatusType for possible result values. If the return value is NO_ERR then the last operation did not cause any errors. Avoid calls to LowspeedRead or LowspeedWrite while LowspeedStatus returns STAT_COMM_PENDING. See also: I2CStatus, I2CRead, I2CWrite, I2CCheckStatus, LowspeedRead, LowspeedWrite, and LowspeedCheckStatus Examples: ex_LowspeedStatus.nxc. I2CBytesReady,

6.42.2.17

long LowspeedWrite (const byte port, byte retlen, byte buffer[ ]) [inline]

Write lowspeed data. This method starts a transaction to write the bytes contained in the array buffer to the I2C device on the specied port. It also tells the I2C device the
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.42

LowSpeed module functions

365

number of bytes that should be included in the response. The maximum number of bytes that can be written or read is 16. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads. retlen The number of bytes that should be returned by the I2C device. buffer A byte array containing the address of the I2C device, the I2C device register at which to write data, and up to 14 bytes of data to be written at the specied register. Returns: A status code indicating whether the write completed successfully or not. See CommLSWriteType for possible result values. If the return value is NO_ERR then the last operation did not cause any errors. See also: I2CCheckStatus, I2CRead, I2CWrite, I2CStatus, I2CBytesReady, LowspeedRead, LowspeedCheckStatus, LowspeedBytesReady, and LowspeedStatus Examples: ex_LowspeedWrite.nxc.

6.42.2.18

char ReadI2CRegister (byte port, byte i2caddr, byte reg, byte & out) [inline]

Read I2C register. Read a single byte from an I2C device register. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. i2caddr The I2C device address. reg The I2C device register from which to read a single byte. out The single byte read from the I2C device.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.42

LowSpeed module functions

366

Returns: A status code indicating whether the read completed successfully or not. See CommLSReadType for possible result values. Examples: ex_readi2cregister.nxc.

6.42.2.19

char ReadSensorEMeter (const byte & port, oat & vIn, oat & aIn, oat & vOut, oat & aOut, int & joules, oat & wIn, oat & wOut) [inline]

Read the LEGO EMeter values. Read all the LEGO EMeter register values. They must all be read at once to ensure data coherency. Parameters: port The port to which the LEGO EMeter sensor is attached. See the Input port constants group. You may use a constant or a variable. vIn Input voltage aIn Input current vOut Output voltage aOut Output current joules The number of joules stored in the EMeter wIn The number of watts generated wOut The number of watts consumed Returns: A status code indicating whether the read completed successfully or not. See CommLSReadType for possible result values. Examples: ex_ReadSensorEMeter.nxc.

6.42.2.20

char ReadSensorUSEx (const byte port, byte & values[ ]) [inline]

Read multiple ultrasonic sensor values. Return eight ultrasonic sensor distance values.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.42

LowSpeed module functions

367

Parameters: port The port to which the ultrasonic sensor is attached. See the Input port constants group. You may use a constant or a variable. values An array of bytes that will contain the 8 distance values read from the ultrasonic sensor. Returns: A status code indicating whether the read completed successfully or not. See CommLSReadType for possible result values. Examples: ex_ReadSensorUSEx.nxc.

6.42.2.21

oat SensorTemperature (const byte & port) [inline]

Read the LEGO Temperature sensor value. Return the temperature sensor value in degrees celcius. Since a temperature sensor is an I2C digital sensor its value cannot be read using the standard Sensor(n) value. The port must be congured as a temperature sensor port before using this function. Use SetSensorTemperature to congure the port. Parameters: port The port to which the temperature sensor is attached. See the Input port constants group. You may use a constant or a variable. Returns: The temperature sensor value in degrees celcius. Examples: ex_SensorTemperature.nxc.

6.42.2.22

byte SensorUS (const byte port) [inline]

Read ultrasonic sensor value. Return the ultrasonic sensor distance value. Since an ultrasonic sensor is an I2C digital sensor its value cannot be read using the standard Sensor(n) value. The port must be congured as a Lowspeed port before using this function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.43

Low level LowSpeed module functions

368

Parameters: port The port to which the ultrasonic sensor is attached. See the Input port constants group. You may use a constant or a variable. Returns: The ultrasonic sensor distance value (0..255) Examples: ex_SensorUS.nxc.

6.42.2.23

char WriteI2CRegister (byte port, byte i2caddr, byte reg, byte val) [inline]

Write I2C register. Write a single byte to an I2C device register. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. i2caddr The I2C device address. reg The I2C device register to which to write a single byte. val The byte to write to the I2C device. Returns: A status code indicating whether the write completed successfully or not. See CommLSCheckStatusType for possible result values. Examples: ex_writei2cregister.nxc.

6.43

Low level LowSpeed module functions

Low level functions for accessing low speed module features. Functions void GetLSInputBuffer (const byte port, const byte offset, byte cnt, byte &data[ ])
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.43

Low level LowSpeed module functions

369

Get I2C input buffer data.

void GetLSOutputBuffer (const byte port, const byte offset, byte cnt, byte &data[ ])
Get I2C output buffer data.

byte LSInputBufferInPtr (const byte port)


Get I2C input buffer in-pointer.

byte LSInputBufferOutPtr (const byte port)


Get I2C input buffer out-pointer.

byte LSInputBufferBytesToRx (const byte port)


Get I2C input buffer bytes to rx.

byte LSOutputBufferInPtr (const byte port)


Get I2C output buffer in-pointer.

byte LSOutputBufferOutPtr (const byte port)


Get I2C output buffer out-pointer.

byte LSOutputBufferBytesToRx (const byte port)


Get I2C output buffer bytes to rx.

byte LSMode (const byte port)


Get I2C mode.

byte LSChannelState (const byte port)


Get I2C channel state.

byte LSErrorType (const byte port)


Get I2C error type.

byte LSState ()
Get I2C state.

byte LSSpeed ()
Get I2C speed.

byte LSNoRestartOnRead ()
Get I2C no restart on read setting.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.43

Low level LowSpeed module functions

370

6.43.1

Detailed Description

Low level functions for accessing low speed module features. 6.43.2 6.43.2.1 Function Documentation void GetLSInputBuffer (const byte port, const byte offset, byte cnt, byte & data[ ]) [inline]

Get I2C input buffer data. This method reads count bytes of data from the I2C input buffer for the specied port and writes it to the buffer provided. Parameters: port A constant port number (S1..S4). See Input port constants. offset A constant offset into the I2C input buffer. cnt The number of bytes to read. data The byte array reference which will contain the data read from the I2C input buffer. Examples: ex_GetLSInputBuffer.nxc.

6.43.2.2

void GetLSOutputBuffer (const byte port, const byte offset, byte cnt, byte & data[ ]) [inline]

Get I2C output buffer data. This method reads cnt bytes of data from the I2C output buffer for the specied port and writes it to the buffer provided. Parameters: port A constant port number (S1..S4). See Input port constants. offset A constant offset into the I2C output buffer. cnt The number of bytes to read. data The byte array reference which will contain the data read from the I2C output buffer. Examples: ex_GetLSOutputBuffer.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.43

Low level LowSpeed module functions

371

6.43.2.3

byte LSChannelState (const byte port) [inline]

Get I2C channel state. This method returns the value of the I2C channel state for the specied port. Parameters: port A constant port number (S1..S4). See Input port constants. Returns: The I2C port channel state. See LSChannelState constants. Examples: ex_LSChannelState.nxc.

6.43.2.4

byte LSErrorType (const byte port) [inline]

Get I2C error type. This method returns the value of the I2C error type for the specied port. Parameters: port A constant port number (S1..S4). See Input port constants. Returns: The I2C port error type. See LSErrorType constants. Examples: ex_LSErrorType.nxc.

6.43.2.5

byte LSInputBufferBytesToRx (const byte port) [inline]

Get I2C input buffer bytes to rx. This method returns the value of the bytes to rx eld of the I2C input buffer for the specied port. Parameters: port A constant port number (S1..S4). See Input port constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.43

Low level LowSpeed module functions

372

Returns: The I2C input buffers bytes to rx value. Examples: ex_LSInputBufferBytesToRx.nxc.

6.43.2.6

byte LSInputBufferInPtr (const byte port) [inline]

Get I2C input buffer in-pointer. This method returns the value of the input pointer of the I2C input buffer for the specied port. Parameters: port A constant port number (S1..S4). See Input port constants. Returns: The I2C input buffers in-pointer value. Examples: ex_LSInputBufferInPtr.nxc.

6.43.2.7

byte LSInputBufferOutPtr (const byte port) [inline]

Get I2C input buffer out-pointer. This method returns the value of the output pointer of the I2C input buffer for the specied port. Parameters: port A constant port number (S1..S4). See Input port constants. Returns: The I2C input buffers out-pointer value. Examples: ex_LSInputBufferOutPtr.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.43

Low level LowSpeed module functions

373

6.43.2.8

byte LSMode (const byte port) [inline]

Get I2C mode. This method returns the value of the I2C mode for the specied port. Parameters: port A constant port number (S1..S4). See Input port constants. Returns: The I2C port mode. See LSMode constants. Examples: ex_LSMode.nxc.

6.43.2.9

byte LSNoRestartOnRead () [inline]

Get I2C no restart on read setting. This method returns the value of the I2C no restart on read eld. Returns: The I2C no restart on read eld. See LSNoRestartOnRead constants. Examples: ex_LSNoRestartOnRead.nxc.

6.43.2.10

byte LSOutputBufferBytesToRx (const byte port) [inline]

Get I2C output buffer bytes to rx. This method returns the value of the bytes to rx eld of the I2C output buffer for the specied port. Parameters: port A constant port number (S1..S4). See Input port constants. Returns: The I2C output buffers bytes to rx value. Examples: ex_LSOutputBufferBytesToRx.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.43

Low level LowSpeed module functions

374

6.43.2.11

byte LSOutputBufferInPtr (const byte port) [inline]

Get I2C output buffer in-pointer. This method returns the value of the input pointer of the I2C output buffer for the specied port. Parameters: port A constant port number (S1..S4). See Input port constants. Returns: The I2C output buffers in-pointer value. Examples: ex_LSOutputBufferInPtr.nxc.

6.43.2.12

byte LSOutputBufferOutPtr (const byte port) [inline]

Get I2C output buffer out-pointer. This method returns the value of the output pointer of the I2C output buffer for the specied port. Parameters: port A constant port number (S1..S4). See Input port constants. Returns: The I2C output buffers out-pointer value. Examples: ex_LSOutputBufferOutPtr.nxc.

6.43.2.13

byte LSSpeed () [inline]

Get I2C speed. This method returns the value of the I2C speed. Returns: The I2C speed.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.44

LowSpeed module system call functions

375

Warning: This function is unimplemented within the rmware. Examples: ex_LSSpeed.nxc.

6.43.2.14

byte LSState () [inline]

Get I2C state. This method returns the value of the I2C state. Returns: The I2C state. See LSState constants. Examples: ex_LSState.nxc.

6.44

LowSpeed module system call functions

System call functions for accessing low speed module features. Functions void SysCommLSWrite (CommLSWriteType &args)
Write to a Lowspeed sensor.

void SysCommLSRead (CommLSReadType &args)


Read from a Lowspeed sensor.

void SysCommLSCheckStatus (CommLSCheckStatusType &args)


Check Lowspeed sensor status.

void SysCommLSWriteEx (CommLSWriteExType &args)


Write to a Lowspeed sensor (extra).

6.44.1

Detailed Description

System call functions for accessing low speed module features.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.44

LowSpeed module system call functions

376

6.44.2 6.44.2.1

Function Documentation void SysCommLSCheckStatus (CommLSCheckStatusType & args) [inline]

Check Lowspeed sensor status. This function lets you check the status of an I2C (Lowspeed) sensor transaction using the values specied via the CommLSCheckStatusType structure. Parameters: args The CommLSCheckStatusType structure containing the needed parameters. Examples: ex_syscommlscheckstatus.nxc.

6.44.2.2

void SysCommLSRead (CommLSReadType & args) [inline]

Read from a Lowspeed sensor. This function lets you read from an I2C (Lowspeed) sensor using the values specied via the CommLSReadType structure. Parameters: args The CommLSReadType structure containing the needed parameters. Examples: ex_syscommlsread.nxc.

6.44.2.3

void SysCommLSWrite (CommLSWriteType & args) [inline]

Write to a Lowspeed sensor. This function lets you write to an I2C (Lowspeed) sensor using the values specied via the CommLSWriteType structure. Parameters: args The CommLSWriteType structure containing the needed parameters. Examples: ex_syscommlswrite.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.45

Command module types

377

6.44.2.4

void SysCommLSWriteEx (CommLSWriteExType & args) [inline]

Write to a Lowspeed sensor (extra). This function lets you write to an I2C (Lowspeed) sensor using the values specied via the CommLSWriteExType structure. This is the same as the SysCommLSWrite function except that you also can specify whether or not the Lowspeed module should issue a restart command to the I2C device before beginning to read data from the device. Parameters: args The CommLSWriteExType structure containing the desired parameters. Examples: ex_syscommlswriteex.nxc.

6.45

Command module types

Types used by various Command module functions. Data Structures struct GetStartTickType
Parameters for the GetStartTick system call.

struct KeepAliveType
Parameters for the KeepAlive system call.

struct IOMapReadType
Parameters for the IOMapRead system call.

struct IOMapWriteType
Parameters for the IOMapWrite system call.

struct IOMapReadByIDType
Parameters for the IOMapReadByID system call.

struct IOMapWriteByIDType
Parameters for the IOMapWriteByID system call.

struct DatalogWriteType
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

378

Parameters for the DatalogWrite system call.

struct DatalogGetTimesType
Parameters for the DatalogGetTimes system call.

struct ReadSemDataType
Parameters for the ReadSemData system call.

struct WriteSemDataType
Parameters for the WriteSemData system call.

struct UpdateCalibCacheInfoType
Parameters for the UpdateCalibCacheInfo system call.

struct ComputeCalibValueType
Parameters for the ComputeCalibValue system call.

struct MemoryManagerType
Parameters for the MemoryManager system call.

struct ReadLastResponseType
Parameters for the ReadLastResponse system call.

6.45.1

Detailed Description

Types used by various Command module functions.

6.46

Command module functions

Functions for accessing and modifying Command module features. Modules Array API functions
Functions for use with NXC array types.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

379

Functions unsigned long CurrentTick ()


Read the current system tick.

unsigned long FirstTick ()


Get the rst tick.

long ResetSleepTimer ()
Reset the sleep timer.

void SysCall (byte funcID, variant &args)


Call any system function.

void SysGetStartTick (GetStartTickType &args)


Get start tick.

void SysKeepAlive (KeepAliveType &args)


Keep alive.

void SysIOMapRead (IOMapReadType &args)


Read from IOMap by name.

void SysIOMapWrite (IOMapWriteType &args)


Write to IOMap by name.

void SysIOMapReadByID (IOMapReadByIDType &args)


Read from IOMap by identier.

void SysIOMapWriteByID (IOMapWriteByIDType &args)


Write to IOMap by identier.

void SysDatalogWrite (DatalogWriteType &args)


Write to the datalog.

void SysDatalogGetTimes (DatalogGetTimesType &args)


Get datalog times.

void SysReadSemData (ReadSemDataType &args)


Read semaphore data.

void SysWriteSemData (WriteSemDataType &args)


Write semaphore data.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

380

void SysUpdateCalibCacheInfo (UpdateCalibCacheInfoType &args)


Update calibration cache information.

void SysComputeCalibValue (ComputeCalibValueType &args)


Compute calibration values.

char GetMemoryInfo (bool Compact, unsigned int &PoolSize, unsigned int &DataspaceSize)
Read memory information.

void SysMemoryManager (MemoryManagerType &args)


Read memory information.

char GetLastResponseInfo (bool Clear, byte &Length, byte &Command, byte &Buffer[ ])
Read last response information.

void SysReadLastResponse (ReadLastResponseType &args)


Read last response information.

void Wait (unsigned long ms)


Wait some milliseconds.

void Yield ()
Yield to another task.

void StopAllTasks ()
Stop all tasks.

void Stop (bool bvalue)


Stop the running program.

void ExitTo (task newTask)


Exit to another task.

void Precedes (task task1, task task2,..., task taskN)


Declare tasks that this task precedes.

void Follows (task task1, task task2,..., task taskN)


Declare tasks that this task follows.

void Acquire (mutex m)


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

381

Acquire a mutex.

void Release (mutex m)


Acquire a mutex.

void StartTask (task t)


Start a task.

void StopTask (task t)


Stop a task.

void SetIOMapBytes (string moduleName, unsigned int offset, unsigned int count, byte data[ ])
Set IOMap bytes by name.

void SetIOMapValue (string moduleName, unsigned int offset, variant value)


Set IOMap value by name.

void GetIOMapBytes (string moduleName, unsigned int offset, unsigned int count, byte &data[ ])
Get IOMap bytes by name.

void GetIOMapValue (string moduleName, unsigned int offset, variant &value)


Get IOMap value by name.

void GetLowSpeedModuleBytes (unsigned int offset, unsigned int count, byte &data[ ])
Get Lowspeed module IOMap bytes.

void GetDisplayModuleBytes (unsigned int offset, unsigned int count, byte &data[ ])
Get Display module IOMap bytes.

void GetCommModuleBytes (unsigned int offset, unsigned int count, byte &data[ ])
Get Comm module IOMap bytes.

void GetCommandModuleBytes (unsigned int offset, unsigned int count, byte &data[ ])
Get Command module IOMap bytes.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

382

void SetCommandModuleBytes (unsigned int offset, unsigned int count, byte data[ ])
Set Command module IOMap bytes.

void SetLowSpeedModuleBytes (unsigned int offset, unsigned int count, byte data[ ])
Set Lowspeed module IOMap bytes.

void SetDisplayModuleBytes (unsigned int offset, unsigned int count, byte data[ ])
Set Display module IOMap bytes.

void SetCommModuleBytes (unsigned int offset, unsigned int count, byte data[ ])
Set Comm module IOMap bytes.

void SetIOMapBytesByID (unsigned long moduleId, unsigned int offset, unsigned int count, byte data[ ])
Set IOMap bytes by ID.

void SetIOMapValueByID (unsigned long moduleId, unsigned int offset, variant value)
Set IOMap value by ID.

void GetIOMapBytesByID (unsigned long moduleId, unsigned int offset, unsigned int count, byte &data[ ])
Get IOMap bytes by ID.

void GetIOMapValueByID (unsigned long moduleId, unsigned int offset, variant &value)
Get IOMap value by ID.

void SetCommandModuleValue (unsigned int offset, variant value)


Set Command module IOMap value.

void SetIOCtrlModuleValue (unsigned int offset, variant value)


Set IOCtrl module IOMap value.

void SetLoaderModuleValue (unsigned int offset, variant value)


Set Loader module IOMap value.

void SetUIModuleValue (unsigned int offset, variant value)


Set Ui module IOMap value.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

383

void SetSoundModuleValue (unsigned int offset, variant value)


Set Sound module IOMap value.

void SetButtonModuleValue (unsigned int offset, variant value)


Set Button module IOMap value.

void SetInputModuleValue (unsigned int offset, variant value)


Set Input module IOMap value.

void SetOutputModuleValue (unsigned int offset, variant value)


Set Output module IOMap value.

void SetLowSpeedModuleValue (unsigned int offset, variant value)


Set Lowspeed module IOMap value.

void SetDisplayModuleValue (unsigned int offset, variant value)


Set Display module IOMap value.

void SetCommModuleValue (unsigned int offset, variant value)


Set Comm module IOMap value.

void GetCommandModuleValue (unsigned int offset, variant &value)


Get Command module IOMap value.

void GetLoaderModuleValue (unsigned int offset, variant &value)


Get Loader module IOMap value.

void GetSoundModuleValue (unsigned int offset, variant &value)


Get Sound module IOMap value.

void GetButtonModuleValue (unsigned int offset, variant &value)


Get Button module IOMap value.

void GetUIModuleValue (unsigned int offset, variant &value)


Get Ui module IOMap value.

void GetInputModuleValue (unsigned int offset, variant &value)


Get Input module IOMap value.

void GetOutputModuleValue (unsigned int offset, variant &value)


Get Output module IOMap value.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

384

void GetLowSpeedModuleValue (unsigned int offset, variant &value)


Get LowSpeed module IOMap value.

void GetDisplayModuleValue (unsigned int offset, variant &value)


Get Display module IOMap value.

void GetCommModuleValue (unsigned int offset, variant &value)


Get Comm module IOMap value.

6.46.1

Detailed Description

Functions for accessing and modifying Command module features. 6.46.2 6.46.2.1 Function Documentation void Acquire (mutex m) [inline]

Acquire a mutex. Acquire the specied mutex variable. If another task already has acquired the mutex then the current task will be suspended until the mutex is released by the other task. This function is used to ensure that the current task has exclusive access to a shared resource, such as the display or a motor. After the current task has nished using the shared resource the program should call Release to allow other tasks to acquire the mutex. Parameters: m The mutex to acquire. Examples: ex_Acquire.nxc, and ex_Release.nxc.

6.46.2.2

unsigned long CurrentTick () [inline]

Read the current system tick. This function lets you current system tick count. Returns: The current system tick count.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

385

Examples: ex_CurrentTick.nxc, ex_dispgout.nxc, and util_rpm.nxc.

6.46.2.3

void ExitTo (task newTask) [inline]

Exit to another task. Immediately exit the current task and start executing the specied task. Parameters: newTask The task to start executing after exiting the current task. Examples: alternating_tasks.nxc.

6.46.2.4

unsigned long FirstTick () [inline]

Get the rst tick. Return an unsigned 32-bit value, which is the system timing value (called a "tick") in milliseconds at the time that the program began running. Returns: The tick count at the start of program execution. Examples: ex_FirstTick.nxc.

6.46.2.5

void Follows (task task1, task task2, ..., task taskN) [inline]

Declare tasks that this task follows. Schedule this task to follow the specied tasks so that it will execute once any of the specied tasks has completed executing. This statement should occur once within a task - preferably at the start of the task denition. If multiple tasks declare that they follow the same task then they will all execute simultaneously unless other dependencies prevent them from doing so. Any number of tasks may be listed in the Follows statement.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

386

Parameters: task1 The rst task that this task follows. task2 The second task that this task follows. taskN The last task that this task follows. Examples: ex_Follows.nxc.

6.46.2.6

void GetButtonModuleValue (unsigned int offset, variant & value) [inline]

Get Button module IOMap value. Read a value from the Button module IOMap structure. You provide the offset into the Button module IOMap structure where you want to read the value from along with a variable that will store the value. The type of the variable determines how many bytes are read from the IOMap. Parameters: offset The number of bytes offset from the start of the IOMap structure where the value should be read. See Button module IOMAP offsets. value A variable that will contain the value read from the IOMap.

6.46.2.7

void GetCommandModuleBytes (unsigned int offset, unsigned int count, byte & data[ ]) [inline]

Get Command module IOMap bytes. Read one or more bytes of data from Command module IOMap structure. You provide the offset into the Command module IOMap structure where you want to start reading, the number of bytes to read from that location, and a byte array where the data will be stored. Parameters: offset The number of bytes offset from the start of the Command module IOMap structure where the data should be read. See Command module IOMAP offsets. count The number of bytes to read from the specied Command module IOMap offset. data A byte array that will contain the data read from the Command module IOMap.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

387

6.46.2.8

void GetCommandModuleValue (unsigned int offset, variant & value) [inline]

Get Command module IOMap value. Read a value from the Command module IOMap structure. You provide the offset into the Command module IOMap structure where you want to read the value from along with a variable that will store the value. The type of the variable determines how many bytes are read from the IOMap. Parameters: offset The number of bytes offset from the start of the IOMap structure where the value should be read. See Command module IOMAP offsets. value A variable that will contain the value read from the IOMap.

6.46.2.9

void GetCommModuleBytes (unsigned int offset, unsigned int count, byte & data[ ]) [inline]

Get Comm module IOMap bytes. Read one or more bytes of data from Comm module IOMap structure. You provide the offset into the Comm module IOMap structure where you want to start reading, the number of bytes to read from that location, and a byte array where the data will be stored. Parameters: offset The number of bytes offset from the start of the Comm module IOMap structure where the data should be read. See Comm module IOMAP offsets. count The number of bytes to read from the specied Comm module IOMap offset. data A byte array that will contain the data read from the Comm module IOMap.

6.46.2.10

void GetCommModuleValue (unsigned int offset, variant & value) [inline]

Get Comm module IOMap value. Read a value from the Comm module IOMap structure. You provide the offset into the Comm module IOMap structure where you want to read the value from along with a variable that will store the value. The type of the variable determines how many bytes are read from the IOMap.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

388

Parameters: offset The number of bytes offset from the start of the IOMap structure where the value should be read. See Comm module IOMAP offsets. value A variable that will contain the value read from the IOMap.

6.46.2.11

void GetDisplayModuleBytes (unsigned int offset, unsigned int count, byte & data[ ]) [inline]

Get Display module IOMap bytes. Read one or more bytes of data from Display module IOMap structure. You provide the offset into the Display module IOMap structure where you want to start reading, the number of bytes to read from that location, and a byte array where the data will be stored. Parameters: offset The number of bytes offset from the start of the Display module IOMap structure where the data should be read. See Display module IOMAP offsets. count The number of bytes to read from the specied Display module IOMap offset. data A byte array that will contain the data read from the Display module IOMap.

6.46.2.12

void GetDisplayModuleValue (unsigned int offset, variant & value) [inline]

Get Display module IOMap value. Read a value from the Display module IOMap structure. You provide the offset into the Display module IOMap structure where you want to read the value from along with a variable that will store the value. The type of the variable determines how many bytes are read from the IOMap. Parameters: offset The number of bytes offset from the start of the IOMap structure where the value should be read. See Display module IOMAP offsets. value A variable that will contain the value read from the IOMap.

6.46.2.13

void GetInputModuleValue (unsigned int offset, variant & value) [inline]

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

389

Get Input module IOMap value. Read a value from the Input module IOMap structure. You provide the offset into the Input module IOMap structure where you want to read the value from along with a variable that will store the value. The type of the variable determines how many bytes are read from the IOMap. Parameters: offset The number of bytes offset from the start of the IOMap structure where the value should be read. See Input module IOMAP offsets. value A variable that will contain the value read from the IOMap.

6.46.2.14

void GetIOMapBytes (string moduleName, unsigned int offset, unsigned int count, byte & data[ ]) [inline]

Get IOMap bytes by name. Read one or more bytes of data from an IOMap structure. The IOMap structure is specied by its module name. You also provide the offset into the IOMap structure where you want to start reading, the number of bytes to read from that location, and a byte array where the data will be stored. Parameters: moduleName The module name of the IOMap. See NXT rmware module names. offset The number of bytes offset from the start of the IOMap structure where the data should be read count The number of bytes to read from the specied IOMap offset. data A byte array that will contain the data read from the IOMap

6.46.2.15

void GetIOMapBytesByID (unsigned long moduleId, unsigned int offset, unsigned int count, byte & data[ ]) [inline]

Get IOMap bytes by ID. Read one or more bytes of data from an IOMap structure. The IOMap structure is specied by its Module ID. You also provide the offset into the IOMap structure where you want to start reading, the number of bytes to read from that location, and a byte array where the data will be stored. Parameters: moduleId The module ID of the IOMap. See NXT rmware module IDs. offset The number of bytes offset from the start of the IOMap structure where the data should be read.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

390

count The number of bytes to read from the specied IOMap offset. data A byte array that will contain the data read from the IOMap. Warning: This function requires the enhanced NBC/NXC rmware.

6.46.2.16

void GetIOMapValue (string moduleName, unsigned int offset, variant & value) [inline]

Get IOMap value by name. Read a value from an IOMap structure. The IOMap structure is specied by its module name. You also provide the offset into the IOMap structure where you want to read the value along with a variable that will contain the IOMap value. Parameters: moduleName The module name of the IOMap. See NXT rmware module names. offset The number of bytes offset from the start of the IOMap structure where the value should be read value A variable that will contain the value read from the IOMap

6.46.2.17

void GetIOMapValueByID (unsigned long moduleId, unsigned int offset, variant & value) [inline]

Get IOMap value by ID. Read a value from an IOMap structure. The IOMap structure is specied by its Module ID. You also provide the offset into the IOMap structure where you want to read the value along with a variable that will contain the IOMap value. Parameters: moduleId The module ID of the IOMap. See NXT rmware module IDs. offset The number of bytes offset from the start of the IOMap structure where the value should be read. value A variable that will contain the value read from the IOMap. Warning: This function requires the enhanced NBC/NXC rmware.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

391

6.46.2.18

char GetLastResponseInfo (bool Clear, byte & Length, byte & Command, byte & Buffer[ ]) [inline]

Read last response information. Read the last direct or system command response packet received by the NXT. Optionally clear the response after retrieving the information. Warning: This function requires the enhanced NBC/NXC rmware version 1.31+. Parameters: Clear A boolean value indicating whether to clear the response or not. Length The response packet length. Command The original command byte. Buffer The response packet buffer. Returns: The response status code. Examples: ex_GetLastResponseInfo.nxc.

6.46.2.19

void GetLoaderModuleValue (unsigned int offset, variant & value) [inline]

Get Loader module IOMap value. Read a value from the Loader module IOMap structure. You provide the offset into the Loader module IOMap structure where you want to read the value from along with a variable that will store the value. The type of the variable determines how many bytes are read from the IOMap. Parameters: offset The number of bytes offset from the start of the IOMap structure where the value should be read. See Loader module IOMAP offsets. value A variable that will contain the value read from the IOMap.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

392

6.46.2.20

void GetLowSpeedModuleBytes (unsigned int offset, unsigned int count, byte & data[ ]) [inline]

Get Lowspeed module IOMap bytes. Read one or more bytes of data from Lowspeed module IOMap structure. You provide the offset into the Lowspeed module IOMap structure where you want to start reading, the number of bytes to read from that location, and a byte array where the data will be stored. Parameters: offset The number of bytes offset from the start of the Lowspeed module IOMap structure where the data should be read. See Low speed module IOMAP offsets. count The number of bytes to read from the specied Lowspeed module IOMap offset. data A byte array that will contain the data read from the Lowspeed module IOMap.

6.46.2.21

void GetLowSpeedModuleValue (unsigned int offset, variant & value) [inline]

Get LowSpeed module IOMap value. Read a value from the LowSpeed module IOMap structure. You provide the offset into the Command module IOMap structure where you want to read the value from along with a variable that will store the value. The type of the variable determines how many bytes are read from the IOMap. Parameters: offset The number of bytes offset from the start of the IOMap structure where the value should be read. See Low speed module IOMAP offsets. value A variable that will contain the value read from the IOMap.

6.46.2.22

char GetMemoryInfo (bool Compact, unsigned int & PoolSize, unsigned int & DataspaceSize) [inline]

Read memory information. Read the current pool size and dataspace size. Optionally compact the dataspace before returning the information. Running programs have a maximum of 32k bytes of memory available. The amount of free RAM can be calculated by subtracting the value returned by this function from POOL_MAX_SIZE.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

393

Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: Compact A boolean value indicating whether to compact the dataspace or not. PoolSize The current pool size. DataspaceSize The current dataspace size. Returns: The function call result. It will be NO_ERR if the compact operation is not performed. Otherwise it will be the result of the compact operation. Examples: ex_getmemoryinfo.nxc.

6.46.2.23

void GetOutputModuleValue (unsigned int offset, variant & value) [inline]

Get Output module IOMap value. Read a value from the Output module IOMap structure. You provide the offset into the Output module IOMap structure where you want to read the value from along with a variable that will store the value. The type of the variable determines how many bytes are read from the IOMap. Parameters: offset The number of bytes offset from the start of the IOMap structure where the value should be read. See Output module IOMAP offsets. value A variable that will contain the value read from the IOMap.

6.46.2.24

void GetSoundModuleValue (unsigned int offset, variant & value) [inline]

Get Sound module IOMap value. Read a value from the Sound module IOMap structure. You provide the offset into the Sound module IOMap structure where you want to read the value from along with a variable that will store the value. The type of the variable determines how many bytes are read from the IOMap.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

394

Parameters: offset The number of bytes offset from the start of the IOMap structure where the value should be read. See Sound module IOMAP offsets. value A variable that will contain the value read from the IOMap.

6.46.2.25

void GetUIModuleValue (unsigned int offset, variant & value) [inline]

Get Ui module IOMap value. Read a value from the Ui module IOMap structure. You provide the offset into the Ui module IOMap structure where you want to read the value from along with a variable that will store the value. The type of the variable determines how many bytes are read from the IOMap. Parameters: offset The number of bytes offset from the start of the IOMap structure where the value should be read. See Ui module IOMAP offsets. value A variable that will contain the value read from the IOMap.

6.46.2.26

void Precedes (task task1, task task2, ..., task taskN) [inline]

Declare tasks that this task precedes. Schedule the listed tasks for execution once the current task has completed executing. The tasks will all execute simultaneously unless other dependencies prevent them from doing so. This statement should be used once within a task - preferably at the start of the task denition. Any number of tasks may be listed in the Precedes statement. Parameters: task1 The rst task to start executing after the current task ends. task2 The second task to start executing after the current task ends. taskN The last task to start executing after the current task ends. Examples: alternating_tasks.nxc, ex_Precedes.nxc, and ex_yield.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

395

6.46.2.27

void Release (mutex m) [inline]

Acquire a mutex. Release the specied mutex variable. Use this to relinquish a mutex so that it can be acquired by another task. Release should always be called after a matching call to Acquire and as soon as possible after a shared resource is no longer needed. Parameters: m The mutex to release. Examples: ex_Acquire.nxc, and ex_Release.nxc.

6.46.2.28

long ResetSleepTimer () [inline]

Reset the sleep timer. This function lets you reset the sleep timer. Returns: The result of resetting the sleep timer. Examples: ex_ResetSleepTimer.nxc.

6.46.2.29

void SetButtonModuleValue (unsigned int offset, variant value) [inline]

Set Button module IOMap value. Set one of the elds of the Button module IOMap structure to a new value. You provide the offset into the Button module IOMap structure where you want to write the value along with a variable containing the new value. Parameters: offset The number of bytes offset from the start of the Button module IOMap structure where the new value should be written. See Button module IOMAP offsets. value A variable containing the new value to write to the Button module IOMap.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

396

6.46.2.30

void SetCommandModuleBytes (unsigned int offset, unsigned int count, byte data[ ]) [inline]

Set Command module IOMap bytes. Modify one or more bytes of data in the Command module IOMap structure. You provide the offset into the Command module IOMap structure where you want to start writing, the number of bytes to write at that location, and a byte array containing the new data. Parameters: offset The number of bytes offset from the start of the Command module IOMap structure where the data should be written. See Command module IOMAP offsets. count The number of bytes to write at the specied Command module IOMap offset. data The byte array containing the data to write to the Command module IOMap.

6.46.2.31

void SetCommandModuleValue (unsigned int offset, variant value) [inline]

Set Command module IOMap value. Set one of the elds of the Command module IOMap structure to a new value. You provide the offset into the Command module IOMap structure where you want to write the value along with a variable containing the new value. Parameters: offset The number of bytes offset from the start of the Command module IOMap structure where the new value should be written. See Command module IOMAP offsets. value A variable containing the new value to write to the Command module IOMap.

6.46.2.32

void SetCommModuleBytes (unsigned int offset, unsigned int count, byte data[ ]) [inline]

Set Comm module IOMap bytes. Modify one or more bytes of data in an IOMap structure. You provide the offset into the Comm module IOMap structure where you want to start writing, the number of bytes to write at that location, and a byte array containing the new data.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

397

Parameters: offset The number of bytes offset from the start of the Comm module IOMap structure where the data should be written. See Comm module IOMAP offsets. count The number of bytes to write at the specied Comm module IOMap offset. data The byte array containing the data to write to the Comm module IOMap.

6.46.2.33

void SetCommModuleValue (unsigned int offset, variant value) [inline]

Set Comm module IOMap value. Set one of the elds of the Comm module IOMap structure to a new value. You provide the offset into the Comm module IOMap structure where you want to write the value along with a variable containing the new value. Parameters: offset The number of bytes offset from the start of the Comm module IOMap structure where the new value should be written. See Comm module IOMAP offsets. value A variable containing the new value to write to the Comm module IOMap.

6.46.2.34

void SetDisplayModuleBytes (unsigned int offset, unsigned int count, byte data[ ]) [inline]

Set Display module IOMap bytes. Modify one or more bytes of data in the Display module IOMap structure. You provide the offset into the Display module IOMap structure where you want to start writing, the number of bytes to write at that location, and a byte array containing the new data. Parameters: offset The number of bytes offset from the start of the Display module IOMap structure where the data should be written. See Display module IOMAP offsets. count The number of bytes to write at the specied Display module IOMap offset. data The byte array containing the data to write to the Display module IOMap.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

398

6.46.2.35

void SetDisplayModuleValue (unsigned int offset, variant value) [inline]

Set Display module IOMap value. Set one of the elds of the Display module IOMap structure to a new value. You provide the offset into the Display module IOMap structure where you want to write the value along with a variable containing the new value. Parameters: offset The number of bytes offset from the start of the Display module IOMap structure where the new value should be written. See Display module IOMAP offsets. value A variable containing the new value to write to the Display module IOMap.

6.46.2.36

void SetInputModuleValue (unsigned int offset, variant value) [inline]

Set Input module IOMap value. Set one of the elds of the Input module IOMap structure to a new value. You provide the offset into the Input module IOMap structure where you want to write the value along with a variable containing the new value. Parameters: offset The number of bytes offset from the start of the Input module IOMap structure where the new value should be written. See Input module IOMAP offsets. value A variable containing the new value to write to the Input module IOMap.

6.46.2.37

void SetIOCtrlModuleValue (unsigned int offset, variant value) [inline]

Set IOCtrl module IOMap value. Set one of the elds of the IOCtrl module IOMap structure to a new value. You provide the offset into the IOCtrl module IOMap structure where you want to write the value along with a variable containing the new value. Parameters: offset The number of bytes offset from the start of the IOCtrl module IOMap structure where the new value should be written. See IOCtrl module IOMAP offsets. value A variable containing the new value to write to the IOCtrl module IOMap.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

399

6.46.2.38

void SetIOMapBytes (string moduleName, unsigned int offset, unsigned int count, byte data[ ]) [inline]

Set IOMap bytes by name. Modify one or more bytes of data in an IOMap structure. The IOMap structure is specied by its module name. You also provide the offset into the IOMap structure where you want to start writing, the number of bytes to write at that location, and a byte array containing the new data. Parameters: moduleName The module name of the IOMap to modify. See NXT rmware module names. offset The number of bytes offset from the start of the IOMap structure where the data should be written count The number of bytes to write at the specied IOMap offset. data The byte array containing the data to write to the IOMap

6.46.2.39

void SetIOMapBytesByID (unsigned long moduleId, unsigned int offset, unsigned int count, byte data[ ]) [inline]

Set IOMap bytes by ID. Modify one or more bytes of data in an IOMap structure. The IOMap structure is specied by its Module ID. You also provide the offset into the IOMap structure where you want to start writing, the number of bytes to write at that location, and a byte array containing the new data. Parameters: moduleId The module ID of the IOMap to modify. See NXT rmware module IDs. offset The number of bytes offset from the start of the IOMap structure where the data should be written. count The number of bytes to write at the specied IOMap offset. data The byte array containing the data to write to the IOMap. Warning: This function requires the enhanced NBC/NXC rmware.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

400

6.46.2.40

void SetIOMapValue (string moduleName, unsigned int offset, variant value) [inline]

Set IOMap value by name. Set one of the elds of an IOMap structure to a new value. The IOMap structure is specied by its module name. You also provide the offset into the IOMap structure where you want to write the value along with a variable containing the new value. Parameters: moduleName The module name of the IOMap to modify. See NXT rmware module names. offset The number of bytes offset from the start of the IOMap structure where the new value should be written value A variable containing the new value to write to the IOMap

6.46.2.41

void SetIOMapValueByID (unsigned long moduleId, unsigned int offset, variant value) [inline]

Set IOMap value by ID. Set one of the elds of an IOMap structure to a new value. The IOMap structure is specied by its Module ID. You also provide the offset into the IOMap structure where you want to write the value along with a variable containing the new value. Parameters: moduleId The module ID of the IOMap to modify. See NXT rmware module IDs. offset The number of bytes offset from the start of the IOMap structure where the new value should be written. value A variable containing the new value to write to the IOMap. Warning: This function requires the enhanced NBC/NXC rmware.

6.46.2.42

void SetLoaderModuleValue (unsigned int offset, variant value) [inline]

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

401

Set Loader module IOMap value. Set one of the elds of the Loader module IOMap structure to a new value. You provide the offset into the Loader module IOMap structure where you want to write the value along with a variable containing the new value. Parameters: offset The number of bytes offset from the start of the Loader module IOMap structure where the new value should be written. See Loader module IOMAP offsets. value A variable containing the new value to write to the Loader module IOMap.

6.46.2.43

void SetLowSpeedModuleBytes (unsigned int offset, unsigned int count, byte data[ ]) [inline]

Set Lowspeed module IOMap bytes. Modify one or more bytes of data in the Lowspeed module IOMap structure. You provide the offset into the Lowspeed module IOMap structure where you want to start writing, the number of bytes to write at that location, and a byte array containing the new data. Parameters: offset The number of bytes offset from the start of the Lowspeed module IOMap structure where the data should be written. See Low speed module IOMAP offsets. count The number of bytes to write at the specied Lowspeed module IOMap offset. data The byte array containing the data to write to the Lowspeed module IOMap.

6.46.2.44

void SetLowSpeedModuleValue (unsigned int offset, variant value) [inline]

Set Lowspeed module IOMap value. Set one of the elds of the Lowspeed module IOMap structure to a new value. You provide the offset into the Lowspeed module IOMap structure where you want to write the value along with a variable containing the new value. Parameters: offset The number of bytes offset from the start of the Lowspeed module IOMap structure where the new value should be written. See Low speed module IOMAP offsets.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

402

value A variable containing the new value to write to the Lowspeed module IOMap.

6.46.2.45

void SetOutputModuleValue (unsigned int offset, variant value) [inline]

Set Output module IOMap value. Set one of the elds of the Output module IOMap structure to a new value. You provide the offset into the Output module IOMap structure where you want to write the value along with a variable containing the new value. Parameters: offset The number of bytes offset from the start of the Output module IOMap structure where the new value should be written. See Output module IOMAP offsets. value A variable containing the new value to write to the Output module IOMap.

6.46.2.46

void SetSoundModuleValue (unsigned int offset, variant value) [inline]

Set Sound module IOMap value. Set one of the elds of the Sound module IOMap structure to a new value. You provide the offset into the Sound module IOMap structure where you want to write the value along with a variable containing the new value. Parameters: offset The number of bytes offset from the start of the Sound module IOMap structure where the new value should be written. See Sound module IOMAP offsets. value A variable containing the new value to write to the Sound module IOMap.

6.46.2.47

void SetUIModuleValue (unsigned int offset, variant value) [inline]

Set Ui module IOMap value. Set one of the elds of the Ui module IOMap structure to a new value. You provide the offset into the Ui module IOMap structure where you want to write the value along with a variable containing the new value.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

403

Parameters: offset The number of bytes offset from the start of the Ui module IOMap structure where the new value should be written. See Ui module IOMAP offsets. value A variable containing the new value to write to the Ui module IOMap.

6.46.2.48

void StartTask (task t) [inline]

Start a task. Start the specied task. Parameters: t The task to start. Examples: ex_StartTask.nxc.

6.46.2.49

void Stop (bool bvalue) [inline]

Stop the running program. Stop the running program if bvalue is true. This will halt the program completely, so any code following this command will be ignored. Parameters: bvalue If this value is true the program will stop executing. Examples: ex_le_system.nxc, and ex_Stop.nxc.

6.46.2.50

void StopAllTasks () [inline]

Stop all tasks. Stop all currently running tasks. This will halt the program completely, so any code following this command will be ignored. Examples: ex_StopAllTasks.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

404

6.46.2.51

void StopTask (task t) [inline]

Stop a task. Stop the specied task. Parameters: t The task to stop. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_StopTask.nxc.

6.46.2.52

void SysCall (byte funcID, variant & args) [inline]

Call any system function. This generic macro can be used to call any system function. No type checking is performed so you need to make sure you use the correct structure type given the selected system function ID. This is, however, the fastest possible way to call a system function in NXC. Valid function ID constants are dened in the System Call function constants group. Parameters: funcID The function ID constant corresponding to the function to be called. args The structure containing the needed parameters. Examples: ex_dispgout.nxc, and ex_syscall.nxc.

6.46.2.53

void SysComputeCalibValue (ComputeCalibValueType & args) [inline]

Compute calibration values. This function lets you compute calibration values using the values specied via the ComputeCalibValueType structure.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

405

Todo gure out what this function is intended for Parameters: args The ComputeCalibValueType structure containing the needed parameters. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_SysComputeCalibValue.nxc.

6.46.2.54

void SysDatalogGetTimes (DatalogGetTimesType & args) [inline]

Get datalog times. This function lets you get datalog times using the values specied via the DatalogGetTimesType structure. Todo gure out what this function is intended for Parameters: args The DatalogGetTimesType structure containing the needed parameters. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_sysdataloggettimes.nxc.

6.46.2.55

void SysDatalogWrite (DatalogWriteType & args) [inline]

Write to the datalog. This function lets you write to the datalog using the values specied via the DatalogWriteType structure.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

406

Todo gure out what this function is intended for Parameters: args The DatalogWriteType structure containing the needed parameters. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_SysDatalogWrite.nxc.

6.46.2.56

void SysGetStartTick (GetStartTickType & args) [inline]

Get start tick. This function lets you obtain the tick value at the time your program began executing via the GetStartTickType structure. Parameters: args The GetStartTickType structure receiving results. Examples: ex_sysgetstarttick.nxc.

6.46.2.57

void SysIOMapRead (IOMapReadType & args) [inline]

Read from IOMap by name. This function lets you read data from a rmware modules IOMap using the values specied via the IOMapReadType structure. Parameters: args The IOMapReadType structure containing the needed parameters. Examples: ex_sysiomapread.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

407

6.46.2.58

void SysIOMapReadByID (IOMapReadByIDType & args) [inline]

Read from IOMap by identier. This function lets you read data from a rmware modules IOMap using the values specied via the IOMapReadByIDType structure. This function can be as much as three times faster than using SysIOMapRead since it does not have to do a string lookup using the ModuleName. Parameters: args The IOMapReadByIDType structure containing the needed parameters. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_reladdressof.nxc, and ex_sysiomapreadbyid.nxc.

6.46.2.59

void SysIOMapWrite (IOMapWriteType & args) [inline]

Write to IOMap by name. This function lets you write data to a rmware modules IOMap using the values specied via the IOMapWriteType structure. Parameters: args The IOMapWriteType structure containing the needed parameters. Examples: ex_sysiomapwrite.nxc.

6.46.2.60

void SysIOMapWriteByID (IOMapWriteByIDType & args) [inline]

Write to IOMap by identier. This function lets you write data to a rmware modules IOMap using the values specied via the IOMapWriteByIDType structure. This function can be as much as three times faster than using SysIOMapWrite since it does not have to do a string lookup using the ModuleName.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

408

Parameters: args The IOMapWriteByIDType structure containing the needed parameters. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_reladdressof.nxc, and ex_sysiomapwritebyid.nxc.

6.46.2.61

void SysKeepAlive (KeepAliveType & args) [inline]

Keep alive. This function lets you reset the sleep timer via the KeepAliveType structure. Parameters: args The KeepAliveType structure receiving results. Examples: ex_syskeepalive.nxc.

6.46.2.62

void SysMemoryManager (MemoryManagerType & args) [inline]

Read memory information. This function lets you read memory information using the values specied via the MemoryManagerType structure. Parameters: args The MemoryManagerType structure containing the required parameters. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Examples: ex_sysmemorymanager.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

409

6.46.2.63

void SysReadLastResponse (ReadLastResponseType & args) [inline]

Read last response information. This function lets you read the last system or direct command response received by the NXT using the values specied via the ReadLastResponseType structure. Parameters: args The ReadLastResponseType structure containing the required parameters. Warning: This function requires the enhanced NBC/NXC rmware version 1.31+. Examples: ex_SysReadLastResponse.nxc.

6.46.2.64

void SysReadSemData (ReadSemDataType & args) [inline]

Read semaphore data. This function lets you read global motor semaphore data using the values specied via the ReadSemDataType structure. Parameters: args The ReadSemDataType structure containing the needed parameters. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_SysReadSemData.nxc.

6.46.2.65

void SysUpdateCalibCacheInfo (UpdateCalibCacheInfoType & args) [inline]

Update calibration cache information. This function lets you update calibration cache information using the values specied via the UpdateCalibCacheInfoType structure.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.46

Command module functions

410

Todo gure out what this function is intended for Parameters: args The UpdateCalibCacheInfoType structure containing the needed parameters. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_SysUpdateCalibCacheInfo.nxc.

6.46.2.66

void SysWriteSemData (WriteSemDataType & args) [inline]

Write semaphore data. This function lets you write global motor semaphore data using the values specied via the WriteSemDataType structure. Parameters: args The WriteSemDataType structure containing the needed parameters. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_SysWriteSemData.nxc.

6.46.2.67

void Wait (unsigned long ms) [inline]

Wait some milliseconds. Make a task sleep for specied amount of time (in 1000ths of a second). Parameters: ms The number of milliseconds to sleep.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.47

Array API functions

411

Examples: alternating_tasks.nxc, ex_addressof.nxc, ex_addressofex.nxc, ex_ArrayMax.nxc, ex_ArrayMean.nxc, ex_ArrayMin.nxc, ex_ArrayOp.nxc, ex_ArraySort.nxc, ex_ArrayStd.nxc, ex_ArraySum.nxc, ex_ArraySumSqr.nxc, ex_atof.nxc, ex_atoi.nxc, ex_atol.nxc, ex_CircleOut.nxc, ex_clearline.nxc, ex_ClearScreen.nxc, ex_contrast.nxc, ex_copy.nxc, ex_ctype.nxc, ex_DataMode.nxc, ex_delete_data_le.nxc, ex_dispftout.nxc, ex_dispfunc.nxc, ex_dispgaout.nxc, ex_dispgout.nxc, ex_dispgoutex.nxc, ex_displayfont.nxc, ex_dispmisc.nxc, ex_div.nxc, ex_le_system.nxc, ex_ndrstle.nxc, ex_ndnextle.nxc, ex_FlattenVar.nxc, ex_getchar.nxc, ex_getmemoryinfo.nxc, ex_HTGyroTest.nxc, ex_i2cdeviceinfo.nxc, ex_isnan.nxc, ex_labs.nxc, ex_ldiv.nxc, ex_leftstr.nxc, ex_LineOut.nxc, ex_memcmp.nxc, ex_midstr.nxc, ex_NXTHID.nxc, ex_NXTLineLeader.nxc, ex_NXTPowerMeter.nxc, ex_NXTServo.nxc, ex_NXTSumoEyes.nxc, ex_PFMate.nxc, ex_playsound.nxc, ex_playtones.nxc, ex_PolyOut.nxc, ex_PosReg.nxc, ex_ReadSensorHTAngle.nxc, ex_reladdressof.nxc, ex_ResetSensorHTAngle.nxc, ex_rightstr.nxc, ex_RS485Receive.nxc, ex_RS485Send.nxc, ex_SensorHTGyro.nxc, ex_setdisplayfont.nxc, ex_sin_cos.nxc, ex_sind_cosd.nxc, ex_StrCatOld.nxc, ex_StrIndex.nxc, ex_string.nxc, ex_StrLenOld.nxc, ex_StrReplace.nxc, ex_strtod.nxc, ex_strtol.nxc, ex_strtoul.nxc, ex_SubStr.nxc, ex_syscommbtconnection.nxc, ex_SysCommHSControl.nxc, ex_SysCommHSRead.nxc, ex_sysdataloggettimes.nxc, ex_sysdrawfont.nxc, ex_sysdrawgraphicarray.nxc, ex_sysdrawpolygon.nxc, ex_syslistles.nxc, ex_sysmemorymanager.nxc, ex_UnattenVar.nxc, ex_wait.nxc, ex_yield.nxc, glBoxDemo.nxc, glScaleDemo.nxc, util_battery_1.nxc, util_battery_2.nxc, and util_rpm.nxc.

6.46.2.68

void Yield () [inline]

Yield to another task. Make a task yield to another concurrently running task. Examples: ex_yield.nxc.

6.47

Array API functions

Functions for use with NXC array types. Functions void ArrayBuild (variant &aout[ ], variant src1, variant src2,..., variant srcN)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.47

Array API functions

412

Build an array.

unsigned int ArrayLen (variant data[ ])


Get array length.

void ArrayInit (variant &aout[ ], variant value, unsigned int count)


Initialize an array.

void ArraySubset (variant &aout[ ], variant asrc[ ], unsigned int idx, unsigned int len)
Copy an array subset.

variant ArraySum (const variant &src[ ], unsigned int idx, unsigned int len)
Calculate the sum of the elements in a numeric array.

variant ArrayMean (const variant &src[ ], unsigned int idx, unsigned int len)
Calculate the mean of the elements in a numeric array.

variant ArraySumSqr (const variant &src[ ], unsigned int idx, unsigned int len)
Calculate the sum of the squares of the elements in a numeric array.

variant ArrayStd (const variant &src[ ], unsigned int idx, unsigned int len)
Calculate the standard deviation of the elements in a numeric array.

variant ArrayMin (const variant &src[ ], unsigned int idx, unsigned int len)
Calculate the minimum of the elements in a numeric array.

variant ArrayMax (const variant &src[ ], unsigned int idx, unsigned int len)
Calculate the maximum of the elements in a numeric array.

void ArraySort (variant &dest[ ], const variant &src[ ], unsigned int idx, unsigned int len)
Sort the elements in a numeric array.

void ArrayOp (const byte op, variant &dest, const variant &src[ ], unsigned int idx, unsigned int len)
Operate on numeric arrays.

6.47.1

Detailed Description

Functions for use with NXC array types.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.47

Array API functions

413

6.47.2 6.47.2.1

Function Documentation void ArrayBuild (variant & aout[ ], variant src1, variant src2, ..., variant srcN) [inline]

Build an array. Build a new array from the specied source(s). The sources can be of any type so long as the number of dimensions is equal to or one less than the number of dimensions in the output array and the type is compatible with the type of the output array. If a source is an array with the same number of dimensions as the output array then all of its elements are added to the output array. Parameters: aout The output array to build. src1 The rst source to build into the output array. src2 The second source to build into the output array. srcN The rst source to build into the output array. Examples: ex_ArrayBuild.nxc, ex_getmemoryinfo.nxc, ex_SysCommHSWrite.nxc, ex_SysDatalogWrite.nxc, and ex_sysmemorymanager.nxc.

6.47.2.2

void ArrayInit (variant & aout[ ], variant value, unsigned int count) [inline]

Initialize an array. Initialize the array to contain count elements with each element equal to the value provided. To initialize a multi-dimensional array, the value should be an array of N-1 dimensions, where N is the number of dimensions in the array being initialized. Parameters: aout The output array to initialize. value The value to initialize each element to. count The number of elements to create in the output array. Examples: ex_ArrayInit.nxc, ex_getmemoryinfo.nxc, ex_sysdrawgraphic.nxc, and ex_sysmemorymanager.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.47

Array API functions

414

6.47.2.3

unsigned int ArrayLen (variant data[ ]) [inline]

Get array length. Return the length of the specied array. Any type of array of up to four dimensions can be passed into this function. Parameters: data The array whose length you need to read. Returns: The length of the specied array. Examples: ex_ArrayLen.nxc, ex_atan2.nxc, ex_atan2d.nxc, ex_syslistles.nxc, ex_tan.nxc, and ex_tand.nxc.

6.47.2.4

variant ArrayMax (const variant & src[ ], unsigned int idx, unsigned int len) [inline]

Calculate the maximum of the elements in a numeric array. This function calculates the maximum of all or a subset of the elements in the numeric src array. Warning: This function requires the enhanced NBC/NXC rmware. Parameters: src The source numeric array. idx The index of the start of the array subset to process. Pass NA to start with the rst element. len The number of elements to include in the calculation. Pass NA to include the rest of the elements in the src array (from idx to the end of the array). Returns: The maximum of len elements from the src numeric array (starting from idx). Examples: ex_ArrayMax.nxc, and ex_ArraySort.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.47

Array API functions

415

6.47.2.5

variant ArrayMean (const variant & src[ ], unsigned int idx, unsigned int len) [inline]

Calculate the mean of the elements in a numeric array. This function calculates the mean of all or a subset of the elements in the numeric src array. Warning: This function requires the enhanced NBC/NXC rmware. Parameters: src The source numeric array. idx The index of the start of the array subset to process. Pass NA to start with the rst element. len The number of elements to include in the calculation. Pass NA to include the rest of the elements in the src array (from idx to the end of the array). Returns: The mean value of len elements from the src numeric array (starting from idx). Examples: ex_ArrayMean.nxc.

6.47.2.6

variant ArrayMin (const variant & src[ ], unsigned int idx, unsigned int len) [inline]

Calculate the minimum of the elements in a numeric array. This function calculates the minimum of all or a subset of the elements in the numeric src array. Warning: This function requires the enhanced NBC/NXC rmware. Parameters: src The source numeric array. idx The index of the start of the array subset to process. Pass NA to start with the rst element. len The number of elements to include in the calculation. Pass NA to include the rest of the elements in the src array (from idx to the end of the array).
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.47

Array API functions

416

Returns: The minimum of len elements from the src numeric array (starting from idx). Examples: ex_ArrayMin.nxc, and ex_ArraySort.nxc.

6.47.2.7

void ArrayOp (const byte op, variant & dest, const variant & src[ ], unsigned int idx, unsigned int len) [inline]

Operate on numeric arrays. This function lets you perform various operations on numeric arrays. Warning: This function requires the enhanced NBC/NXC rmware. Parameters: op The array operation. See Array operation constants. dest The destination variant type (scalar or array, depending on the operation). src The source numeric array. idx The index of the start of the array subset to process. Pass NA to start with the rst element. len The number of elements to include in the specied process. Pass NA to include the rest of the elements in the src array (from idx to the end of the array). Examples: ex_ArrayOp.nxc.

6.47.2.8

void ArraySort (variant & dest[ ], const variant & src[ ], unsigned int idx, unsigned int len) [inline]

Sort the elements in a numeric array. This function sorts all or a subset of the elements in the numeric src array in ascending order and saves the results in the numeric dest array.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.47

Array API functions

417

Warning: This function requires the enhanced NBC/NXC rmware. Parameters: dest The destination numeric array. src The source numeric array. idx The index of the start of the array subset to process. Pass NA to start with the rst element. len The number of elements to include in the sorting process. Pass NA to include the rest of the elements in the src array (from idx to the end of the array). Examples: ex_ArraySort.nxc.

6.47.2.9

variant ArrayStd (const variant & src[ ], unsigned int idx, unsigned int len) [inline]

Calculate the standard deviation of the elements in a numeric array. This function calculates the standard deviation of all or a subset of the elements in the numeric src array. Warning: This function requires the enhanced NBC/NXC rmware. Parameters: src The source numeric array. idx The index of the start of the array subset to process. Pass NA to start with the rst element. len The number of elements to include in the calculation. Pass NA to include the rest of the elements in the src array (from idx to the end of the array). Returns: The standard deviation of len elements from the src numeric array (starting from idx). Examples: ex_ArrayStd.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.47

Array API functions

418

6.47.2.10

void ArraySubset (variant & aout[ ], variant asrc[ ], unsigned int idx, unsigned int len) [inline]

Copy an array subset. Copy a subset of the source array starting at the specied index and containing the specied number of elements into the destination array. Parameters: aout The output array containing the subset. asrc The input array from which to copy a subset. idx The start index of the array subset. len The length of the array subset. Examples: ex_ArraySubset.nxc.

6.47.2.11

variant ArraySum (const variant & src[ ], unsigned int idx, unsigned int len) [inline]

Calculate the sum of the elements in a numeric array. This function calculates the sum of all or a subset of the elements in the numeric src array. Warning: This function requires the enhanced NBC/NXC rmware. Parameters: src The source numeric array. idx The index of the start of the array subset to process. Pass NA to start with the rst element. len The number of elements to include in the calculation. Pass NA to include the rest of the elements in the src array (from idx to the end of the array). Returns: The sum of len elements from the src numeric array (starting from idx). Examples: ex_ArraySum.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.48

IOCtrl module types

419

6.47.2.12

variant ArraySumSqr (const variant & src[ ], unsigned int idx, unsigned int len) [inline]

Calculate the sum of the squares of the elements in a numeric array. This function calculates the sum of the squares of all or a subset of the elements in the numeric src array. Warning: This function requires the enhanced NBC/NXC rmware. Parameters: src The source numeric array. idx The index of the start of the array subset to process. Pass NA to start with the rst element. len The number of elements to include in the calculation. Pass NA to include the rest of the elements in the src array (from idx to the end of the array). Returns: The sum of the squares of len elements from the src numeric array (starting from idx). Examples: ex_ArraySumSqr.nxc.

6.48

IOCtrl module types

Types used by various IOCtrl module functions. Types used by various IOCtrl module functions.

6.49

IOCtrl module functions

Functions for accessing and modifying IOCtrl module features. Functions void PowerDown ()
Power down the NXT.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.49

IOCtrl module functions

420

void SleepNow ()
Put the brick to sleep immediately.

void RebootInFirmwareMode ()
Reboot the NXT in rmware download mode.

6.49.1

Detailed Description

Functions for accessing and modifying IOCtrl module features. 6.49.2 6.49.2.1 Function Documentation void PowerDown () [inline]

Power down the NXT. This function powers down the NXT. The running program will terminate as a result of this action. Examples: ex_PowerDown.nxc.

6.49.2.2

void RebootInFirmwareMode () [inline]

Reboot the NXT in rmware download mode. This function lets you reboot the NXT into SAMBA or rmware download mode. The running program will terminate as a result of this action. Examples: ex_RebootInFirmwareMode.nxc.

6.49.2.3

void SleepNow () [inline]

Put the brick to sleep immediately. This function lets you immediately put the NXT to sleep. The running program will terminate as a result of this action. Examples: ex_SleepNow.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.50

Comm module types

421

6.50

Comm module types

Types used by various Comm module functions. Data Structures struct MessageWriteType
Parameters for the MessageWrite system call.

struct MessageReadType
Parameters for the MessageRead system call.

struct CommBTCheckStatusType
Parameters for the CommBTCheckStatus system call.

struct CommBTWriteType
Parameters for the CommBTWrite system call.

struct CommExecuteFunctionType
Parameters for the CommExecuteFunction system call.

struct CommHSControlType
Parameters for the CommHSControl system call.

struct CommHSCheckStatusType
Parameters for the CommHSCheckStatus system call.

struct CommHSReadWriteType
Parameters for the CommHSReadWrite system call.

struct CommBTOnOffType
Parameters for the CommBTOnOff system call.

struct CommBTConnectionType
Parameters for the CommBTConnection system call.

6.50.1

Detailed Description

Types used by various Comm module functions.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

422

6.51

Comm module functions

Functions for accessing and modifying Comm module features. Modules Direct Command functions
Functions for sending direct commands to another NXT.

System Command functions


Functions for sending system commands to another NXT.

Functions char SendMessage (byte queue, string msg)


Send a message to a queue/mailbox.

char ReceiveMessage (byte queue, bool clear, string &msg)


Read a message from a queue/mailbox.

char BluetoothStatus (byte conn)


Check bluetooth status.

char BluetoothWrite (byte conn, byte buffer[ ])


Write to a bluetooth connection.

char RemoteConnectionWrite (byte conn, byte buffer[ ])


Write to a remote connection.

bool RemoteConnectionIdle (byte conn)


Check if remote connection is idle.

char SendRemoteBool (byte conn, byte queue, bool bval)


Send a boolean value to a remote mailbox.

char SendRemoteNumber (byte conn, byte queue, long val)


Send a numeric value to a remote mailbox.

char SendRemoteString (byte conn, byte queue, string str)


Send a string value to a remote mailbox.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

423

char SendResponseBool (byte queue, bool bval)


Write a boolean value to a local response mailbox.

char SendResponseNumber (byte queue, long val)


Write a numeric value to a local response mailbox.

char SendResponseString (byte queue, string str)


Write a string value to a local response mailbox.

char ReceiveRemoteBool (byte queue, bool clear, bool &bval)


Read a boolean value from a queue/mailbox.

char ReceiveRemoteMessageEx (byte queue, bool clear, string &str, long &val, bool &bval)
Read a value from a queue/mailbox.

char ReceiveRemoteNumber (byte queue, bool clear, long &val)


Read a numeric value from a queue/mailbox.

char ReceiveRemoteString (byte queue, bool clear, string &str)


Read a string value from a queue/mailbox.

void UseRS485 (void)


Use the RS485 port.

char RS485Control (byte cmd, byte baud, unsigned int mode)


Control the RS485 port.

bool RS485DataAvailable (void)


Check for RS485 available data.

char RS485Initialize (void)


Initialize RS485 port.

char RS485Disable (void)


Disable RS485.

char RS485Enable (void)


Enable RS485.

char RS485Read (byte &buffer[ ])


Read RS485 data.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

424

bool RS485SendingData (void)


Is RS485 sending data.

void RS485Status (bool &sendingData, bool &dataAvail)


Check RS485 status.

char RS485Uart (byte baud, unsigned int mode)


Congure RS485 UART.

char RS485Write (byte buffer[ ])


Write RS485 data.

char SendRS485Bool (bool bval)


Write RS485 boolean.

char SendRS485Number (long val)


Write RS485 numeric.

char SendRS485String (string str)


Write RS485 string.

void GetBTInputBuffer (const byte offset, byte cnt, byte &data[ ])


Get bluetooth input buffer data.

void GetBTOutputBuffer (const byte offset, byte cnt, byte &data[ ])


Get bluetooth output buffer data.

void GetHSInputBuffer (const byte offset, byte cnt, byte &data[ ])


Get hi-speed port input buffer data.

void GetHSOutputBuffer (const byte offset, byte cnt, byte &data[ ])


Get hi-speed port output buffer data.

void GetUSBInputBuffer (const byte offset, byte cnt, byte &data[ ])


Get usb input buffer data.

void GetUSBOutputBuffer (const byte offset, byte cnt, byte &data[ ])


Get usb output buffer data.

void GetUSBPollBuffer (const byte offset, byte cnt, byte &data[ ])


Get usb poll buffer data.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

425

string BTDeviceName (const byte devidx)


Get bluetooth device name.

string BTConnectionName (const byte conn)


Get bluetooth device name.

string BTConnectionPinCode (const byte conn)


Get bluetooth device pin code.

string BrickDataName (void)


Get NXT name.

void GetBTDeviceAddress (const byte devidx, byte &data[ ])


Get bluetooth device address.

void GetBTConnectionAddress (const byte conn, byte &data[ ])


Get bluetooth device address.

void GetBrickDataAddress (byte &data[ ])


Get NXT address.

long BTDeviceClass (const byte devidx)


Get bluetooth device class.

byte BTDeviceStatus (const byte devidx)


Get bluetooth device status.

long BTConnectionClass (const byte conn)


Get bluetooth device class.

byte BTConnectionHandleNum (const byte conn)


Get bluetooth device handle number.

byte BTConnectionStreamStatus (const byte conn)


Get bluetooth device stream status.

byte BTConnectionLinkQuality (const byte conn)


Get bluetooth device link quality.

int BrickDataBluecoreVersion (void)


Get NXT bluecore version.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

426

byte BrickDataBtStateStatus (void)


Get NXT bluetooth state status.

byte BrickDataBtHardwareStatus (void)


Get NXT bluetooth hardware status.

byte BrickDataTimeoutValue (void)


Get NXT bluetooth timeout value.

byte BTInputBufferInPtr (void)


Get bluetooth input buffer in-pointer.

byte BTInputBufferOutPtr (void)


Get bluetooth input buffer out-pointer.

byte BTOutputBufferInPtr (void)


Get bluetooth output buffer in-pointer.

byte BTOutputBufferOutPtr (void)


Get bluetooth output buffer out-pointer.

byte HSInputBufferInPtr (void)


Get hi-speed port input buffer in-pointer.

byte HSInputBufferOutPtr (void)


Get hi-speed port input buffer out-pointer.

byte HSOutputBufferInPtr (void)


Get hi-speed port output buffer in-pointer.

byte HSOutputBufferOutPtr (void)


Get hi-speed port output buffer out-pointer.

byte USBInputBufferInPtr (void)


Get usb port input buffer in-pointer.

byte USBInputBufferOutPtr (void)


Get usb port input buffer out-pointer.

byte USBOutputBufferInPtr (void)


Get usb port output buffer in-pointer.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

427

byte USBOutputBufferOutPtr (void)


Get usb port output buffer out-pointer.

byte USBPollBufferInPtr (void)


Get usb port poll buffer in-pointer.

byte USBPollBufferOutPtr (void)


Get usb port poll buffer out-pointer.

byte BTDeviceCount (void)


Get bluetooth device count.

byte BTDeviceNameCount (void)


Get bluetooth device name count.

byte HSFlags (void)


Get hi-speed port ags.

byte HSSpeed (void)


Get hi-speed port speed.

byte HSState (void)


Get hi-speed port state.

int HSMode (void)


Get hi-speed port mode.

int BTDataMode (void)


Get Bluetooth data mode.

int HSDataMode (void)


Get hi-speed port datamode.

byte USBState (void)


Get USB state.

void SetBTInputBuffer (const byte offset, byte cnt, byte data[ ])


Set bluetooth input buffer data.

void SetBTInputBufferInPtr (byte n)


Set bluetooth input buffer in-pointer.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

428

void SetBTInputBufferOutPtr (byte n)


Set bluetooth input buffer out-pointer.

void SetBTOutputBuffer (const byte offset, byte cnt, byte data[ ])


Set bluetooth output buffer data.

void SetBTOutputBufferInPtr (byte n)


Set bluetooth output buffer in-pointer.

void SetBTOutputBufferOutPtr (byte n)


Set bluetooth output buffer out-pointer.

void SetHSInputBuffer (const byte offset, byte cnt, byte data[ ])


Set hi-speed port input buffer data.

void SetHSInputBufferInPtr (byte n)


Set hi-speed port input buffer in-pointer.

void SetHSInputBufferOutPtr (byte n)


Set hi-speed port input buffer out-pointer.

void SetHSOutputBuffer (const byte offset, byte cnt, byte data[ ])


Set hi-speed port output buffer data.

void SetHSOutputBufferInPtr (byte n)


Set hi-speed port output buffer in-pointer.

void SetHSOutputBufferOutPtr (byte n)


Set hi-speed port output buffer out-pointer.

void SetUSBInputBuffer (const byte offset, byte cnt, byte data[ ])


Set USB input buffer data.

void SetUSBInputBufferInPtr (byte n)


Set USB input buffer in-pointer.

void SetUSBInputBufferOutPtr (byte n)


Set USB input buffer out-pointer.

void SetUSBOutputBuffer (const byte offset, byte cnt, byte data[ ])


Set USB output buffer data.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

429

void SetUSBOutputBufferInPtr (byte n)


Set USB output buffer in-pointer.

void SetUSBOutputBufferOutPtr (byte n)


Set USB output buffer out-pointer.

void SetUSBPollBuffer (const byte offset, byte cnt, byte data[ ])


Set USB poll buffer data.

void SetUSBPollBufferInPtr (byte n)


Set USB poll buffer in-pointer.

void SetUSBPollBufferOutPtr (byte n)


Set USB poll buffer out-pointer.

void SetHSFlags (byte hsFlags)


Set hi-speed port ags.

void SetHSSpeed (byte hsSpeed)


Set hi-speed port speed.

void SetHSState (byte hsState)


Set hi-speed port state.

void SetHSMode (unsigned int hsMode)


Set hi-speed port mode.

void SetBTDataMode (const byte dataMode)


Set Bluetooth data mode.

void SetHSDataMode (const byte dataMode)


Set hi-speed port data mode.

void SetUSBState (byte usbState)


Set USB state.

void SysMessageWrite (MessageWriteType &args)


Write message.

void SysMessageRead (MessageReadType &args)


Read message.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

430

void SysCommBTWrite (CommBTWriteType &args)


Write data to a Bluetooth connection.

void SysCommBTCheckStatus (CommBTCheckStatusType &args)


Check Bluetooth connection status.

void SysCommExecuteFunction (CommExecuteFunctionType &args)


Execute any Comm module command.

void SysCommHSControl (CommHSControlType &args)


Control the hi-speed port.

void SysCommHSCheckStatus (CommHSCheckStatusType &args)


Check the hi-speed port status.

void SysCommHSRead (CommHSReadWriteType &args)


Read from the hi-speed port.

void SysCommHSWrite (CommHSReadWriteType &args)


Write to the hi-speed port.

void SysCommBTOnOff (CommBTOnOffType &args)


Turn on or off the bluetooth subsystem.

void SysCommBTConnection (CommBTConnectionType &args)


Connect or disconnect a bluetooth device.

6.51.1

Detailed Description

Functions for accessing and modifying Comm module features. 6.51.2 6.51.2.1 Function Documentation char BluetoothStatus (byte conn) [inline]

Check bluetooth status. Check the status of the bluetooth subsystem for the specied connection slot.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

431

Parameters: conn The connection slot (0..3). Connections 0 through 3 are for bluetooth connections. See Remote connection constants. Returns: The bluetooth status for the specied connection. Examples: ex_BluetoothStatus.nxc, and ex_syscommbtconnection.nxc.

6.51.2.2

char BluetoothWrite (byte conn, byte buffer[ ]) [inline]

Write to a bluetooth connection. This method tells the NXT rmware to write the data in the buffer to the device on the specied Bluetooth connection. Use BluetoothStatus to determine when this write request is completed. Parameters: conn The connection slot (0..3). Connections 0 through 3 are for bluetooth connections. See Remote connection constants. buffer The data to be written (up to 128 bytes) Returns: A char value indicating whether the function call succeeded or not. Examples: ex_BluetoothWrite.nxc.

6.51.2.3

int BrickDataBluecoreVersion (void) [inline]

Get NXT bluecore version. This method returns the bluecore version of the NXT. Returns: The NXTs bluecore version number. Examples: ex_BrickDataBluecoreVersion.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

432

6.51.2.4

byte BrickDataBtHardwareStatus (void) [inline]

Get NXT bluetooth hardware status. This method returns the Bluetooth hardware status of the NXT. Returns: The NXTs bluetooth hardware status. Examples: ex_BrickDataBtHardwareStatus.nxc.

6.51.2.5

byte BrickDataBtStateStatus (void) [inline]

Get NXT bluetooth state status. This method returns the Bluetooth state status of the NXT. Returns: The NXTs bluetooth state status. Examples: ex_BrickDataBtStateStatus.nxc.

6.51.2.6

string BrickDataName (void) [inline]

Get NXT name. This method returns the name of the NXT. Returns: The NXTs bluetooth name. Examples: ex_BrickDataName.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

433

6.51.2.7

byte BrickDataTimeoutValue (void) [inline]

Get NXT bluetooth timeout value. This method returns the Bluetooth timeout value of the NXT. Returns: The NXTs bluetooth timeout value. Examples: ex_BrickDataTimeoutValue.nxc.

6.51.2.8

long BTConnectionClass (const byte conn) [inline]

Get bluetooth device class. This method returns the class of the device at the specied index within the Bluetooth connection table. Parameters: conn The connection slot (0..3). Returns: The class of the bluetooth device at the specied connection slot. Examples: ex_BTConnectionClass.nxc.

6.51.2.9

byte BTConnectionHandleNum (const byte conn) [inline]

Get bluetooth device handle number. This method returns the handle number of the device at the specied index within the Bluetooth connection table. Parameters: conn The connection slot (0..3). Returns: The handle number of the bluetooth device at the specied connection slot.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

434

Examples: ex_BTConnectionHandleNum.nxc.

6.51.2.10

byte BTConnectionLinkQuality (const byte conn) [inline]

Get bluetooth device link quality. This method returns the link quality of the device at the specied index within the Bluetooth connection table. Parameters: conn The connection slot (0..3). Returns: The link quality of the specied connection slot (unimplemented). Warning: This function is not implemented at the rmware level. Examples: ex_BTConnectionLinkQuality.nxc.

6.51.2.11

string BTConnectionName (const byte conn) [inline]

Get bluetooth device name. This method returns the name of the device at the specied index in the Bluetooth connection table. Parameters: conn The connection slot (0..3). Returns: The name of the bluetooth device at the specied connection slot. Examples: ex_BTConnectionName.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

435

6.51.2.12

string BTConnectionPinCode (const byte conn) [inline]

Get bluetooth device pin code. This method returns the pin code of the device at the specied index in the Bluetooth connection table. Parameters: conn The connection slot (0..3). Returns: The pin code for the bluetooth device at the specied connection slot. Examples: ex_BTConnectionPinCode.nxc.

6.51.2.13

byte BTConnectionStreamStatus (const byte conn) [inline]

Get bluetooth device stream status. This method returns the stream status of the device at the specied index within the Bluetooth connection table. Parameters: conn The connection slot (0..3). Returns: The stream status of the bluetooth device at the specied connection slot. Examples: ex_BTConnectionStreamStatus.nxc.

6.51.2.14

int BTDataMode (void) [inline]

Get Bluetooth data mode. This method returns the value of the Bluetooth data mode. Returns: The Bluetooth data mode. See Data mode constants.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

436

Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Examples: ex_DataMode.nxc.

6.51.2.15

long BTDeviceClass (const byte devidx) [inline]

Get bluetooth device class. This method returns the class of the device at the specied index within the Bluetooth device table. Parameters: devidx The device table index. Returns: The device class of the specied bluetooth device. Examples: ex_BTDeviceClass.nxc.

6.51.2.16

byte BTDeviceCount (void) [inline]

Get bluetooth device count. This method returns the number of devices dened within the Bluetooth device table. Returns: The count of known bluetooth devices. Examples: ex_BTDeviceCount.nxc.

6.51.2.17

string BTDeviceName (const byte devidx) [inline]

Get bluetooth device name. This method returns the name of the device at the specied index in the Bluetooth device table.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

437

Parameters: devidx The device table index. Returns: The device name of the specied bluetooth device. Examples: ex_BTDeviceName.nxc.

6.51.2.18

byte BTDeviceNameCount (void) [inline]

Get bluetooth device name count. This method returns the number of device names dened within the Bluetooth device table. This usually has the same value as BTDeviceCount but it can differ in some instances. Returns: The count of known bluetooth device names. Examples: ex_BTDeviceNameCount.nxc.

6.51.2.19

byte BTDeviceStatus (const byte devidx) [inline]

Get bluetooth device status. This method returns the status of the device at the specied index within the Bluetooth device table. Parameters: devidx The device table index. Returns: The status of the specied bluetooth device. Examples: ex_BTDeviceStatus.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

438

6.51.2.20

byte BTInputBufferInPtr (void) [inline]

Get bluetooth input buffer in-pointer. This method returns the value of the input pointer of the Bluetooth input buffer. Returns: The bluetooth input buffers in-pointer value. Examples: ex_BTInputBufferInPtr.nxc.

6.51.2.21

byte BTInputBufferOutPtr (void) [inline]

Get bluetooth input buffer out-pointer. This method returns the value of the output pointer of the Bluetooth input buffer. Returns: The bluetooth input buffers out-pointer value. Examples: ex_BTInputBufferOutPtr.nxc.

6.51.2.22

byte BTOutputBufferInPtr (void) [inline]

Get bluetooth output buffer in-pointer. This method returns the value of the input pointer of the Bluetooth output buffer. Returns: The bluetooth output buffers in-pointer value. Examples: ex_BTOutputBufferInPtr.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

439

6.51.2.23

byte BTOutputBufferOutPtr (void) [inline]

Get bluetooth output buffer out-pointer. This method returns the value of the output pointer of the Bluetooth output buffer. Returns: The bluetooth output buffers out-pointer value. Examples: ex_BTOutputBufferOutPtr.nxc.

6.51.2.24

void GetBrickDataAddress (byte & data[ ]) [inline]

Get NXT address. This method reads the address of the NXT and stores it in the data buffer provided. Parameters: data The byte array reference that will contain the device address. Examples: ex_GetBrickDataAddress.nxc.

6.51.2.25

void GetBTConnectionAddress (const byte conn, byte & data[ ]) [inline]

Get bluetooth device address. This method reads the address of the device at the specied index within the Bluetooth connection table and stores it in the data buffer provided. Parameters: conn The connection slot (0..3). data The byte array reference that will contain the device address. Examples: ex_GetBTConnectionAddress.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

440

6.51.2.26

void GetBTDeviceAddress (const byte devidx, byte & data[ ]) [inline]

Get bluetooth device address. This method reads the address of the device at the specied index within the Bluetooth device table and stores it in the data buffer provided. Parameters: devidx The device table index. data The byte array reference that will contain the device address. Examples: ex_GetBTDeviceAddress.nxc.

6.51.2.27

void GetBTInputBuffer (const byte offset, byte cnt, byte & data[ ]) [inline]

Get bluetooth input buffer data. This method reads count bytes of data from the Bluetooth input buffer and writes it to the buffer provided. Parameters: offset A constant offset into the bluetooth input buffer. cnt The number of bytes to read. data The byte array reference which will contain the data read from the bluetooth input buffer. Examples: ex_GetBTInputBuffer.nxc.

6.51.2.28

void GetBTOutputBuffer (const byte offset, byte cnt, byte & data[ ]) [inline]

Get bluetooth output buffer data. This method reads count bytes of data from the Bluetooth output buffer and writes it to the buffer provided.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

441

Parameters: offset A constant offset into the bluetooth output buffer. cnt The number of bytes to read. data The byte array reference which will contain the data read from the bluetooth output buffer. Examples: ex_GetBTOutputBuffer.nxc.

6.51.2.29

void GetHSInputBuffer (const byte offset, byte cnt, byte & data[ ]) [inline]

Get hi-speed port input buffer data. This method reads count bytes of data from the hi-speed port input buffer and writes it to the buffer provided. Parameters: offset A constant offset into the hi-speed port input buffer. cnt The number of bytes to read. data The byte array reference which will contain the data read from the hi-speed port input buffer. Examples: ex_GetHSInputBuffer.nxc.

6.51.2.30

void GetHSOutputBuffer (const byte offset, byte cnt, byte & data[ ]) [inline]

Get hi-speed port output buffer data. This method reads count bytes of data from the hi-speed port output buffer and writes it to the buffer provided. Parameters: offset A constant offset into the hi-speed port output buffer. cnt The number of bytes to read. data The byte array reference which will contain the data read from the hi-speed port output buffer.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

442

Examples: ex_GetHSOutputBuffer.nxc.

6.51.2.31

void GetUSBInputBuffer (const byte offset, byte cnt, byte & data[ ]) [inline]

Get usb input buffer data. This method reads count bytes of data from the usb input buffer and writes it to the buffer provided. Parameters: offset A constant offset into the usb input buffer. cnt The number of bytes to read. data The byte array reference which will contain the data read from the usb input buffer. Examples: ex_GetUSBInputBuffer.nxc.

6.51.2.32

void GetUSBOutputBuffer (const byte offset, byte cnt, byte & data[ ]) [inline]

Get usb output buffer data. This method reads count bytes of data from the usb output buffer and writes it to the buffer provided. Parameters: offset A constant offset into the usb output buffer. cnt The number of bytes to read. data The byte array reference which will contain the data read from the usb output buffer. Examples: ex_GetUSBOutputBuffer.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

443

6.51.2.33

void GetUSBPollBuffer (const byte offset, byte cnt, byte & data[ ]) [inline]

Get usb poll buffer data. This method reads count bytes of data from the usb poll buffer and writes it to the buffer provided. Parameters: offset A constant offset into the usb poll buffer. cnt The number of bytes to read. data The byte array reference which will contain the data read from the usb poll buffer. Examples: ex_GetUSBPollBuffer.nxc.

6.51.2.34

int HSDataMode (void) [inline]

Get hi-speed port datamode. This method returns the value of the hi-speed port data mode. Returns: The hi-speed port data mode. See Data mode constants. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Examples: ex_DataMode.nxc.

6.51.2.35

byte HSFlags (void) [inline]

Get hi-speed port ags. This method returns the value of the hi-speed port ags. Returns: The hi-speed port ags. See Hi-speed port ags constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

444

Examples: ex_HSFlags.nxc.

6.51.2.36

byte HSInputBufferInPtr (void) [inline]

Get hi-speed port input buffer in-pointer. This method returns the value of the input pointer of the hi-speed port input buffer. Returns: The hi-speed port input buffers in-pointer value. Examples: ex_HSInputBufferInPtr.nxc.

6.51.2.37

byte HSInputBufferOutPtr (void) [inline]

Get hi-speed port input buffer out-pointer. This method returns the value of the output pointer of the hi-speed port input buffer. Returns: The hi-speed port input buffers out-pointer value. Examples: ex_HSInputBufferOutPtr.nxc.

6.51.2.38

int HSMode (void) [inline]

Get hi-speed port mode. This method returns the value of the hi-speed port mode. Returns: The hi-speed port mode (data bits, stop bits, parity). See Hi-speed port data bits constants, Hi-speed port stop bits constants, Hi-speed port parity constants, and Hi-speed port combined UART constants.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

445

Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Examples: ex_HSMode.nxc.

6.51.2.39

byte HSOutputBufferInPtr (void) [inline]

Get hi-speed port output buffer in-pointer. This method returns the value of the input pointer of the hi-speed port output buffer. Returns: The hi-speed port output buffers in-pointer value. Examples: ex_HSOutputBufferInPtr.nxc.

6.51.2.40

byte HSOutputBufferOutPtr (void) [inline]

Get hi-speed port output buffer out-pointer. This method returns the value of the output pointer of the hi-speed port output buffer. Returns: The hi-speed port output buffers out-pointer value. Examples: ex_HSOutputBufferOutPtr.nxc.

6.51.2.41

byte HSSpeed (void) [inline]

Get hi-speed port speed. This method returns the value of the hi-speed port speed (baud rate).

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

446

Returns: The hi-speed port speed (baud rate). See Hi-speed port baud rate constants. Examples: ex_HSSpeed.nxc.

6.51.2.42

byte HSState (void) [inline]

Get hi-speed port state. This method returns the value of the hi-speed port state. Returns: The hi-speed port state. See Hi-speed port state constants. Examples: ex_HSState.nxc.

6.51.2.43

char ReceiveMessage (byte queue, bool clear, string & msg) [inline]

Read a message from a queue/mailbox. Read a message from a mailbox and optionally remove it. If the local mailbox is empty and this NXT is the master then it attempts to poll one of its slave NXTs for a message from the response mailbox that corresponds to the specied local mailbox number. Parameters: queue The mailbox number. See Mailbox constants. clear A ag indicating whether to remove the message from the mailbox after it has been read. msg The message that is read from the mailbox. Returns: A char value indicating whether the function call succeeded or not.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

447

6.51.2.44

char ReceiveRemoteBool (byte queue, bool clear, bool & bval) [inline]

Read a boolean value from a queue/mailbox. Read a boolean value from a mailbox and optionally remove it. If the local mailbox is empty and this NXT is the master then it attempts to poll one of its slave NXTs for a message from the response mailbox that corresponds to the specied local mailbox number. Parameters: queue The mailbox number. See Mailbox constants. clear A ag indicating whether to remove the message from the mailbox after it has been read. bval The boolean value that is read from the mailbox. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_ReceiveRemoteBool.nxc, and ex_ReceiveRemoteNumber.nxc.

6.51.2.45

char ReceiveRemoteMessageEx (byte queue, bool clear, string & str, long & val, bool & bval) [inline]

Read a value from a queue/mailbox. Read a value from a mailbox and optionally remove it. If the local mailbox is empty and this NXT is the master then it attempts to poll one of its slave NXTs for a message from the response mailbox that corresponds to the specied local mailbox number. Output the value in string, number, and boolean form. Parameters: queue The mailbox number. See Mailbox constants. clear A ag indicating whether to remove the message from the mailbox after it has been read. str The string value that is read from the mailbox. val The numeric value that is read from the mailbox. bval The boolean value that is read from the mailbox.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

448

Returns: A char value indicating whether the function call succeeded or not. Examples: ex_ReceiveRemoteMessageEx.nxc.

6.51.2.46

char ReceiveRemoteNumber (byte queue, bool clear, long & val) [inline]

Read a numeric value from a queue/mailbox. Read a numeric value from a mailbox and optionally remove it. If the local mailbox is empty and this NXT is the master then it attempts to poll one of its slave NXTs for a message from the response mailbox that corresponds to the specied local mailbox number. Parameters: queue The mailbox number. See Mailbox constants. clear A ag indicating whether to remove the message from the mailbox after it has been read. val The numeric value that is read from the mailbox. Returns: A char value indicating whether the function call succeeded or not.

6.51.2.47

char ReceiveRemoteString (byte queue, bool clear, string & str) [inline]

Read a string value from a queue/mailbox. Read a string value from a mailbox and optionally remove it. If the local mailbox is empty and this NXT is the master then it attempts to poll one of its slave NXTs for a message from the response mailbox that corresponds to the specied local mailbox number. Parameters: queue The mailbox number. See Mailbox constants. clear A ag indicating whether to remove the message from the mailbox after it has been read. str The string value that is read from the mailbox.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

449

Returns: A char value indicating whether the function call succeeded or not. Examples: ex_ReceiveRemoteString.nxc.

6.51.2.48

bool RemoteConnectionIdle (byte conn) [inline]

Check if remote connection is idle. Check whether a Bluetooth or RS485 hi-speed port connection is idle, i.e., not currently sending data. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. Returns: A boolean value indicating whether the connection is idle or busy. Warning: Checking the status of the RS485 hi-speed connection requires the enhanced NBC/NXC rmware Examples: ex_RemoteConnectionIdle.nxc.

6.51.2.49

char RemoteConnectionWrite (byte conn, byte buffer[ ]) [inline]

Write to a remote connection. This method tells the NXT rmware to write the data in the buffer to the device on the specied connection. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

450

buffer The data to be written (up to 128 bytes) Returns: A char value indicating whether the function call succeeded or not. Warning: Writing to the RS485 hi-speed connection requires the enhanced NBC/NXC rmware Examples: ex_RemoteConnectionWrite.nxc.

6.51.2.50

char RS485Control (byte cmd, byte baud, unsigned int mode) [inline]

Control the RS485 port. Control the RS485 hi-speed port using the specied parameters. Parameters: cmd The control command to send to the port. See Hi-speed port SysCommHSControl constants. baud The baud rate for the RS485 port. See Hi-speed port baud rate constants. mode The RS485 port mode (data bits, stop bits, parity). See Hi-speed port data bits constants, Hi-speed port stop bits constants, Hi-speed port parity constants, and Hi-speed port combined UART constants. Returns: A char value indicating whether the function call succeeded or not. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_RS485Receive.nxc, and ex_RS485Send.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

451

6.51.2.51

bool RS485DataAvailable (void) [inline]

Check for RS485 available data. Check the RS485 hi-speed port for available data. Returns: A value indicating whether data is available or not. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_RS485Receive.nxc.

6.51.2.52

char RS485Disable (void) [inline]

Disable RS485. Turn off the RS485 port. Returns: A char value indicating whether the function call succeeded or not. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_RS485Receive.nxc, and ex_RS485Send.nxc.

6.51.2.53

char RS485Enable (void) [inline]

Enable RS485. Turn on the RS485 hi-speed port so that it can be used. Returns: A char value indicating whether the function call succeeded or not.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

452

Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_RS485Receive.nxc, and ex_RS485Send.nxc.

6.51.2.54

char RS485Initialize (void) [inline]

Initialize RS485 port. Initialize the RS485 UART port to its default values. The baud rate is set to 921600 and the mode is set to 8N1 (8 data bits, no parity, 1 stop bit). Data cannot be sent or received over the RS485 port until the port is congured as as a hi-speed port, the port is turned on, and the UART is initialized. Returns: A char value indicating whether the function call succeeded or not. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_RS485Receive.nxc, and ex_RS485Send.nxc.

6.51.2.55

char RS485Read (byte & buffer[ ]) [inline]

Read RS485 data. Read data from the RS485 hi-speed port. Parameters: buffer A byte array that will contain the data read from the RS485 port. Returns: A char value indicating whether the function call succeeded or not. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_RS485Receive.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

453

6.51.2.56

bool RS485SendingData (void) [inline]

Is RS485 sending data. Check whether the RS485 is actively sending data. Returns: A value indicating whether data is being sent or not. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_RS485Send.nxc.

6.51.2.57

void RS485Status (bool & sendingData, bool & dataAvail) [inline]

Check RS485 status. Check the status of the RS485 hi-speed port. Parameters: sendingData A boolean value set to true on output if data is being sent. dataAvail A boolean value set to true on output if data is available to be read. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_RS485Receive.nxc, and ex_RS485Send.nxc.

6.51.2.58

char RS485Uart (byte baud, unsigned int mode) [inline]

Congure RS485 UART. Congure the RS485 UART parameters, including baud rate, data bits, stop bits, and parity.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

454

Parameters: baud The baud rate for the RS485 port. See Hi-speed port baud rate constants. mode The RS485 port mode (data bits, stop bits, parity). See Hi-speed port data bits constants, Hi-speed port stop bits constants, Hi-speed port parity constants, and Hi-speed port combined UART constants. Returns: A char value indicating whether the function call succeeded or not. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_RS485Receive.nxc, and ex_RS485Send.nxc.

6.51.2.59

char RS485Write (byte buffer[ ]) [inline]

Write RS485 data. Write data to the RS485 hi-speed port. Parameters: buffer A byte array containing the data to write to the RS485 port. Returns: A char value indicating whether the function call succeeded or not. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_RS485Send.nxc.

6.51.2.60

char SendMessage (byte queue, string msg) [inline]

Send a message to a queue/mailbox. Write a message into a local mailbox.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

455

Parameters: queue The mailbox number. See Mailbox constants. msg The message to write to the mailbox. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_SendMessage.nxc.

6.51.2.61

char SendRemoteBool (byte conn, byte queue, bool bval) [inline]

Send a boolean value to a remote mailbox. Send a boolean value on the specied connection to the specied remote mailbox number. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. queue The mailbox number. See Mailbox constants. bval The boolean value to send. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_SendRemoteBool.nxc.

6.51.2.62

char SendRemoteNumber (byte conn, byte queue, long val) [inline]

Send a numeric value to a remote mailbox. Send a numeric value on the specied connection to the specied remote mailbox number. Use RemoteConnectionIdle to determine when this write request is completed.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

456

Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. queue The mailbox number. See Mailbox constants. val The numeric value to send. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_SendRemoteNumber.nxc.

6.51.2.63

char SendRemoteString (byte conn, byte queue, string str) [inline]

Send a string value to a remote mailbox. Send a string value on the specied connection to the specied remote mailbox number. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. queue The mailbox number. See Mailbox constants. str The string value to send. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_SendRemoteString.nxc.

6.51.2.64

char SendResponseBool (byte queue, bool bval) [inline]

Write a boolean value to a local response mailbox. Write a boolean value to a response mailbox (the mailbox number + 10).
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

457

Parameters: queue The mailbox number. See Mailbox constants. This function shifts the specied value into the range of response mailbox numbers by adding 10. bval The boolean value to write. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_SendResponseBool.nxc.

6.51.2.65

char SendResponseNumber (byte queue, long val) [inline]

Write a numeric value to a local response mailbox. Write a numeric value to a response mailbox (the mailbox number + 10). Parameters: queue The mailbox number. See Mailbox constants. This function shifts the specied value into the range of response mailbox numbers by adding 10. val The numeric value to write. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_SendResponseNumber.nxc.

6.51.2.66

char SendResponseString (byte queue, string str) [inline]

Write a string value to a local response mailbox. Write a string value to a response mailbox (the mailbox number + 10). Parameters: queue The mailbox number. See Mailbox constants. This function shifts the specied value into the range of response mailbox numbers by adding 10.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

458

str The string value to write. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_SendResponseString.nxc.

6.51.2.67

char SendRS485Bool (bool bval) [inline]

Write RS485 boolean. Write a boolean value to the RS485 hi-speed port. Parameters: bval A boolean value to write over the RS485 port. Returns: A char value indicating whether the function call succeeded or not. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_RS485Send.nxc.

6.51.2.68

char SendRS485Number (long val) [inline]

Write RS485 numeric. Write a numeric value to the RS485 hi-speed port. Parameters: val A numeric value to write over the RS485 port. Returns: A char value indicating whether the function call succeeded or not.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

459

Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_RS485Send.nxc.

6.51.2.69

char SendRS485String (string str) [inline]

Write RS485 string. Write a string value to the RS485 hi-speed port. Parameters: str A string value to write over the RS485 port. Returns: A char value indicating whether the function call succeeded or not. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_RS485Send.nxc.

6.51.2.70

void SetBTDataMode (const byte dataMode) [inline]

Set Bluetooth data mode. This method sets the value of the Bluetooth data mode. Parameters: dataMode The Bluetooth data mode. See Data mode constants. Must be a constant. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Examples: ex_DataMode.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

460

6.51.2.71

void SetBTInputBuffer (const byte offset, byte cnt, byte data[ ]) [inline]

Set bluetooth input buffer data. Write cnt bytes of data to the bluetooth input buffer at offset. Parameters: offset A constant offset into the input buffer cnt The number of bytes to write data A byte array containing the data to write Examples: ex_SetBTInputBuffer.nxc.

6.51.2.72

void SetBTInputBufferInPtr (byte n) [inline]

Set bluetooth input buffer in-pointer. Set the value of the input buffer in-pointer. Parameters: n The new in-pointer value (0..127). Examples: ex_SetBTInputBufferInPtr.nxc.

6.51.2.73

void SetBTInputBufferOutPtr (byte n) [inline]

Set bluetooth input buffer out-pointer. Set the value of the input buffer out-pointer. Parameters: n The new out-pointer value (0..127). Examples: ex_SetBTInputBufferOutPtr.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

461

6.51.2.74

void SetBTOutputBuffer (const byte offset, byte cnt, byte data[ ]) [inline]

Set bluetooth output buffer data. Write cnt bytes of data to the bluetooth output buffer at offset. Parameters: offset A constant offset into the output buffer cnt The number of bytes to write data A byte array containing the data to write Examples: ex_SetBTOutputBuffer.nxc.

6.51.2.75

void SetBTOutputBufferInPtr (byte n) [inline]

Set bluetooth output buffer in-pointer. Set the value of the output buffer in-pointer. Parameters: n The new in-pointer value (0..127). Examples: ex_SetBTOutputBufferInPtr.nxc.

6.51.2.76

void SetBTOutputBufferOutPtr (byte n) [inline]

Set bluetooth output buffer out-pointer. Set the value of the output buffer out-pointer. Parameters: n The new out-pointer value (0..127). Examples: ex_SetBTOutputBufferOutPtr.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

462

6.51.2.77

void SetHSDataMode (const byte dataMode) [inline]

Set hi-speed port data mode. This method sets the value of the hi-speed port data mode. Parameters: dataMode The hi-speed port data mode. See Data mode constants. Must be a constant. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Examples: ex_DataMode.nxc.

6.51.2.78

void SetHSFlags (byte hsFlags) [inline]

Set hi-speed port ags. This method sets the value of the hi-speed port ags. Parameters: hsFlags The hi-speed port ags. See Hi-speed port ags constants. Examples: ex_SetHSFlags.nxc.

6.51.2.79

void SetHSInputBuffer (const byte offset, byte cnt, byte data[ ]) [inline]

Set hi-speed port input buffer data. Write cnt bytes of data to the hi-speed port input buffer at offset. Parameters: offset A constant offset into the input buffer cnt The number of bytes to write data A byte array containing the data to write

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

463

Examples: ex_SetHSInputBuffer.nxc.

6.51.2.80

void SetHSInputBufferInPtr (byte n) [inline]

Set hi-speed port input buffer in-pointer. Set the value of the input buffer in-pointer. Parameters: n The new in-pointer value (0..127). Examples: ex_SetHSInputBufferInPtr.nxc.

6.51.2.81

void SetHSInputBufferOutPtr (byte n) [inline]

Set hi-speed port input buffer out-pointer. Set the value of the input buffer out-pointer. Parameters: n The new out-pointer value (0..127). Examples: ex_SetHSInputBufferOutPtr.nxc.

6.51.2.82

void SetHSMode (unsigned int hsMode) [inline]

Set hi-speed port mode. This method sets the value of the hi-speed port mode. Parameters: hsMode The hi-speed port mode (data bits, stop bits, parity). See Hi-speed port data bits constants, Hi-speed port stop bits constants, Hi-speed port parity constants, and Hi-speed port combined UART constants. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

464

Examples: ex_sethsmode.nxc.

6.51.2.83

void SetHSOutputBuffer (const byte offset, byte cnt, byte data[ ]) [inline]

Set hi-speed port output buffer data. Write cnt bytes of data to the hi-speed port output buffer at offset. Parameters: offset A constant offset into the output buffer cnt The number of bytes to write data A byte array containing the data to write Examples: ex_SetHSOutputBuffer.nxc.

6.51.2.84

void SetHSOutputBufferInPtr (byte n) [inline]

Set hi-speed port output buffer in-pointer. Set the value of the output buffer in-pointer. Parameters: n The new in-pointer value (0..127). Examples: ex_SetHSOutputBufferInPtr.nxc.

6.51.2.85

void SetHSOutputBufferOutPtr (byte n) [inline]

Set hi-speed port output buffer out-pointer. Set the value of the output buffer outpointer. Parameters: n The new out-pointer value (0..127).
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

465

Examples: ex_SetHSOutputBufferOutPtr.nxc.

6.51.2.86

void SetHSSpeed (byte hsSpeed) [inline]

Set hi-speed port speed. This method sets the value of the hi-speed port speed (baud rate). Parameters: hsSpeed The hi-speed port speed (baud rate). See Hi-speed port baud rate constants. Examples: ex_SetHSSpeed.nxc.

6.51.2.87

void SetHSState (byte hsState) [inline]

Set hi-speed port state. This method sets the value of the hi-speed port state. Parameters: hsState The hi-speed port state. See Hi-speed port state constants. Examples: ex_SetHSState.nxc.

6.51.2.88

void SetUSBInputBuffer (const byte offset, byte cnt, byte data[ ]) [inline]

Set USB input buffer data. Write cnt bytes of data to the USB input buffer at offset. Parameters: offset A constant offset into the input buffer cnt The number of bytes to write

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

466

data A byte array containing the data to write Examples: ex_SetUSBInputBuffer.nxc.

6.51.2.89

void SetUSBInputBufferInPtr (byte n) [inline]

Set USB input buffer in-pointer. Set the value of the input buffer in-pointer. Parameters: n The new in-pointer value (0..63). Examples: ex_SetUSBInputBufferInPtr.nxc.

6.51.2.90

void SetUSBInputBufferOutPtr (byte n) [inline]

Set USB input buffer out-pointer. Set the value of the input buffer out-pointer. Parameters: n The new out-pointer value (0..63). Examples: ex_SetUSBInputBufferOutPtr.nxc.

6.51.2.91

void SetUSBOutputBuffer (const byte offset, byte cnt, byte data[ ]) [inline]

Set USB output buffer data. Write cnt bytes of data to the USB output buffer at offset. Parameters: offset A constant offset into the output buffer cnt The number of bytes to write
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

467

data A byte array containing the data to write Examples: ex_SetUSBOutputBuffer.nxc.

6.51.2.92

void SetUSBOutputBufferInPtr (byte n) [inline]

Set USB output buffer in-pointer. Set the value of the output buffer in-pointer. Parameters: n The new in-pointer value (0..63). Examples: ex_SetUSBOutputBufferInPtr.nxc.

6.51.2.93

void SetUSBOutputBufferOutPtr (byte n) [inline]

Set USB output buffer out-pointer. Set the value of the output buffer out-pointer. Parameters: n The new out-pointer value (0..63). Examples: ex_SetUSBOutputBufferOutPtr.nxc.

6.51.2.94

void SetUSBPollBuffer (const byte offset, byte cnt, byte data[ ]) [inline]

Set USB poll buffer data. Write cnt bytes of data to the USB poll buffer at offset. Parameters: offset A constant offset into the poll buffer cnt The number of bytes to write
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

468

data A byte array containing the data to write Examples: ex_SetUSBPollBuffer.nxc.

6.51.2.95

void SetUSBPollBufferInPtr (byte n) [inline]

Set USB poll buffer in-pointer. Set the value of the poll buffer in-pointer. Parameters: n The new in-pointer value (0..63). Examples: ex_SetUSBPollBufferInPtr.nxc.

6.51.2.96

void SetUSBPollBufferOutPtr (byte n) [inline]

Set USB poll buffer out-pointer. Set the value of the poll buffer out-pointer. Parameters: n The new out-pointer value (0..63). Examples: ex_SetUSBPollBufferOutPtr.nxc.

6.51.2.97

void SetUSBState (byte usbState) [inline]

Set USB state. This method sets the value of the USB state. Parameters: usbState The USB state. Examples: ex_SetUsbState.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

469

6.51.2.98

void SysCommBTCheckStatus (CommBTCheckStatusType & args)

Check Bluetooth connection status. This function lets you check the status of a Bluetooth connection using the values specied via the CommBTCheckStatusType structure. Parameters: args The CommBTCheckStatusType structure containing the needed parameters. Examples: ex_syscommbtcheckstatus.nxc.

6.51.2.99

void SysCommBTConnection (CommBTConnectionType & args) [inline]

Connect or disconnect a bluetooth device. This function lets you connect or disconnect a bluetooth device using the values specied via the CommBTConnectionType structure. Parameters: args The CommBTConnectionType structure containing the needed parameters. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_syscommbtconnection.nxc.

6.51.2.100

void SysCommBTOnOff (CommBTOnOffType & args) [inline]

Turn on or off the bluetooth subsystem. This function lets you turn on or off the bluetooth subsystem using the values specied via the CommBTOnOffType structure. Parameters: args The CommBTOnOffType structure containing the needed parameters.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

470

Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_SysCommBTOnOff.nxc.

6.51.2.101

void SysCommBTWrite (CommBTWriteType & args)

Write data to a Bluetooth connection. This function lets you write to a Bluetooth connection using the values specied via the CommBTWriteType structure. Parameters: args The CommBTWriteType structure containing the needed parameters. Examples: ex_syscommbtwrite.nxc.

6.51.2.102

void SysCommExecuteFunction (CommExecuteFunctionType & args) [inline]

Execute any Comm module command. This function lets you directly execute the Comm modules primary function using the values specied via the CommExecuteFunctionType structure. Parameters: args The CommExecuteFunctionType structure containing the needed parameters. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_syscommexecutefunction.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

471

6.51.2.103

void SysCommHSCheckStatus (CommHSCheckStatusType & args) [inline]

Check the hi-speed port status. This function lets you check the hi-speed port status using the values specied via the CommHSCheckStatusType structure. Parameters: args The CommHSCheckStatusType structure containing the needed parameters. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_SysCommHSCheckStatus.nxc.

6.51.2.104

void SysCommHSControl (CommHSControlType & args) [inline]

Control the hi-speed port. This function lets you control the hi-speed port using the values specied via the CommHSControlType structure. Parameters: args The CommHSControlType structure containing the needed parameters. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_SysCommHSControl.nxc.

6.51.2.105

void SysCommHSRead (CommHSReadWriteType & args) [inline]

Read from the hi-speed port. This function lets you read from the hi-speed port using the values specied via the CommHSReadWriteType structure.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

472

Parameters: args The CommHSReadWriteType structure containing the needed parameters. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_SysCommHSRead.nxc.

6.51.2.106

void SysCommHSWrite (CommHSReadWriteType & args) [inline]

Write to the hi-speed port. This function lets you write to the hi-speed port using the values specied via the CommHSReadWriteType structure. Parameters: args The CommHSReadWriteType structure containing the needed parameters. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_SysCommHSWrite.nxc.

6.51.2.107

void SysMessageRead (MessageReadType & args)

Read message. This function lets you read a message from a queue (aka mailbox) using the values specied via the MessageReadType structure. Parameters: args The MessageReadType structure containing the needed parameters. Examples: ex_sysmessageread.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

473

6.51.2.108

void SysMessageWrite (MessageWriteType & args)

Write message. This function lets you write a message to a queue (aka mailbox) using the values specied via the MessageWriteType structure. Parameters: args The MessageWriteType structure containing the needed parameters. Examples: ex_sysmessagewrite.nxc.

6.51.2.109

byte USBInputBufferInPtr (void) [inline]

Get usb port input buffer in-pointer. This method returns the value of the input pointer of the usb port input buffer. Returns: The USB port input buffers in-pointer value. Examples: ex_USBInputBufferInPtr.nxc.

6.51.2.110

byte USBInputBufferOutPtr (void) [inline]

Get usb port input buffer out-pointer. This method returns the value of the output pointer of the usb port input buffer. Returns: The USB port input buffers out-pointer value. Examples: ex_USBInputBufferOutPtr.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.51

Comm module functions

474

6.51.2.111

byte USBOutputBufferInPtr (void) [inline]

Get usb port output buffer in-pointer. This method returns the value of the input pointer of the usb port output buffer. Returns: The USB port output buffers in-pointer value. Examples: ex_USBOutputBufferInPtr.nxc.

6.51.2.112

byte USBOutputBufferOutPtr (void) [inline]

Get usb port output buffer out-pointer. This method returns the value of the output pointer of the usb port output buffer. Returns: The USB port output buffers out-pointer value. Examples: ex_USBOutputBufferOutPtr.nxc.

6.51.2.113

byte USBPollBufferInPtr (void) [inline]

Get usb port poll buffer in-pointer. This method returns the value of the input pointer of the usb port poll buffer. Returns: The USB port poll buffers in-pointer value. Examples: ex_USBPollBufferInPtr.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.52

Direct Command functions

475

6.51.2.114

byte USBPollBufferOutPtr (void) [inline]

Get usb port poll buffer out-pointer. This method returns the value of the output pointer of the usb port poll buffer. Returns: The USB port poll buffers out-pointer value. Examples: ex_USBPollBufferOutPtr.nxc, and ex_UsbState.nxc.

6.51.2.115

byte USBState (void) [inline]

Get USB state. This method returns the value of the USB state. Returns: The USB state.

6.51.2.116

void UseRS485 (void) [inline]

Use the RS485 port. Congure port 4 for RS485 usage. Examples: ex_RS485Receive.nxc, and ex_RS485Send.nxc.

6.52

Direct Command functions

Functions for sending direct commands to another NXT. Functions char RemoteKeepAlive (byte conn)
Send a KeepAlive message.

char RemoteMessageRead (byte conn, byte queue)


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.52

Direct Command functions

476

Send a MessageRead message.

char RemoteMessageWrite (byte conn, byte queue, string msg)


Send a MessageWrite message.

char RemotePlaySoundFile (byte conn, string lename, bool bloop)


Send a PlaySoundFile message.

char RemotePlayTone (byte conn, unsigned int frequency, unsigned int duration)
Send a PlayTone message.

char RemoteResetMotorPosition (byte conn, byte port, bool brelative)


Send a ResetMotorPosition message.

char RemoteResetScaledValue (byte conn, byte port)


Send a ResetScaledValue message.

char RemoteSetInputMode (byte conn, byte port, byte type, byte mode)
Send a SetInputMode message.

char RemoteSetOutputState (byte conn, byte port, char speed, byte mode, byte regmode, char turnpct, byte runstate, unsigned long tacholimit)
Send a SetOutputMode message.

char RemoteStartProgram (byte conn, string lename)


Send a StartProgram message.

char RemoteStopProgram (byte conn)


Send a StopProgram message.

char RemoteStopSound (byte conn)


Send a StopSound message.

char RemoteGetOutputState (byte conn, OutputStateType &params)


Send a GetOutputState message.

char RemoteGetInputValues (byte conn, InputValuesType &params)


Send a GetInputValues message.

char RemoteGetBatteryLevel (byte conn, int &value)


Send a GetBatteryLevel message.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.52

Direct Command functions

477

char RemoteLowspeedGetStatus (byte conn, byte &value)


Send a LowspeedGetStatus message.

char RemoteLowspeedRead (byte conn, byte port, byte &bread, byte &data[ ])
Send a LowspeedRead message.

char RemoteGetCurrentProgramName (byte conn, string &name)


Send a GetCurrentProgramName message.

char RemoteDatalogRead (byte conn, bool remove, byte &cnt, byte &log[ ])
Send a DatalogRead message.

char RemoteGetContactCount (byte conn, byte &cnt)


Send a GetContactCount message.

char RemoteGetContactName (byte conn, byte idx, string &name)


Send a GetContactName message.

char RemoteGetConnectionCount (byte conn, byte &cnt)


Send a GetConnectionCount message.

char RemoteGetConnectionName (byte conn, byte idx, string &name)


Send a GetConnectionName message.

char RemoteGetProperty (byte conn, byte property, variant &value)


Send a GetProperty message.

char RemoteResetTachoCount (byte conn, byte port)


Send a ResetTachoCount message.

char RemoteDatalogSetTimes (byte conn, long synctime)


Send a DatalogSetTimes message.

char RemoteSetProperty (byte conn, byte prop, variant value)


Send a SetProperty message.

char RemoteLowspeedWrite (byte conn, byte port, byte txlen, byte rxlen, byte data[ ])
Send a LowspeedWrite message.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.52

Direct Command functions

478

6.52.1

Detailed Description

Functions for sending direct commands to another NXT. 6.52.2 6.52.2.1 Function Documentation char RemoteDatalogRead (byte conn, bool remove, byte & cnt, byte & log[ ]) [inline]

Send a DatalogRead message. Send the DatalogRead direct command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. remove Remove the datalog message from the queue after reading it (true or false). cnt The number of bytes read from the datalog. log A byte array containing the datalog contents. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteDatalogRead.nxc.

6.52.2.2

char RemoteDatalogSetTimes (byte conn, long synctime) [inline]

Send a DatalogSetTimes message. Send the DatalogSetTimes direct command on the specied connection slot. Use RemoteConnectionIdle to determine when this write request is completed.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.52

Direct Command functions

479

Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. synctime The datalog sync time. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteDatalogSetTimes.nxc.

6.52.2.3

char RemoteGetBatteryLevel (byte conn, int & value) [inline]

Send a GetBatteryLevel message. Send the GetBatteryLevel direct command to the device on the specied connection. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. value The battery level value. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteGetBatteryLevel.nxc.

6.52.2.4

char RemoteGetConnectionCount (byte conn, byte & cnt) [inline]

Send a GetConnectionCount message. This method sends a GetConnectionCount direct command to the device on the specied connection.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.52

Direct Command functions

480

Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. cnt The number of connections. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteGetConnectionCount.nxc.

6.52.2.5

char RemoteGetConnectionName (byte conn, byte idx, string & name) [inline]

Send a GetConnectionName message. Send the GetConnectionName direct command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. idx The index of the connection. name The name of the specied connection. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteGetConnectionName.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.52

Direct Command functions

481

6.52.2.6

char RemoteGetContactCount (byte conn, byte & cnt) [inline]

Send a GetContactCount message. This method sends a GetContactCount direct command to the device on the specied connection. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. cnt The number of contacts. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteGetContactCount.nxc.

6.52.2.7

char RemoteGetContactName (byte conn, byte idx, string & name) [inline]

Send a GetContactName message. Send the GetContactName direct command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. idx The index of the contact. name The name of the specied contact.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.52

Direct Command functions

482

Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteGetContactName.nxc.

6.52.2.8

char RemoteGetCurrentProgramName (byte conn, string & name) [inline]

Send a GetCurrentProgramName message. This method sends a GetCurrentProgramName direct command to the device on the specied connection. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. name The current program name. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteGetCurrentProgramName.nxc.

6.52.2.9

char RemoteGetInputValues (byte conn, InputValuesType & params) [inline]

Send a GetInputValues message. Send the GetInputValues direct command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.52

Direct Command functions

483

Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. params The input and output parameters for the function call. See InputValuesType. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteGetInputValues.nxc.

6.52.2.10

char RemoteGetOutputState (byte conn, OutputStateType & params) [inline]

Send a GetOutputState message. Send the GetOutputState direct command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. params The input and output parameters for the function call. See OutputStateType. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteGetOutputState.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.52

Direct Command functions

484

6.52.2.11

char RemoteGetProperty (byte conn, byte property, variant & value) [inline]

Send a GetProperty message. Send the GetProperty direct command on the specied connection slot. Use RemoteConnectionIdle to determine when this write request is completed. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. property The property to read. See Property constants. value The property value. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteGetProperty.nxc.

6.52.2.12

char RemoteKeepAlive (byte conn) [inline]

Send a KeepAlive message. This method sends a KeepAlive direct command to the device on the specied connection. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteKeepAlive.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.52

Direct Command functions

485

6.52.2.13

char RemoteLowspeedGetStatus (byte conn, byte & value) [inline]

Send a LowspeedGetStatus message. This method sends a LowspeedGetStatus direct command to the device on the specied connection. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. value The count of available bytes to read. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteLowspeedGetStatus.nxc.

6.52.2.14

char RemoteLowspeedRead (byte conn, byte port, byte & bread, byte & data[ ]) [inline]

Send a LowspeedRead message. Send the LowspeedRead direct command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. port The input port from which to read I2C data. See Input port constants. bread The number of bytes read.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.52

Direct Command functions

486

data A byte array containing the data read from the I2C device. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteLowspeedRead.nxc.

6.52.2.15

char RemoteLowspeedWrite (byte conn, byte port, byte txlen, byte rxlen, byte data[ ]) [inline]

Send a LowspeedWrite message. Send the LowspeedWrite direct command on the specied connection slot. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. port The I2C port. See Input port constants. txlen The number of bytes you are writing to the I2C device. rxlen The number of bytes want to read from the I2C device. data A byte array containing the data you are writing to the device. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteLowspeedWrite.nxc.

6.52.2.16

char RemoteMessageRead (byte conn, byte queue) [inline]

Send a MessageRead message. This method sends a MessageRead direct command to the device on the specied connection. Use RemoteConnectionIdle to determine when this write request is completed.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.52

Direct Command functions

487

Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. queue The mailbox to read. See Mailbox constants. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteMessageRead.nxc.

6.52.2.17

char RemoteMessageWrite (byte conn, byte queue, string msg) [inline]

Send a MessageWrite message. This method sends a MessageWrite direct command to the device on the specied connection. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. queue The mailbox to write. See Mailbox constants. msg The message to write to the mailbox. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteMessageWrite.nxc.

6.52.2.18

char RemotePlaySoundFile (byte conn, string lename, bool bloop) [inline]

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.52

Direct Command functions

488

Send a PlaySoundFile message. Send the PlaySoundFile direct command on the specied connection slot. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. lename The name of the sound le to play. bloop A boolean value indicating whether to loop the sound le or not. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemotePlaySoundFile.nxc.

6.52.2.19

char RemotePlayTone (byte conn, unsigned int frequency, unsigned int duration) [inline]

Send a PlayTone message. Send the PlayTone direct command on the specied connection slot. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. frequency The frequency of the tone. duration The duration of the tone. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemotePlayTone.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.52

Direct Command functions

489

6.52.2.20

char RemoteResetMotorPosition (byte conn, byte port, bool brelative) [inline]

Send a ResetMotorPosition message. Send the ResetMotorPosition direct command on the specied connection slot. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. port The output port to reset. brelative A ag indicating whether the counter to reset is relative. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteResetMotorPosition.nxc.

6.52.2.21

char RemoteResetScaledValue (byte conn, byte port) [inline]

Send a ResetScaledValue message. Send the ResetScaledValue direct command on the specied connection slot. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. port The input port to reset. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteResetScaledValue.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.52

Direct Command functions

490

6.52.2.22

char RemoteResetTachoCount (byte conn, byte port) [inline]

Send a ResetTachoCount message. Send the ResetTachoCount direct command on the specied connection slot. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. port The output port to reset the tachometer count on. See Output port constants. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteResetTachoCount.nxc.

6.52.2.23

char RemoteSetInputMode (byte conn, byte port, byte type, byte mode) [inline]

Send a SetInputMode message. Send the SetInputMode direct command on the specied connection slot. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. port The input port to congure. See Input port constants. type The sensor type. See Sensor type constants. mode The sensor mode. See Sensor mode constants. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteSetInputMode.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.52

Direct Command functions

491

6.52.2.24

char RemoteSetOutputState (byte conn, byte port, char speed, byte mode, byte regmode, char turnpct, byte runstate, unsigned long tacholimit) [inline]

Send a SetOutputMode message. Send the SetOutputMode direct command on the specied connection slot. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. port The output port to congure. See Output port constants. speed The motor speed. (-100..100) mode The motor mode. See Output port mode constants. regmode The motor regulation mode. See Output port regulation mode constants. turnpct The motor synchronized turn percentage. (-100..100) runstate The motor run state. See Output port run state constants. tacholimit The motor tachometer limit. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteSetOutputState.nxc.

6.52.2.25

char RemoteSetProperty (byte conn, byte prop, variant value) [inline]

Send a SetProperty message. Send the SetProperty direct command on the specied connection slot. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.52

Direct Command functions

492

prop The property to set. See Property constants. value The new property value. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteSetProperty.nxc.

6.52.2.26

char RemoteStartProgram (byte conn, string lename) [inline]

Send a StartProgram message. Send the StartProgram direct command on the specied connection slot. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. lename The name of the program to start running. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteStartProgram.nxc.

6.52.2.27

char RemoteStopProgram (byte conn) [inline]

Send a StopProgram message. Send the StopProgram direct command on the specied connection slot. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.53

System Command functions

493

Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteStopProgram.nxc.

6.52.2.28

char RemoteStopSound (byte conn) [inline]

Send a StopSound message. Send the StopSound direct command on the specied connection slot. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteStopSound.nxc.

6.53

System Command functions

Functions for sending system commands to another NXT. Functions char RemoteOpenRead (byte conn, string lename, byte &handle, long &size)
Send an OpenRead message.

char RemoteOpenAppendData (byte conn, string lename, byte &handle, long &size)
Send an OpenAppendData message.

char RemoteDeleteFile (byte conn, string lename)


Send a DeleteFile message.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.53

System Command functions

494

char RemoteFindFirstFile (byte conn, string mask, byte &handle, string &name, long &size)
Send a FindFirstFile message.

char RemoteGetFirmwareVersion (byte conn, byte &pmin, byte &pmaj, byte &fmin, byte &fmaj)
Send a GetFirmwareVersion message.

char RemoteGetBluetoothAddress (byte conn, byte &btaddr[ ])


Send a GetBluetoothAddress message.

char RemoteGetDeviceInfo (byte conn, string &name, byte &btaddr[ ], byte &btsignal[ ], long &freemem)
Send a GetDeviceInfo message.

char RemoteDeleteUserFlash (byte conn)


Send a DeleteUserFlash message.

char RemoteOpenWrite (byte conn, string lename, long size, byte &handle)
Send an OpenWrite message.

char RemoteOpenWriteLinear (byte conn, string lename, long size, byte &handle)
Send an OpenWriteLinear message.

char RemoteOpenWriteData (byte conn, string lename, long size, byte &handle)
Send an OpenWriteData message.

char RemoteCloseFile (byte conn, byte handle)


Send a CloseFile message.

char RemoteFindNextFile (byte conn, byte &handle, string &name, long &size)
Send a FindNextFile message.

char RemotePollCommandLength (byte conn, byte bufnum, byte &length)


Send a PollCommandLength message.

char RemoteWrite (byte conn, byte &handle, int &numbytes, byte data[ ])
Send a Write message.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.53

System Command functions

495

char RemoteRead (byte conn, byte &handle, int &numbytes, byte &data[ ])
Send a Read message.

char RemoteIOMapRead (byte conn, long id, int offset, int &numbytes, byte &data[ ])
Send an IOMapRead message.

char RemotePollCommand (byte conn, byte bufnum, byte &len, byte &data[ ])
Send a PollCommand message.

char RemoteRenameFile (byte conn, string oldname, string newname)


Send a RenameFile message.

char RemoteBluetoothFactoryReset (byte conn)


Send a BluetoothFactoryReset message.

char RemoteIOMapWriteValue (byte conn, long id, int offset, variant value)
Send an IOMapWrite value message.

char RemoteIOMapWriteBytes (byte conn, long id, int offset, byte data[ ])
Send an IOMapWrite bytes message.

char RemoteSetBrickName (byte conn, string name)


Send a SetBrickName message.

6.53.1

Detailed Description

Functions for sending system commands to another NXT. 6.53.2 6.53.2.1 Function Documentation char RemoteBluetoothFactoryReset (byte conn) [inline]

Send a BluetoothFactoryReset message. This method sends a BluetoothFactoryReset system command to the device on the specied connection. Use RemoteConnectionIdle to determine when this write request is completed. This command cannot be sent over a bluetooth connection.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.53

System Command functions

496

Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteBluetoothFactoryReset.nxc.

6.53.2.2

char RemoteCloseFile (byte conn, byte handle) [inline]

Send a CloseFile message. Send the CloseFile system command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. handle The handle of the le to close. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteCloseFile.nxc.

6.53.2.3

char RemoteDeleteFile (byte conn, string lename) [inline]

Send a DeleteFile message. Send the DeleteFile system command on the specied connection slot.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.53

System Command functions

497

Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. lename The name of the le to delete. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteDeleteFile.nxc.

6.53.2.4

char RemoteDeleteUserFlash (byte conn) [inline]

Send a DeleteUserFlash message. This method sends a DeleteUserFlash system command to the device on the specied connection. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteDeleteUserFlash.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.53

System Command functions

498

6.53.2.5

char RemoteFindFirstFile (byte conn, string mask, byte & handle, string & name, long & size) [inline]

Send a FindFirstFile message. Send the FindFirstFile system command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. mask The lename mask for the les you want to nd. handle The handle of the found le. name The name of the found le. size The size of the found le. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteFindFirstFile.nxc.

6.53.2.6

char RemoteFindNextFile (byte conn, byte & handle, string & name, long & size) [inline]

Send a FindNextFile message. Send the FindNextFile system command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.53

System Command functions

499

handle The handle returned by the last FindFirstFile or FindNextFile call. name The name of the next found le. size The size of the next found le. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteFindNextFile.nxc.

6.53.2.7

char RemoteGetBluetoothAddress (byte conn, byte & btaddr[ ]) [inline]

Send a GetBluetoothAddress message. This method sends a GetBluetoothAddress system command to the device on the specied connection. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. btaddr The bluetooth address of the remote device. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteGetBluetoothAddress.nxc.

6.53.2.8

char RemoteGetDeviceInfo (byte conn, string & name, byte & btaddr[ ], byte & btsignal[ ], long & freemem) [inline]

Send a GetDeviceInfo message. This method sends a GetDeviceInfo system command to the device on the specied connection.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.53

System Command functions

500

Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. name The name of the remote device. btaddr The bluetooth address of the remote device. btsignal The signal strength of each connection on the remote device. freemem The number of bytes of free ash memory on the remote device. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteGetDeviceInfo.nxc.

6.53.2.9

char RemoteGetFirmwareVersion (byte conn, byte & pmin, byte & pmaj, byte & fmin, byte & fmaj) [inline]

Send a GetFirmwareVersion message. This method sends a GetFirmwareVersion system command to the device on the specied connection. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. pmin The protocol minor version byte. pmaj The protocol major version byte. fmin The rmware minor version byte. fmaj The rmware major version byte.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.53

System Command functions

501

Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteGetFirmwareVersion.nxc.

6.53.2.10

char RemoteIOMapRead (byte conn, long id, int offset, int & numbytes, byte & data[ ]) [inline]

Send an IOMapRead message. Send the IOMapRead system command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. id The ID of the module from which to read data. offset The offset into the IOMap structure from which to read. numbytes The number of bytes of data to read. Returns the number of bytes actually read. data A byte array containing the response data. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteIOMapRead.nxc.

6.53.2.11

char RemoteIOMapWriteBytes (byte conn, long id, int offset, byte data[ ]) [inline]

Send an IOMapWrite bytes message. Send the IOMapWrite system command on the specied connection slot to write the data provided. Use RemoteConnectionIdle to determine when this write request is completed.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.53

System Command functions

502

Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. id The ID of the module to which to write data. offset The offset into the IOMap structure to which to write. data A byte array containing the data you are writing to the IOMap structure. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteIOMapWriteBytes.nxc.

6.53.2.12

char RemoteIOMapWriteValue (byte conn, long id, int offset, variant value) [inline]

Send an IOMapWrite value message. Send the IOMapWrite system command on the specied connection slot to write the value provided. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. id The ID of the module to which to write data. offset The offset into the IOMap structure to which to write. value A scalar variable containing the value you are writing to the IOMap structure. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteIOMapWriteValue.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.53

System Command functions

503

6.53.2.13

char RemoteOpenAppendData (byte conn, string lename, byte & handle, long & size) [inline]

Send an OpenAppendData message. Send the OpenAppendData system command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. lename The name of the le to open for appending. handle The handle of the le. size The size of the le. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteOpenAppendData.nxc.

6.53.2.14

char RemoteOpenRead (byte conn, string lename, byte & handle, long & size) [inline]

Send an OpenRead message. Send the OpenRead system command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.53

System Command functions

504

lename The name of the le to open for reading. handle The handle of the le. size The size of the le. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteOpenRead.nxc.

6.53.2.15

char RemoteOpenWrite (byte conn, string lename, long size, byte & handle) [inline]

Send an OpenWrite message. Send the OpenWrite system command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. lename The name of the le to open for writing (i.e., create the le). size The size for the new le. handle The handle of the new le. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteOpenWrite.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.53

System Command functions

505

6.53.2.16

char RemoteOpenWriteData (byte conn, string lename, long size, byte & handle) [inline]

Send an OpenWriteData message. Send the OpenWriteData system command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. lename The name of the le to open for writing (i.e., create the le). size The size for the new le. handle The handle of the new le. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteOpenWriteData.nxc.

6.53.2.17

char RemoteOpenWriteLinear (byte conn, string lename, long size, byte & handle) [inline]

Send an OpenWriteLinear message. Send the OpenWriteLinear system command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.53

System Command functions

506

lename The name of the le to open for writing (i.e., create the le). size The size for the new le. handle The handle of the new le. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteOpenWriteLinear.nxc.

6.53.2.18

char RemotePollCommand (byte conn, byte bufnum, byte & len, byte & data[ ]) [inline]

Send a PollCommand message. Send the PollCommand system command on the specied connection slot to write the data provided. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. bufnum The buffer from which to read data (0=USBPoll, 1=HiSpeed). len The number of bytes to read. Returns the number of bytes actually read. data A byte array containing the response data. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemotePollCommand.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.53

System Command functions

507

6.53.2.19

char RemotePollCommandLength (byte conn, byte bufnum, byte & length) [inline]

Send a PollCommandLength message. Send the PollCommandLength system command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. bufnum The poll buffer you want to query (0=USBPoll, 1=HiSpeed). length The number of bytes available for polling. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemotePollCommandLength.nxc.

6.53.2.20

char RemoteRead (byte conn, byte & handle, int & numbytes, byte & data[ ]) [inline]

Send a Read message. Send the Read system command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. handle The handle of the le you are reading from.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.53

System Command functions

508

numbytes The number of bytes you want to read. Returns the number of bytes actually read. data A byte array containing the response data. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteRead.nxc.

6.53.2.21

char RemoteRenameFile (byte conn, string oldname, string newname) [inline]

Send a RenameFile message. Send the RenameFile system command on the specied connection slot to write the data provided. Use RemoteConnectionIdle to determine when this write request is completed. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. oldname The old lename. newname The new lename. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteRenameFile.nxc.

6.53.2.22

char RemoteSetBrickName (byte conn, string name) [inline]

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.53

System Command functions

509

Send a SetBrickName message. Send the SetBrickName system command on the specied connection slot to write the data provided. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. name The new brick name. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteSetBrickName.nxc.

6.53.2.23

char RemoteWrite (byte conn, byte & handle, int & numbytes, byte data[ ]) [inline]

Send a Write message. Send the Write system command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. handle The handle of the le you are writing to. numbytes The number of bytes actually written. data A byte array containing the data you are writing. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteWrite.nxc.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.54

Button module types

510

6.54

Button module types

Types used by various Button module functions. Data Structures struct ReadButtonType
Parameters for the ReadButton system call.

6.54.1

Detailed Description

Types used by various Button module functions.

6.55

Button module functions

Functions for accessing and modifying Button module features. Functions bool ButtonPressed (const byte btn, bool resetCount)
Check for button press.

byte ButtonCount (const byte btn, bool resetCount)


Get button press count.

char ReadButtonEx (const byte btn, bool reset, bool &pressed, unsigned int &count)
Read button information.

byte ButtonPressCount (const byte btn)


Get button press count.

byte ButtonLongPressCount (const byte btn)


Get button long press count.

byte ButtonShortReleaseCount (const byte btn)


Get button short release count.

byte ButtonLongReleaseCount (const byte btn)


Get button long release count.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.55

Button module functions

511

byte ButtonReleaseCount (const byte btn)


Get button release count.

byte ButtonState (const byte btn)


Get button state.

void SetButtonLongPressCount (const byte btn, const byte n)


Set button long press count.

void SetButtonLongReleaseCount (const byte btn, const byte n)


Set button long release count.

void SetButtonPressCount (const byte btn, const byte n)


Set button press count.

void SetButtonReleaseCount (const byte btn, const byte n)


Set button release count.

void SetButtonShortReleaseCount (const byte btn, const byte n)


Set button short release count.

void SetButtonState (const byte btn, const byte state)


Set button state.

void SysReadButton (ReadButtonType &args)


Read button.

6.55.1

Detailed Description

Functions for accessing and modifying Button module features. 6.55.2 6.55.2.1 Function Documentation byte ButtonCount (const byte btn, bool resetCount) [inline]

Get button press count. Return the number of times the specied button has been pressed since the last time the button press count was reset. Optionally clear the count after reading it.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.55

Button module functions

512

Parameters: btn The button to check. See Button name constants. resetCount Whether or not to reset the press counter. Returns: The button press count. Examples: ex_ButtonCount.nxc.

6.55.2.2

byte ButtonLongPressCount (const byte btn) [inline]

Get button long press count. Return the long press count of the specied button. Parameters: btn The button to check. See Button name constants. Returns: The button long press count. Examples: ex_ButtonLongPressCount.nxc.

6.55.2.3

byte ButtonLongReleaseCount (const byte btn) [inline]

Get button long release count. Return the long release count of the specied button. Parameters: btn The button to check. See Button name constants. Returns: The button long release count. Examples: ex_ButtonLongReleaseCount.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.55

Button module functions

513

6.55.2.4

byte ButtonPressCount (const byte btn) [inline]

Get button press count. Return the press count of the specied button. Parameters: btn The button to check. See Button name constants. Returns: The button press count. Examples: ex_ButtonPressCount.nxc, ex_SetAbortFlag.nxc, and ex_SetLongAbort.nxc.

6.55.2.5

bool ButtonPressed (const byte btn, bool resetCount) [inline]

Check for button press. This function checks whether the specied button is pressed or not. You may optionally reset the press count. Parameters: btn The button to check. See Button name constants. resetCount Whether or not to reset the press counter. Returns: A boolean value indicating whether the button is pressed or not. Examples: ex_buttonpressed.nxc, ex_HTGyroTest.nxc, ex_SetAbortFlag.nxc, and ex_SetLongAbort.nxc.

6.55.2.6

byte ButtonReleaseCount (const byte btn) [inline]

Get button release count. Return the release count of the specied button. Parameters: btn The button to check. See Button name constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.55

Button module functions

514

Returns: The button release count. Examples: ex_ButtonReleaseCount.nxc.

6.55.2.7

byte ButtonShortReleaseCount (const byte btn) [inline]

Get button short release count. Return the short release count of the specied button. Parameters: btn The button to check. See Button name constants. Returns: The button short release count. Examples: ex_ButtonShortReleaseCount.nxc.

6.55.2.8

byte ButtonState (const byte btn) [inline]

Get button state. Return the state of the specied button. See ButtonState constants. Parameters: btn The button to check. See Button name constants. Returns: The button state. Examples: ex_ButtonState.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.55

Button module functions

515

6.55.2.9

char ReadButtonEx (const byte btn, bool reset, bool & pressed, unsigned int & count) [inline]

Read button information. Read the specied button. Set the pressed and count parameters with the current state of the button. Optionally reset the press count after reading it. Parameters: btn The button to check. See Button name constants. reset Whether or not to reset the press counter. pressed The button pressed state. count The button press count. Returns: The function call result. Examples: ex_ReadButtonEx.nxc.

6.55.2.10

void SetButtonLongPressCount (const byte btn, const byte n) [inline]

Set button long press count. Set the long press count of the specied button. Parameters: btn The button number. See Button name constants. n The new long press count value. Examples: ex_SetButtonLongPressCount.nxc.

6.55.2.11

void SetButtonLongReleaseCount (const byte btn, const byte n) [inline]

Set button long release count. Set the long release count of the specied button.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.55

Button module functions

516

Parameters: btn The button number. See Button name constants. n The new long release count value. Examples: ex_SetButtonLongReleaseCount.nxc.

6.55.2.12

void SetButtonPressCount (const byte btn, const byte n) [inline]

Set button press count. Set the press count of the specied button. Parameters: btn The button number. See Button name constants. n The new press count value. Examples: ex_SetButtonPressCount.nxc.

6.55.2.13

void SetButtonReleaseCount (const byte btn, const byte n) [inline]

Set button release count. Set the release count of the specied button. Parameters: btn The button number. See Button name constants. n The new release count value. Examples: ex_SetButtonReleaseCount.nxc.

6.55.2.14

void SetButtonShortReleaseCount (const byte btn, const byte n) [inline]

Set button short release count. Set the short release count of the specied button.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.56

Ui module types

517

Parameters: btn The button number. See Button name constants. n The new short release count value. Examples: ex_SetButtonShortReleaseCount.nxc.

6.55.2.15

void SetButtonState (const byte btn, const byte state) [inline]

Set button state. Set the state of the specied button. Parameters: btn The button to check. See Button name constants. state The new button state. See ButtonState constants. Examples: ex_SetButtonState.nxc.

6.55.2.16

void SysReadButton (ReadButtonType & args) [inline]

Read button. This function lets you read button state information via the ReadButtonType structure. Parameters: args The ReadButtonType structure containing the needed parameters. Examples: ex_sysreadbutton.nxc.

6.56

Ui module types

Types used by various Ui module functions.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.57

Ui module functions

518

Data Structures struct SetSleepTimeoutType


Parameters for the SetSleepTimeout system call.

6.56.1

Detailed Description

Types used by various Ui module functions.

6.57

Ui module functions

Functions for accessing and modifying Ui module features. Functions byte CommandFlags (void)
Get command ags.

byte UIState (void)


Get UI module state.

byte UIButton (void)


Read UI button.

byte VMRunState (void)


Read VM run state.

byte BatteryState (void)


Get battery state.

byte BluetoothState (void)


Get bluetooth state.

byte UsbState (void)


Get UI module USB state.

byte SleepTimeout (void)


Read sleep timeout.

byte SleepTime (void)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.57

Ui module functions

519

Read sleep time.

byte SleepTimer (void)


Read sleep timer.

bool RechargeableBattery (void)


Read battery type.

byte Volume (void)


Read volume.

byte OnBrickProgramPointer (void)


Read the on brick program pointer value.

byte AbortFlag (void)


Read abort ag.

byte LongAbort (void)


Read long abort setting.

unsigned int BatteryLevel (void)


Get battery Level.

void SetCommandFlags (const byte cmdFlags)


Set command ags.

void SetUIButton (byte btn)


Set UI button.

void SetUIState (byte state)


Set UI state.

void SetVMRunState (const byte vmRunState)


Set VM run state.

void SetBatteryState (byte state)


Set battery state.

void SetBluetoothState (byte state)


Set bluetooth state.

void SetSleepTimeout (const byte n)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.57

Ui module functions

520

Set sleep timeout.

void SetSleepTime (const byte n)


Set sleep time.

void SetSleepTimer (const byte n)


Set the sleep timer.

void SetVolume (byte volume)


Set volume.

void SetOnBrickProgramPointer (byte obpStep)


Set on-brick program pointer.

void ForceOff (byte num)


Turn off NXT.

void SetAbortFlag (byte abortFlag)


Set abort ag.

void SetLongAbort (bool longAbort)


Set long abort.

void SysSetSleepTimeout (SetSleepTimeoutType &args)


Set system sleep timeout.

6.57.1

Detailed Description

Functions for accessing and modifying Ui module features. 6.57.2 6.57.2.1 Function Documentation byte AbortFlag (void) [inline]

Read abort ag. Return the enhanced NBC/NXC rmwares abort ag. Returns: The current abort ag value. See ButtonState constants.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.57

Ui module functions

521

Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_AbortFlag.nxc.

6.57.2.2

unsigned int BatteryLevel (void) [inline]

Get battery Level. Return the battery level in millivolts. Returns: The battery level Examples: util_battery_1.nxc, and util_battery_2.nxc.

6.57.2.3

byte BatteryState (void) [inline]

Get battery state. Return battery state information (0..4). Returns: The battery state (0..4) Examples: ex_BatteryState.nxc.

6.57.2.4

byte BluetoothState (void) [inline]

Get bluetooth state. Return the bluetooth state. Returns: The bluetooth state. See BluetoothState constants. Examples: ex_BluetoothState.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.57

Ui module functions

522

6.57.2.5

byte CommandFlags (void) [inline]

Get command ags. Return the command ags. Returns: Command ags. See CommandFlags constants Examples: ex_CommandFlags.nxc.

6.57.2.6

void ForceOff (byte num) [inline]

Turn off NXT. Force the NXT to turn off if the specied value is greater than zero. Parameters: num If greater than zero the NXT will turn off. Examples: ex_ForceOff.nxc.

6.57.2.7

byte LongAbort (void) [inline]

Read long abort setting. Return the enhanced NBC/NXC rmwares long abort setting. See also: AbortFlag Returns: The current abort ag value. See ButtonState constants. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_LongAbort.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.57

Ui module functions

523

6.57.2.8

byte OnBrickProgramPointer (void) [inline]

Read the on brick program pointer value. Return the current OBP (on-brick program) step Returns: On brick program pointer (step). Examples: ex_OnBrickProgramPointer.nxc.

6.57.2.9

bool RechargeableBattery (void) [inline]

Read battery type. Return whether the NXT has a rechargeable battery installed or not. Returns: Whether the battery is rechargeable or not. (false = no, true = yes) Examples: ex_RechargeableBattery.nxc.

6.57.2.10

void SetAbortFlag (byte abortFlag) [inline]

Set abort ag. Set the enhanced NBC/NXC rmwares program abort ag. By default the running program can be interrupted by a short press of the escape button. You can change this to any other button state ag. Parameters: abortFlag The new abort ag value. See ButtonState constants Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_SetAbortFlag.nxc, and ex_SetLongAbort.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.57

Ui module functions

524

6.57.2.11

void SetBatteryState (byte state) [inline]

Set battery state. Set battery state information. Parameters: state The desired battery state (0..4). Examples: ex_SetBatteryState.nxc.

6.57.2.12

void SetBluetoothState (byte state) [inline]

Set bluetooth state. Set the Bluetooth state. Parameters: state The desired bluetooth state. See BluetoothState constants. Examples: ex_SetBluetoothState.nxc.

6.57.2.13

void SetCommandFlags (const byte cmdFlags) [inline]

Set command ags. Set the command ags. Parameters: cmdFlags The new command ags. See CommandFlags constants. Examples: ex_SetCommandFlags.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.57

Ui module functions

525

6.57.2.14

void SetLongAbort (bool longAbort) [inline]

Set long abort. Set the enhanced NBC/NXC rmwares long abort setting (true or false). If set to true then a program has access the escape button. Aborting a program requires a long press of the escape button. Parameters: longAbort If true then require a long press of the escape button to abort a program, otherwise a short press will abort it. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_buttonpressed.nxc, SetLongAbort.nxc. ex_getchar.nxc, ex_SetAbortFlag.nxc, and ex_-

6.57.2.15

void SetOnBrickProgramPointer (byte obpStep) [inline]

Set on-brick program pointer. Set the current OBP (on-brick program) step. Parameters: obpStep The new on-brick program step. Examples: ex_SetOnBrickProgramPointer.nxc.

6.57.2.16

void SetSleepTime (const byte n) [inline]

Set sleep time. Set the NXT sleep timeout value to the specied number of minutes. Parameters: n The minutes to wait before sleeping.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.57

Ui module functions

526

See also: SetSleepTimeout, SleepTimeout Examples: ex_setsleeptime.nxc.

6.57.2.17

void SetSleepTimeout (const byte n) [inline]

Set sleep timeout. Set the NXT sleep timeout value to the specied number of minutes. Parameters: n The minutes to wait before sleeping. Examples: ex_SetSleepTimeout.nxc.

6.57.2.18

void SetSleepTimer (const byte n) [inline]

Set the sleep timer. Set the system sleep timer to the specied number of minutes. Parameters: n The minutes left on the timer. Examples: ex_SetSleepTimer.nxc.

6.57.2.19

void SetUIButton (byte btn) [inline]

Set UI button. Set user interface button information. Parameters: btn A user interface button value. See UIButton constants. Examples: ex_SetUIButton.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.57

Ui module functions

527

6.57.2.20

void SetUIState (byte state) [inline]

Set UI state. Set the user interface state. Parameters: state A user interface state value. See UIState constants. Examples: ex_SetUIState.nxc.

6.57.2.21

void SetVMRunState (const byte vmRunState) [inline]

Set VM run state. Set VM run state information. Parameters: vmRunState The desired VM run state. See VM run state constants. Warning: It is not a good idea to change the VM run state from within a running program unless you know what you are doing. Examples: ex_SetVMRunState.nxc.

6.57.2.22

void SetVolume (byte volume) [inline]

Set volume. Set the user interface volume level. Valid values are from 0 to 4. Parameters: volume The new volume level. Examples: ex_SetVolume.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.57

Ui module functions

528

6.57.2.23

byte SleepTime (void) [inline]

Read sleep time. Return the number of minutes that the NXT will remain on before it automatically shuts down. Returns: The sleep time value See also: SleepTimeout Examples: ex_sleeptime.nxc.

6.57.2.24

byte SleepTimeout (void) [inline]

Read sleep timeout. Return the number of minutes that the NXT will remain on before it automatically shuts down. Returns: The sleep timeout value Examples: ex_SleepTimeout.nxc.

6.57.2.25

byte SleepTimer (void) [inline]

Read sleep timer. Return the number of minutes left in the countdown to zero from the original SleepTimeout value. When the SleepTimer value reaches zero the NXT will shutdown. Returns: The sleep timer value Examples: ex_SleepTimer.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.57

Ui module functions

529

6.57.2.26

void SysSetSleepTimeout (SetSleepTimeoutType & args) [inline]

Set system sleep timeout. This function lets you set the system sleep timeout value given the parameters you pass in via the SetSleepTimeoutType structure. Parameters: args The SetSleepTimeoutType structure containing the required parameters. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_SysSetSleepTimeout.nxc.

6.57.2.27

byte UIButton (void) [inline]

Read UI button. Return user interface button information. Returns: A UI button value. See UIButton constants. Examples: ex_UIButton.nxc.

6.57.2.28

byte UIState (void) [inline]

Get UI module state. Return the user interface state. Returns: The UI module state. See UIState constants. Examples: ex_UIState.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.58

Loader module types

530

6.57.2.29

byte UsbState (void) [inline]

Get UI module USB state. This method returns the UI module USB state. Returns: The UI module USB state. (0=disconnected, 1=connected, 2=working) Examples: ex_UiUsbState.nxc.

6.57.2.30

byte VMRunState (void) [inline]

Read VM run state. Return VM run state information. Returns: VM run state. See VM run state constants. Examples: ex_VMRunState.nxc.

6.57.2.31

byte Volume (void) [inline]

Read volume. Return the user interface volume level. Valid values are from 0 to 4. Returns: The UI module volume. (0..4) Examples: ex_Volume.nxc.

6.58

Loader module types

Types used by various Loader module functions.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.58

Loader module types

531

Data Structures struct FileOpenType


Parameters for the FileOpen system call.

struct FileReadWriteType
Parameters for the FileReadWrite system call.

struct FileCloseType
Parameters for the FileClose system call.

struct FileResolveHandleType
Parameters for the FileResolveHandle system call.

struct FileRenameType
Parameters for the FileRename system call.

struct FileDeleteType
Parameters for the FileDelete system call.

struct LoaderExecuteFunctionType
Parameters for the LoaderExecuteFunction system call.

struct FileFindType
Parameters for the FileFind system call.

struct FileSeekType
Parameters for the FileSeek system call.

struct FileResizeType
Parameters for the FileResize system call.

struct FileTellType
Parameters for the FileTell system call.

struct ListFilesType
Parameters for the ListFiles system call.

6.58.1

Detailed Description

Types used by various Loader module functions.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.59

Loader module functions

532

6.59

Loader module functions

Functions for accessing and modifying Loader module features. Functions unsigned int FreeMemory (void)
Get free ash memory.

unsigned int CreateFile (string fname, unsigned int fsize, byte &handle)
Create a le.

unsigned int OpenFileAppend (string fname, unsigned int &fsize, byte &handle)
Open a le for appending.

unsigned int OpenFileRead (string fname, unsigned int &fsize, byte &handle)
Open a le for reading.

unsigned int CloseFile (byte handle)


Close a le.

unsigned int ResolveHandle (string lename, byte &handle, bool &writeable)


Resolve a handle.

unsigned int RenameFile (string oldname, string newname)


Rename a le.

unsigned int DeleteFile (string fname)


Delete a le.

unsigned int ResizeFile (string fname, const unsigned int newsize)


Resize a le.

unsigned int CreateFileLinear (string fname, unsigned int fsize, byte &handle)
Create a linear le.

unsigned int CreateFileNonLinear (string fname, unsigned int fsize, byte &handle)
Create a non-linear le.

unsigned int OpenFileReadLinear (string fname, unsigned int &fsize, byte &handle)
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.59

Loader module functions

533

Open a linear le for reading.

unsigned int FindFirstFile (string &fname, byte &handle)


Start searching for les.

unsigned int FindNextFile (string &fname, byte &handle)


Continue searching for les.

unsigned int SizeOf (variant &value)


Calculate the size of a variable.

unsigned int Read (byte handle, variant &value)


Read a value from a le.

unsigned int ReadLn (byte handle, variant &value)


Read a value from a le plus line ending.

unsigned int ReadBytes (byte handle, unsigned int &length, byte &buf[ ])
Read bytes from a le.

unsigned int ReadLnString (byte handle, string &output)


Read a string from a le plus line ending.

unsigned int Write (byte handle, const variant &value)


Write value to le.

unsigned int WriteBytes (byte handle, const byte &buf[ ], unsigned int &cnt)
Write bytes to le.

unsigned int WriteBytesEx (byte handle, unsigned int &len, const byte &buf[ ])
Write bytes to a le with limit.

unsigned int WriteLn (byte handle, const variant &value)


Write a value and new line to a le.

unsigned int WriteLnString (byte handle, const string &str, unsigned int &cnt)
Write string and new line to a le.

unsigned int WriteString (byte handle, const string &str, unsigned int &cnt)
Write string to a le.

void SysFileOpenRead (FileOpenType &args)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.59

Loader module functions

534

Open le for reading.

void SysFileOpenWrite (FileOpenType &args)


Open and create le for writing.

void SysFileOpenAppend (FileOpenType &args)


Open le for writing at end of le.

void SysFileRead (FileReadWriteType &args)


Read from le.

void SysFileWrite (FileReadWriteType &args)


File write.

void SysFileClose (FileCloseType &args)


Close le handle.

void SysFileResolveHandle (FileResolveHandleType &args)


File resolve handle.

void SysFileRename (FileRenameType &args)


Rename le.

void SysFileDelete (FileDeleteType &args)


Delete le.

void SysLoaderExecuteFunction (LoaderExecuteFunctionType &args)


Execute any Loader module command.

void SysFileFindFirst (FileFindType &args)


Start nding les.

void SysFileFindNext (FileFindType &args)


Continue nding les.

void SysFileOpenWriteLinear (FileOpenType &args)


Open and create linear le for writing.

void SysFileOpenWriteNonLinear (FileOpenType &args)


Open and create non-linear le for writing.

void SysFileOpenReadLinear (FileOpenType &args)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.59

Loader module functions

535

Open linear le for reading.

void SysFileSeek (FileSeekType &args)


Seek to le position.

void SysFileResize (FileResizeType &args)


Resize a le.

void SysFileTell (FileTellType &args)


Return the le position.

void SysListFiles (ListFilesType &args)


List les.

6.59.1

Detailed Description

Functions for accessing and modifying Loader module features. 6.59.2 6.59.2.1 Function Documentation unsigned int CloseFile (byte handle) [inline]

Close a le. Close the le associated with the specied le handle. The loader result code is returned as the value of the function call. The handle parameter must be a constant or a variable. Parameters: handle The le handle. Returns: The function call result. See Loader module error codes. Examples: ex_CloseFile.nxc, ndnextle.nxc. ex_le_system.nxc, ex_ndrstle.nxc, and ex_-

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.59

Loader module functions

536

6.59.2.2

unsigned int CreateFile (string fname, unsigned int fsize, byte & handle) [inline]

Create a le. Create a new le with the specied lename and size and open it for writing. The le handle is returned in the last parameter, which must be a variable. The loader result code is returned as the value of the function call. The lename and size parameters must be constants, constant expressions, or variables. A le created with a size of zero bytes cannot be written to since the NXC le writing functions do not grow the le if its capacity is exceeded during a write attempt. Parameters: fname The name of the le to create. fsize The size of the le. handle The le handle output from the function call. Returns: The function call result. See Loader module error codes. Examples: ex_CreateFile.nxc, and ex_le_system.nxc.

6.59.2.3

unsigned int CreateFileLinear (string fname, unsigned int fsize, byte & handle) [inline]

Create a linear le. Create a new linear le with the specied lename and size and open it for writing. The le handle is returned in the last parameter, which must be a variable. The loader result code is returned as the value of the function call. The lename and size parameters must be constants, constant expressions, or variables. A le created with a size of zero bytes cannot be written to since the NXC le writing functions do not grow the le if its capacity is exceeded during a write attempt. Parameters: fname The name of the le to create. fsize The size of the le. handle The le handle output from the function call. Returns: The function call result. See Loader module error codes.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.59

Loader module functions

537

Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_CreateFileLinear.nxc.

6.59.2.4

unsigned int CreateFileNonLinear (string fname, unsigned int fsize, byte & handle) [inline]

Create a non-linear le. Create a new non-linear le with the specied lename and size and open it for writing. The le handle is returned in the last parameter, which must be a variable. The loader result code is returned as the value of the function call. The lename and size parameters must be constants, constant expressions, or variables. A le created with a size of zero bytes cannot be written to since the NXC le writing functions do not grow the le if its capacity is exceeded during a write attempt. Parameters: fname The name of the le to create. fsize The size of the le. handle The le handle output from the function call. Returns: The function call result. See Loader module error codes. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_CreateFileNonLinear.nxc.

6.59.2.5

unsigned int DeleteFile (string fname) [inline]

Delete a le. Delete the specied le. The loader result code is returned as the value of the function call. The lename parameter must be a constant or a variable.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.59

Loader module functions

538

Parameters: fname The name of the le to delete. Returns: The function call result. See Loader module error codes. Examples: ex_delete_data_le.nxc, and ex_DeleteFile.nxc.

6.59.2.6

unsigned int FindFirstFile (string & fname, byte & handle) [inline]

Start searching for les. This function lets you begin iterating through les stored on the NXT. Parameters: fname On input this contains the lename pattern you are searching for. On output this contains the name of the rst le found that matches the pattern. handle The search handle input to and output from the function call. Returns: The function call result. See Loader module error codes. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_ndrstle.nxc, and ex_ndnextle.nxc.

6.59.2.7

unsigned int FindNextFile (string & fname, byte & handle) [inline]

Continue searching for les. This function lets you continue iterating through les stored on the NXT.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.59

Loader module functions

539

Parameters: fname On output this contains the name of the next le found that matches the pattern used when the search began by calling FindFirstFile. handle The search handle input to and output from the function call. Returns: The function call result. See Loader module error codes. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_ndrstle.nxc, and ex_ndnextle.nxc.

6.59.2.8

unsigned int FreeMemory (void) [inline]

Get free ash memory. Get the number of bytes of ash memory that are available for use. Returns: The number of bytes of unused ash memory. Examples: ex_FreeMemory.nxc.

6.59.2.9

unsigned int OpenFileAppend (string fname, unsigned int & fsize, byte & handle) [inline]

Open a le for appending. Open an existing le with the specied lename for writing. The le size is returned in the second parameter, which must be a variable. The le handle is returned in the last parameter, which must be a variable. The loader result code is returned as the value of the function call. The lename parameter must be a constant or a variable. Parameters: fname The name of the le to open.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.59

Loader module functions

540

fsize The size of the le returned by the function. handle The le handle output from the function call. Returns: The function call result. See Loader module error codes. Examples: ex_le_system.nxc, and ex_OpenFileAppend.nxc.

6.59.2.10

unsigned int OpenFileRead (string fname, unsigned int & fsize, byte & handle) [inline]

Open a le for reading. Open an existing le with the specied lename for reading. The le size is returned in the second parameter, which must be a variable. The le handle is returned in the last parameter, which must be a variable. The loader result code is returned as the value of the function call. The lename parameter must be a constant or a variable. Parameters: fname The name of the le to open. fsize The size of the le returned by the function. handle The le handle output from the function call. Returns: The function call result. See Loader module error codes. Examples: ex_le_system.nxc, and ex_OpenFileRead.nxc.

6.59.2.11

unsigned int OpenFileReadLinear (string fname, unsigned int & fsize, byte & handle) [inline]

Open a linear le for reading. Open an existing linear le with the specied lename for reading. The le size is returned in the second parameter, which must be a variable. The le handle is returned in the last parameter, which must be a variable. The loader result code is returned as the value of the function call. The lename parameter must be a constant or a variable.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.59

Loader module functions

541

Parameters: fname The name of the le to open. fsize The size of the le returned by the function. handle The le handle output from the function call. Returns: The function call result. See Loader module error codes. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_OpenFileReadLinear.nxc.

6.59.2.12

unsigned int Read (byte handle, variant & value) [inline]

Read a value from a le. Read a value from the le associated with the specied handle. The handle parameter must be a variable. The value parameter must be a variable. The type of the value parameter determines the number of bytes of data read. Parameters: handle The le handle. value The variable to store the data read from the le. Returns: The function call result. See Loader module error codes. Examples: ex_le_system.nxc, and ex_Read.nxc.

6.59.2.13

unsigned int ReadBytes (byte handle, unsigned int & length, byte & buf[ ]) [inline]

Read bytes from a le. Read the specied number of bytes from the le associated with the specied handle. The handle parameter must be a variable. The length parameter must be a variable. The buf parameter must be an array or a string variable. The actual number of bytes read is returned in the length parameter.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.59

Loader module functions

542

Parameters: handle The le handle. length The number of bytes to read. Returns the number of bytes actually read. buf The byte array where the data is stored on output. Returns: The function call result. See Loader module error codes. Examples: ex_ReadBytes.nxc.

6.59.2.14

unsigned int ReadLn (byte handle, variant & value) [inline]

Read a value from a le plus line ending. Read a value from the le associated with the specied handle. The handle parameter must be a variable. The value parameter must be a variable. The type of the value parameter determines the number of bytes of data read. The ReadLn function reads two additional bytes from the le which it assumes are a carriage return and line feed pair. Parameters: handle The le handle. value The variable to store the data read from the le. Returns: The function call result. See Loader module error codes. Examples: ex_ReadLn.nxc.

6.59.2.15

unsigned int ReadLnString (byte handle, string & output) [inline]

Read a string from a le plus line ending. Read a string from the le associated with the specied handle. The handle parameter must be a variable. The output parameter must be a variable. Appends bytes to the output variable until a line ending (CRLF) is reached. The line ending is also read but it is not appended to the output parameter.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.59

Loader module functions

543

Parameters: handle The le handle. output The variable to store the string read from the le. Returns: The function call result. See Loader module error codes.

6.59.2.16

unsigned int RenameFile (string oldname, string newname) [inline]

Rename a le. Rename a le from the old lename to the new lename. The loader result code is returned as the value of the function call. The lename parameters must be constants or variables. Parameters: oldname The old lename. newname The new lename. Returns: The function call result. See Loader module error codes. Examples: ex_RenameFile.nxc.

6.59.2.17

unsigned int ResizeFile (string fname, const unsigned int newsize) [inline]

Resize a le. Resize the specied le. The loader result code is returned as the value of the function call. The lename parameter must be a constant or a variable. Parameters: fname The name of the le to resize. newsize The new size for the le. Returns: The function call result. See Loader module error codes.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.59

Loader module functions

544

Examples: ex_resizele.nxc.

6.59.2.18

unsigned int ResolveHandle (string lename, byte & handle, bool & writeable) [inline]

Resolve a handle. Resolve a le handle from the specied lename. The le handle is returned in the second parameter, which must be a variable. A boolean value indicating whether the handle can be used to write to the le or not is returned in the last parameter, which must be a variable. The loader result code is returned as the value of the function call. The lename parameter must be a constant or a variable. Parameters: lename The name of the le for which to resolve a handle. handle The le handle output from the function call. writeable A boolean ag indicating whether the handle is to a le open for writing (true) or reading (false). Returns: The function call result. See Loader module error codes. Examples: ex_ResolveHandle.nxc.

6.59.2.19

unsigned int SizeOf (variant & value) [inline]

Calculate the size of a variable. Calculate the number of bytes required to store the contents of the variable passed into the function. Parameters: value The variable. Returns: The number of bytes occupied by the variable. Examples: ex_SizeOf.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.59

Loader module functions

545

6.59.2.20

void SysFileClose (FileCloseType & args) [inline]

Close le handle. This function lets you close a le using the values specied via the FileCloseType structure. Parameters: args The FileCloseType structure containing the needed parameters. Examples: ex_sysleclose.nxc.

6.59.2.21

void SysFileDelete (FileDeleteType & args) [inline]

Delete le. This function lets you delete a le using the values specied via the FileDeleteType structure. Parameters: args The FileDeleteType structure containing the needed parameters. Examples: ex_sysledelete.nxc.

6.59.2.22

void SysFileFindFirst (FileFindType & args) [inline]

Start nding les. This function lets you begin iterating through les stored on the NXT. Parameters: args The FileFindType structure containing the needed parameters. Warning: This function requires the extended rmware. Examples: ex_syslendrst.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.59

Loader module functions

546

6.59.2.23

void SysFileFindNext (FileFindType & args) [inline]

Continue nding les. This function lets you continue iterating through les stored on the NXT. Parameters: args The FileFindType structure containing the needed parameters. Warning: This function requires the extended rmware. Examples: ex_syslendnext.nxc.

6.59.2.24

void SysFileOpenAppend (FileOpenType & args) [inline]

Open le for writing at end of le. This function lets you open an existing le that you can write to using the values specied via the FileOpenType structure. The available length remaining in the le is returned via the Length member. Parameters: args The FileOpenType structure containing the needed parameters. Examples: ex_sysleopenappend.nxc.

6.59.2.25

void SysFileOpenRead (FileOpenType & args) [inline]

Open le for reading. This function lets you open an existing le for reading using the values specied via the FileOpenType structure. The number of bytes that can be read from the le is returned via the Length member. Parameters: args The FileOpenType structure containing the needed parameters.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.59

Loader module functions

547

Examples: ex_sysleopenread.nxc.

6.59.2.26

void SysFileOpenReadLinear (FileOpenType & args) [inline]

Open linear le for reading. This function lets you open an existing linear le for reading using the values specied via the FileOpenType structure. Parameters: args The FileOpenType structure containing the needed parameters. Warning: This function requires the extended rmware. Examples: ex_sysleopenreadlinear.nxc.

6.59.2.27

void SysFileOpenWrite (FileOpenType & args) [inline]

Open and create le for writing. This function lets you create a le that you can write to using the values specied via the FileOpenType structure. The desired maximum le capacity in bytes is specied via the Length member. Parameters: args The FileOpenType structure containing the needed parameters. Examples: ex_sysleopenwrite.nxc.

6.59.2.28

void SysFileOpenWriteLinear (FileOpenType & args) [inline]

Open and create linear le for writing. This function lets you create a linear le that you can write to using the values specied via the FileOpenType structure.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.59

Loader module functions

548

Parameters: args The FileOpenType structure containing the needed parameters. Warning: This function requires the extended rmware. Examples: ex_sysleopenwritelinear.nxc.

6.59.2.29

void SysFileOpenWriteNonLinear (FileOpenType & args) [inline]

Open and create non-linear le for writing. This function lets you create a non-linear linear le that you can write to using the values specied via the FileOpenType structure. Parameters: args The FileOpenType structure containing the needed parameters. Warning: This function requires the extended rmware. Examples: ex_sysleopenwritenonlinear.nxc.

6.59.2.30

void SysFileRead (FileReadWriteType & args) [inline]

Read from le. This function lets you read from a le using the values specied via the FileReadWriteType structure. Parameters: args The FileReadWriteType structure containing the needed parameters. Examples: ex_sysleread.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.59

Loader module functions

549

6.59.2.31

void SysFileRename (FileRenameType & args) [inline]

Rename le. This function lets you rename a le using the values specied via the FileRenameType structure. Parameters: args The FileRenameType structure containing the needed parameters. Examples: ex_syslerename.nxc.

6.59.2.32

void SysFileResize (FileResizeType & args) [inline]

Resize a le. This function lets you resize a le using the values specied via the FileResizeType structure. Parameters: args The FileResizeType structure containing the needed parameters. Warning: This function requires the extended rmware. It has not yet been implemented at the rmware level. Examples: ex_sysleresize.nxc.

6.59.2.33

void SysFileResolveHandle (FileResolveHandleType & args) [inline]

File resolve handle. This function lets you resolve the handle of a le using the values specied via the FileResolveHandleType structure. This will nd a previously opened le handle. Parameters: args The FileResolveHandleType structure containing the needed parameters.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.59

Loader module functions

550

Examples: ex_sysleresolvehandle.nxc.

6.59.2.34

void SysFileSeek (FileSeekType & args) [inline]

Seek to le position. This function lets you seek to a specic le position using the values specied via the FileSeekType structure. Parameters: args The FileSeekType structure containing the needed parameters. Warning: This function requires the extended rmware. Examples: ex_sysleseek.nxc.

6.59.2.35

void SysFileTell (FileTellType & args) [inline]

Return the le position. This function returns the current le position in the open le specied via the FileTellType structure. Parameters: args The FileTellType structure containing the needed parameters. Warning: This function requires the extended rmware.

6.59.2.36

void SysFileWrite (FileReadWriteType & args) [inline]

File write. This function lets you write to a le using the values specied via the FileReadWriteType structure.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.59

Loader module functions

551

Parameters: args The FileReadWriteType structure containing the needed parameters. Examples: ex_syslewrite.nxc.

6.59.2.37

void SysListFiles (ListFilesType & args) [inline]

List les. This function lets you retrieve a list of les on the NXT using the values specied via the ListFilesType structure. Parameters: args The ListFilesType structure containing the needed parameters. Examples: ex_syslistles.nxc.

6.59.2.38

void SysLoaderExecuteFunction (LoaderExecuteFunctionType & args) [inline]

Execute any Loader module command. This function lets you directly execute the Loader modules primary function using the values specied via the LoaderExecuteFunctionType structure. Parameters: args The LoaderExecuteFunctionType structure containing the needed parameters. Warning: This function requires the extended rmware. Examples: ex_sysloaderexecutefunction.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.59

Loader module functions

552

6.59.2.39

unsigned int Write (byte handle, const variant & value) [inline]

Write value to le. Write a value to the le associated with the specied handle. The handle parameter must be a variable. The value parameter must be a constant, a constant expression, or a variable. The type of the value parameter determines the number of bytes of data written. Parameters: handle The le handle. value The value to write to the le. Returns: The function call result. See Loader module error codes. Examples: ex_le_system.nxc, and ex_Write.nxc.

6.59.2.40

unsigned int WriteBytes (byte handle, const byte & buf[ ], unsigned int & cnt) [inline]

Write bytes to le. Write the contents of the data array to the le associated with the specied handle. The handle parameter must be a variable. The cnt parameter must be a variable. The data parameter must be a byte array. The actual number of bytes written is returned in the cnt parameter. Parameters: handle The le handle. buf The byte array or string containing the data to write. cnt The number of bytes actually written to the le. Returns: The function call result. See Loader module error codes. Examples: ex_WriteBytes.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.59

Loader module functions

553

6.59.2.41

unsigned int WriteBytesEx (byte handle, unsigned int & len, const byte & buf[ ]) [inline]

Write bytes to a le with limit. Write the specied number of bytes to the le associated with the specied handle. The handle parameter must be a variable. The len parameter must be a variable. The buf parameter must be a byte array or a string variable or string constant. The actual number of bytes written is returned in the len parameter. Parameters: handle The le handle. len The maximum number of bytes to write on input. Returns the actual number of bytes written. buf The byte array or string containing the data to write. Returns: The function call result. See Loader module error codes. Examples: ex_WriteBytesEx.nxc.

6.59.2.42

unsigned int WriteLn (byte handle, const variant & value) [inline]

Write a value and new line to a le. Write a value to the le associated with the specied handle. The handle parameter must be a variable. The value parameter must be a constant, a constant expression, or a variable. The type of the value parameter determines the number of bytes of data written. This function also writes a carriage return and a line feed to the le following the numeric data. Parameters: handle The le handle. value The value to write to the le. Returns: The function call result. See Loader module error codes. Examples: ex_WriteLn.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.59

Loader module functions

554

6.59.2.43

unsigned int WriteLnString (byte handle, const string & str, unsigned int & cnt) [inline]

Write string and new line to a le. Write the string to the le associated with the specied handle. The handle parameter must be a variable. The count parameter must be a variable. The str parameter must be a string variable or string constant. This function also writes a carriage return and a line feed to the le following the string data. The total number of bytes written is returned in the cnt parameter. Parameters: handle The le handle. str The string to write to the le. cnt The number of bytes actually written to the le. Returns: The function call result. See Loader module error codes. Examples: ex_WriteLnString.nxc.

6.59.2.44

unsigned int WriteString (byte handle, const string & str, unsigned int & cnt) [inline]

Write string to a le. Write the string to the le associated with the specied handle. The handle parameter must be a variable. The count parameter must be a variable. The str parameter must be a string variable or string constant. The actual number of bytes written is returned in the cnt parameter. Parameters: handle The le handle. str The string to write to the le. cnt The number of bytes actually written to the le. Returns: The function call result. See Loader module error codes. Examples: ex_WriteString.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

555

6.60

cmath API

Standard C cmath API functions. Denes #dene Sqrt(_X) asm { sqrt __FLTRETVAL__, _X }
Compute square root.

#dene Sin(_X) asm { sin __FLTRETVAL__, _X }


Compute sine.

#dene Cos(_X) asm { cos __FLTRETVAL__, _X }


Compute cosine.

#dene Asin(_X) asm { asin __FLTRETVAL__, _X }


Compute arc sine.

#dene Acos(_X) asm { acos __FLTRETVAL__, _X }


Compute arc cosine.

#dene Atan(_X) asm { atan __FLTRETVAL__, _X }


Compute arc tangent.

#dene Ceil(_X) asm { ceil __FLTRETVAL__, _X }


Round up value.

#dene Exp(_X) asm { exp __FLTRETVAL__, _X }


Compute exponential function .

#dene Floor(_X) asm { oor __FLTRETVAL__, _X }


Round down value.

#dene Tan(_X) asm { tan __FLTRETVAL__, _X }


Compute tangent.

#dene Tanh(_X) asm { tanh __FLTRETVAL__, _X }


Compute hyperbolic tangent.

#dene Cosh(_X) asm { cosh __FLTRETVAL__, _X }


Compute hyperbolic cosine.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

556

#dene Sinh(_X) asm { sinh __FLTRETVAL__, _X }


Compute hyperbolic sine.

#dene Log(_X) asm { log __FLTRETVAL__, _X }


Compute natural logarithm.

#dene Log10(_X) asm { log10 __FLTRETVAL__, _X }


Compute common logarithm.

#dene Atan2(_Y, _X) asm { atan2 __FLTRETVAL__, _Y, _X }


Compute arc tangent with 2 parameters.

#dene Pow(_Base, _Exponent) asm { pow __FLTRETVAL__, _Base, _Exponent }


Raise to power.

#dene Trunc(_X) asm { trunc __RETVAL__, _X }


Compute integral part.

#dene Frac(_X) asm { frac __FLTRETVAL__, _X }


Compute fractional part.

#dene MulDiv32(_A, _B, _C) asm { muldiv __RETVAL__, _A, _B, _C }


Multiply and divide.

#dene SinD(_X) asm { sind __FLTRETVAL__, _X }


Compute sine (degrees).

#dene CosD(_X) asm { cosd __FLTRETVAL__, _X }


Compute cosine (degrees).

#dene AsinD(_X) asm { asind __FLTRETVAL__, _X }


Compute arch sine (degrees).

#dene AcosD(_X) asm { acosd __FLTRETVAL__, _X }


Compute arc cosine (degrees).

#dene AtanD(_X) asm { atand __FLTRETVAL__, _X }


Compute arc tangent (degrees).

#dene TanD(_X) asm { tand __FLTRETVAL__, _X }


Compute tangent (degrees).

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

557

#dene TanhD(_X) asm { tanhd __FLTRETVAL__, _X }


Compute hyperbolic tangent (degrees).

#dene CoshD(_X) asm { coshd __FLTRETVAL__, _X }


Compute hyperbolic cosine (degrees).

#dene SinhD(_X) asm { sinhd __FLTRETVAL__, _X }


Compute hyperbolic sine (degrees).

#dene Atan2D(_Y, _X) asm { atan2d __FLTRETVAL__, _Y, _X }


Compute arc tangent with two parameters (degrees).

Functions oat sqrt (oat x)


Compute square root.

oat cos (oat x)


Compute cosine.

oat sin (oat x)


Compute sine.

oat tan (oat x)


Compute tangent.

oat acos (oat x)


Compute arc cosine.

oat asin (oat x)


Compute arc sine.

oat atan (oat x)


Compute arc tangent.

oat atan2 (oat y, oat x)


Compute arc tangent with 2 parameters.

oat cosh (oat x)


Compute hyperbolic cosine.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

558

oat sinh (oat x)


Compute hyperbolic sine.

oat tanh (oat x)


Compute hyperbolic tangent.

oat exp (oat x)


Compute exponential function.

oat log (oat x)


Compute natural logarithm.

oat log10 (oat x)


Compute common logarithm.

long trunc (oat x)


Compute integral part.

oat frac (oat x)


Compute fractional part.

oat pow (oat base, oat exponent)


Raise to power.

oat ceil (oat x)


Round up value.

oat oor (oat x)


Round down value.

long muldiv32 (long a, long b, long c)


Multiply and divide.

oat cosd (oat x)


Compute cosine (degrees).

oat sind (oat x)


Compute sine (degrees).

oat tand (oat x)


Compute tangent (degrees).

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

559

oat acosd (oat x)


Compute arc cosine (degrees).

oat asind (oat x)


Compute arc sine (degrees).

oat atand (oat x)


Compute arc tangent (degrees).

oat atan2d (oat y, oat x)


Compute arc tangent with 2 parameters (degrees).

oat coshd (oat x)


Compute hyperbolic cosine (degrees).

oat sinhd (oat x)


Compute hyperbolic sine (degrees).

oat tanhd (oat x)


Compute hyperbolic tangent (degrees).

byte bcd2dec (byte bcd)


Convert from BCD to decimal Return the decimal equivalent of the binary coded decimal value provided.

bool isNAN (oat value)


Is the value NaN.

char sign (variant num)


Sign value.

6.60.1

Detailed Description

Standard C cmath API functions. 6.60.2 6.60.2.1 Dene Documentation #dene Acos(_X) asm { acos __FLTRETVAL__, _X }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

560

Compute arc cosine. Computes the arc cosine of _X. Only constants or variables allowed (no expressions). Deprecated Use acos() instead. Parameters: _X Floating point value. Returns: Arc cosine of _X.

6.60.2.2

#dene AcosD(_X) asm { acosd __FLTRETVAL__, _X }

Compute arc cosine (degrees). Computes the arc cosine of _X. Only constants or variables allowed (no expressions). Deprecated Use acosd() instead. Parameters: _X Floating point value. Returns: Arc cosine of _X.

6.60.2.3

#dene Asin(_X) asm { asin __FLTRETVAL__, _X }

Compute arc sine. Computes the arc sine of _X. Only constants or variables allowed (no expressions). Deprecated Use asin() instead. Parameters: _X Floating point value.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

561

Returns: Arc sine of _X.

6.60.2.4

#dene AsinD(_X) asm { asind __FLTRETVAL__, _X }

Compute arch sine (degrees). Computes the arc sine of _X. Only constants or variables allowed (no expressions). Deprecated Use asind() instead. Parameters: _X Floating point value. Returns: Arc sine of _X.

6.60.2.5

#dene Atan(_X) asm { atan __FLTRETVAL__, _X }

Compute arc tangent. Computes the arc tangent of _X. Only constants or variables allowed (no expressions). Deprecated Use atan() instead. Parameters: _X Floating point value. Returns: Arc tangent of _X.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

562

6.60.2.6

#dene Atan2(_Y, _X) asm { atan2 __FLTRETVAL__, _Y, _X }

Compute arc tangent with 2 parameters. Computes the principal value of the arc tangent of _Y/_X, expressed in radians. To compute the value, the function uses the sign of both arguments to determine the quadrant. Only constants or variables allowed (no expressions). Deprecated Use atan2() instead. Parameters: _Y Floating point value representing a y coordinate. _X Floating point value representing an x coordinate. Returns: Arc tangent of _Y/_X, in the interval [-pi,+pi] radians.

6.60.2.7

#dene Atan2D(_Y, _X) asm { atan2d __FLTRETVAL__, _Y, _X }

Compute arc tangent with two parameters (degrees). Computes the arc tangent of _Y/_X. Only constants or variables allowed (no expressions). Deprecated Use atan2d() instead. Parameters: _Y Floating point value. _X Floating point value. Returns: Arc tangent of _Y/_X, in the interval [-180,+180] degrees.

6.60.2.8

#dene AtanD(_X) asm { atand __FLTRETVAL__, _X }

Compute arc tangent (degrees). Computes the arc tangent of _X. Only constants or variables allowed (no expressions).
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

563

Deprecated Use atand() instead. Parameters: _X Floating point value. Returns: Arc tangent of _X.

6.60.2.9

#dene Ceil(_X) asm { ceil __FLTRETVAL__, _X }

Round up value. Computes the smallest integral value that is not less than _X. Only constants or variables allowed (no expressions). Deprecated Use ceil() instead. Parameters: _X Floating point value. Returns: The smallest integral value not less than _X.

6.60.2.10

#dene Cos(_X) asm { cos __FLTRETVAL__, _X }

Compute cosine. Computes the cosine of _X. Only constants or variables allowed (no expressions). Deprecated Use cos() instead. Parameters: _X Floating point value. Returns: Cosine of _X.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

564

6.60.2.11

#dene CosD(_X) asm { cosd __FLTRETVAL__, _X }

Compute cosine (degrees). Computes the cosine of _X. Only constants or variables allowed (no expressions). Deprecated Use cosd() instead. Parameters: _X Floating point value. Returns: Cosine of _X.

6.60.2.12

#dene Cosh(_X) asm { cosh __FLTRETVAL__, _X }

Compute hyperbolic cosine. Computes the hyperbolic cosine of _X. Only constants or variables allowed (no expressions). Deprecated Use cosh() instead. Parameters: _X Floating point value. Returns: Hyperbolic cosine of _X.

6.60.2.13

#dene CoshD(_X) asm { coshd __FLTRETVAL__, _X }

Compute hyperbolic cosine (degrees). Computes the hyperbolic cosine of _X. Only constants or variables allowed (no expressions). Deprecated Use coshd() instead.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

565

Parameters: _X Floating point value. Returns: Hyperbolic cosine of _X.

6.60.2.14

#dene Exp(_X) asm { exp __FLTRETVAL__, _X }

Compute exponential function . Computes the base-e exponential function of _X, which is the e number raised to the power _X. Only constants or variables allowed (no expressions). Deprecated Use exp() instead. Parameters: _X Floating point value. Returns: Exponential value of _X.

6.60.2.15

#dene Floor(_X) asm { oor __FLTRETVAL__, _X }

Round down value. Computes the largest integral value that is not greater than _X. Only constants or variables allowed (no expressions). Deprecated Use oor() instead. Parameters: _X Floating point value. Returns: The largest integral value not greater than _X.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

566

6.60.2.16

#dene Frac(_X) asm { frac __FLTRETVAL__, _X }

Compute fractional part. Computes the fractional part of _X. Only constants or variables allowed (no expressions). Deprecated Use frac() instead. Parameters: _X Floating point value. Returns: Fractional part of _X.

6.60.2.17

#dene Log(_X) asm { log __FLTRETVAL__, _X }

Compute natural logarithm. Computes the natural logarithm of _X. The natural logarithm is the base-e logarithm, the inverse of the natural exponential function (exp). For base-10 logarithms, a specic function Log10() exists. Only constants or variables allowed (no expressions). Deprecated Use log() instead. Parameters: _X Floating point value. Returns: Natural logarithm of _X.

6.60.2.18

#dene Log10(_X) asm { log10 __FLTRETVAL__, _X }

Compute common logarithm. Computes the common logarithm of _X. The common logarithm is the base-10 logarithm. For base-e logarithms, a specic function Log() exists. Only constants or variables allowed (no expressions).
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

567

Deprecated Use log10() instead. Parameters: _X Floating point value. Returns: Common logarithm of _X.

6.60.2.19

#dene MulDiv32(_A, _B, _C) asm { muldiv __RETVAL__, _A, _B, _C }

Multiply and divide. Multiplies two 32-bit values and then divides the 64-bit result by a third 32-bit value. Only constants or variables allowed (no expressions). Deprecated Use muldiv32() instead. Parameters: _A 32-bit long value. _B 32-bit long value. _C 32-bit long value. Returns: The result of multiplying _A times _B and dividing by _C.

6.60.2.20

#dene Pow(_Base, _Exponent) asm { pow __FLTRETVAL__, _Base, _Exponent }

Raise to power. Computes _Base raised to the power _Exponent. Only constants or variables allowed (no expressions). Deprecated Use pow() instead.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

568

Parameters: _Base Floating point value. _Exponent Floating point value. Returns: The result of raising _Base to the power _Exponent.

6.60.2.21

#dene Sin(_X) asm { sin __FLTRETVAL__, _X }

Compute sine. Computes the sine of _X. Only constants or variables allowed (no expressions). Deprecated Use sin() instead. Parameters: _X Floating point value. Returns: Sine of _X.

6.60.2.22

#dene SinD(_X) asm { sind __FLTRETVAL__, _X }

Compute sine (degrees). Computes the sine of _X. Only constants or variables allowed (no expressions). Deprecated Use sind() instead. Parameters: _X Floating point value. Returns: Sine of _X.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

569

6.60.2.23

#dene Sinh(_X) asm { sinh __FLTRETVAL__, _X }

Compute hyperbolic sine. Computes the hyperbolic sine of _X. Only constants or variables allowed (no expressions). Deprecated Use sinh() instead. Parameters: _X Floating point value. Returns: Hyperbolic sine of _X.

6.60.2.24

#dene SinhD(_X) asm { sinhd __FLTRETVAL__, _X }

Compute hyperbolic sine (degrees). Computes the hyperbolic sine of _X. Only constants or variables allowed (no expressions). Deprecated Use sinhd() instead. Parameters: _X Floating point value. Returns: Hyperbolic sine of _X.

6.60.2.25

#dene Sqrt(_X) asm { sqrt __FLTRETVAL__, _X }

Compute square root. Computes the square root of _X. Only constants or variables allowed (no expressions). Deprecated Use sqrt() instead.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

570

Parameters: _X Floating point value. Returns: Square root of _X.

6.60.2.26

#dene Tan(_X) asm { tan __FLTRETVAL__, _X }

Compute tangent. Computes the tangent of _X. Only constants or variables allowed (no expressions). Deprecated Use tan() instead. Parameters: _X Floating point value. Returns: Tangent of _X.

6.60.2.27

#dene TanD(_X) asm { tand __FLTRETVAL__, _X }

Compute tangent (degrees). Computes the sine of _X. Only constants or variables allowed (no expressions). Deprecated Use tand() instead. Parameters: _X Floating point value. Returns: Tangent of _X.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

571

6.60.2.28

#dene Tanh(_X) asm { tanh __FLTRETVAL__, _X }

Compute hyperbolic tangent. Computes the hyperbolic tangent of _X. Only constants or variables allowed (no expressions). Deprecated Use tanh() instead. Parameters: _X Floating point value. Returns: Hyperbolic tangent of _X.

6.60.2.29

#dene TanhD(_X) asm { tanhd __FLTRETVAL__, _X }

Compute hyperbolic tangent (degrees). Computes the hyperbolic tangent of _X. Only constants or variables allowed (no expressions). Deprecated Use tanhd() instead. Parameters: _X Floating point value. Returns: Hyperbolic tangent of _X.

6.60.2.30

#dene Trunc(_X) asm { trunc __RETVAL__, _X }

Compute integral part. Computes the integral part of _X. Only constants or variables allowed (no expressions). Deprecated Use trunc() instead.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

572

Parameters: _X Floating point value. Returns: Integral part of _X. 6.60.3 6.60.3.1 Function Documentation oat acos (oat x) [inline]

Compute arc cosine. Computes the principal value of the arc cosine of x, expressed in radians. In trigonometrics, arc cosine is the inverse operation of cosine. Parameters: x Floating point value in the interval [-1,+1]. Returns: Arc cosine of x, in the interval [0,pi] radians. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_acos.nxc.

6.60.3.2

oat acosd (oat x) [inline]

Compute arc cosine (degrees). Computes the principal value of the arc cosine of x, expressed in degrees. In trigonometrics, arc cosine is the inverse operation of cosine. Parameters: x Floating point value in the interval [-1,+1]. Returns: Arc cosine of x, in the interval [0,180] degrees.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

573

Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_acosd.nxc.

6.60.3.3

oat asin (oat x) [inline]

Compute arc sine. Computes the principal value of the arc sine of x, expressed in radians. In trigonometrics, arc sine is the inverse operation of sine. Parameters: x Floating point value in the interval [-1,+1]. Returns: Arc sine of x, in the interval [-pi/2,+pi/2] radians. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_asin.nxc.

6.60.3.4

oat asind (oat x) [inline]

Compute arc sine (degrees). Computes the principal value of the arc sine of x, expressed in degrees. In trigonometrics, arc sine is the inverse operation of sine. Parameters: x Floating point value in the interval [-1,+1]. Returns: Arc sine of x, in the interval [-90,+90] degrees.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

574

Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_asind.nxc.

6.60.3.5

oat atan (oat x) [inline]

Compute arc tangent. Computes the principal value of the arc tangent of x, expressed in radians. In trigonometrics, arc tangent is the inverse operation of tangent. Notice that because of the sign ambiguity, a function cannot determine with certainty in which quadrant the angle falls only by its tangent value. You can use atan2() if you need to determine the quadrant. See also: atan2() Parameters: x Floating point value. Returns: Arc tangent of x, in the interval [-pi/2,+pi/2] radians. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_atan.nxc.

6.60.3.6

oat atan2 (oat y, oat x) [inline]

Compute arc tangent with 2 parameters. Computes the principal value of the arc tangent of y/x, expressed in radians. To compute the value, the function uses the sign of both arguments to determine the quadrant.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

575

See also: atan() Parameters: y Floating point value representing a y coordinate. x Floating point value representing an x coordinate. Returns: Arc tangent of y/x, in the interval [-pi,+pi] radians. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_atan2.nxc.

6.60.3.7

oat atan2d (oat y, oat x) [inline]

Compute arc tangent with 2 parameters (degrees). Computes the principal value of the arc tangent of y/x, expressed in degrees. To compute the value, the function uses the sign of both arguments to determine the quadrant. Parameters: y Floating point value representing a y coordinate. x Floating point value representing an x coordinate. Returns: Arc tangent of y/x, in the interval [-180,+180] degrees. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_atan2d.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

576

6.60.3.8

oat atand (oat x) [inline]

Compute arc tangent (degrees). Computes the principal value of the arc tangent of x, expressed in degrees. In trigonometrics, arc tangent is the inverse operation of tangent. Notice that because of the sign ambiguity, a function cannot determine with certainty in which quadrant the angle falls only by its tangent value. You can use atan2d if you need to determine the quadrant. Parameters: x Floating point value. Returns: Arc tangent of x, in the interval [-90,+90] degrees. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_atand.nxc.

6.60.3.9

byte bcd2dec (byte bcd) [inline]

Convert from BCD to decimal Return the decimal equivalent of the binary coded decimal value provided. Parameters: bcd The value you want to convert from bcd to decimal. Returns: The decimal equivalent of the binary coded decimal byte. Examples: ex_bcd2dec.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

577

6.60.3.10

oat ceil (oat x) [inline]

Round up value. Computes the smallest integral value that is not less than x. Parameters: x Floating point value. Returns: The smallest integral value not less than x. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_ceil.nxc.

6.60.3.11

oat cos (oat x) [inline]

Compute cosine. Computes the cosine of an angle of x radians. Parameters: x Floating point value representing an angle expressed in radians. Returns: Cosine of x. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_sin_cos.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

578

6.60.3.12

oat cosd (oat x) [inline]

Compute cosine (degrees). Computes the cosine of an angle of x degrees. Parameters: x Floating point value representing an angle expressed in degrees. Returns: Cosine of x. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_sind_cosd.nxc.

6.60.3.13

oat cosh (oat x) [inline]

Compute hyperbolic cosine. Computes the hyperbolic cosine of x, expressed in radians. Parameters: x Floating point value. Returns: Hyperbolic cosine of x. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_cosh.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

579

6.60.3.14

oat coshd (oat x) [inline]

Compute hyperbolic cosine (degrees). Computes the hyperbolic cosine of x, expressed in degrees. Parameters: x Floating point value. Returns: Hyperbolic cosine of x. Warning: This function requires the enhanced NBC/NXC rmware.

6.60.3.15

oat exp (oat x) [inline]

Compute exponential function. Computes the base-e exponential function of x, which is the e number raised to the power x. Parameters: x Floating point value. Returns: Exponential value of x. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_exp.nxc.

6.60.3.16

oat oor (oat x) [inline]

Round down value. Computes the largest integral value that is not greater than x.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

580

Parameters: x Floating point value. Returns: The largest integral value not greater than x. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_oor.nxc.

6.60.3.17

oat frac (oat x) [inline]

Compute fractional part. Computes the fractional part of x. Parameters: x Floating point value. Returns: Fractional part of x. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_frac.nxc.

6.60.3.18

bool isNAN (oat value) [inline]

Is the value NaN. Returns true if the oating point value is NaN (not a number). Parameters: value A oating point variable.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

581

Returns: Whether the value is NaN. Examples: ex_isnan.nxc, and ex_labs.nxc.

6.60.3.19

oat log (oat x) [inline]

Compute natural logarithm. Computes the natural logarithm of x. The natural logarithm is the base-e logarithm, the inverse of the natural exponential function (exp). For base-10 logarithms, a specic function log10() exists. See also: log10(), exp() Parameters: x Floating point value. Returns: Natural logarithm of x. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_log.nxc.

6.60.3.20

oat log10 (oat x) [inline]

Compute common logarithm. Computes the common logarithm of x. The common logarithm is the base-10 logarithm. For base-e logarithms, a specic function log() exists. See also: log(), exp()

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

582

Parameters: x Floating point value. Returns: Common logarithm of x. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_log10.nxc.

6.60.3.21

long muldiv32 (long a, long b, long c) [inline]

Multiply and divide. Multiplies two 32-bit values and then divides the 64-bit result by a third 32-bit value. Parameters: a 32-bit long value. b 32-bit long value. c 32-bit long value. Returns: The result of multiplying a times b and dividing by c. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_muldiv32.nxc.

6.60.3.22

oat pow (oat base, oat exponent) [inline]

Raise to power. Computes base raised to the power exponent.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

583

Parameters: base Floating point value. exponent Floating point value. Returns: The result of raising base to the power exponent. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_pow.nxc.

6.60.3.23

char sign (variant num) [inline]

Sign value. Return the sign of the value argument (-1, 0, or 1). Any scalar type can be passed into this function. Parameters: num The numeric value for which to calculate its sign value. Returns: -1 if the parameter is negative, 0 if the parameter is zero, or 1 if the parameter is positive. Examples: ex_sign.nxc.

6.60.3.24

oat sin (oat x) [inline]

Compute sine. Computes the sine of an angle of x radians. Parameters: x Floating point value representing an angle expressed in radians.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

584

Returns: Sine of x. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_sin_cos.nxc.

6.60.3.25

oat sind (oat x) [inline]

Compute sine (degrees). Computes the sine of an angle of x degrees. Parameters: x Floating point value representing an angle expressed in degrees. Returns: Sine of x. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_sind_cosd.nxc.

6.60.3.26

oat sinh (oat x) [inline]

Compute hyperbolic sine. Computes the hyperbolic sine of x, expressed in radians. Parameters: x Floating point value. Returns: Hyperbolic sine of x.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

585

Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_sinh.nxc.

6.60.3.27

oat sinhd (oat x) [inline]

Compute hyperbolic sine (degrees). Computes the hyperbolic sine of x, expressed in degrees. Parameters: x Floating point value. Returns: Hyperbolic sine of x. Warning: This function requires the enhanced NBC/NXC rmware.

6.60.3.28

oat sqrt (oat x) [inline]

Compute square root. Computes the square root of x. Parameters: x Floating point value. Returns: Square root of x. Examples: ex_isnan.nxc, ex_labs.nxc, and ex_sqrt.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

586

6.60.3.29

oat tan (oat x) [inline]

Compute tangent. Computes the tangent of an angle of x radians. Parameters: x Floating point value representing an angle expressed in radians. Returns: Tangent of x. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_tan.nxc.

6.60.3.30

oat tand (oat x) [inline]

Compute tangent (degrees). Computes the tangent of an angle of x degrees. Parameters: x Floating point value representing an angle expressed in degrees. Returns: Tangent of x. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_tand.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.60

cmath API

587

6.60.3.31

oat tanh (oat x) [inline]

Compute hyperbolic tangent. Computes the hyperbolic tangent of x, expressed in radians. Parameters: x Floating point value. Returns: Hyperbolic tangent of x. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_tanh.nxc.

6.60.3.32

oat tanhd (oat x) [inline]

Compute hyperbolic tangent (degrees). Computes the hyperbolic tangent of x, expressed in degrees. Parameters: x Floating point value. Returns: Hyperbolic tangent of x. Warning: This function requires the enhanced NBC/NXC rmware.

6.60.3.33

long trunc (oat x) [inline]

Compute integral part. Computes the integral part of x.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.61

cstdio API

588

Parameters: x Floating point value. Returns: Integral part of x. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_sin_cos.nxc, ex_sind_cosd.nxc, and ex_trunc.nxc.

6.61

cstdio API

Standard C cstdio API functions. Modules fseek origin constants


Constants for use in calls to fseek.

Denes #dene getc(_handle) fgetc(_handle)


Get character from le.

#dene putc(_ch, _handle) fputc(_ch, _handle)


Write character to le.

Functions int fclose (byte handle)


Close le.

int remove (string lename)


Remove le.

int rename (string old, string new)


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.61

cstdio API

589

Rename le.

char fgetc (byte handle)


Get character from le.

string fgets (string &str, int num, byte handle)


Get string from le.

int feof (byte handle)


Check End-of-le indicator.

void set_fopen_size (unsigned long fsize)


Set the default fopen le size.

byte fopen (string lename, const string mode)


Open le.

int fush (byte handle)


Flush le.

unsigned long ftell (byte handle)


Get current position in le.

char fputc (char ch, byte handle)


Write character to le.

int fputs (string str, byte handle)


Write string to le.

void printf (string format, variant value)


Print formatted data to stdout.

void fprintf (byte handle, string format, variant value)


Write formatted data to le.

void sprintf (string &str, string format, variant value)


Write formatted data to string.

int fseek (byte handle, long offset, int origin)


Reposition le position indicator.

void rewind (byte handle)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.61

cstdio API

590

Set position indicator to the beginning.

int getchar ()
Get character from stdin.

Variables unsigned long __fopen_default_size = 1024 6.61.1 Detailed Description

Standard C cstdio API functions. 6.61.2 6.61.2.1 Dene Documentation #dene getc(_handle) fgetc(_handle)

Get character from le. Returns the character currently pointed to by the internal le position indicator of the le specied by the handle. The internal le position indicator is then advanced by one character to point to the next character. The functions fgetc and getc are equivalent. Parameters: _handle The handle of the le from which the character is read. Returns: The character read from the le. Examples: ex_getc.nxc.

6.61.2.2

#dene putc(_ch, _handle) fputc(_ch, _handle)

Write character to le. Writes a character to the le and advances the position indicator. The character is written at the current position of the le as indicated by the internal position indicator, which is then advanced one character. If there are no errors, the same character that has been written is returned. If an error occurs, EOF is returned.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.61

cstdio API

591

Parameters: _ch The character to be written. _handle The handle of the le where the character is to be written. Returns: The character written to the le. Examples: ex_putc.nxc. 6.61.3 6.61.3.1 Function Documentation int fclose (byte handle) [inline]

Close le. Close the le associated with the specied le handle. The loader result code is returned as the value of the function call. Parameters: handle The handle of the le to be closed. Returns: The loader result code. Examples: ex_fclose.nxc.

6.61.3.2

int feof (byte handle) [inline]

Check End-of-le indicator. Checks whether the End-of-File indicator associated with the handle is set, returning a value different from zero if it is. Parameters: handle The handle of the le to check. Returns: Currently always returns 0.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.61

cstdio API

592

Examples: ex_feof.nxc.

6.61.3.3

int fush (byte handle) [inline]

Flush le. Writes any buffered data to the le. A zero value indicates success. Parameters: handle The handle of the le to be ushed. Returns: Currently always returns 0. Examples: ex_fush.nxc.

6.61.3.4

char fgetc (byte handle) [inline]

Get character from le. Returns the character currently pointed to by the internal le position indicator of the le specied by the handle. The internal le position indicator is then advanced by one character to point to the next character. The functions fgetc and getc are equivalent. Parameters: handle The handle of the le from which the character is read. Returns: The character read from the le. Examples: ex_fgetc.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.61

cstdio API

593

6.61.3.5

string fgets (string & str, int num, byte handle) [inline]

Get string from le. Reads characters from a le and stores them as a string into str until (num-1) characters have been read or either a newline or a the End-of-File is reached, whichever comes rst. A newline character makes fgets stop reading, but it is considered a valid character and therefore it is included in the string copied to str. A null character is automatically appended in str after the characters read to signal the end of the string. Returns the string parameter. Parameters: str The string where the characters are stored. num The maximum number of characters to be read. handle The handle of the le from which the characters are read. Returns: The string read from the le. Examples: ex_fgets.nxc.

6.61.3.6

byte fopen (string lename, const string mode)

Open le. Opens the le whose name is specied in the parameter lename and associates it with a le handle that can be identied in future operations by the handle that is returned. The operations that are allowed on the stream and how these are performed are dened by the mode parameter. Parameters: lename The name of the le to be opened. mode The le access mode. Valid values are "r" - opens an existing le for reading, "w" - creates a new le and opens it for writing, and "a" - opens an existing le for appending to the end of the le. Returns: The handle to the opened le. Examples: ex_fopen.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.61

cstdio API

594

6.61.3.7

void fprintf (byte handle, string format, variant value) [inline]

Write formatted data to le. Writes a sequence of data formatted as the format argument species to a le. After the format parameter, the function expects one value argument. Parameters: handle The handle of the le to write to. format A string specifying the desired format. value A value to be formatted for writing to the le. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_fprintf.nxc.

6.61.3.8

char fputc (char ch, byte handle) [inline]

Write character to le. Writes a character to the le and advances the position indicator. The character is written at the current position of the le as indicated by the internal position indicator, which is then advanced one character. If there are no errors, the same character that has been written is returned. If an error occurs, EOF is returned. Parameters: ch The character to be written. handle The handle of the le where the character is to be written. Returns: The character written to the le. Examples: ex_fputc.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.61

cstdio API

595

6.61.3.9

int fputs (string str, byte handle) [inline]

Write string to le. Writes the string to the le specied by the handle. The null terminating character at the end of the string is not written to the le. If there are no errors, a non-negative value is returned. If an error occurs, EOF is returned. Parameters: str The string of characters to be written. handle The handle of the le where the string is to be written. Returns: The number of characters written to the le. Examples: ex_fputs.nxc.

6.61.3.10

int fseek (byte handle, long offset, int origin) [inline]

Reposition le position indicator. Sets the position indicator associated with the le to a new position dened by adding offset to a reference position specied by origin. Parameters: handle The handle of the le. offset The number of bytes to offset from origin. origin Position from where offset is added. It is specied by one of the following constants: SEEK_SET - beginning of le, SEEK_CUR - current position of the le pointer, or SEEK_END - end of le. fseek origin constants Returns: A value of zero if successful or non-zero otherwise. See Loader module error codes. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Examples: ex_fseek.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.61

cstdio API

596

6.61.3.11

unsigned long ftell (byte handle) [inline]

Get current position in le. Returns the current value of the le position indicator of the specied handle. Parameters: handle The handle of the le. Returns: The current le position in the open le. Warning: This function requires the enhanced NBC/NXC rmware version 1.31+. Examples: ex_ftell.nxc.

6.61.3.12

int getchar () [inline]

Get character from stdin. Returns the next character from the standard input (stdin). It is equivalent to getc with stdin as its argument. On the NXT this means wait for a button press and return the value of the button pressed. Returns: The pressed button. See Button name constants. Examples: ex_getchar.nxc.

6.61.3.13

void printf (string format, variant value) [inline]

Print formatted data to stdout. Writes to the LCD at 0, LCD_LINE1 a sequence of data formatted as the format argument species. After the format parameter, the function expects one value argument.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.61

cstdio API

597

Parameters: format A string specifying the desired format. value A value to be formatted for writing to the LCD. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_printf.nxc.

6.61.3.14

int remove (string lename) [inline]

Remove le. Delete the specied le. The loader result code is returned as the value of the function call. Parameters: lename The name of the le to be deleted. Returns: The loader result code.

6.61.3.15

int rename (string old, string new) [inline]

Rename le. Rename a le from the old lename to the new lename. The loader result code is returned as the value of the function call. Parameters: old The name of the le to be renamed. new The new name for the le. Returns: The loader result code. Examples: ex_rename.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.61

cstdio API

598

6.61.3.16

void rewind (byte handle) [inline]

Set position indicator to the beginning. Sets the position indicator associated with stream to the beginning of the le. Parameters: handle The handle of the le. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Examples: ex_rewind.nxc.

6.61.3.17

void set_fopen_size (unsigned long fsize) [inline]

Set the default fopen le size. Set the default size of a le created via a call to fopen. Parameters: fsize The default new le size for fopen.

6.61.3.18

void sprintf (string & str, string format, variant value) [inline]

Write formatted data to string. Writes a sequence of data formatted as the format argument species to a string. After the format parameter, the function expects one value argument. Parameters: str The string to write to. format A string specifying the desired format. value A value to be formatted for writing to the string. Warning: This function requires the enhanced NBC/NXC rmware.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.62

fseek origin constants

599

Examples: ex_sprintf.nxc.

6.62

fseek origin constants

Constants for use in calls to fseek. Denes #dene SEEK_SET 0 #dene SEEK_CUR 1 #dene SEEK_END 2 6.62.1 Detailed Description

Constants for use in calls to fseek. 6.62.2 6.62.2.1 Dene Documentation #dene SEEK_CUR 1 Seek from the current le position Examples: ex_fseek.nxc.

6.62.2.2

#dene SEEK_END 2 Seek from the end of the le

6.62.2.3

#dene SEEK_SET 0 Seek from the beginning of the le

Examples: ex_sysleseek.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.63

cstdlib API

600

6.63

cstdlib API

Standard C cstdlib API functions and types. Modules cstdlib API types
Standard C cstdlib API types.

Functions void abort ()


Abort current process.

variant abs (variant num)


Absolute value.

unsigned int rand ()


Generate random number.

int Random (unsigned int n=0)


Generate random number.

void SysRandomNumber (RandomNumberType &args)


Draw a random number.

int atoi (const string &str)


Convert string to integer.

long atol (const string &str)


Convert string to long integer.

long labs (long n)


Absolute value.

oat atof (const string &str)


Convert string to oat.

oat strtod (const string &str, string &endptr)


Convert string to oat.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.63

cstdlib API

601

long strtol (const string &str, string &endptr, int base=10)


Convert string to long integer.

long strtoul (const string &str, string &endptr, int base=10)


Convert string to unsigned long integer.

div_t div (int numer, int denom)


Integral division.

ldiv_t ldiv (long numer, long denom)


Integral division.

6.63.1

Detailed Description

Standard C cstdlib API functions and types. 6.63.2 6.63.2.1 Function Documentation void abort () [inline]

Abort current process. Aborts the process with an abnormal program termination. The function never returns to its caller. Examples: ex_abort.nxc.

6.63.2.2

variant abs (variant num) [inline]

Absolute value. Return the absolute value of the value argument. Any scalar type can be passed into this function. Parameters: num The numeric value. Returns: The absolute value of num. The return type matches the input type.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.63

cstdlib API

602

Examples: ex_abs.nxc.

6.63.2.3

oat atof (const string & str) [inline]

Convert string to oat. Parses the string str interpreting its content as a oating point number and returns its value as a oat. The function rst discards as many whitespace characters as necessary until the rst non-whitespace character is found. Then, starting from this character, takes as many characters as possible that are valid following a syntax resembling that of oating point literals, and interprets them as a numerical value. The rest of the string after the last valid character is ignored and has no effect on the behavior of this function. A valid oating point number for atof is formed by a succession of: An optional plus or minus sign A sequence of digits, optionally containing a decimal-point character An optional exponent part, which itself consists on an e or E character followed by an optional sign and a sequence of digits. If the rst sequence of non-whitespace characters in str does not form a valid oatingpoint number as just dened, or if no such sequence exists because either str is empty or contains only whitespace characters, no conversion is performed. Parameters: str String beginning with the representation of a oating-point number. Returns: On success, the function returns the converted oating point number as a oat value. If no valid conversion could be performed a zero value (0.0) is returned. Examples: ex_atof.nxc.

6.63.2.4

int atoi (const string & str) [inline]

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.63

cstdlib API

603

Convert string to integer. Parses the string str interpreting its content as an integral number, which is returned as an int value. The function rst discards as many whitespace characters as necessary until the rst non-whitespace character is found. Then, starting from this character, takes an optional initial plus or minus sign followed by as many numerical digits as possible, and interprets them as a numerical value. The string can contain additional characters after those that form the integral number, which are ignored and have no effect on the behavior of this function. If the rst sequence of non-whitespace characters in str does not form a valid integral number, or if no such sequence exists because either str is empty or contains only whitespace characters, no conversion is performed. Parameters: str String beginning with the representation of an integral number. Returns: On success, the function returns the converted integral number as an int value. If no valid conversion could be performed a zero value is returned. Examples: ex_atoi.nxc.

6.63.2.5

long atol (const string & str) [inline]

Convert string to long integer. Parses the string str interpreting its content as an integral number, which is returned as a long int value. The function rst discards as many whitespace characters as necessary until the rst non-whitespace character is found. Then, starting from this character, takes an optional initial plus or minus sign followed by as many numerical digits as possible, and interprets them as a numerical value. The string can contain additional characters after those that form the integral number, which are ignored and have no effect on the behavior of this function. If the rst sequence of non-whitespace characters in str does not form a valid integral number, or if no such sequence exists because either str is empty or contains only whitespace characters, no conversion is performed. Parameters: str String beginning with the representation of an integral number.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.63

cstdlib API

604

Returns: On success, the function returns the converted integral number as a long int value. If no valid conversion could be performed a zero value is returned. Examples: ex_atol.nxc.

6.63.2.6

div_t div (int numer, int denom) [inline]

Integral division. Returns the integral quotient and remainder of the division of numerator by denominator as a structure of type div_t, which has two members: quot and rem. Parameters: numer Numerator. denom Denominator. Returns: The result is returned by value in a structure dened in cstdlib, which has two members. For div_t, these are, in either order: int quot; int rem. Examples: ex_div.nxc.

6.63.2.7

long labs (long n) [inline]

Absolute value. Return the absolute value of parameter n. Parameters: n Integral value. Returns: The absolute value of n.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.63

cstdlib API

605

6.63.2.8

ldiv_t ldiv (long numer, long denom) [inline]

Integral division. Returns the integral quotient and remainder of the division of numerator by denominator as a structure of type ldiv_t, which has two members: quot and rem. Parameters: numer Numerator. denom Denominator. Returns: The result is returned by value in a structure dened in cstdlib, which has two members. For ldiv_t, these are, in either order: long quot; long rem. Examples: ex_ldiv.nxc.

6.63.2.9

unsigned int rand () [inline]

Generate random number. Returns a pseudo-random integral number in the range 0 to RAND_MAX. Returns: An integer value between 0 and RAND_MAX. Examples: ex_ArrayMean.nxc, ex_ArrayMin.nxc, ex_ArrayOp.nxc, ex_ArraySort.nxc, ex_ArrayStd.nxc, ex_ArraySum.nxc, ex_ArraySumSqr.nxc, and ex_rand.nxc.

6.63.2.10

int Random (unsigned int n = 0) [inline]

Generate random number. Return a signed or unsigned 16-bit random number. If the optional argument n is not provided the function will return a signed value. Otherwise the returned value will range between 0 and n (exclusive).

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.63

cstdlib API

606

Parameters: n The maximum unsigned value desired (optional). Returns: A random number Examples: ex_ArrayMax.nxc, ex_CircleOut.nxc, ex_dispgoutex.nxc, ex_EllipseOut.nxc, ex_le_system.nxc, ex_Random.nxc, ex_sin_cos.nxc, ex_sind_cosd.nxc, ex_string.nxc, ex_SysDrawEllipse.nxc, and ex_wait.nxc.

6.63.2.11

oat strtod (const string & str, string & endptr) [inline]

Convert string to oat. Parses the string str interpreting its content as a oating point number and returns its value as a oat. The function rst discards as many whitespace characters as necessary until the rst non-whitespace character is found. Then, starting from this character, takes as many characters as possible that are valid following a syntax resembling that of oating point literals, and interprets them as a numerical value. A string containing the rest of the string after the last valid character is stored in endptr. A valid oating point number for atof is formed by a succession of: An optional plus or minus sign A sequence of digits, optionally containing a decimal-point character An optional exponent part, which itself consists on an e or E character followed by an optional sign and a sequence of digits. If the rst sequence of non-whitespace characters in str does not form a valid oatingpoint number as just dened, or if no such sequence exists because either str is empty or contains only whitespace characters, no conversion is performed. Parameters: str String beginning with the representation of a oating-point number. endptr Reference to a string, whose value is set by the function to the remaining characters in str after the numerical value. Returns: On success, the function returns the converted oating point number as a oat value. If no valid conversion could be performed a zero value (0.0) is returned.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.63

cstdlib API

607

Examples: ex_strtod.nxc.

6.63.2.12

long strtol (const string & str, string & endptr, int base = 10) [inline]

Convert string to long integer. Parses the C string str interpreting its content as an integral number of the specied base, which is returned as a long int value. The function rst discards as many whitespace characters as necessary until the rst non-whitespace character is found. Then, starting from this character, takes as many characters as possible that are valid following a syntax that depends on the base parameter, and interprets them as a numerical value. A string containing the rest of the characters following the integer representation in str is stored in endptr. If the rst sequence of non-whitespace characters in str does not form a valid integral number, or if no such sequence exists because either str is empty or contains only whitespace characters, no conversion is performed. Parameters: str String beginning with the representation of an integral number. endptr Reference to a string, whose value is set by the function to the remaining characters in str after the numerical value. base Optional and ignored if specied. Returns: On success, the function returns the converted integral number as a long int value. If no valid conversion could be performed a zero value is returned. Warning: Only base = 10 is currently supported. Examples: ex_strtol.nxc.

6.63.2.13

long strtoul (const string & str, string & endptr, int base = 10) [inline]

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.63

cstdlib API

608

Convert string to unsigned long integer. Parses the C string str interpreting its content as an unsigned integral number of the specied base, which is returned as an unsigned long int value. The function rst discards as many whitespace characters as necessary until the rst non-whitespace character is found. Then, starting from this character, takes as many characters as possible that are valid following a syntax that depends on the base parameter, and interprets them as a numerical value. A string containing the rest of the characters following the integer representation in str is stored in endptr. If the rst sequence of non-whitespace characters in str does not form a valid integral number, or if no such sequence exists because either str is empty or contains only whitespace characters, no conversion is performed. Parameters: str String containing the representation of an unsigned integral number. endptr Reference to a string, whose value is set by the function to the remaining characters in str after the numerical value. base Optional and ignored if specied. Returns: On success, the function returns the converted integral number as an unsigned long int value. If no valid conversion could be performed a zero value is returned. Warning: Only base = 10 is currently supported. Examples: ex_strtoul.nxc.

6.63.2.14

void SysRandomNumber (RandomNumberType & args) [inline]

Draw a random number. This function lets you obtain a random number via the RandomNumberType structure. Parameters: args The RandomNumberType structure receiving results. Examples: ex_sysrandomnumber.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.64

cstdlib API types

609

6.64

cstdlib API types

Standard C cstdlib API types. Data Structures struct RandomNumberType


Parameters for the RandomNumber system call.

struct div_t
Output type of the div function.

struct ldiv_t
Output type of the ldiv function.

6.64.1

Detailed Description

Standard C cstdlib API types.

6.65

cstring API

Standard C cstring API functions. Functions variant StrToNum (string str)


Convert string to number.

unsigned int StrLen (string str)


Get string length.

byte StrIndex (string str, unsigned int idx)


Extract a character from a string.

string NumToStr (variant num)


Convert number to string.

string StrCat (string str1, string str2, string strN)


Concatenate strings.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.65

cstring API

610

string SubStr (string str, unsigned int idx, unsigned int len)
Extract a portion of a string.

string Flatten (variant num)


Flatten a number to a string.

string StrReplace (string str, unsigned int idx, string strnew)


Replace a portion of a string.

string FormatNum (string fmt, variant num)


Format a number.

string FlattenVar (variant x)


Flatten any data to a string.

int UnattenVar (string str, variant &x)


Unatten a string into a data type.

int Pos (string Substr, string S)


Find substring position.

string ByteArrayToStr (byte data[ ])


Convert a byte array to a string.

void ByteArrayToStrEx (byte data[ ], string &str)


Convert a byte array to a string.

void StrToByteArray (string str, byte &data[ ])


Convert a string to a byte array.

string Copy (string str, unsigned int idx, unsigned int len)
Copy a portion of a string.

string MidStr (string str, unsigned int idx, unsigned int len)
Copy a portion from the middle of a string.

string RightStr (string str, unsigned int size)


Copy a portion from the end of a string.

string LeftStr (string str, unsigned int size)


Copy a portion from the start of a string.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.65

cstring API

611

int strlen (const string &str)


Get string length.

string strcat (string &dest, const string &src)


Concatenate strings.

string strncat (string &dest, const string &src, unsigned int num)
Append characters from string.

string strcpy (string &dest, const string &src)


Copy string.

string strncpy (string &dest, const string &src, unsigned int num)
Copy characters from string.

int strcmp (const string &str1, const string &str2)


Compare two strings.

int strncmp (const string &str1, const string &str2, unsigned int num)
Compare characters of two strings.

void memcpy (variant dest, variant src, byte num)


Copy memory.

void memmove (variant dest, variant src, byte num)


Move memory.

char memcmp (variant ptr1, variant ptr2, byte num)


Compare two blocks of memory.

unsigned long addressOf (variant data)


Get the absolute address of a variable.

unsigned long reladdressOf (variant data)


Get the relative address of a variable.

unsigned long addressOfEx (variant data, bool relative)


Get the absolute or relative address of a variable.

6.65.1

Detailed Description

Standard C cstring API functions.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.65

cstring API

612

6.65.2 6.65.2.1

Function Documentation unsigned long addressOf (variant data) [inline]

Get the absolute address of a variable. Get the absolute address of a variable and return it to the calling routine as an unsigned long value. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: data A variable whose address you wish to get. Returns: The absolute address of the variable. Examples: ex_addressof.nxc.

6.65.2.2

unsigned long addressOfEx (variant data, bool relative) [inline]

Get the absolute or relative address of a variable. Get the absolute or relative address of a variable and return it to the calling routine as an unsigned long value. The relative address is an offset from the Command modules MemoryPool address. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: data A variable whose address you wish to get. relative A boolean ag indicating whether you want to get the relative or absolute address. Returns: The absolute or relative address of the variable. Examples: ex_addressofex.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.65

cstring API

613

6.65.2.3

string ByteArrayToStr (byte data[ ]) [inline]

Convert a byte array to a string. Convert the specied array to a string by appending a null terminator to the end of the array elements. The array must be a one-dimensional array of byte. See also: StrToByteArray, ByteArrayToStrEx Parameters: data A byte array. Returns: A string containing data and a null terminator byte. Examples: ex_ByteArrayToStr.nxc, and ex_string.nxc.

6.65.2.4

void ByteArrayToStrEx (byte data[ ], string & str) [inline]

Convert a byte array to a string. Convert the specied array to a string by appending a null terminator to the end of the array elements. The array must be a one-dimensional array of byte. See also: StrToByteArray, ByteArrayToStr Parameters: data A byte array. str A string variable reference which, on output, will contain data and a null terminator byte. Examples: ex_ByteArrayToStrEx.nxc, and ex_string.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.65

cstring API

614

6.65.2.5

string Copy (string str, unsigned int idx, unsigned int len) [inline]

Copy a portion of a string. Returns a substring of a string. Parameters: str A string idx The starting index of the substring. len The length of the substring. Returns: The specied substring. Examples: ex_copy.nxc.

6.65.2.6

string Flatten (variant num) [inline]

Flatten a number to a string. Return a string containing the byte representation of the specied value. Parameters: num A number. Returns: A string containing the byte representation of the parameter num. Examples: ex_Flatten.nxc, and ex_string.nxc.

6.65.2.7

string FlattenVar (variant x) [inline]

Flatten any data to a string. Return a string containing the byte representation of the specied value.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.65

cstring API

615

See also: UnattenVar Parameters: x Any NXC datatype. Returns: A string containing the byte representation of the parameter x. Examples: ex_FlattenVar.nxc, ex_string.nxc, and ex_UnattenVar.nxc.

6.65.2.8

string FormatNum (string fmt, variant num) [inline]

Format a number. Return the formatted string using the format and value. Use a standard numeric sprintf format specier within the format string. The input string parameter may be a variable, constant, or expression. Parameters: fmt The string format containing a sprintf numeric format specier. num A number. Returns: A string containing the formatted numeric value. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_acos.nxc, ex_acosd.nxc, ex_addressof.nxc, ex_addressofex.nxc, ex_asin.nxc, ex_asind.nxc, ex_atan.nxc, ex_atan2.nxc, ex_atan2d.nxc, ex_atand.nxc, ex_delete_data_le.nxc, ex_displayfont.nxc, ex_le_system.nxc, ex_FormatNum.nxc, ex_GetBrickDataAddress.nxc, ex_reladdressof.nxc, ex_setdisplayfont.nxc, ex_string.nxc, ex_tan.nxc, ex_tand.nxc, util_battery_1.nxc, util_battery_2.nxc, and util_rpm.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.65

cstring API

616

6.65.2.9

string LeftStr (string str, unsigned int size) [inline]

Copy a portion from the start of a string. Returns the substring of a specied length that appears at the start of a string. Parameters: str A string size The size or length of the substring. Returns: The substring of a specied length that appears at the start of a string. Examples: ex_leftstr.nxc.

6.65.2.10

char memcmp (variant ptr1, variant ptr2, byte num) [inline]

Compare two blocks of memory. Compares the variant ptr1 to the variant ptr2. Returns an integral value indicating the relationship between the variables. The num argument is ignored. Parameters: ptr1 A variable to be compared. ptr2 A variable to be compared. num The number of bytes to compare (ignored). Examples: ex_memcmp.nxc.

6.65.2.11

void memcpy (variant dest, variant src, byte num) [inline]

Copy memory. Copies memory contents from the source to the destination. The num argument is ignored.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.65

cstring API

617

Parameters: dest The destination variable. src The source variable. num The number of bytes to copy (ignored). Examples: ex_memcpy.nxc.

6.65.2.12

void memmove (variant dest, variant src, byte num) [inline]

Move memory. Moves memory contents from the source to the destination. The num argument is ignored. Parameters: dest The destination variable. src The source variable. num The number of bytes to copy (ignored). Examples: ex_memmove.nxc.

6.65.2.13

string MidStr (string str, unsigned int idx, unsigned int len) [inline]

Copy a portion from the middle of a string. Returns the substring of a specied length that appears at a specied position in a string. Parameters: str A string idx The starting index of the substring. len The length of the substring. Returns: The substring of a specied length that appears at a specied position in a string. Examples: ex_midstr.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.65

cstring API

618

6.65.2.14

string NumToStr (variant num) [inline]

Convert number to string. Return the string representation of the specied numeric value. Parameters: num A number. Returns: The string representation of the parameter num. Examples: ex_NumToStr.nxc, ex_RS485Send.nxc, and ex_string.nxc.

6.65.2.15

int Pos (string Substr, string S) [inline]

Find substring position. Returns the index value of the rst character in a specied substring that occurs in a given string. Pos searches for Substr within S and returns an integer value that is the index of the rst character of Substr within S. Pos is casesensitive. If Substr is not found, Pos returns negative one. Parameters: Substr A substring to search for in another string. S A string that might contain the specied substring. Returns: The position of the substring in the specied string or -1 if it is not found. Examples: ex_Pos.nxc.

6.65.2.16

unsigned long reladdressOf (variant data) [inline]

Get the relative address of a variable. Get the relative address of a variable and return it to the calling routine as an unsigned long value. The relative address is an offset from the Command modules MemoryPool address.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.65

cstring API

619

Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: data A variable whose address you wish to get. Returns: The relative address of the variable. Examples: ex_reladdressof.nxc.

6.65.2.17

string RightStr (string str, unsigned int size) [inline]

Copy a portion from the end of a string. Returns the substring of a specied length that appears at the end of a string. Parameters: str A string size The size or length of the substring. Returns: The substring of a specied length that appears at the end of a string. Examples: ex_rightstr.nxc.

6.65.2.18

string strcat (string & dest, const string & src) [inline]

Concatenate strings. Appends a copy of the source string to the destination string. The terminating null character in destination is overwritten by the rst character of source, and a new null-character is appended at the end of the new string formed by the concatenation of both in destination. The destination string is returned. Parameters: dest The destination string.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.65

cstring API

620

src The string to be appended. Returns: The destination string. Examples: ex_StrCat.nxc.

6.65.2.19

string StrCat (string str1, string str2, string strN) [inline]

Concatenate strings. Return a string which is the result of concatenating all of the string arguments together. This function accepts any number of parameters which may be string variables, constants, or expressions. Parameters: str1 The rst string. str2 The second string. strN The Nth string. Returns: The concatenated string. Examples: ex_GetBrickDataAddress.nxc, ex_StrCatOld.nxc, StrReplace.nxc, and util_battery_1.nxc. ex_string.nxc, ex_-

6.65.2.20

int strcmp (const string & str1, const string & str2) [inline]

Compare two strings. Compares the string str1 to the string str2. Parameters: str1 A string to be compared. str2 A string to be compared.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.65

cstring API

621

Returns: Returns an integral value indicating the relationship between the strings. A zero value indicates that both strings are equal. A value greater than zero indicates that the rst character that does not match has a greater value in str1 than in str2. A value less than zero indicates the opposite. Examples: ex_strcmp.nxc.

6.65.2.21

string strcpy (string & dest, const string & src) [inline]

Copy string. Copies the string pointed by source into the array pointed by destination, including the terminating null character. The destination string is returned. Parameters: dest The destination string. src The string to be appended. Returns: The destination string. Examples: ex_strcpy.nxc.

6.65.2.22

byte StrIndex (string str, unsigned int idx) [inline]

Extract a character from a string. Return the numeric value of the character in the specied string at the specied index. The input string parameter may be a variable, constant, or expression. Parameters: str A string. idx The index of the character to retrieve. Returns: The numeric value of the character at the specied index.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.65

cstring API

622

Examples: ex_StrIndex.nxc, and ex_string.nxc.

6.65.2.23

int strlen (const string & str) [inline]

Get string length. Return the length of the specied string. The length of a string does not include the null terminator at the end of the string. Parameters: str A string. Returns: The length of the string. Examples: ex_string.nxc, and ex_StrLen.nxc.

6.65.2.24

unsigned int StrLen (string str) [inline]

Get string length. Return the length of the specied string. The length of a string does not include the null terminator at the end of the string. The input string parameter may be a variable, constant, or expression. Parameters: str A string. Returns: The length of the string. Examples: ex_string.nxc, and ex_StrLenOld.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.65

cstring API

623

6.65.2.25

string strncat (string & dest, const string & src, unsigned int num) [inline]

Append characters from string. Appends the rst num characters of source to destination, plus a terminating null-character. If the length of the string in source is less than num, only the content up to the terminating null-character is copied. The destination string is returned. Parameters: dest The destination string. src The string to be appended. num The maximum number of characters to be appended. Returns: The destination string. Examples: ex_strncat.nxc.

6.65.2.26

int strncmp (const string & str1, const string & str2, unsigned int num) [inline]

Compare characters of two strings. Compares up to num characters of the string str1 to those of the string str2. Parameters: str1 A string to be compared. str2 A string to be compared. num The maximum number of characters to be compared. Returns: Returns an integral value indicating the relationship between the strings. A zero value indicates that the characters compared in both strings are all equal. A value greater than zero indicates that the rst character that does not match has a greater value in str1 than in str2. A value less than zero indicates the opposite. Examples: ex_strncmp.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.65

cstring API

624

6.65.2.27

string strncpy (string & dest, const string & src, unsigned int num) [inline]

Copy characters from string. Copies the rst num characters of source to destination. The destination string is returned. Parameters: dest The destination string. src The string to be appended. num The maximum number of characters to be appended. Returns: The destination string. Examples: ex_strncpy.nxc.

6.65.2.28

string StrReplace (string str, unsigned int idx, string strnew) [inline]

Replace a portion of a string. Return a string with the part of the string replaced (starting at the specied index) with the contents of the new string value provided in the third argument. The input string parameters may be variables, constants, or expressions. Parameters: str A string. idx The starting point for the replace operation. strnew The replacement string. Returns: The modied string. Examples: ex_string.nxc, and ex_StrReplace.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.65

cstring API

625

6.65.2.29

void StrToByteArray (string str, byte & data[ ]) [inline]

Convert a string to a byte array. Convert the specied string to an array of byte by removing the null terminator at the end of the string. The output array variable must be a one-dimensional array of byte. See also: ByteArrayToStr, ByteArrayToStrEx Parameters: str A string data A byte array reference which, on output, will contain str without its null terminator. Examples: ex_string.nxc, and ex_StrToByteArray.nxc.

6.65.2.30

variant StrToNum (string str) [inline]

Convert string to number. Return the numeric value specied by the string passed to the function. If the content of the string is not a numeric value then this function returns zero. The input string parameter may be a variable, constant, or expression. Parameters: str String beginning with the representation of a number. str A string. Returns: A number. Examples: ex_string.nxc, and ex_StrToNum.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.65

cstring API

626

6.65.2.31

string SubStr (string str, unsigned int idx, unsigned int len) [inline]

Extract a portion of a string. Return a sub-string from the specied input string starting at idx and including the specied number of characters. The input string parameter may be a variable, constant, or expression. Parameters: str A string. idx The starting point of the sub-string. len The length of the sub-string. Returns: The sub-string extracted from parameter str. Examples: ex_StrCatOld.nxc, ex_string.nxc, and ex_SubStr.nxc.

6.65.2.32

int UnattenVar (string str, variant & x) [inline]

Unatten a string into a data type. Convert a string containing the byte representation of the specied variable back into the original variable type. See also: FlattenVar, Flatten Parameters: str A string containing attened data. x A variable reference where the unattened data is stored. Returns: A boolean value indicating whether the operation succeeded or not. Examples: ex_FlattenVar.nxc, ex_string.nxc, and ex_UnattenVar.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.66

ctype API

627

6.66

ctype API

Standard C ctype API functions. Functions int isupper (int c)


Check if character is uppercase letter.

int islower (int c)


Check if character is lowercase letter.

int isalpha (int c)


Check if character is alphabetic.

int isdigit (int c)


Check if character is decimal digit.

int isalnum (int c)


Check if character is alphanumeric.

int isspace (int c)


Check if character is a white-space.

int iscntrl (int c)


Check if character is a control character.

int isprint (int c)


Check if character is printable.

int isgraph (int c)


Check if character has graphical representation.

int ispunct (int c)


Check if character is a punctuation.

int isxdigit (int c)


Check if character is hexadecimal digit.

int toupper (int c)


Convert lowercase letter to uppercase.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.66

ctype API

628

int tolower (int c)


Convert uppercase letter to lowercase.

6.66.1

Detailed Description

Standard C ctype API functions. 6.66.2 6.66.2.1 Function Documentation int isalnum (int c) [inline]

Check if character is alphanumeric. Checks if parameter c is either a decimal digit or an uppercase or lowercase letter. The result is true if either isalpha or isdigit would also return true. Parameters: c Character to be checked. Returns: Returns a non-zero value (true) if c is either a digit or a letter, otherwise it returns 0 (false). Examples: ex_ctype.nxc, and ex_isalnum.nxc.

6.66.2.2

int isalpha (int c) [inline]

Check if character is alphabetic. Checks if parameter c is either an uppercase or lowercase letter. Parameters: c Character to be checked. Returns: Returns a non-zero value (true) if c is an alphabetic letter, otherwise it returns 0 (false).
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.66

ctype API

629

Examples: ex_ctype.nxc, and ex_isalpha.nxc.

6.66.2.3

int iscntrl (int c) [inline]

Check if character is a control character. Checks if parameter c is a control character. Parameters: c Character to be checked. Returns: Returns a non-zero value (true) if c is a control character, otherwise it returns 0 (false). Examples: ex_ctype.nxc, and ex_iscntrl.nxc.

6.66.2.4

int isdigit (int c) [inline]

Check if character is decimal digit. Checks if parameter c is a decimal digit character. Parameters: c Character to be checked. Returns: Returns a non-zero value (true) if c is a decimal digit, otherwise it returns 0 (false). Examples: ex_ctype.nxc, and ex_isdigit.nxc.

6.66.2.5

int isgraph (int c) [inline]

Check if character has graphical representation. Checks if parameter c is a character with a graphical representation.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.66

ctype API

630

Parameters: c Character to be checked. Returns: Returns a non-zero value (true) if c has a graphical representation, otherwise it returns 0 (false). Examples: ex_ctype.nxc, and ex_isgraph.nxc.

6.66.2.6

int islower (int c) [inline]

Check if character is lowercase letter. Checks if parameter c is an lowercase alphabetic letter. Parameters: c Character to be checked. Returns: Returns a non-zero value (true) if c is an lowercase alphabetic letter, otherwise it returns 0 (false). Examples: ex_ctype.nxc, and ex_islower.nxc.

6.66.2.7

int isprint (int c) [inline]

Check if character is printable. Checks if parameter c is a printable character (i.e., not a control character). Parameters: c Character to be checked. Returns: Returns a non-zero value (true) if c is a printable character, otherwise it returns 0 (false).
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.66

ctype API

631

Examples: ex_ctype.nxc, and ex_isprint.nxc.

6.66.2.8

int ispunct (int c) [inline]

Check if character is a punctuation. Checks if parameter c is a punctuation character. Parameters: c Character to be checked. Returns: Returns a non-zero value (true) if c is a punctuation character, otherwise it returns 0 (false). Examples: ex_ctype.nxc, and ex_ispunct.nxc.

6.66.2.9

int isspace (int c) [inline]

Check if character is a white-space. Checks if parameter c is a white-space character. Parameters: c Character to be checked. Returns: Returns a non-zero value (true) if c is a white-space character, otherwise it returns 0 (false). Examples: ex_ctype.nxc, and ex_isspace.nxc.

6.66.2.10

int isupper (int c) [inline]

Check if character is uppercase letter. Checks if parameter c is an uppercase alphabetic letter.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.66

ctype API

632

Parameters: c Character to be checked. Returns: Returns a non-zero value (true) if c is an uppercase alphabetic letter, otherwise it returns 0 (false). Examples: ex_ctype.nxc, and ex_isupper.nxc.

6.66.2.11

int isxdigit (int c) [inline]

Check if character is hexadecimal digit. Checks if parameter c is a hexadecimal digit character. Parameters: c Character to be checked. Returns: Returns a non-zero value (true) if c is a hexadecimal digit character, otherwise it returns 0 (false). Examples: ex_ctype.nxc, and ex_isxdigit.nxc.

6.66.2.12

int tolower (int c) [inline]

Convert uppercase letter to lowercase. Converts parameter c to its lowercase equivalent if c is an uppercase letter and has a lowercase equivalent. If no such conversion is possible, the value returned is c unchanged. Parameters: c Uppercase letter character to be converted. Returns: The lowercase equivalent to c, if such value exists, or c (unchanged) otherwise..
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.67

Property constants

633

Examples: ex_ctype.nxc, and ex_tolower.nxc.

6.66.2.13

int toupper (int c) [inline]

Convert lowercase letter to uppercase. Converts parameter c to its uppercase equivalent if c is a lowercase letter and has an uppercase equivalent. If no such conversion is possible, the value returned is c unchanged. Parameters: c Lowercase letter character to be converted. Returns: The uppercase equivalent to c, if such value exists, or c (unchanged) otherwise.. Examples: ex_ctype.nxc, and ex_toupper.nxc.

6.67

Property constants

Use these constants for specifying the property for the GetProperty and SetProperty direct commands. Denes 6.67.1 #dene RC_PROP_BTONOFF 0x0 #dene RC_PROP_SOUND_LEVEL 0x1 #dene RC_PROP_SLEEP_TIMEOUT 0x2 #dene RC_PROP_DEBUGGING 0xF Detailed Description

Use these constants for specifying the property for the GetProperty and SetProperty direct commands.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.68

Array operation constants

634

6.67.2 6.67.2.1

Dene Documentation #dene RC_PROP_BTONOFF 0x0 Set/get whether bluetooth is on or off

6.67.2.2

#dene RC_PROP_DEBUGGING 0xF Set/get enhanced rmware debugging information

6.67.2.3

#dene RC_PROP_SLEEP_TIMEOUT 0x2 Set/get the NXT sleep timeout value (times 60000)

6.67.2.4

#dene RC_PROP_SOUND_LEVEL 0x1 Set/get the NXT sound level

Examples: ex_RemoteGetProperty.nxc, and ex_RemoteSetProperty.nxc.

6.68

Array operation constants

Constants for use with the NXC ArrayOp function and the NBC arrop statement. Denes 6.68.1 #dene OPARR_SUM 0x00 #dene OPARR_MEAN 0x01 #dene OPARR_SUMSQR 0x02 #dene OPARR_STD 0x03 #dene OPARR_MIN 0x04 #dene OPARR_MAX 0x05 #dene OPARR_SORT 0x06 Detailed Description

Constants for use with the NXC ArrayOp function and the NBC arrop statement.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.69

System Call function constants

635

6.68.2 6.68.2.1

Dene Documentation #dene OPARR_MAX 0x05 Calculate the maximum value of the elements in the numeric input array

Examples: ex_ArrayOp.nxc.

6.68.2.2

#dene OPARR_MEAN 0x01 Calculate the mean value for the elements in the numeric input array

6.68.2.3

#dene OPARR_MIN 0x04 Calculate the minimum value of the elements in the numeric input array

6.68.2.4

#dene OPARR_SORT 0x06 Sort the elements in the numeric input array

6.68.2.5

#dene OPARR_STD 0x03 Calculate the standard deviation of the elements in the numeric input array

6.68.2.6

#dene OPARR_SUM 0x00 Calculate the sum of the elements in the numeric input array

6.68.2.7

#dene OPARR_SUMSQR 0x02 Calculate the sum of the squares of the elements in the numeric input array

6.69

System Call function constants

Constants for use in the SysCall() function or NBC syscall statement.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.69

System Call function constants

636

Denes #dene FileOpenRead 0 #dene FileOpenWrite 1 #dene FileOpenAppend 2 #dene FileRead 3 #dene FileWrite 4 #dene FileClose 5 #dene FileResolveHandle 6 #dene FileRename 7 #dene FileDelete 8 #dene SoundPlayFile 9 #dene SoundPlayTone 10 #dene SoundGetState 11 #dene SoundSetState 12 #dene DrawText 13 #dene DrawPoint 14 #dene DrawLine 15 #dene DrawCircle 16 #dene DrawRect 17 #dene DrawGraphic 18 #dene SetScreenMode 19 #dene ReadButton 20 #dene CommLSWrite 21 #dene CommLSRead 22 #dene CommLSCheckStatus 23 #dene RandomNumber 24 #dene GetStartTick 25 #dene MessageWrite 26 #dene MessageRead 27 #dene CommBTCheckStatus 28 #dene CommBTWrite 29 #dene CommBTRead 30 #dene KeepAlive 31 #dene IOMapRead 32 #dene IOMapWrite 33 #dene ColorSensorRead 34 #dene CommBTOnOff 35 #dene CommBTConnection 36 #dene CommHSWrite 37 #dene CommHSRead 38 #dene CommHSCheckStatus 39 #dene ReadSemData 40

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.69

System Call function constants

637

6.69.1

#dene WriteSemData 41 #dene ComputeCalibValue 42 #dene UpdateCalibCacheInfo 43 #dene DatalogWrite 44 #dene DatalogGetTimes 45 #dene SetSleepTimeoutVal 46 #dene ListFiles 47 #dene IOMapReadByID 78 #dene IOMapWriteByID 79 #dene DisplayExecuteFunction 80 #dene CommExecuteFunction 81 #dene LoaderExecuteFunction 82 #dene FileFindFirst 83 #dene FileFindNext 84 #dene FileOpenWriteLinear 85 #dene FileOpenWriteNonLinear 86 #dene FileOpenReadLinear 87 #dene CommHSControl 88 #dene CommLSWriteEx 89 #dene FileSeek 90 #dene FileResize 91 #dene DrawGraphicArray 92 #dene DrawPolygon 93 #dene DrawEllipse 94 #dene DrawFont 95 #dene MemoryManager 96 #dene ReadLastResponse 97 #dene FileTell 98 Detailed Description

Constants for use in the SysCall() function or NBC syscall statement. 6.69.2 6.69.2.1 Dene Documentation #dene ColorSensorRead 34 Read data from the NXT 2.0 color sensor 6.69.2.2 #dene CommBTCheckStatus 28 Check the bluetooth status
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.69

System Call function constants

638

6.69.2.3

#dene CommBTConnection 36 Connect or disconnect to a known bluetooth device

6.69.2.4

#dene CommBTOnOff 35 Turn the bluetooth radio on or off

6.69.2.5

#dene CommBTRead 30 Read from a bluetooth connection

6.69.2.6

#dene CommBTWrite 29 Write to a bluetooth connections

6.69.2.7

#dene CommExecuteFunction 81 Execute one of the Comm modules internal functions

6.69.2.8

#dene CommHSCheckStatus 39 Check the status of the hi-speed port

6.69.2.9

#dene CommHSControl 88 Control the hi-speed port

6.69.2.10

#dene CommHSRead 38 Read data from the hi-speed port

6.69.2.11

#dene CommHSWrite 37 Write data to the hi-speed port

6.69.2.12

#dene CommLSCheckStatus 23 Check the status of a lowspeed (aka I2C) device

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.69

System Call function constants

639

6.69.2.13

#dene CommLSRead 22 Read from a lowspeed (aka I2C) device

6.69.2.14

#dene CommLSWrite 21 Write to a lowspeed (aka I2C) device

6.69.2.15

#dene CommLSWriteEx 89 Write to a lowspeed (aka I2C) device with optional restart on read

6.69.2.16

#dene ComputeCalibValue 42 Compute a calibration value

6.69.2.17

#dene DatalogGetTimes 45 Get datalog timing information

6.69.2.18

#dene DatalogWrite 44 Write to the datalog

6.69.2.19

#dene DisplayExecuteFunction 80 Execute one of the Display modules internal functions

6.69.2.20

#dene DrawCircle 16 Draw a circle on the LCD screen

6.69.2.21

#dene DrawEllipse 94 Draw an ellipse on the LCD screen

6.69.2.22

#dene DrawFont 95 Draw text using a custom RIC-based font to the LCD screen

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.69

System Call function constants

640

6.69.2.23

#dene DrawGraphic 18 Draw a graphic image on the LCD screen

6.69.2.24

#dene DrawGraphicArray 92 Draw a graphic image from a byte array to the LCD screen

Examples: ex_dispgout.nxc.

6.69.2.25

#dene DrawLine 15 Draw a line on the LCD screen

6.69.2.26

#dene DrawPoint 14 Draw a single pixel on the LCD screen

6.69.2.27

#dene DrawPolygon 93 Draw a polygon on the LCD screen

6.69.2.28

#dene DrawRect 17 Draw a rectangle on the LCD screen

6.69.2.29

#dene DrawText 13 Draw text to one of 8 LCD lines

Examples: ex_syscall.nxc.

6.69.2.30

#dene FileClose 5 Close the specied le

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.69

System Call function constants

641

6.69.2.31

#dene FileDelete 8 Delete a le

6.69.2.32

#dene FileFindFirst 83 Start a search for a le using a lename pattern

6.69.2.33

#dene FileFindNext 84 Continue searching for a le

6.69.2.34

#dene FileOpenAppend 2 Open a le for appending to the end of the le

6.69.2.35

#dene FileOpenRead 0 Open a le for reading

6.69.2.36

#dene FileOpenReadLinear 87 Open a linear le for reading

6.69.2.37

#dene FileOpenWrite 1 Open a le for writing (creates a new le)

6.69.2.38

#dene FileOpenWriteLinear 85 Open a linear le for writing

6.69.2.39

#dene FileOpenWriteNonLinear 86 Open a non-linear le for writing

6.69.2.40

#dene FileRead 3 Read from the specied le

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.69

System Call function constants

642

6.69.2.41

#dene FileRename 7 Rename a le

6.69.2.42

#dene FileResize 91 Resize a le (not yet implemented)

6.69.2.43

#dene FileResolveHandle 6 Get a le handle for the specied lename if it is already open

6.69.2.44

#dene FileSeek 90 Seek to a specic position in an open le

6.69.2.45

#dene FileTell 98 Return the current le position in an open le

6.69.2.46

#dene FileWrite 4 Write to the specied le

6.69.2.47

#dene GetStartTick 25 Get the current system tick count

6.69.2.48

#dene IOMapRead 32

Read data from one of the rmware modules IOMap structures using the modules name 6.69.2.49 #dene IOMapReadByID 78

Read data from one of the rmware modules IOMap structures using the modules ID

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.69

System Call function constants

643

6.69.2.50

#dene IOMapWrite 33

Write data to one of the rmware modules IOMap structures using the modules name 6.69.2.51 #dene IOMapWriteByID 79

Write data to one of the rmware modules IOMap structures using the modules ID 6.69.2.52 #dene KeepAlive 31 Reset the NXT sleep timer 6.69.2.53 #dene ListFiles 47 List les that match the specied lename pattern 6.69.2.54 #dene LoaderExecuteFunction 82 Execute one of the Loader modules internal functions 6.69.2.55 #dene MemoryManager 96

Read memory manager information, optionally compacting the dataspace rst 6.69.2.56 #dene MessageRead 27 Read a message from a mailbox 6.69.2.57 #dene MessageWrite 26 Write a message to a mailbox 6.69.2.58 #dene RandomNumber 24 Generate a random number 6.69.2.59 #dene ReadButton 20 Read the current button state
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.69

System Call function constants

644

6.69.2.60

#dene ReadLastResponse 97

Read the last response packet received by the NXT. Optionally clear the value after reading it. 6.69.2.61 #dene ReadSemData 40 Read motor semaphore data 6.69.2.62 #dene SetScreenMode 19 Set the screen mode 6.69.2.63 #dene SetSleepTimeoutVal 46 Set the NXT sleep timeout value 6.69.2.64 #dene SoundGetState 11 Get the current sound module state 6.69.2.65 #dene SoundPlayFile 9 Play a sound or melody le 6.69.2.66 #dene SoundPlayTone 10 Play a simple tone with the specied frequency and duration 6.69.2.67 #dene SoundSetState 12 Set the sound module state 6.69.2.68 #dene UpdateCalibCacheInfo 43 Update sensor calibration cache information 6.69.2.69 #dene WriteSemData 41 Write motor semaphore data
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.70

Line number constants

645

6.70

Line number constants

Line numbers for use with DrawText system function. Denes 6.70.1 #dene LCD_LINE8 0 #dene LCD_LINE7 8 #dene LCD_LINE6 16 #dene LCD_LINE5 24 #dene LCD_LINE4 32 #dene LCD_LINE3 40 #dene LCD_LINE2 48 #dene LCD_LINE1 56 Detailed Description

Line numbers for use with DrawText system function. See also: SysDrawText(), TextOut(), NumOut() 6.70.2 6.70.2.1 Dene Documentation #dene LCD_LINE1 56 The 1st line of the LCD screen Examples: ex_acos.nxc, ex_acosd.nxc, ex_addressof.nxc, ex_addressofex.nxc, ex_ArrayMax.nxc, ex_ArrayMean.nxc, ex_ArrayMin.nxc, ex_ArrayOp.nxc, ex_ArraySort.nxc, ex_ArrayStd.nxc, ex_ArraySum.nxc, ex_ArraySumSqr.nxc, ex_asin.nxc, ex_asind.nxc, ex_atan.nxc, ex_atand.nxc, ex_atof.nxc, ex_atoi.nxc, ex_atol.nxc, ex_buttonpressed.nxc, ex_clearline.nxc, ex_contrast.nxc, ex_copy.nxc, ex_ctype.nxc, ex_DataMode.nxc, ex_delete_data_le.nxc, ex_dispgaout.nxc, ex_dispgout.nxc, ex_displayfont.nxc, ex_dispmisc.nxc, ex_div.nxc, ex_le_system.nxc, ex_ndrstle.nxc, ex_ndnextle.nxc, ex_FlattenVar.nxc, ex_GetBrickDataAddress.nxc, ex_getchar.nxc, ex_getmemoryinfo.nxc, ex_HTGyroTest.nxc, ex_i2cdeviceid.nxc, ex_i2cdeviceinfo.nxc, ex_i2cvendorid.nxc, ex_i2cversion.nxc, ex_isnan.nxc, ex_labs.nxc, ex_ldiv.nxc, ex_leftstr.nxc, ex_memcmp.nxc, ex_midstr.nxc,

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.70

Line number constants

646

ex_motoroutputoptions.nxc, ex_NumOut.nxc, ex_NXTLineLeader.nxc, ex_NXTPowerMeter.nxc, ex_NXTServo.nxc, ex_NXTSumoEyes.nxc, ex_Pos.nxc, ex_ReadSensorHTAngle.nxc, ex_ReadSensorHTTouchMultiplexer.nxc, ex_reladdressof.nxc, ex_rightstr.nxc, ex_RS485Receive.nxc, ex_RS485Send.nxc, ex_SensorHTGyro.nxc, ex_SetAbortFlag.nxc, ex_setdisplayfont.nxc, ex_SetLongAbort.nxc, ex_SizeOf.nxc, ex_string.nxc, ex_strtod.nxc, ex_strtol.nxc, ex_strtoul.nxc, ex_syscall.nxc, ex_SysColorSensorRead.nxc, ex_syscommbtconnection.nxc, ex_SysCommBTOnOff.nxc, ex_SysCommHSCheckStatus.nxc, ex_SysCommHSControl.nxc, ex_SysCommHSRead.nxc, ex_SysComputeCalibValue.nxc, ex_SysDatalogWrite.nxc, ex_sysdrawtext.nxc, ex_syslendrst.nxc, ex_syslendnext.nxc, ex_sysleread.nxc, ex_syslewrite.nxc, ex_sysmemorymanager.nxc, ex_sysmessageread.nxc, ex_SysReadLastResponse.nxc, ex_SysReadSemData.nxc, ex_SysUpdateCalibCacheInfo.nxc, ex_SysWriteSemData.nxc, and ex_UnattenVar.nxc.

6.70.2.2

#dene LCD_LINE2 48 The 2nd line of the LCD screen

Examples: ex_acos.nxc, ex_acosd.nxc, ex_addressof.nxc, ex_addressofex.nxc, ex_ArrayMax.nxc, ex_ArrayMean.nxc, ex_ArrayMin.nxc, ex_ArrayOp.nxc, ex_ArraySort.nxc, ex_ArrayStd.nxc, ex_ArraySum.nxc, ex_ArraySumSqr.nxc, ex_asin.nxc, ex_asind.nxc, ex_atan.nxc, ex_atand.nxc, ex_buttonpressed.nxc, ex_ctype.nxc, ex_DataMode.nxc, ex_displayfont.nxc, ex_dispmisc.nxc, ex_div.nxc, ex_le_system.nxc, ex_ndrstle.nxc, ex_ndnextle.nxc, ex_FlattenVar.nxc, ex_getmemoryinfo.nxc, ex_HTGyroTest.nxc, ex_i2cdeviceid.nxc, ex_i2cdeviceinfo.nxc, ex_i2cvendorid.nxc, ex_i2cversion.nxc, ex_isnan.nxc, ex_labs.nxc, ex_ldiv.nxc, ex_memcmp.nxc, ex_NXTLineLeader.nxc, ex_NXTPowerMeter.nxc, ex_NXTServo.nxc, ex_ReadSensorHTAngle.nxc, ex_ReadSensorHTTouchMultiplexer.nxc, ex_reladdressof.nxc, ex_SetAbortFlag.nxc, ex_setdisplayfont.nxc, ex_SetLongAbort.nxc, ex_SizeOf.nxc, ex_string.nxc, ex_strtod.nxc, ex_strtol.nxc, ex_strtoul.nxc, ex_SubStr.nxc, ex_syscommbtconnection.nxc, ex_sysleread.nxc, ex_sysmemorymanager.nxc, ex_SysReadLastResponse.nxc, ex_UnattenVar.nxc, util_battery_1.nxc, util_battery_2.nxc, and util_rpm.nxc.

6.70.2.3

#dene LCD_LINE3 40 The 3rd line of the LCD screen

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.70

Line number constants

647

Examples: ex_acos.nxc, ex_acosd.nxc, ex_ArraySort.nxc, ex_asin.nxc, ex_asind.nxc, ex_atan.nxc, ex_atand.nxc, ex_buttonpressed.nxc, ex_ctype.nxc, ex_dispmisc.nxc, ex_ndrstle.nxc, ex_ndnextle.nxc, ex_FlattenVar.nxc, ex_i2cdeviceid.nxc, ex_i2cdeviceinfo.nxc, ex_i2cvendorid.nxc, ex_i2cversion.nxc, ex_memcmp.nxc, ex_NXTLineLeader.nxc, ex_NXTPowerMeter.nxc, ex_NXTServo.nxc, ex_ReadSensorHTAngle.nxc, ex_ReadSensorHTTouchMultiplexer.nxc, ex_reladdressof.nxc, ex_SetAbortFlag.nxc, ex_SetLongAbort.nxc, ex_SizeOf.nxc, ex_StrCatOld.nxc, ex_string.nxc, ex_strtod.nxc, ex_strtol.nxc, ex_strtoul.nxc, ex_syscommbtconnection.nxc, ex_TextOut.nxc, and ex_UnattenVar.nxc.

6.70.2.4

#dene LCD_LINE4 32 The 4th line of the LCD screen

Examples: ex_acos.nxc, ex_acosd.nxc, ex_addressof.nxc, ex_addressofex.nxc, ex_ArrayBuild.nxc, ex_ArraySort.nxc, ex_asin.nxc, ex_asind.nxc, ex_atan.nxc, ex_atand.nxc, ex_buttonpressed.nxc, ex_ctype.nxc, ex_DataMode.nxc, ex_displayfont.nxc, ex_dispmisc.nxc, ex_FlattenVar.nxc, ex_NXTPowerMeter.nxc, ex_ReadSensorHTTouchMultiplexer.nxc, ex_reladdressof.nxc, ex_SetAbortFlag.nxc, ex_setdisplayfont.nxc, ex_SetLongAbort.nxc, ex_SizeOf.nxc, ex_string.nxc, ex_StrReplace.nxc, ex_sysdataloggettimes.nxc, and ex_UnattenVar.nxc.

6.70.2.5

#dene LCD_LINE5 24 The 5th line of the LCD screen

Examples: ex_ArrayBuild.nxc, ex_ArraySort.nxc, ex_atan.nxc, ex_atand.nxc, ex_ctype.nxc, ex_DataMode.nxc, ex_dispmisc.nxc, ex_NXTPowerMeter.nxc, ex_StrIndex.nxc, ex_string.nxc, and ex_sysdataloggettimes.nxc.

6.70.2.6

#dene LCD_LINE6 16 The 6th line of the LCD screen

Examples: ex_ArraySort.nxc, ex_ctype.nxc, ex_NXTPowerMeter.nxc, ex_string.nxc, ex_StrLenOld.nxc, and ex_syslistles.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.71

Time constants

648

6.70.2.7

#dene LCD_LINE7 8 The 7th line of the LCD screen

Examples: ex_ArraySort.nxc, ex_ctype.nxc, ex_NXTPowerMeter.nxc, and ex_string.nxc.

6.70.2.8

#dene LCD_LINE8 0 The 8th line of the LCD screen

Examples: ex_ArraySort.nxc, ex_ctype.nxc, ex_dispgout.nxc, ex_getmemoryinfo.nxc, ex_SetAbortFlag.nxc, ex_SetLongAbort.nxc, ex_string.nxc, and ex_sysmemorymanager.nxc.

6.71

Time constants

Constants for use with the Wait() function. Denes #dene MS_1 1 #dene MS_2 2 #dene MS_3 3 #dene MS_4 4 #dene MS_5 5 #dene MS_6 6 #dene MS_7 7 #dene MS_8 8 #dene MS_9 9 #dene MS_10 10 #dene MS_20 20 #dene MS_30 30 #dene MS_40 40 #dene MS_50 50 #dene MS_60 60 #dene MS_70 70 #dene MS_80 80 #dene MS_90 90 #dene MS_100 100

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.71

Time constants

649

6.71.1

#dene MS_150 150 #dene MS_200 200 #dene MS_250 250 #dene MS_300 300 #dene MS_350 350 #dene MS_400 400 #dene MS_450 450 #dene MS_500 500 #dene MS_600 600 #dene MS_700 700 #dene MS_800 800 #dene MS_900 900 #dene SEC_1 1000 #dene SEC_2 2000 #dene SEC_3 3000 #dene SEC_4 4000 #dene SEC_5 5000 #dene SEC_6 6000 #dene SEC_7 7000 #dene SEC_8 8000 #dene SEC_9 9000 #dene SEC_10 10000 #dene SEC_15 15000 #dene SEC_20 20000 #dene SEC_30 30000 #dene MIN_1 60000 Detailed Description

Constants for use with the Wait() function. See also: Wait() 6.71.2 6.71.2.1 Dene Documentation #dene MIN_1 60000 1 minute Examples: ex_SysSetSleepTimeout.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.71

Time constants

650

6.71.2.2

#dene MS_1 1 1 millisecond

Examples: ex_RS485Send.nxc.

6.71.2.3

#dene MS_10 10 10 milliseconds

Examples: ex_PosReg.nxc, ex_RS485Receive.nxc, and ex_RS485Send.nxc.

6.71.2.4

#dene MS_100 100 100 milliseconds

Examples: ex_PolyOut.nxc, and ex_sysdrawpolygon.nxc.

6.71.2.5

#dene MS_150 150 150 milliseconds

6.71.2.6

#dene MS_2 2 2 milliseconds

6.71.2.7

#dene MS_20 20 20 milliseconds

Examples: ex_dispgaout.nxc, ex_sin_cos.nxc, ex_sind_cosd.nxc, glBoxDemo.nxc, and glScaleDemo.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.71

Time constants

651

6.71.2.8

#dene MS_200 200 200 milliseconds

Examples: ex_dispgoutex.nxc, and ex_playtones.nxc.

6.71.2.9

#dene MS_250 250 250 milliseconds

6.71.2.10

#dene MS_3 3 3 milliseconds

6.71.2.11

#dene MS_30 30 30 milliseconds

6.71.2.12

#dene MS_300 300 300 milliseconds

6.71.2.13

#dene MS_350 350 350 milliseconds

6.71.2.14

#dene MS_4 4 4 milliseconds

6.71.2.15

#dene MS_40 40 40 milliseconds

6.71.2.16

#dene MS_400 400 400 milliseconds

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.71

Time constants

652

6.71.2.17

#dene MS_450 450 450 milliseconds

6.71.2.18

#dene MS_5 5 5 milliseconds

Examples: ex_getchar.nxc.

6.71.2.19

#dene MS_50 50 50 milliseconds

Examples: ex_CircleOut.nxc, and ex_playtones.nxc.

6.71.2.20

#dene MS_500 500 500 milliseconds

Examples: alternating_tasks.nxc, ex_dispgout.nxc, ex_NXTSumoEyes.nxc, ex_playsound.nxc, ex_ReadSensorHTAngle.nxc, ex_yield.nxc, and util_rpm.nxc.

6.71.2.21

#dene MS_6 6 6 milliseconds

6.71.2.22

#dene MS_60 60 60 milliseconds

6.71.2.23

#dene MS_600 600 600 milliseconds

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.71

Time constants

653

6.71.2.24

#dene MS_7 7 7 milliseconds

6.71.2.25

#dene MS_70 70 70 milliseconds

6.71.2.26

#dene MS_700 700 700 milliseconds

6.71.2.27

#dene MS_8 8 8 milliseconds

6.71.2.28

#dene MS_80 80 80 milliseconds

6.71.2.29

#dene MS_800 800 800 milliseconds

6.71.2.30

#dene MS_9 9 9 milliseconds

6.71.2.31

#dene MS_90 90 90 milliseconds

6.71.2.32

#dene MS_900 900 900 milliseconds

6.71.2.33

#dene SEC_1 1000 1 second

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.71

Time constants

654

Examples: alternating_tasks.nxc, ex_dispmisc.nxc, ex_le_system.nxc, ex_getmemoryinfo.nxc, ex_NXTLineLeader.nxc, ex_NXTServo.nxc, ex_playsound.nxc, ex_playtones.nxc, ex_PolyOut.nxc, ex_SysCommHSRead.nxc, ex_sysdrawpolygon.nxc, ex_sysmemorymanager.nxc, ex_wait.nxc, and ex_yield.nxc.

6.71.2.34

#dene SEC_10 10000 10 seconds

Examples: ex_addressof.nxc, ex_addressofex.nxc, ex_ClearScreen.nxc, ex_displayfont.nxc, ex_i2cdeviceinfo.nxc, ex_NXTPowerMeter.nxc, ex_reladdressof.nxc, ex_setdisplayfont.nxc, ex_string.nxc, ex_syscommbtconnection.nxc, and ex_SysCommHSControl.nxc.

6.71.2.35

#dene SEC_15 15000 15 seconds

Examples: ex_dispfunc.nxc, and ex_memcmp.nxc.

6.71.2.36

#dene SEC_2 2000 2 seconds

Examples: ex_CircleOut.nxc, ex_dispmisc.nxc, ex_le_system.nxc, ex_LineOut.nxc, ex_PolyOut.nxc, and ex_sysdrawpolygon.nxc.

6.71.2.37

#dene SEC_20 20000 20 seconds

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.71

Time constants

655

6.71.2.38

#dene SEC_3 3000 3 seconds

Examples: ex_ArrayMax.nxc, ex_ArrayMean.nxc, ex_ArrayMin.nxc, ex_ArrayOp.nxc, ex_ArraySort.nxc, ex_ArrayStd.nxc, ex_ArraySum.nxc, ex_ArraySumSqr.nxc, ex_div.nxc, and ex_ldiv.nxc.

6.71.2.39

#dene SEC_30 30000 30 seconds

6.71.2.40

#dene SEC_4 4000 4 seconds

Examples: ex_copy.nxc, ex_dispftout.nxc, ex_dispmisc.nxc, ex_leftstr.nxc, ex_midstr.nxc, ex_rightstr.nxc, ex_sysdrawfont.nxc, ex_syslistles.nxc, util_battery_1.nxc, and util_battery_2.nxc.

6.71.2.41

#dene SEC_5 5000 5 seconds

Examples: ex_atof.nxc, ex_atoi.nxc, ex_atol.nxc, ex_clearline.nxc, ex_ctype.nxc, ex_DataMode.nxc, ex_delete_data_le.nxc, ex_dispftout.nxc, ex_dispgout.nxc, ex_FlattenVar.nxc, ex_getmemoryinfo.nxc, ex_isnan.nxc, ex_labs.nxc, ex_NXTHID.nxc, ex_NXTLineLeader.nxc, ex_NXTPowerMeter.nxc, ex_NXTServo.nxc, ex_PFMate.nxc, ex_StrCatOld.nxc, ex_StrIndex.nxc, ex_string.nxc, ex_StrLenOld.nxc, ex_StrReplace.nxc, ex_SubStr.nxc, ex_sysdataloggettimes.nxc, ex_sysdrawgraphicarray.nxc, ex_sysmemorymanager.nxc, ex_UnattenVar.nxc, and ex_wait.nxc.

6.71.2.42

#dene SEC_6 6000 6 seconds

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.72

Mailbox constants

656

Examples: ex_strtod.nxc, ex_strtol.nxc, and ex_strtoul.nxc.

6.71.2.43

#dene SEC_7 7000 7 seconds

6.71.2.44

#dene SEC_8 8000 8 seconds

Examples: ex_le_system.nxc.

6.71.2.45

#dene SEC_9 9000 9 seconds

Examples: ex_SensorHTGyro.nxc.

6.72

Mailbox constants

Mailbox number constants should be used to avoid confusing NXT-G users. Denes #dene MAILBOX1 0 #dene MAILBOX2 1 #dene MAILBOX3 2 #dene MAILBOX4 3 #dene MAILBOX5 4 #dene MAILBOX6 5 #dene MAILBOX7 6 #dene MAILBOX8 7 #dene MAILBOX9 8 #dene MAILBOX10 9

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.72

Mailbox constants

657

6.72.1

Detailed Description

Mailbox number constants should be used to avoid confusing NXT-G users. See also: SysMessageWrite(), SysMessageRead(), SendMessage(), ReceiveMessage(), SendRemoteBool(), SendRemoteNumber(), SendRemoteString(), SendResponseBool(), SendResponseNumber(), SendResponseString(), ReceiveRemoteBool(), ReceiveRemoteNumber(), ReceiveRemoteString(), ReceiveRemoteMessageEx(), RemoteMessageRead(), RemoteMessageWrite() 6.72.2 6.72.2.1 Dene Documentation #dene MAILBOX1 0 Mailbox number 1 Examples: ex_ReceiveMessage.nxc, ex_ReceiveRemoteBool.nxc, ex_ReceiveRemoteMessageEx.nxc, ex_ReceiveRemoteNumber.nxc, ex_SendMessage.nxc, ex_SendRemoteBool.nxc, ex_SendRemoteNumber.nxc, ex_SendRemoteString.nxc, ex_SendResponseBool.nxc, ex_SendResponseNumber.nxc, ex_SendResponseString.nxc, ex_sysmessageread.nxc, and ex_sysmessagewrite.nxc.

6.72.2.2

#dene MAILBOX10 9 Mailbox number 10

6.72.2.3

#dene MAILBOX2 1 Mailbox number 2

6.72.2.4

#dene MAILBOX3 2 Mailbox number 3

6.72.2.5

#dene MAILBOX4 3 Mailbox number 4

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.73

VM state constants

658

6.72.2.6

#dene MAILBOX5 4 Mailbox number 5

6.72.2.7

#dene MAILBOX6 5 Mailbox number 6

6.72.2.8

#dene MAILBOX7 6 Mailbox number 7

6.72.2.9

#dene MAILBOX8 7 Mailbox number 8

6.72.2.10

#dene MAILBOX9 8 Mailbox number 9

6.73

VM state constants

Constants dening possible VM states. Denes 6.73.1 #dene TIMES_UP 6 #dene ROTATE_QUEUE 5 #dene STOP_REQ 4 #dene BREAKOUT_REQ 3 #dene CLUMP_SUSPEND 2 #dene CLUMP_DONE 1 Detailed Description

Constants dening possible VM states.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.74

Fatal errors

659

6.73.2 6.73.2.1

Dene Documentation #dene BREAKOUT_REQ 3 VM should break out of current thread

6.73.2.2

#dene CLUMP_DONE 1 VM has nished executing thread

6.73.2.3

#dene CLUMP_SUSPEND 2 VM should suspend thread

6.73.2.4

#dene ROTATE_QUEUE 5 VM should rotate queue

6.73.2.5

#dene STOP_REQ 4 VM should stop executing program

6.73.2.6

#dene TIMES_UP 6 VM time is up

6.74

Fatal errors

Constants dening various fatal error conditions. Denes #dene ERR_ARG -1 #dene ERR_INSTR -2 #dene ERR_FILE -3 #dene ERR_VER -4 #dene ERR_MEM -5 #dene ERR_BAD_PTR -6 #dene ERR_CLUMP_COUNT -7 #dene ERR_NO_CODE -8

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.74

Fatal errors

660

6.74.1

#dene ERR_INSANE_OFFSET -9 #dene ERR_BAD_POOL_SIZE -10 #dene ERR_LOADER_ERR -11 #dene ERR_SPOTCHECK_FAIL -12 #dene ERR_NO_ACTIVE_CLUMP -13 #dene ERR_DEFAULT_OFFSETS -14 #dene ERR_MEMMGR_FAIL -15 #dene ERR_NON_FATAL -16 Detailed Description

Constants dening various fatal error conditions. 6.74.2 6.74.2.1 Dene Documentation #dene ERR_ARG -1 0xFF Bad arguments 6.74.2.2 #dene ERR_BAD_POOL_SIZE -10 0xF6 VarsCmd.PoolSize > POOL_MAX_SIZE 6.74.2.3 #dene ERR_BAD_PTR -6 0xFA Someone passed us a bad pointer! 6.74.2.4 #dene ERR_CLUMP_COUNT -7 0xF9 (FileClumpCount == 0 || FileClumpCount >= NOT_A_CLUMP) 6.74.2.5 #dene ERR_DEFAULT_OFFSETS -14

0xF2 (DefaultsOffset != FileOffsets.DynamicDefaults) || (DefaultsOffset + FileOffsets.DynamicDefaultsSize != FileOffsets.DSDefaultsSize) 6.74.2.6 #dene ERR_FILE -3 0xFD Malformed le contents

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.74

Fatal errors

661

6.74.2.7

#dene ERR_INSANE_OFFSET -9 0xF7 CurrOffset != (DataSize - VarsCmd.CodespaceCount 2)

6.74.2.8

#dene ERR_INSTR -2 0xFE Illegal bytecode instruction

6.74.2.9

#dene ERR_LOADER_ERR -11

0xF5 LOADER_ERR(LStatus) != SUCCESS || pData == NULL || DataSize == 0 6.74.2.10 #dene ERR_MEM -5 0xFB Insufcient memory available 6.74.2.11 #dene ERR_MEMMGR_FAIL -15

0xF1 (UBYTE )VarsCmd.MemMgr.pDopeVectorArray != VarsCmd.pDataspace + DV_ARRAY[0].Offset 6.74.2.12 #dene ERR_NO_ACTIVE_CLUMP -13 0xF3 VarsCmd.RunQ.Head == NOT_A_CLUMP 6.74.2.13 #dene ERR_NO_CODE -8 0xF8 VarsCmd.CodespaceCount == 0 6.74.2.14 #dene ERR_NON_FATAL -16 Fatal errors are greater than this value 6.74.2.15 #dene ERR_SPOTCHECK_FAIL -12 0xF4 ((UBYTE)(VarsCmd.pCodespace) < pData) (c_cmd.c 1893) 6.74.2.16 #dene ERR_VER -4 0xFC Version mismatch between rmware and compiler
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.75

General errors

662

6.75

General errors

Constants dening general error conditions. Denes 6.75.1 #dene ERR_INVALID_PORT -16 #dene ERR_INVALID_FIELD -17 #dene ERR_INVALID_QUEUE -18 #dene ERR_INVALID_SIZE -19 #dene ERR_NO_PROG -20 Detailed Description

Constants dening general error conditions. 6.75.2 6.75.2.1 Dene Documentation #dene ERR_INVALID_FIELD -17 0xEF Attempted to access invalid eld of a structure 6.75.2.2 #dene ERR_INVALID_PORT -16 0xF0 Bad input or output port specied 6.75.2.3 #dene ERR_INVALID_QUEUE -18 0xEE Illegal queue ID specied 6.75.2.4 #dene ERR_INVALID_SIZE -19 0xED Illegal size specied 6.75.2.5 #dene ERR_NO_PROG -20 0xEC No active program

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.76

Communications specic errors

663

6.76

Communications specic errors

Constants dening communication error conditions. Denes 6.76.1 #dene ERR_COMM_CHAN_NOT_READY -32 #dene ERR_COMM_CHAN_INVALID -33 #dene ERR_COMM_BUFFER_FULL -34 #dene ERR_COMM_BUS_ERR -35 Detailed Description

Constants dening communication error conditions. 6.76.2 6.76.2.1 Dene Documentation #dene ERR_COMM_BUFFER_FULL -34 0xDE No room in comm buffer 6.76.2.2 #dene ERR_COMM_BUS_ERR -35 0xDD Something went wrong on the communications bus 6.76.2.3 #dene ERR_COMM_CHAN_INVALID -33 0xDF Specied channel/connection is not valid 6.76.2.4 #dene ERR_COMM_CHAN_NOT_READY -32 0xE0 Specied channel/connection not congured or busy

6.77

Remote control (direct commands) errors

Constants dening errors that can occur during remote control (RC) direct command operations.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.78

Program status constants

664

Denes 6.77.1 #dene ERR_RC_ILLEGAL_VAL -64 #dene ERR_RC_BAD_PACKET -65 #dene ERR_RC_UNKNOWN_CMD -66 #dene ERR_RC_FAILED -67 Detailed Description

Constants dening errors that can occur during remote control (RC) direct command operations. 6.77.2 6.77.2.1 Dene Documentation #dene ERR_RC_BAD_PACKET -65 0xBF Clearly insane packet 6.77.2.2 #dene ERR_RC_FAILED -67 0xBD Request failed (i.e. specied le not found) 6.77.2.3 #dene ERR_RC_ILLEGAL_VAL -64 0xC0 Data contains out-of-range values 6.77.2.4 #dene ERR_RC_UNKNOWN_CMD -66 0xBE Unknown command opcode

6.78

Program status constants

Constants dening various states of the command module virtual machine. Denes #dene PROG_IDLE 0 #dene PROG_OK 1 #dene PROG_RUNNING 2 #dene PROG_ERROR 3

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.79

Command module IOMAP offsets

665

#dene PROG_ABORT 4 #dene PROG_RESET 5 6.78.1 Detailed Description

Constants dening various states of the command module virtual machine. 6.78.2 6.78.2.1 Dene Documentation #dene PROG_ABORT 4 Program has been aborted 6.78.2.2 #dene PROG_ERROR 3 A program error has occurred 6.78.2.3 #dene PROG_IDLE 0 Program state is idle 6.78.2.4 #dene PROG_OK 1 Program state is okay 6.78.2.5 #dene PROG_RESET 5 Program has been reset 6.78.2.6 #dene PROG_RUNNING 2 Program is running

6.79

Command module IOMAP offsets

Constant offsets into the Command module IOMAP structure.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.79

Command module IOMAP offsets

666

Denes 6.79.1 #dene CommandOffsetFormatString 0 #dene CommandOffsetPRCHandler 16 #dene CommandOffsetTick 20 #dene CommandOffsetOffsetDS 24 #dene CommandOffsetOffsetDVA 26 #dene CommandOffsetProgStatus 28 #dene CommandOffsetAwake 29 #dene CommandOffsetActivateFlag 30 #dene CommandOffsetDeactivateFlag 31 #dene CommandOffsetFileName 32 #dene CommandOffsetMemoryPool 52 #dene CommandOffsetSyncTime 32820 #dene CommandOffsetSyncTick 32824 Detailed Description

Constant offsets into the Command module IOMAP structure. 6.79.2 6.79.2.1 Dene Documentation #dene CommandOffsetActivateFlag 30 Offset to the activate ag 6.79.2.2 #dene CommandOffsetAwake 29 Offset to the VMs awake state 6.79.2.3 #dene CommandOffsetDeactivateFlag 31 Offset to the deactivate ag 6.79.2.4 #dene CommandOffsetFileName 32 Offset to the running programs lename 6.79.2.5 #dene CommandOffsetFormatString 0 Offset to the format string
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.79

Command module IOMAP offsets

667

6.79.2.6

#dene CommandOffsetMemoryPool 52 Offset to the VMs memory pool

Examples: ex_reladdressof.nxc.

6.79.2.7

#dene CommandOffsetOffsetDS 24 Offset to the running programs data space (DS)

6.79.2.8

#dene CommandOffsetOffsetDVA 26 Offset to the running programs DOPE vector address (DVA)

6.79.2.9

#dene CommandOffsetPRCHandler 16 Offset to the RC Handler function pointer

6.79.2.10

#dene CommandOffsetProgStatus 28 Offset to the running programs status

Examples: ex_RemoteIOMapRead.nxc, ex_RemoteIOMapWriteBytes.nxc, RemoteIOMapWriteValue.nxc. and ex_-

6.79.2.11

#dene CommandOffsetSyncTick 32824 Offset to the VM sync tick

6.79.2.12

#dene CommandOffsetSyncTime 32820 Offset to the VM sync time

6.79.2.13

#dene CommandOffsetTick 20 Offset to the VMs current tick

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.80

IOCtrl module constants

668

Examples: ex_sysiomapread.nxc, and ex_sysiomapreadbyid.nxc.

6.80

IOCtrl module constants

Constants that are part of the NXT rmwares IOCtrl module. Modules PowerOn constants
Use these constants to power down the NXT or boot it into SAMBA (aka rmware download) mode.

IOCtrl module IOMAP offsets


Constant offsets into the IOCtrl module IOMAP structure.

6.80.1

Detailed Description

Constants that are part of the NXT rmwares IOCtrl module.

6.81

PowerOn constants

Use these constants to power down the NXT or boot it into SAMBA (aka rmware download) mode. Denes #dene IOCTRL_POWERDOWN 0x5A00 #dene IOCTRL_BOOT 0xA55A 6.81.1 Detailed Description

Use these constants to power down the NXT or boot it into SAMBA (aka rmware download) mode. 6.81.2 6.81.2.1 Dene Documentation #dene IOCTRL_BOOT 0xA55A Reboot the NXT into SAMBA mode
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.82

IOCtrl module IOMAP offsets

669

6.81.2.2

#dene IOCTRL_POWERDOWN 0x5A00 Power down the NXT

6.82

IOCtrl module IOMAP offsets

Constant offsets into the IOCtrl module IOMAP structure. Denes #dene IOCtrlOffsetPowerOn 0 6.82.1 Detailed Description

Constant offsets into the IOCtrl module IOMAP structure. 6.82.2 6.82.2.1 Dene Documentation #dene IOCtrlOffsetPowerOn 0 Offset to power on eld

6.83

Loader module constants

Constants that are part of the NXT rmwares Loader module. Modules Loader module IOMAP offsets
Constant offsets into the Loader module IOMAP structure.

Loader module error codes


Error codes returned by functions in the Loader module (le access).

Loader module function constants


Constants dening the functions provided by the Loader module.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.84

Loader module IOMAP offsets

670

Denes #dene EOF -1 #dene NULL 0 6.83.1 Detailed Description

Constants that are part of the NXT rmwares Loader module. 6.83.2 6.83.2.1 Dene Documentation #dene EOF -1 A constant representing end of le 6.83.2.2 #dene NULL 0 A constant representing NULL

6.84

Loader module IOMAP offsets

Constant offsets into the Loader module IOMAP structure. Denes #dene LoaderOffsetPFunc 0 #dene LoaderOffsetFreeUserFlash 4 6.84.1 Detailed Description

Constant offsets into the Loader module IOMAP structure. 6.84.2 6.84.2.1 Dene Documentation #dene LoaderOffsetFreeUserFlash 4 Offset to the amount of free user ash

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.85

Loader module error codes

671

6.84.2.2

#dene LoaderOffsetPFunc 0 Offset to the Loader module function pointer

6.85

Loader module error codes

Error codes returned by functions in the Loader module (le access). Denes #dene LDR_SUCCESS 0x0000 #dene LDR_INPROGRESS 0x0001 #dene LDR_REQPIN 0x0002 #dene LDR_NOMOREHANDLES 0x8100 #dene LDR_NOSPACE 0x8200 #dene LDR_NOMOREFILES 0x8300 #dene LDR_EOFEXPECTED 0x8400 #dene LDR_ENDOFFILE 0x8500 #dene LDR_NOTLINEARFILE 0x8600 #dene LDR_FILENOTFOUND 0x8700 #dene LDR_HANDLEALREADYCLOSED 0x8800 #dene LDR_NOLINEARSPACE 0x8900 #dene LDR_UNDEFINEDERROR 0x8A00 #dene LDR_FILEISBUSY 0x8B00 #dene LDR_NOWRITEBUFFERS 0x8C00 #dene LDR_APPENDNOTPOSSIBLE 0x8D00 #dene LDR_FILEISFULL 0x8E00 #dene LDR_FILEEXISTS 0x8F00 #dene LDR_MODULENOTFOUND 0x9000 #dene LDR_OUTOFBOUNDARY 0x9100 #dene LDR_ILLEGALFILENAME 0x9200 #dene LDR_ILLEGALHANDLE 0x9300 #dene LDR_BTBUSY 0x9400 #dene LDR_BTCONNECTFAIL 0x9500 #dene LDR_BTTIMEOUT 0x9600 #dene LDR_FILETX_TIMEOUT 0x9700 #dene LDR_FILETX_DSTEXISTS 0x9800 #dene LDR_FILETX_SRCMISSING 0x9900 #dene LDR_FILETX_STREAMERROR 0x9A00 #dene LDR_FILETX_CLOSEERROR 0x9B00 #dene LDR_INVALIDSEEK 0x9C00

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.85

Loader module error codes

672

6.85.1

Detailed Description

Error codes returned by functions in the Loader module (le access). 6.85.2 6.85.2.1 Dene Documentation #dene LDR_APPENDNOTPOSSIBLE 0x8D00 Only datales can be appended to. 6.85.2.2 #dene LDR_BTBUSY 0x9400 The bluetooth system is busy. 6.85.2.3 #dene LDR_BTCONNECTFAIL 0x9500 Bluetooth connection attempt failed. 6.85.2.4 #dene LDR_BTTIMEOUT 0x9600 A timeout in the bluetooth system has occurred. 6.85.2.5 #dene LDR_ENDOFFILE 0x8500 The end of the le has been reached. Examples: ex_le_system.nxc.

6.85.2.6

#dene LDR_EOFEXPECTED 0x8400 EOF expected.

Examples: ex_le_system.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.85

Loader module error codes

673

6.85.2.7

#dene LDR_FILEEXISTS 0x8F00 A le with the same name already exists.

Examples: ex_le_system.nxc.

6.85.2.8

#dene LDR_FILEISBUSY 0x8B00 The le is already being used.

6.85.2.9

#dene LDR_FILEISFULL 0x8E00 The allocated le size has been lled.

Examples: ex_le_system.nxc.

6.85.2.10

#dene LDR_FILENOTFOUND 0x8700 No les matched the search criteria.

6.85.2.11

#dene LDR_FILETX_CLOSEERROR 0x9B00 Error transmitting le: attempt to close le failed.

6.85.2.12

#dene LDR_FILETX_DSTEXISTS 0x9800 Error transmitting le: destination le exists.

6.85.2.13

#dene LDR_FILETX_SRCMISSING 0x9900 Error transmitting le: source le is missing.

6.85.2.14

#dene LDR_FILETX_STREAMERROR 0x9A00 Error transmitting le: a stream error occurred.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.85

Loader module error codes

674

6.85.2.15

#dene LDR_FILETX_TIMEOUT 0x9700 Error transmitting le: a timeout occurred.

6.85.2.16

#dene LDR_HANDLEALREADYCLOSED 0x8800 The le handle has already been closed.

6.85.2.17

#dene LDR_ILLEGALFILENAME 0x9200

Filename length to long or attempted open a system le (.rxe, .rtm, or .sys) for writing as a datale. 6.85.2.18 #dene LDR_ILLEGALHANDLE 0x9300 Invalid le handle. 6.85.2.19 #dene LDR_INPROGRESS 0x0001 The function is executing but has not yet completed. 6.85.2.20 #dene LDR_INVALIDSEEK 0x9C00 Invalid le seek operation. 6.85.2.21 #dene LDR_MODULENOTFOUND 0x9000 No modules matched the specied search criteria. 6.85.2.22 #dene LDR_NOLINEARSPACE 0x8900 Not enough linear ash memory is available. 6.85.2.23 #dene LDR_NOMOREFILES 0x8300 The maximum number of les has been reached. 6.85.2.24 #dene LDR_NOMOREHANDLES 0x8100 All available le handles are in use.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.86

Loader module function constants

675

6.85.2.25

#dene LDR_NOSPACE 0x8200 Not enough free ash memory for the specied le size.

6.85.2.26

#dene LDR_NOTLINEARFILE 0x8600 The specied le is not linear.

6.85.2.27

#dene LDR_NOWRITEBUFFERS 0x8C00 No more write buffers are available.

6.85.2.28

#dene LDR_OUTOFBOUNDARY 0x9100 Specied IOMap offset is outside the bounds of the IOMap.

6.85.2.29

#dene LDR_REQPIN 0x0002 A PIN exchange request is in progress.

6.85.2.30

#dene LDR_SUCCESS 0x0000 The function completed successfully.

Examples: ex_le_system.nxc, ex_ndrstle.nxc, ex_ndnextle.nxc, ex_syscommbtcheckstatus.nxc, ex_syscommbtconnection.nxc, ex_syslerename.nxc, and ex_sysleresolvehandle.nxc.

6.85.2.31

#dene LDR_UNDEFINEDERROR 0x8A00 An undened error has occurred.

6.86

Loader module function constants

Constants dening the functions provided by the Loader module.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.86

Loader module function constants

676

Denes 6.86.1 #dene LDR_CMD_OPENREAD 0x80 #dene LDR_CMD_OPENWRITE 0x81 #dene LDR_CMD_READ 0x82 #dene LDR_CMD_WRITE 0x83 #dene LDR_CMD_CLOSE 0x84 #dene LDR_CMD_DELETE 0x85 #dene LDR_CMD_FINDFIRST 0x86 #dene LDR_CMD_FINDNEXT 0x87 #dene LDR_CMD_VERSIONS 0x88 #dene LDR_CMD_OPENWRITELINEAR 0x89 #dene LDR_CMD_OPENREADLINEAR 0x8A #dene LDR_CMD_OPENWRITEDATA 0x8B #dene LDR_CMD_OPENAPPENDDATA 0x8C #dene LDR_CMD_CROPDATAFILE 0x8D #dene LDR_CMD_FINDFIRSTMODULE 0x90 #dene LDR_CMD_FINDNEXTMODULE 0x91 #dene LDR_CMD_CLOSEMODHANDLE 0x92 #dene LDR_CMD_IOMAPREAD 0x94 #dene LDR_CMD_IOMAPWRITE 0x95 #dene LDR_CMD_BOOTCMD 0x97 #dene LDR_CMD_SETBRICKNAME 0x98 #dene LDR_CMD_BTGETADR 0x9A #dene LDR_CMD_DEVICEINFO 0x9B #dene LDR_CMD_DELETEUSERFLASH 0xA0 #dene LDR_CMD_POLLCMDLEN 0xA1 #dene LDR_CMD_POLLCMD 0xA2 #dene LDR_CMD_RENAMEFILE 0xA3 #dene LDR_CMD_BTFACTORYRESET 0xA4 #dene LDR_CMD_RESIZEDATAFILE 0xD0 #dene LDR_CMD_SEEKFROMSTART 0xD1 #dene LDR_CMD_SEEKFROMCURRENT 0xD2 #dene LDR_CMD_SEEKFROMEND 0xD3 Detailed Description

Constants dening the functions provided by the Loader module. 6.86.2 6.86.2.1 Dene Documentation #dene LDR_CMD_BOOTCMD 0x97 Reboot the NXT into SAMBA mode
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.86

Loader module function constants

677

6.86.2.2

#dene LDR_CMD_BTFACTORYRESET 0xA4 Reset bluetooth conguration to factory defaults

6.86.2.3

#dene LDR_CMD_BTGETADR 0x9A Get the NXTs bluetooth brick address

6.86.2.4

#dene LDR_CMD_CLOSE 0x84 Close a le handle

6.86.2.5

#dene LDR_CMD_CLOSEMODHANDLE 0x92 Close a module handle

6.86.2.6

#dene LDR_CMD_CROPDATAFILE 0x8D Crop a data le to its used space

6.86.2.7

#dene LDR_CMD_DELETE 0x85 Delete a le

6.86.2.8

#dene LDR_CMD_DELETEUSERFLASH 0xA0 Delete all les from user ash memory

6.86.2.9

#dene LDR_CMD_DEVICEINFO 0x9B Read device information

6.86.2.10

#dene LDR_CMD_FINDFIRST 0x86 Find the rst le matching the specied pattern

6.86.2.11

#dene LDR_CMD_FINDFIRSTMODULE 0x90 Find the rst module matching the specied pattern

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.86

Loader module function constants

678

6.86.2.12

#dene LDR_CMD_FINDNEXT 0x87 Find the next le matching the specied pattern

6.86.2.13

#dene LDR_CMD_FINDNEXTMODULE 0x91 Find the next module matching the specied pattern

6.86.2.14

#dene LDR_CMD_IOMAPREAD 0x94 Read data from a module IOMAP

6.86.2.15

#dene LDR_CMD_IOMAPWRITE 0x95 Write data to a module IOMAP

6.86.2.16

#dene LDR_CMD_OPENAPPENDDATA 0x8C Open a data le for appending

6.86.2.17

#dene LDR_CMD_OPENREAD 0x80 Open a le for reading

6.86.2.18

#dene LDR_CMD_OPENREADLINEAR 0x8A Open a linear le for reading

6.86.2.19

#dene LDR_CMD_OPENWRITE 0x81 Open a le for writing

6.86.2.20

#dene LDR_CMD_OPENWRITEDATA 0x8B Open a data le for writing

6.86.2.21

#dene LDR_CMD_OPENWRITELINEAR 0x89 Open a linear le for writing

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.86

Loader module function constants

679

6.86.2.22

#dene LDR_CMD_POLLCMD 0xA2 Poll command

6.86.2.23

#dene LDR_CMD_POLLCMDLEN 0xA1 Read poll command length

6.86.2.24

#dene LDR_CMD_READ 0x82 Read from a le

6.86.2.25

#dene LDR_CMD_RENAMEFILE 0xA3 Rename a le

6.86.2.26

#dene LDR_CMD_RESIZEDATAFILE 0xD0 Resize a data le

6.86.2.27

#dene LDR_CMD_SEEKFROMCURRENT 0xD2 Seek from the current position

6.86.2.28

#dene LDR_CMD_SEEKFROMEND 0xD3 Seek from the end of the le

6.86.2.29

#dene LDR_CMD_SEEKFROMSTART 0xD1 Seek from the start of the le

6.86.2.30

#dene LDR_CMD_SETBRICKNAME 0x98 Set the NXTs brick name

6.86.2.31

#dene LDR_CMD_VERSIONS 0x88 Read rmware version information

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.87

Sound module constants

680

6.86.2.32

#dene LDR_CMD_WRITE 0x83 Write to a le

6.87

Sound module constants

Constants that are part of the NXT rmwares Sound module. Modules SoundFlags constants
Constants for use with the SoundFlags() function.

SoundState constants
Constants for use with the SoundState() function.

SoundMode constants
Constants for use with the SoundMode() function.

Sound module IOMAP offsets


Constant offsets into the Sound module IOMAP structure.

Sound module miscellaneous constants


Constants dening miscellaneous sound module aspects.

Tone constants
Constants for use in the SoundPlayTone() API function.

6.87.1

Detailed Description

Constants that are part of the NXT rmwares Sound module.

6.88

SoundFlags constants

Constants for use with the SoundFlags() function. Denes #dene SOUND_FLAGS_IDLE 0x00 #dene SOUND_FLAGS_UPDATE 0x01 #dene SOUND_FLAGS_RUNNING 0x02
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.89

SoundState constants

681

6.88.1

Detailed Description

Constants for use with the SoundFlags() function. See also: SoundFlags() 6.88.2 6.88.2.1 Dene Documentation #dene SOUND_FLAGS_IDLE 0x00 R - Sound is idle 6.88.2.2 #dene SOUND_FLAGS_RUNNING 0x02 R - Currently processing a tone or le 6.88.2.3 #dene SOUND_FLAGS_UPDATE 0x01 W - Make changes take effect Examples: ex_SetSoundFlags.nxc.

6.89

SoundState constants

Constants for use with the SoundState() function. Denes 6.89.1 #dene SOUND_STATE_IDLE 0x00 #dene SOUND_STATE_FILE 0x02 #dene SOUND_STATE_TONE 0x03 #dene SOUND_STATE_STOP 0x04 Detailed Description

Constants for use with the SoundState() function. See also: SoundState()
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.90

SoundMode constants

682

6.89.2 6.89.2.1

Dene Documentation #dene SOUND_STATE_FILE 0x02 R - Processing a le of sound/melody data

6.89.2.2

#dene SOUND_STATE_IDLE 0x00 R - Idle, ready for start sound (SOUND_UPDATE)

Examples: ex_syssoundgetstate.nxc.

6.89.2.3

#dene SOUND_STATE_STOP 0x04 W - Stop sound immediately and close hardware

Examples: ex_SetSoundModuleState.nxc, and ex_syssoundsetstate.nxc.

6.89.2.4

#dene SOUND_STATE_TONE 0x03 R - Processing a play tone request

6.90

SoundMode constants

Constants for use with the SoundMode() function. Denes #dene SOUND_MODE_ONCE 0x00 #dene SOUND_MODE_LOOP 0x01 #dene SOUND_MODE_TONE 0x02 6.90.1 Detailed Description

Constants for use with the SoundMode() function. See also: SoundMode()
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.91

Sound module IOMAP offsets

683

6.90.2 6.90.2.1

Dene Documentation #dene SOUND_MODE_LOOP 0x01 W - Play le until writing SOUND_STATE_STOP into SoundState

6.90.2.2

#dene SOUND_MODE_ONCE 0x00 W - Only play le once

Examples: ex_SetSoundMode.nxc.

6.90.2.3

#dene SOUND_MODE_TONE 0x02 W - Play tone specied in Frequency for Duration ms

6.91

Sound module IOMAP offsets

Constant offsets into the Sound module IOMAP structure. Denes 6.91.1 #dene SoundOffsetFreq 0 #dene SoundOffsetDuration 2 #dene SoundOffsetSampleRate 4 #dene SoundOffsetSoundFilename 6 #dene SoundOffsetFlags 26 #dene SoundOffsetState 27 #dene SoundOffsetMode 28 #dene SoundOffsetVolume 29 Detailed Description

Constant offsets into the Sound module IOMAP structure. 6.91.2 6.91.2.1 Dene Documentation #dene SoundOffsetDuration 2 RW - Tone duration [mS] (2 bytes)
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.92

Sound module miscellaneous constants

684

6.91.2.2

#dene SoundOffsetFlags 26 RW - Play ag - described above (1 byte) SoundFlags constants

6.91.2.3

#dene SoundOffsetFreq 0 RW - Tone frequency [Hz] (2 bytes)

6.91.2.4

#dene SoundOffsetMode 28 RW - Play mode - described above (1 byte) SoundMode constants

6.91.2.5

#dene SoundOffsetSampleRate 4 RW - Sound le sample rate [2000..16000] (2 bytes)

Examples: ex_sysiomapwrite.nxc, and ex_sysiomapwritebyid.nxc.

6.91.2.6

#dene SoundOffsetSoundFilename 6 RW - Sound/melody lename (20 bytes)

6.91.2.7

#dene SoundOffsetState 27 RW - Play state - described above (1 byte) SoundState constants

6.91.2.8

#dene SoundOffsetVolume 29 RW - Sound/melody volume [0..4] 0 = off (1 byte)

6.92

Sound module miscellaneous constants

Constants dening miscellaneous sound module aspects. Denes #dene FREQUENCY_MIN 220 #dene FREQUENCY_MAX 14080
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.93

Tone constants

685

#dene SAMPLERATE_MIN 2000 #dene SAMPLERATE_DEFAULT 8000 #dene SAMPLERATE_MAX 16000 6.92.1 Detailed Description

Constants dening miscellaneous sound module aspects. 6.92.2 6.92.2.1 Dene Documentation #dene FREQUENCY_MAX 14080 Maximum frequency [Hz] 6.92.2.2 #dene FREQUENCY_MIN 220 Minimum frequency [Hz] 6.92.2.3 #dene SAMPLERATE_DEFAULT 8000 Default sample rate [sps] 6.92.2.4 #dene SAMPLERATE_MAX 16000 Max sample rate [sps] 6.92.2.5 #dene SAMPLERATE_MIN 2000 Min sample rate [sps]

6.93

Tone constants

Constants for use in the SoundPlayTone() API function. Denes #dene TONE_A3 220 #dene TONE_AS3 233 #dene TONE_B3 247

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.93

Tone constants

686

#dene TONE_C4 262 #dene TONE_CS4 277 #dene TONE_D4 294 #dene TONE_DS4 311 #dene TONE_E4 330 #dene TONE_F4 349 #dene TONE_FS4 370 #dene TONE_G4 392 #dene TONE_GS4 415 #dene TONE_A4 440 #dene TONE_AS4 466 #dene TONE_B4 494 #dene TONE_C5 523 #dene TONE_CS5 554 #dene TONE_D5 587 #dene TONE_DS5 622 #dene TONE_E5 659 #dene TONE_F5 698 #dene TONE_FS5 740 #dene TONE_G5 784 #dene TONE_GS5 831 #dene TONE_A5 880 #dene TONE_AS5 932 #dene TONE_B5 988 #dene TONE_C6 1047 #dene TONE_CS6 1109 #dene TONE_D6 1175 #dene TONE_DS6 1245 #dene TONE_E6 1319 #dene TONE_F6 1397 #dene TONE_FS6 1480 #dene TONE_G6 1568 #dene TONE_GS6 1661 #dene TONE_A6 1760 #dene TONE_AS6 1865 #dene TONE_B6 1976 #dene TONE_C7 2093 #dene TONE_CS7 2217 #dene TONE_D7 2349 #dene TONE_DS7 2489 #dene TONE_E7 2637 #dene TONE_F7 2794 #dene TONE_FS7 2960

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.93

Tone constants

687

6.93.1

#dene TONE_G7 3136 #dene TONE_GS7 3322 #dene TONE_A7 3520 #dene TONE_AS7 3729 #dene TONE_B7 3951 Detailed Description

Constants for use in the SoundPlayTone() API function. See also: SoundPlayTone() 6.93.2 6.93.2.1 Dene Documentation #dene TONE_A3 220 Third octave A 6.93.2.2 #dene TONE_A4 440 Fourth octave A Examples: ex_yield.nxc.

6.93.2.3

#dene TONE_A5 880 Fifth octave A

6.93.2.4

#dene TONE_A6 1760 Sixth octave A

6.93.2.5

#dene TONE_A7 3520 Seventh octave A

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.93

Tone constants

688

6.93.2.6

#dene TONE_AS3 233 Third octave A sharp

6.93.2.7

#dene TONE_AS4 466 Fourth octave A sharp

6.93.2.8

#dene TONE_AS5 932 Fifth octave A sharp

6.93.2.9

#dene TONE_AS6 1865 Sixth octave A sharp

6.93.2.10

#dene TONE_AS7 3729 Seventh octave A sharp

6.93.2.11

#dene TONE_B3 247 Third octave B

6.93.2.12

#dene TONE_B4 494 Fourth octave B

6.93.2.13

#dene TONE_B5 988 Fifth octave B

6.93.2.14

#dene TONE_B6 1976 Sixth octave B

6.93.2.15

#dene TONE_B7 3951 Seventh octave B

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.93

Tone constants

689

6.93.2.16

#dene TONE_C4 262 Fourth octave C

Examples: alternating_tasks.nxc, and ex_playtones.nxc.

6.93.2.17

#dene TONE_C5 523 Fifth octave C

Examples: ex_le_system.nxc, and ex_playtones.nxc.

6.93.2.18

#dene TONE_C6 1047 Sixth octave C

Examples: alternating_tasks.nxc, and ex_playtones.nxc.

6.93.2.19

#dene TONE_C7 2093 Seventh octave C

6.93.2.20

#dene TONE_CS4 277 Fourth octave C sharp

6.93.2.21

#dene TONE_CS5 554 Fifth octave C sharp

6.93.2.22

#dene TONE_CS6 1109 Sixth octave C sharp

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.93

Tone constants

690

6.93.2.23

#dene TONE_CS7 2217 Seventh octave C sharp

6.93.2.24

#dene TONE_D4 294 Fourth octave D

6.93.2.25

#dene TONE_D5 587 Fifth octave D

6.93.2.26

#dene TONE_D6 1175 Sixth octave D

6.93.2.27

#dene TONE_D7 2349 Seventh octave D

6.93.2.28

#dene TONE_DS4 311 Fourth octave D sharp

6.93.2.29

#dene TONE_DS5 622 Fifth octave D sharp

6.93.2.30

#dene TONE_DS6 1245 Sixth octave D sharp

6.93.2.31

#dene TONE_DS7 2489 Seventh octave D sharp

6.93.2.32

#dene TONE_E4 330 Fourth octave E

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.93

Tone constants

691

Examples: ex_playtones.nxc.

6.93.2.33

#dene TONE_E5 659 Fifth octave E

Examples: ex_playtones.nxc.

6.93.2.34

#dene TONE_E6 1319 Sixth octave E

6.93.2.35

#dene TONE_E7 2637 Seventh octave E

6.93.2.36

#dene TONE_F4 349 Fourth octave F

6.93.2.37

#dene TONE_F5 698 Fifth octave F

6.93.2.38

#dene TONE_F6 1397 Sixth octave F

6.93.2.39

#dene TONE_F7 2794 Seventh octave F

6.93.2.40

#dene TONE_FS4 370 Fourth octave F sharp

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.93

Tone constants

692

6.93.2.41

#dene TONE_FS5 740 Fifth octave F sharp

6.93.2.42

#dene TONE_FS6 1480 Sixth octave F sharp

6.93.2.43

#dene TONE_FS7 2960 Seventh octave F sharp

6.93.2.44

#dene TONE_G4 392 Fourth octave G

Examples: ex_playtones.nxc.

6.93.2.45

#dene TONE_G5 784 Fifth octave G

Examples: ex_playtones.nxc.

6.93.2.46

#dene TONE_G6 1568 Sixth octave G

6.93.2.47

#dene TONE_G7 3136 Seventh octave G

6.93.2.48

#dene TONE_GS4 415 Fourth octave G sharp

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.94

Button module constants

693

6.93.2.49

#dene TONE_GS5 831 Fifth octave G sharp

6.93.2.50

#dene TONE_GS6 1661 Sixth octave G sharp

6.93.2.51

#dene TONE_GS7 3322 Seventh octave G sharp

6.94

Button module constants

Constants that are part of the NXT rmwares Button module. Modules Button name constants
Constants to specify which button to use with button module functions.

ButtonState constants
Constants for use with the ButtonState() function.

Button module IOMAP offsets


Constant offsets into the Button module IOMAP structure.

6.94.1

Detailed Description

Constants that are part of the NXT rmwares Button module.

6.95

Button name constants

Constants to specify which button to use with button module functions. Denes #dene BTN1 0 #dene BTN2 1
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.95

Button name constants

694

6.95.1

#dene BTN3 2 #dene BTN4 3 #dene BTNEXIT BTN1 #dene BTNRIGHT BTN2 #dene BTNLEFT BTN3 #dene BTNCENTER BTN4 #dene NO_OF_BTNS 4 Detailed Description

Constants to specify which button to use with button module functions. See also: ButtonPressed(), ButtonState(), ButtonCount(), ReadButtonEx(), SysReadButton(), ReadButtonType 6.95.2 6.95.2.1 Dene Documentation #dene BTN1 0 The exit button. Examples: ex_ButtonCount.nxc, ex_ButtonLongPressCount.nxc, ex_ButtonLongReleaseCount.nxc, ex_ButtonPressCount.nxc, ex_ButtonReleaseCount.nxc, ex_ButtonShortReleaseCount.nxc, ex_ButtonState.nxc, ex_ReadButtonEx.nxc, ex_SetButtonLongPressCount.nxc, ex_SetButtonLongReleaseCount.nxc, ex_SetButtonPressCount.nxc, ex_SetButtonReleaseCount.nxc, ex_SetButtonShortReleaseCount.nxc, and ex_SetButtonState.nxc.

6.95.2.2

#dene BTN2 1 The right button.

6.95.2.3

#dene BTN3 2 The left button.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.95

Button name constants

695

6.95.2.4

#dene BTN4 3 The enter button.

6.95.2.5

#dene BTNCENTER BTN4 The enter button.

Examples: ex_buttonpressed.nxc, and ex_HTGyroTest.nxc.

6.95.2.6

#dene BTNEXIT BTN1 The exit button.

Examples: ex_buttonpressed.nxc, ex_SetAbortFlag.nxc, and ex_SetLongAbort.nxc.

6.95.2.7

#dene BTNLEFT BTN3 The left button.

Examples: ex_buttonpressed.nxc.

6.95.2.8

#dene BTNRIGHT BTN2 The right button.

Examples: ex_buttonpressed.nxc, and ex_sysreadbutton.nxc.

6.95.2.9

#dene NO_OF_BTNS 4 The number of NXT buttons.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.96

ButtonState constants

696

6.96

ButtonState constants

Constants for use with the ButtonState() function. Denes 6.96.1 #dene BTNSTATE_PRESSED_EV 0x01 #dene BTNSTATE_SHORT_RELEASED_EV 0x02 #dene BTNSTATE_LONG_PRESSED_EV 0x04 #dene BTNSTATE_LONG_RELEASED_EV 0x08 #dene BTNSTATE_PRESSED_STATE 0x80 #dene BTNSTATE_NONE 0x10 Detailed Description

Constants for use with the ButtonState() function. The _EV values can be combined together using a bitwise OR operation. See also: ButtonState() 6.96.2 6.96.2.1 Dene Documentation #dene BTNSTATE_LONG_PRESSED_EV 0x04 Button is in the long pressed state. Examples: ex_SetAbortFlag.nxc, and ex_SetLongAbort.nxc.

6.96.2.2

#dene BTNSTATE_LONG_RELEASED_EV 0x08 Button is in the long released state.

6.96.2.3

#dene BTNSTATE_NONE 0x10 The default button state.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.97

Button module IOMAP offsets

697

6.96.2.4

#dene BTNSTATE_PRESSED_EV 0x01 Button is in the pressed state.

Examples: ex_SetButtonState.nxc.

6.96.2.5

#dene BTNSTATE_PRESSED_STATE 0x80 A bitmask for the button pressed state

6.96.2.6

#dene BTNSTATE_SHORT_RELEASED_EV 0x02 Button is in the short released state.

6.97

Button module IOMAP offsets

Constant offsets into the Button module IOMAP structure. Denes 6.97.1 #dene ButtonOffsetPressedCnt(b) (((b)8)+0) #dene ButtonOffsetLongPressCnt(b) (((b)8)+1) #dene ButtonOffsetShortRelCnt(b) (((b)8)+2) #dene ButtonOffsetLongRelCnt(b) (((b)8)+3) #dene ButtonOffsetRelCnt(b) (((b)8)+4) #dene ButtonOffsetState(b) ((b)+32) Detailed Description

Constant offsets into the Button module IOMAP structure. 6.97.2 6.97.2.1 Dene Documentation #dene ButtonOffsetLongPressCnt(b) (((b)8)+1) Offset to the LongPressCnt eld. This eld stores the long press count.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.98

Ui module constants

698

6.97.2.2

#dene ButtonOffsetLongRelCnt(b) (((b)8)+3) Offset to the LongRelCnt eld. This eld stores the long release count.

6.97.2.3

#dene ButtonOffsetPressedCnt(b) (((b)8)+0) Offset to the PressedCnt eld. This eld stores the press count.

6.97.2.4

#dene ButtonOffsetRelCnt(b) (((b)8)+4) Offset to the RelCnt eld. This eld stores the release count.

6.97.2.5

#dene ButtonOffsetShortRelCnt(b) (((b)8)+2) Offset to the ShortRelCnt eld. This eld stores the short release count.

6.97.2.6

#dene ButtonOffsetState(b) ((b)+32) Offset to the State eld. This eld stores the current button state.

6.98

Ui module constants

Constants that are part of the NXT rmwares Ui module. Modules CommandFlags constants
Constants for use with the CommandFlags() function.

UIState constants
Constants for use with the UIState() function.

UIButton constants
Constants for use with the UIButton() function.

BluetoothState constants
Constants for use with the BluetoothState() function.

VM run state constants


Constants for use with the VMRunState() function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.99

CommandFlags constants

699

Ui module IOMAP offsets


Constant offsets into the Ui module IOMAP structure.

6.98.1

Detailed Description

Constants that are part of the NXT rmwares Ui module.

6.99

CommandFlags constants

Constants for use with the CommandFlags() function. Denes 6.99.1 #dene UI_FLAGS_UPDATE 0x01 #dene UI_FLAGS_DISABLE_LEFT_RIGHT_ENTER 0x02 #dene UI_FLAGS_DISABLE_EXIT 0x04 #dene UI_FLAGS_REDRAW_STATUS 0x08 #dene UI_FLAGS_RESET_SLEEP_TIMER 0x10 #dene UI_FLAGS_EXECUTE_LMS_FILE 0x20 #dene UI_FLAGS_BUSY 0x40 #dene UI_FLAGS_ENABLE_STATUS_UPDATE 0x80 Detailed Description

Constants for use with the CommandFlags() function. See also: CommandFlags() 6.99.2 6.99.2.1 Dene Documentation #dene UI_FLAGS_BUSY 0x40 R - UI busy running or datalogging (popup disabled) 6.99.2.2 #dene UI_FLAGS_DISABLE_EXIT 0x04 RW - Disable exit button

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.100

UIState constants

700

6.99.2.3

#dene UI_FLAGS_DISABLE_LEFT_RIGHT_ENTER 0x02 RW - Disable left, right and enter button

6.99.2.4

#dene UI_FLAGS_ENABLE_STATUS_UPDATE 0x80 W - Enable status line to be updated

6.99.2.5

#dene UI_FLAGS_EXECUTE_LMS_FILE 0x20 W - Execute LMS le in "LMSlename" (Try It)

6.99.2.6

#dene UI_FLAGS_REDRAW_STATUS 0x08 W - Redraw entire status line

Examples: ex_SetCommandFlags.nxc.

6.99.2.7

#dene UI_FLAGS_RESET_SLEEP_TIMER 0x10 W - Reset sleep timeout timer

6.99.2.8

#dene UI_FLAGS_UPDATE 0x01 W - Make changes take effect

6.100

UIState constants

Constants for use with the UIState() function. Denes #dene UI_STATE_INIT_DISPLAY 0 #dene UI_STATE_INIT_LOW_BATTERY 1 #dene UI_STATE_INIT_INTRO 2 #dene UI_STATE_INIT_WAIT 3 #dene UI_STATE_INIT_MENU 4 #dene UI_STATE_NEXT_MENU 5

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.100

UIState constants

701

#dene UI_STATE_DRAW_MENU 6 #dene UI_STATE_TEST_BUTTONS 7 #dene UI_STATE_LEFT_PRESSED 8 #dene UI_STATE_RIGHT_PRESSED 9 #dene UI_STATE_ENTER_PRESSED 10 #dene UI_STATE_EXIT_PRESSED 11 #dene UI_STATE_CONNECT_REQUEST 12 #dene UI_STATE_EXECUTE_FILE 13 #dene UI_STATE_EXECUTING_FILE 14 #dene UI_STATE_LOW_BATTERY 15 #dene UI_STATE_BT_ERROR 16 Detailed Description

6.100.1

Constants for use with the UIState() function. See also: UIState() 6.100.2 6.100.2.1 Dene Documentation #dene UI_STATE_BT_ERROR 16 R - BT error 6.100.2.2 #dene UI_STATE_CONNECT_REQUEST 12 RW - Request for connection accept 6.100.2.3 #dene UI_STATE_DRAW_MENU 6 RW - Execute function and draw menu icons 6.100.2.4 #dene UI_STATE_ENTER_PRESSED 10 RW - Load selected function and next menu id 6.100.2.5 #dene UI_STATE_EXECUTE_FILE 13 RW - Execute le in "LMSlename"

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.100

UIState constants

702

6.100.2.6

#dene UI_STATE_EXECUTING_FILE 14 R - Executing le in "LMSlename"

6.100.2.7

#dene UI_STATE_EXIT_PRESSED 11 RW - Load selected function and next menu id

6.100.2.8

#dene UI_STATE_INIT_DISPLAY 0 RW - Init display and load font, menu etc.

6.100.2.9

#dene UI_STATE_INIT_INTRO 2 R - Display intro

6.100.2.10

#dene UI_STATE_INIT_LOW_BATTERY 1 R - Low battery voltage at power on

6.100.2.11

#dene UI_STATE_INIT_MENU 4 RW - Init menu system

6.100.2.12

#dene UI_STATE_INIT_WAIT 3 RW - Wait for initialization end

6.100.2.13

#dene UI_STATE_LEFT_PRESSED 8 RW - Load selected function and next menu id

6.100.2.14

#dene UI_STATE_LOW_BATTERY 15 R - Low battery at runtime

Examples: ex_SetUIState.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.101

UIButton constants

703

6.100.2.15

#dene UI_STATE_NEXT_MENU 5 RW - Next menu icons ready for drawing

6.100.2.16

#dene UI_STATE_RIGHT_PRESSED 9 RW - Load selected function and next menu id

6.100.2.17

#dene UI_STATE_TEST_BUTTONS 7 RW - Wait for buttons to be pressed

6.101

UIButton constants

Constants for use with the UIButton() function. Denes #dene UI_BUTTON_NONE 0 #dene UI_BUTTON_LEFT 1 #dene UI_BUTTON_ENTER 2 #dene UI_BUTTON_RIGHT 3 #dene UI_BUTTON_EXIT 4 Detailed Description

6.101.1

Constants for use with the UIButton() function. See also: UIButton() 6.101.2 6.101.2.1 Dene Documentation #dene UI_BUTTON_ENTER 2 W - Insert enter button Examples: ex_SetUIButton.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.102

BluetoothState constants

704

6.101.2.2

#dene UI_BUTTON_EXIT 4 W - Insert exit button

6.101.2.3

#dene UI_BUTTON_LEFT 1 W - Insert left arrow button

6.101.2.4

#dene UI_BUTTON_NONE 0 R - Button inserted are executed

6.101.2.5

#dene UI_BUTTON_RIGHT 3 W - Insert right arrow button

6.102

BluetoothState constants

Constants for use with the BluetoothState() function. Denes #dene UI_BT_STATE_VISIBLE 0x01 #dene UI_BT_STATE_CONNECTED 0x02 #dene UI_BT_STATE_OFF 0x04 #dene UI_BT_ERROR_ATTENTION 0x08 #dene UI_BT_CONNECT_REQUEST 0x40 #dene UI_BT_PIN_REQUEST 0x80 Detailed Description

6.102.1

Constants for use with the BluetoothState() function. See also: BluetoothState() 6.102.2 6.102.2.1 Dene Documentation #dene UI_BT_CONNECT_REQUEST 0x40 RW - BT get connect accept in progress
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.103

VM run state constants

705

6.102.2.2

#dene UI_BT_ERROR_ATTENTION 0x08 W - BT error attention

6.102.2.3

#dene UI_BT_PIN_REQUEST 0x80 RW - BT get pin code

6.102.2.4

#dene UI_BT_STATE_CONNECTED 0x02 RW - BT connected to something

6.102.2.5

#dene UI_BT_STATE_OFF 0x04 RW - BT power off

Examples: ex_SetBluetoothState.nxc.

6.102.2.6

#dene UI_BT_STATE_VISIBLE 0x01 RW - BT visible

6.103

VM run state constants

Constants for use with the VMRunState() function. Denes #dene UI_VM_IDLE 0 #dene UI_VM_RUN_FREE 1 #dene UI_VM_RUN_SINGLE 2 #dene UI_VM_RUN_PAUSE 3 #dene UI_VM_RESET1 4 #dene UI_VM_RESET2 5

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.104

Ui module IOMAP offsets

706

6.103.1

Detailed Description

Constants for use with the VMRunState() function. See also: VMRunState() 6.103.2 6.103.2.1 Dene Documentation #dene UI_VM_IDLE 0

VM_IDLE: Just sitting around. Request to run program will lead to ONE of the VM_RUN states. 6.103.2.2 #dene UI_VM_RESET1 4

VM_RESET1: Initialize state variables and some I/O devices -- executed when programs end 6.103.2.3 #dene UI_VM_RESET2 5 VM_RESET2: Final clean up and return to IDLE 6.103.2.4 #dene UI_VM_RUN_FREE 1

VM_RUN_FREE: Attempt to run as many instructions as possible within our timeslice 6.103.2.5 #dene UI_VM_RUN_PAUSE 3

VM_RUN_PAUSE: Program still "active", but someone has asked us to pause 6.103.2.6 #dene UI_VM_RUN_SINGLE 2 VM_RUN_SINGLE: Run exactly one instruction per timeslice

6.104

Ui module IOMAP offsets

Constant offsets into the Ui module IOMAP structure.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.104

Ui module IOMAP offsets

707

Denes #dene UIOffsetPMenu 0 #dene UIOffsetBatteryVoltage 4 #dene UIOffsetLMSlename 6 #dene UIOffsetFlags 26 #dene UIOffsetState 27 #dene UIOffsetButton 28 #dene UIOffsetRunState 29 #dene UIOffsetBatteryState 30 #dene UIOffsetBluetoothState 31 #dene UIOffsetUsbState 32 #dene UIOffsetSleepTimeout 33 #dene UIOffsetSleepTimer 34 #dene UIOffsetRechargeable 35 #dene UIOffsetVolume 36 #dene UIOffsetError 37 #dene UIOffsetOBPPointer 38 #dene UIOffsetForceOff 39 #dene UIOffsetAbortFlag 40 Detailed Description

6.104.1

Constant offsets into the Ui module IOMAP structure. 6.104.2 6.104.2.1 Dene Documentation #dene UIOffsetAbortFlag 40 RW - Long Abort (true == use long press to abort) (1 byte) 6.104.2.2 #dene UIOffsetBatteryState 30 W - Battery state (0..4 capacity) (1 byte) 6.104.2.3 #dene UIOffsetBatteryVoltage 4 R - Battery voltage in millivolts (2 bytes) 6.104.2.4 #dene UIOffsetBluetoothState 31

W - Bluetooth state (0=on, 1=visible, 2=conn, 3=conn.visible, 4=off, 5=dfu) (1 byte)


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.104

Ui module IOMAP offsets

708

6.104.2.5

#dene UIOffsetButton 28 RW - Insert button (buttons enumerated above) (1 byte)

6.104.2.6

#dene UIOffsetError 37 W - Error code (1 byte)

6.104.2.7

#dene UIOffsetFlags 26 RW - Update command ags (ags enumerated above) (1 byte)

6.104.2.8

#dene UIOffsetForceOff 39 W - Force off (> 0 = off) (1 byte)

6.104.2.9

#dene UIOffsetLMSlename 6 W - LMS lename to execute (Try It) (20 bytes)

6.104.2.10

#dene UIOffsetOBPPointer 38 W - Actual OBP step (0 - 4) (1 byte)

6.104.2.11

#dene UIOffsetPMenu 0 W - Pointer to menu le (4 bytes)

6.104.2.12

#dene UIOffsetRechargeable 35 R - Rechargeable battery (0 = no, 1 = yes) (1 byte)

6.104.2.13

#dene UIOffsetRunState 29 W - VM Run state (0 = stopped, 1 = running) (1 byte)

6.104.2.14

#dene UIOffsetSleepTimeout 33 RW - Sleep timeout time (min) (1 byte)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.105

NBC Input port constants

709

6.104.2.15

#dene UIOffsetSleepTimer 34 RW - Sleep timer (min) (1 byte)

6.104.2.16

#dene UIOffsetState 27 RW - UI state (states enumerated above) (1 byte)

6.104.2.17

#dene UIOffsetUsbState 32 W - Usb state (0=disconnected, 1=connected, 2=working) (1 byte)

6.104.2.18

#dene UIOffsetVolume 36 RW - Volume used in UI (0 - 4) (1 byte)

6.105

NBC Input port constants

Input port constants are used when calling sensor control API functions. Denes #dene IN_1 0x00 #dene IN_2 0x01 #dene IN_3 0x02 #dene IN_4 0x03 Detailed Description

6.105.1

Input port constants are used when calling sensor control API functions. These constants are intended for use in NBC. See also: SetSensorType(), SetSensorMode(), S1, S2, S3, S4 6.105.2 6.105.2.1 Dene Documentation #dene IN_1 0x00 Input port 1

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.106

NBC sensor type constants

710

6.105.2.2

#dene IN_2 0x01 Input port 2

6.105.2.3

#dene IN_3 0x02 Input port 3

6.105.2.4

#dene IN_4 0x03 Input port 4

6.106

NBC sensor type constants

Use sensor type constants to congure an input port for a specic type of sensor. Denes #dene IN_TYPE_NO_SENSOR 0x00 #dene IN_TYPE_SWITCH 0x01 #dene IN_TYPE_TEMPERATURE 0x02 #dene IN_TYPE_REFLECTION 0x03 #dene IN_TYPE_ANGLE 0x04 #dene IN_TYPE_LIGHT_ACTIVE 0x05 #dene IN_TYPE_LIGHT_INACTIVE 0x06 #dene IN_TYPE_SOUND_DB 0x07 #dene IN_TYPE_SOUND_DBA 0x08 #dene IN_TYPE_CUSTOM 0x09 #dene IN_TYPE_LOWSPEED 0x0A #dene IN_TYPE_LOWSPEED_9V 0x0B #dene IN_TYPE_HISPEED 0x0C #dene IN_TYPE_COLORFULL 0x0D #dene IN_TYPE_COLORRED 0x0E #dene IN_TYPE_COLORGREEN 0x0F #dene IN_TYPE_COLORBLUE 0x10 #dene IN_TYPE_COLORNONE 0x11 #dene IN_TYPE_COLOREXIT 0x12

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.106

NBC sensor type constants

711

6.106.1

Detailed Description

Use sensor type constants to congure an input port for a specic type of sensor. These constants are intended for use in NBC. See also: SetSensorType() 6.106.2 6.106.2.1 Dene Documentation #dene IN_TYPE_ANGLE 0x04 RCX rotation sensor 6.106.2.2 #dene IN_TYPE_COLORBLUE 0x10 NXT 2.0 color sensor with blue light 6.106.2.3 #dene IN_TYPE_COLOREXIT 0x12 NXT 2.0 color sensor internal state 6.106.2.4 #dene IN_TYPE_COLORFULL 0x0D NXT 2.0 color sensor in full color mode 6.106.2.5 #dene IN_TYPE_COLORGREEN 0x0F NXT 2.0 color sensor with green light 6.106.2.6 #dene IN_TYPE_COLORNONE 0x11 NXT 2.0 color sensor with no light 6.106.2.7 #dene IN_TYPE_COLORRED 0x0E NXT 2.0 color sensor with red light

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.106

NBC sensor type constants

712

6.106.2.8

#dene IN_TYPE_CUSTOM 0x09 NXT custom sensor

6.106.2.9

#dene IN_TYPE_HISPEED 0x0C NXT Hi-speed port (only S4)

6.106.2.10

#dene IN_TYPE_LIGHT_ACTIVE 0x05 NXT light sensor with light

6.106.2.11

#dene IN_TYPE_LIGHT_INACTIVE 0x06 NXT light sensor without light

6.106.2.12

#dene IN_TYPE_LOWSPEED 0x0A NXT I2C digital sensor

6.106.2.13

#dene IN_TYPE_LOWSPEED_9V 0x0B NXT I2C digital sensor with 9V power

6.106.2.14

#dene IN_TYPE_NO_SENSOR 0x00 No sensor congured

6.106.2.15

#dene IN_TYPE_REFLECTION 0x03 RCX light sensor

6.106.2.16

#dene IN_TYPE_SOUND_DB 0x07 NXT sound sensor with dB scaling

6.106.2.17

#dene IN_TYPE_SOUND_DBA 0x08 NXT sound sensor with dBA scaling

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.107

NBC sensor mode constants

713

6.106.2.18

#dene IN_TYPE_SWITCH 0x01 NXT or RCX touch sensor

6.106.2.19

#dene IN_TYPE_TEMPERATURE 0x02 RCX temperature sensor

6.107

NBC sensor mode constants

Use sensor mode constants to congure an input port for the desired sensor mode. Denes #dene IN_MODE_RAW 0x00 #dene IN_MODE_BOOLEAN 0x20 #dene IN_MODE_TRANSITIONCNT 0x40 #dene IN_MODE_PERIODCOUNTER 0x60 #dene IN_MODE_PCTFULLSCALE 0x80 #dene IN_MODE_CELSIUS 0xA0 #dene IN_MODE_FAHRENHEIT 0xC0 #dene IN_MODE_ANGLESTEP 0xE0 #dene IN_MODE_SLOPEMASK 0x1F #dene IN_MODE_MODEMASK 0xE0 Detailed Description

6.107.1

Use sensor mode constants to congure an input port for the desired sensor mode. The constants are intended for use in NBC. See also: SetSensorMode() 6.107.2 6.107.2.1 Dene Documentation #dene IN_MODE_ANGLESTEP 0xE0 RCX rotation sensor (16 ticks per revolution)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.108

Input eld constants

714

6.107.2.2

#dene IN_MODE_BOOLEAN 0x20 Boolean value (0 or 1)

6.107.2.3

#dene IN_MODE_CELSIUS 0xA0 RCX temperature sensor value in degrees celcius

6.107.2.4

#dene IN_MODE_FAHRENHEIT 0xC0 RCX temperature sensor value in degrees fahrenheit

6.107.2.5

#dene IN_MODE_MODEMASK 0xE0 Mask for the mode without any slope value

6.107.2.6

#dene IN_MODE_PCTFULLSCALE 0x80 Scaled value from 0 to 100

6.107.2.7

#dene IN_MODE_PERIODCOUNTER 0x60 Counts the number of boolean periods

6.107.2.8

#dene IN_MODE_RAW 0x00 Raw value from 0 to 1023

6.107.2.9

#dene IN_MODE_SLOPEMASK 0x1F Mask for slope parameter added to mode

6.107.2.10

#dene IN_MODE_TRANSITIONCNT 0x40 Counts the number of boolean transitions

6.108

Input eld constants

Constants for use with SetInput() and GetInput().

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.108

Input eld constants

715

Denes #dene TypeField 0 #dene InputModeField 1 #dene RawValueField 2 #dene NormalizedValueField 3 #dene ScaledValueField 4 #dene InvalidDataField 5 Detailed Description

6.108.1

Constants for use with SetInput() and GetInput(). Each sensor has six elds that are used to dene its state. 6.108.2 6.108.2.1 Dene Documentation #dene InputModeField 1 Input mode eld. Contains one of the sensor mode constants. Read/write. 6.108.2.2 #dene InvalidDataField 5

Invalid data eld. Contains a boolean value indicating whether the sensor data is valid or not. Read/write. 6.108.2.3 #dene NormalizedValueField 3

Normalized value eld. Contains the current normalized analog sensor value. Read only. 6.108.2.4 #dene RawValueField 2 Raw value eld. Contains the current raw analog sensor value. Read only. 6.108.2.5 #dene ScaledValueField 4

Scaled value eld. Contains the current scaled analog sensor value. Read/write. 6.108.2.6 #dene TypeField 0 Type eld. Contains one of the sensor type constants. Read/write.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.109

Input port digital pin constants

716

6.109

Input port digital pin constants

Constants for use when directly controlling or reading a ports digital pin state. Denes #dene INPUT_DIGI0 0x01 #dene INPUT_DIGI1 0x02 6.109.1 Detailed Description

Constants for use when directly controlling or reading a ports digital pin state. 6.109.2 6.109.2.1 Dene Documentation #dene INPUT_DIGI0 0x01 Digital pin 0 6.109.2.2 #dene INPUT_DIGI1 0x02 Digital pin 1

6.110

Color sensor array indices

Constants for use with color sensor value arrays to index RGB and blank return values. Denes #dene INPUT_RED 0 #dene INPUT_GREEN 1 #dene INPUT_BLUE 2 #dene INPUT_BLANK 3 #dene INPUT_NO_OF_COLORS 4 Detailed Description

6.110.1

Constants for use with color sensor value arrays to index RGB and blank return values.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.111

Color values

717

See also: ReadSensorColorEx(), ReadSensorColorRaw(), SysColorSensorRead(), ColorSensorReadType 6.110.2 6.110.2.1 Dene Documentation #dene INPUT_BLANK 3 Access the blank value from color sensor value arrays 6.110.2.2 #dene INPUT_BLUE 2 Access the blue value from color sensor value arrays 6.110.2.3 #dene INPUT_GREEN 1 Access the green value from color sensor value arrays 6.110.2.4 #dene INPUT_NO_OF_COLORS 4 The number of entries in the color sensor value arrays 6.110.2.5 #dene INPUT_RED 0 Access the red value from color sensor value arrays Examples: ex_ColorADRaw.nxc, ex_ColorBoolean.nxc, ex_ColorCalibration.nxc, ex_ColorSensorRaw.nxc, and ex_ColorSensorValue.nxc.

6.111

Color values

Constants for use with the ColorValue returned by the color sensor in full color mode. Denes #dene INPUT_BLACKCOLOR 1 #dene INPUT_BLUECOLOR 2 #dene INPUT_GREENCOLOR 3

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.112

Color calibration state constants

718

#dene INPUT_YELLOWCOLOR 4 #dene INPUT_REDCOLOR 5 #dene INPUT_WHITECOLOR 6 6.111.1 Detailed Description

Constants for use with the ColorValue returned by the color sensor in full color mode. See also: SensorValue(), SysColorSensorRead(), ColorSensorReadType 6.111.2 6.111.2.1 Dene Documentation #dene INPUT_BLACKCOLOR 1 The color value is black 6.111.2.2 #dene INPUT_BLUECOLOR 2 The color value is blue 6.111.2.3 #dene INPUT_GREENCOLOR 3 The color value is green 6.111.2.4 #dene INPUT_REDCOLOR 5 The color value is red 6.111.2.5 #dene INPUT_WHITECOLOR 6 The color value is white 6.111.2.6 #dene INPUT_YELLOWCOLOR 4 The color value is yellow

6.112

Color calibration state constants

Constants for use with the color calibration state function.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.113

Color calibration constants

719

Denes #dene INPUT_SENSORCAL 0x01 #dene INPUT_SENSOROFF 0x02 #dene INPUT_RUNNINGCAL 0x20 #dene INPUT_STARTCAL 0x40 #dene INPUT_RESETCAL 0x80 Detailed Description

6.112.1

Constants for use with the color calibration state function. See also: ColorCalibrationState() 6.112.2 6.112.2.1 Dene Documentation #dene INPUT_RESETCAL 0x80 Unused calibration state constant 6.112.2.2 #dene INPUT_RUNNINGCAL 0x20 Unused calibration state constant 6.112.2.3 #dene INPUT_SENSORCAL 0x01 The state returned while the color sensor is calibrating 6.112.2.4 #dene INPUT_SENSOROFF 0x02 The state returned once calibration has completed 6.112.2.5 #dene INPUT_STARTCAL 0x40 Unused calibration state constant

6.113

Color calibration constants

Constants for use with the color calibration functions.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.114

Input module IOMAP offsets

720

Denes #dene INPUT_CAL_POINT_0 0 #dene INPUT_CAL_POINT_1 1 #dene INPUT_CAL_POINT_2 2 #dene INPUT_NO_OF_POINTS 3 Detailed Description

6.113.1

Constants for use with the color calibration functions. See also: ColorCalibration(), ColorCalLimits() 6.113.2 6.113.2.1 Dene Documentation #dene INPUT_CAL_POINT_0 0 Calibration point 0 Examples: ex_ColorCalibration.nxc, and ex_ColorCalLimits.nxc.

6.113.2.2

#dene INPUT_CAL_POINT_1 1 Calibration point 1

6.113.2.3

#dene INPUT_CAL_POINT_2 2 Calibration point 2

6.113.2.4

#dene INPUT_NO_OF_POINTS 3 The number of calibration points

6.114

Input module IOMAP offsets

Constant offsets into the Input module IOMAP structure.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.114

Input module IOMAP offsets

721

Denes #dene InputOffsetCustomZeroOffset(p) (((p)20)+0) #dene InputOffsetADRaw(p) (((p)20)+2) #dene InputOffsetSensorRaw(p) (((p)20)+4) #dene InputOffsetSensorValue(p) (((p)20)+6) #dene InputOffsetSensorType(p) (((p)20)+8) #dene InputOffsetSensorMode(p) (((p)20)+9) #dene InputOffsetSensorBoolean(p) (((p)20)+10) #dene InputOffsetDigiPinsDir(p) (((p)20)+11) #dene InputOffsetDigiPinsIn(p) (((p)20)+12) #dene InputOffsetDigiPinsOut(p) (((p)20)+13) #dene InputOffsetCustomPctFullScale(p) (((p)20)+14) #dene InputOffsetCustomActiveStatus(p) (((p)20)+15) #dene InputOffsetInvalidData(p) (((p)20)+16) #dene InputOffsetColorCalibration(p, np, nc) (80+((p)84)+0+((np)16)+((nc)4)) #dene InputOffsetColorCalLimits(p, np) (80+((p)84)+48+((np)2)) #dene InputOffsetColorADRaw(p, nc) (80+((p)84)+52+((nc)2)) #dene InputOffsetColorSensorRaw(p, nc) (80+((p)84)+60+((nc)2)) #dene InputOffsetColorSensorValue(p, nc) (80+((p)84)+68+((nc)2)) #dene InputOffsetColorBoolean(p, nc) (80+((p)84)+76+((nc)2)) #dene InputOffsetColorCalibrationState(p) (80+((p)84)+80) Detailed Description

6.114.1

Constant offsets into the Input module IOMAP structure. 6.114.2 6.114.2.1 Dene Documentation #dene InputOffsetADRaw(p) (((p)20)+2) Read the AD raw sensor value (2 bytes) uword 6.114.2.2 #dene InputOffsetColorADRaw(p, nc) (80+((p)84)+52+((nc)2)) Read AD raw color sensor values 6.114.2.3 #dene InputOffsetColorBoolean(p, nc) (80+((p)84)+76+((nc)2)) Read color sensor boolean values

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.114

Input module IOMAP offsets

722

6.114.2.4

#dene InputOffsetColorCalibration(p, np, nc) (80+((p)84)+0+((np)16)+((nc)4)) Read/write color calibration point values

6.114.2.5

#dene InputOffsetColorCalibrationState(p) (80+((p)84)+80) Read color sensor calibration state

6.114.2.6

#dene InputOffsetColorCalLimits(p, np) (80+((p)84)+48+((np)2)) Read/write color calibration limits

6.114.2.7

#dene InputOffsetColorSensorRaw(p, nc) (80+((p)84)+60+((nc)2)) Read raw color sensor values

6.114.2.8

#dene InputOffsetColorSensorValue(p, nc) (80+((p)84)+68+((nc)2)) Read scaled color sensor values

6.114.2.9

#dene InputOffsetCustomActiveStatus(p) (((p)20)+15) Read/write the active or inactive state of the custom sensor

6.114.2.10

#dene InputOffsetCustomPctFullScale(p) (((p)20)+14) Read/write the Pct full scale of the custom sensor

6.114.2.11

#dene InputOffsetCustomZeroOffset(p) (((p)20)+0) Read/write the zero offset of a custom sensor (2 bytes) uword

6.114.2.12

#dene InputOffsetDigiPinsDir(p) (((p)20)+11) Read/write the direction of the Digital pins (1 is output, 0 is input)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.115

Output port constants

723

6.114.2.13

#dene InputOffsetDigiPinsIn(p) (((p)20)+12) Read/write the status of the digital pins

6.114.2.14

#dene InputOffsetDigiPinsOut(p) (((p)20)+13) Read/write the output level of the digital pins

6.114.2.15

#dene InputOffsetInvalidData(p) (((p)20)+16) Indicates whether data is invalid (1) or valid (0)

6.114.2.16

#dene InputOffsetSensorBoolean(p) (((p)20)+10) Read the sensor boolean value

6.114.2.17

#dene InputOffsetSensorMode(p) (((p)20)+9) Read/write the sensor mode

6.114.2.18

#dene InputOffsetSensorRaw(p) (((p)20)+4) Read the raw sensor value (2 bytes) uword

6.114.2.19

#dene InputOffsetSensorType(p) (((p)20)+8) Read/write the sensor type

6.114.2.20

#dene InputOffsetSensorValue(p) (((p)20)+6) Read/write the scaled sensor value (2 bytes) sword

6.115

Output port constants

Output port constants are used when calling motor control API functions.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.115

Output port constants

724

Denes #dene OUT_A 0x00 #dene OUT_B 0x01 #dene OUT_C 0x02 #dene OUT_AB 0x03 #dene OUT_AC 0x04 #dene OUT_BC 0x05 #dene OUT_ABC 0x06 Detailed Description

6.115.1

Output port constants are used when calling motor control API functions. 6.115.2 6.115.2.1 Dene Documentation #dene OUT_A 0x00 Output port A Examples: ex_coast.nxc, ex_coastex.nxc, ex_oat.nxc, ex_getoutput.nxc, ex_motoractualspeed.nxc, ex_motorblocktachocount.nxc, ex_motormode.nxc, ex_motoroutputoptions.nxc, ex_motoroverload.nxc, ex_motorpower.nxc, ex_motorregdvalue.nxc, ex_motorregivalue.nxc, ex_motorregpvalue.nxc, ex_motorregulation.nxc, ex_motorrotationcount.nxc, ex_motorrunstate.nxc, ex_motortachocount.nxc, ex_motortacholimit.nxc, ex_motorturnratio.nxc, ex_off.nxc, ex_offex.nxc, ex_onfwd.nxc, ex_onfwdex.nxc, ex_onfwdreg.nxc, ex_onfwdregex.nxc, ex_onfwdregexpid.nxc, ex_onfwdregpid.nxc, ex_onrev.nxc, ex_onrevex.nxc, ex_onrevreg.nxc, ex_onrevregex.nxc, ex_onrevregexpid.nxc, ex_onrevregpid.nxc, ex_PosReg.nxc, ex_RemoteResetMotorPosition.nxc, ex_RemoteResetTachoCount.nxc, ex_RemoteSetOutputState.nxc, ex_rotatemotor.nxc, ex_rotatemotorpid.nxc, and ex_yield.nxc.

6.115.2.2

#dene OUT_AB 0x03 Output ports A and B

Examples: ex_onfwdsync.nxc, ex_onfwdsyncpid.nxc, ex_onfwdsyncex.nxc, ex_onfwdsyncexpid.nxc, ex_onrevsync.nxc, ex_onrevsyncex.nxc, ex_-

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.116

PID constants

725

onrevsyncexpid.nxc, ex_onrevsyncpid.nxc, ex_resetalltachocounts.nxc, ex_resetblocktachocount.nxc, ex_resetrotationcount.nxc, ex_resettachocount.nxc, ex_rotatemotorex.nxc, ex_rotatemotorexpid.nxc, and ex_setoutput.nxc.

6.115.2.3

#dene OUT_ABC 0x06 Output ports A, B, and C

6.115.2.4

#dene OUT_AC 0x04 Output ports A and C

6.115.2.5

#dene OUT_B 0x01 Output port B

6.115.2.6

#dene OUT_BC 0x05 Output ports B and C

6.115.2.7

#dene OUT_C 0x02 Output port C

6.116

PID constants

PID constants are for adjusting the Proportional, Integral, and Derivative motor controller parameters. Denes #dene PID_0 0 #dene PID_1 32 #dene PID_2 64 #dene PID_3 96 #dene PID_4 128 #dene PID_5 160 #dene PID_6 192 #dene PID_7 224

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.116

PID constants

726

6.116.1

Detailed Description

PID constants are for adjusting the Proportional, Integral, and Derivative motor controller parameters. See also: RotateMotorExPID(), RotateMotorPID(), OnFwdExPID(), OnRevExPID(), OnFwdRegExPID(), OnRevRegExPID(), OnFwdRegPID(), OnRevRegPID(), OnFwdSyncExPID(), OnRevSyncExPID(), OnFwdSyncPID(), OnRevSyncPID() 6.116.2 6.116.2.1 Dene Documentation #dene PID_0 0 PID zero 6.116.2.2 #dene PID_1 32 PID one 6.116.2.3 #dene PID_2 64 PID two 6.116.2.4 #dene PID_3 96 PID three 6.116.2.5 #dene PID_4 128 PID four 6.116.2.6 #dene PID_5 160 PID ve 6.116.2.7 #dene PID_6 192 PID six

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.117

Output port update ag constants

727

6.116.2.8

#dene PID_7 224 PID seven

6.117

Output port update ag constants

Use these constants to specify which motor values need to be updated. Denes #dene UF_UPDATE_MODE 0x01 #dene UF_UPDATE_SPEED 0x02 #dene UF_UPDATE_TACHO_LIMIT 0x04 #dene UF_UPDATE_RESET_COUNT 0x08 #dene UF_UPDATE_PID_VALUES 0x10 #dene UF_UPDATE_RESET_BLOCK_COUNT 0x20 #dene UF_UPDATE_RESET_ROTATION_COUNT 0x40 #dene UF_PENDING_UPDATES 0x80 Detailed Description

6.117.1

Use these constants to specify which motor values need to be updated. Update ag constants can be combined with bitwise OR. See also: SetOutput() 6.117.2 6.117.2.1 Dene Documentation #dene UF_PENDING_UPDATES 0x80 Are there any pending motor updates? 6.117.2.2 #dene UF_UPDATE_MODE 0x01 Commits changes to the OutputModeField output property 6.117.2.3 #dene UF_UPDATE_PID_VALUES 0x10 Commits changes to the PID motor regulation properties

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.118

Tachometer counter reset ags

728

6.117.2.4

#dene UF_UPDATE_RESET_BLOCK_COUNT 0x20 Resets the NXT-G block-relative rotation counter

6.117.2.5

#dene UF_UPDATE_RESET_COUNT 0x08

Resets all rotation counters, cancels the current goal, and resets the rotation error-correction system 6.117.2.6 #dene UF_UPDATE_RESET_ROTATION_COUNT 0x40 Resets the program-relative (user) rotation counter 6.117.2.7 #dene UF_UPDATE_SPEED 0x02 Commits changes to the PowerField output property 6.117.2.8 #dene UF_UPDATE_TACHO_LIMIT 0x04 Commits changes to the TachoLimitField output property

6.118

Tachometer counter reset ags

Use these constants to specify which of the three tachometer counters should be reset. Denes #dene RESET_NONE 0x00 #dene RESET_COUNT 0x08 #dene RESET_BLOCK_COUNT 0x20 #dene RESET_ROTATION_COUNT 0x40 #dene RESET_BLOCKANDTACHO 0x28 #dene RESET_ALL 0x68 Detailed Description

6.118.1

Use these constants to specify which of the three tachometer counters should be reset. Reset constants can be combined with bitwise OR. See also: OnFwdEx(), OnRevEx(), etc...
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.119

Output port mode constants

729

6.118.2 6.118.2.1

Dene Documentation #dene RESET_ALL 0x68 Reset all three tachometer counters

6.118.2.2

#dene RESET_BLOCK_COUNT 0x20 Reset the NXT-G block tachometer counter

6.118.2.3

#dene RESET_BLOCKANDTACHO 0x28 Reset both the internal counter and the NXT-G block counter

6.118.2.4

#dene RESET_COUNT 0x08 Reset the internal tachometer counter

6.118.2.5

#dene RESET_NONE 0x00 No counters will be reset

Examples: ex_coastex.nxc, ex_offex.nxc, ex_onfwdex.nxc, ex_onfwdregex.nxc, ex_onfwdregexpid.nxc, ex_onfwdsyncex.nxc, ex_onfwdsyncexpid.nxc, ex_onrevex.nxc, ex_onrevregex.nxc, ex_onrevregexpid.nxc, ex_onrevsyncex.nxc, and ex_onrevsyncexpid.nxc.

6.118.2.6

#dene RESET_ROTATION_COUNT 0x40 Reset the rotation counter

6.119

Output port mode constants

Use these constants to congure the desired mode for the specied motor(s): coast, motoron, brake, or regulated.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.119

Output port mode constants

730

Denes #dene OUT_MODE_COAST 0x00 #dene OUT_MODE_MOTORON 0x01 #dene OUT_MODE_BRAKE 0x02 #dene OUT_MODE_REGULATED 0x04 #dene OUT_MODE_REGMETHOD 0xF0 Detailed Description

6.119.1

Use these constants to congure the desired mode for the specied motor(s): coast, motoron, brake, or regulated. Mode constants can be combined with bitwise OR. See also: SetOutput() 6.119.2 6.119.2.1 Dene Documentation #dene OUT_MODE_BRAKE 0x02 Uses electronic braking to outputs 6.119.2.2 #dene OUT_MODE_COAST 0x00 No power and no braking so motors rotate freely. 6.119.2.3 #dene OUT_MODE_MOTORON 0x01 Enables PWM power to the outputs given the power setting Examples: ex_RemoteSetOutputState.nxc.

6.119.2.4

#dene OUT_MODE_REGMETHOD 0xF0 Mask for unimplemented regulation mode

6.119.2.5

#dene OUT_MODE_REGULATED 0x04 Enables active power regulation using the regulation mode value

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.120

Output port option constants

731

6.120

Output port option constants

Use these constants to congure the desired options for the specied motor(s): hold at limit and ramp down to limit. Denes #dene OUT_OPTION_HOLDATLIMIT 0x10 #dene OUT_OPTION_RAMPDOWNTOLIMIT 0x20 6.120.1 Detailed Description

Use these constants to congure the desired options for the specied motor(s): hold at limit and ramp down to limit. Option constants can be combined with bitwise OR. See also: SetOutput() 6.120.2 6.120.2.1 Dene Documentation #dene OUT_OPTION_HOLDATLIMIT 0x10

Option to have the rmware hold the motor when it reaches the tachometer limit 6.120.2.2 #dene OUT_OPTION_RAMPDOWNTOLIMIT 0x20

Option to have the rmware rampdown the motor power as it approaches the tachometer limit

6.121

Output regulation option constants

Use these constants to congure the desired options for position regulation. Denes #dene OUT_REGOPTION_NO_SATURATION 0x01 6.121.1 Detailed Description

Use these constants to congure the desired options for position regulation.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.122

Output port run state constants

732

6.121.2 6.121.2.1

Dene Documentation #dene OUT_REGOPTION_NO_SATURATION 0x01 Do not limit intermediary regulation results

Examples: ex_PosReg.nxc.

6.122

Output port run state constants

Use these constants to congure the desired run state for the specied motor(s): idle, rampup, running, rampdown, or hold. Denes #dene OUT_RUNSTATE_IDLE 0x00 #dene OUT_RUNSTATE_RAMPUP 0x10 #dene OUT_RUNSTATE_RUNNING 0x20 #dene OUT_RUNSTATE_RAMPDOWN 0x40 #dene OUT_RUNSTATE_HOLD 0x60 Detailed Description

6.122.1

Use these constants to congure the desired run state for the specied motor(s): idle, rampup, running, rampdown, or hold. See also: SetOutput() 6.122.2 6.122.2.1 Dene Documentation #dene OUT_RUNSTATE_HOLD 0x60 Set motor run state to hold at the current position. 6.122.2.2 #dene OUT_RUNSTATE_IDLE 0x00 Disable all power to motors.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.123

Output port regulation mode constants

733

6.122.2.3

#dene OUT_RUNSTATE_RAMPDOWN 0x40

Enable ramping down from a current power to a new (lower) power over a specied TachoLimitField goal. 6.122.2.4 #dene OUT_RUNSTATE_RAMPUP 0x10

Enable ramping up from a current power to a new (higher) power over a specied TachoLimitField goal. 6.122.2.5 #dene OUT_RUNSTATE_RUNNING 0x20 Enable power to motors at the specied power level. Examples: ex_RemoteSetOutputState.nxc.

6.123

Output port regulation mode constants

Use these constants to congure the desired regulation mode for the specied motor(s): none, speed regulation, multi-motor synchronization, or position regulation (requires the enhanced NBC/NXC rmware version 1.31+). Denes #dene OUT_REGMODE_IDLE 0 #dene OUT_REGMODE_SPEED 1 #dene OUT_REGMODE_SYNC 2 #dene OUT_REGMODE_POS 4 Detailed Description

6.123.1

Use these constants to congure the desired regulation mode for the specied motor(s): none, speed regulation, multi-motor synchronization, or position regulation (requires the enhanced NBC/NXC rmware version 1.31+). See also: SetOutput()

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.124

Output eld constants

734

6.123.2 6.123.2.1

Dene Documentation #dene OUT_REGMODE_IDLE 0 No motor regulation.

Examples: ex_RemoteSetOutputState.nxc.

6.123.2.2

#dene OUT_REGMODE_POS 4 Regulate a motors position.

6.123.2.3

#dene OUT_REGMODE_SPEED 1 Regulate a motors speed (aka power).

Examples: ex_onfwdreg.nxc, ex_onfwdregex.nxc, ex_onfwdregexpid.nxc, ex_onfwdregpid.nxc, ex_onrevreg.nxc, ex_onrevregex.nxc, ex_onrevregexpid.nxc, and ex_onrevregpid.nxc.

6.123.2.4

#dene OUT_REGMODE_SYNC 2 Synchronize the rotation of two motors.

6.124

Output eld constants

Constants for use with SetOutput() and GetOutput(). Denes #dene UpdateFlagsField 0
Update ags eld.

#dene OutputModeField 1
Mode eld.

#dene PowerField 2
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.124

Output eld constants

735

Power eld.

#dene ActualSpeedField 3
Actual speed eld.

#dene TachoCountField 4
Internal tachometer count eld.

#dene TachoLimitField 5
Tachometer limit eld.

#dene RunStateField 6
Run state eld.

#dene TurnRatioField 7
Turn ratio eld.

#dene RegModeField 8
Regulation mode eld.

#dene OverloadField 9
Overload eld.

#dene RegPValueField 10
Proportional eld.

#dene RegIValueField 11
Integral eld.

#dene RegDValueField 12
Derivative eld.

#dene BlockTachoCountField 13
NXT-G block tachometer count eld.

#dene RotationCountField 14
Rotation counter eld.

#dene OutputOptionsField 15
Options eld.

#dene MaxSpeedField 16

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.124

Output eld constants

736

MaxSpeed eld.

#dene MaxAccelerationField 17
MaxAcceleration eld.

6.124.1

Detailed Description

Constants for use with SetOutput() and GetOutput(). See also: SetOutput(), GetOutput() 6.124.2 6.124.2.1 Dene Documentation #dene ActualSpeedField 3

Actual speed eld. Contains the actual power level (-100 to 100). Read only. Return the percent of full power the rmware is applying to the output. This may vary from the PowerField value when auto-regulation code in the rmware responds to a load on the output. 6.124.2.2 #dene BlockTachoCountField 13

NXT-G block tachometer count eld. Contains the current NXT-G block tachometer count. Read only. Return the block-relative position counter value for the specied port. Refer to the UpdateFlagsField description for information about how to use block-relative position counts. Set the UF_UPDATE_RESET_BLOCK_COUNT ag in UpdateFlagsField to request that the rmware reset the BlockTachoCountField. The sign of BlockTachoCountField indicates the direction of rotation. Positive values indicate forward rotation and negative values indicate reverse rotation. Forward and reverse depend on the orientation of the motor. 6.124.2.3 #dene MaxAccelerationField 17

MaxAcceleration eld. Contains the current max acceleration value. Read/write. Set the maximum acceleration to be used during position regulation.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.124

Output eld constants

737

6.124.2.4

#dene MaxSpeedField 16

MaxSpeed eld. Contains the current max speed value. Read/write. Set the maximum speed to be used during position regulation. 6.124.2.5 #dene OutputModeField 1

Mode eld. Contains a combination of the output mode constants. Read/write. The OUT_MODE_MOTORON bit must be set in order for power to be applied to the motors. Add OUT_MODE_BRAKE to enable electronic braking. Braking means that the output voltage is not allowed to oat between active PWM pulses. It improves the accuracy of motor output but uses more battery power. To use motor regulation include OUT_MODE_REGULATED in the OutputModeField value. Use UF_UPDATE_MODE with UpdateFlagsField to commit changes to this eld. 6.124.2.6 #dene OutputOptionsField 15

Options eld. Contains a combination of the output options constants. Read/write. Set options for how the output module will act when a tachometer limit is reached. Option constants can be combined with bitwise OR. Use OUT_OPTION_HOLDATLIMIT to have the output module hold the motor when it reaches the tachometer limit. Use OUT_OPTION_RAMPDOWNTOLIMIT to have the output module ramp down the motor power as it approaches the tachometer limit. 6.124.2.7 #dene OverloadField 9

Overload eld. Contains a boolean value which is TRUE if the motor is overloaded. Read only. This eld will have a value of 1 (true) if the rmware speed regulation cannot overcome a physical load on the motor. In other words, the motor is turning more slowly than expected. If the motor speed can be maintained in spite of loading then this eld value is zero (false). In order to use this eld the motor must have a non-idle RunStateField, an OutputModeField which includes OUT_MODE_MOTORON and OUT_MODE_REGULATED, and its RegModeField must be set to OUT_REGMODE_SPEED.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.124

Output eld constants

738

6.124.2.8

#dene PowerField 2

Power eld. Contains the desired power level (-100 to 100). Read/write. Specify the power level of the output. The absolute value of PowerField is a percentage of the full power of the motor. The sign of PowerField controls the rotation direction. Positive values tell the rmware to turn the motor forward, while negative values turn the motor backward. Use UF_UPDATE_SPEED with UpdateFlagsField to commit changes to this eld. 6.124.2.9 #dene RegDValueField 12

Derivative eld. Contains the derivative constant for the PID motor controller. Read/write. This eld species the derivative term used in the internal proportionalintegral-derivative (PID) control algorithm. Set UF_UPDATE_PID_VALUES to commit changes to RegPValue, RegIValue, and RegDValue simultaneously. 6.124.2.10 #dene RegIValueField 11

Integral eld. Contains the integral constant for the PID motor controller. Read/write. This eld species the integral term used in the internal proportional-integral-derivative (PID) control algorithm. Set UF_UPDATE_PID_VALUES to commit changes to RegPValue, RegIValue, and RegDValue simultaneously. 6.124.2.11 #dene RegModeField 8

Regulation mode eld. Contains one of the regulation mode constants. Read/write. This eld species the regulation mode to use with the specied port(s). It is ignored if the OUT_MODE_REGULATED bit is not set in the OutputModeField eld. Unlike OutputModeField, RegModeField is not a biteld. Only one regulation mode value can be set at a time. Speed regulation means that the rmware tries to maintain a certain speed based on the PowerField setting. The rmware adjusts the PWM duty cycle if the motor is affected by a physical load. This adjustment is reected by the value of the ActualSpeedField property. When using speed regulation, do not set PowerField to its maximum value since the rmware cannot adjust to higher power levels in that situation. Synchronization means the rmware tries to keep two motors in sync regardless of physical loads. Use this mode to maintain a straight path for a mobile robot automatically. Also use this mode with the TurnRatioField property to provide proportional turning. Set OUT_REGMODE_SYNC on at least two motor ports in order
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.124

Output eld constants

739

for synchronization to function. Setting OUT_REGMODE_SYNC on all three motor ports will result in only the rst two (OUT_A and OUT_B) being synchronized. 6.124.2.12 #dene RegPValueField 10

Proportional eld. Contains the proportional constant for the PID motor controller. Read/write. This eld species the proportional term used in the internal proportionalintegral-derivative (PID) control algorithm. Set UF_UPDATE_PID_VALUES to commit changes to RegPValue, RegIValue, and RegDValue simultaneously. 6.124.2.13 #dene RotationCountField 14

Rotation counter eld. Contains the current rotation count. Read only. Return the program-relative position counter value for the specied port. Refer to the UpdateFlagsField description for information about how to use program-relative position counts. Set the UF_UPDATE_RESET_ROTATION_COUNT ag in UpdateFlagsField to request that the rmware reset the RotationCountField. The sign of RotationCountField indicates the direction of rotation. Positive values indicate forward rotation and negative values indicate reverse rotation. Forward and reverse depend on the orientation of the motor. 6.124.2.14 #dene RunStateField 6

Run state eld. Contains one of the run state constants. Read/write. Use this eld to specify the running state of an output. Set the RunStateField to OUT_RUNSTATE_RUNNING to enable power to any output. Use OUT_RUNSTATE_RAMPUP to enable automatic ramping to a new PowerField level greater than the current PowerField level. Use OUT_RUNSTATE_RAMPDOWN to enable automatic ramping to a new PowerField level less than the current PowerField level. Both the rampup and rampdown bits must be used in conjunction with appropriate TachoLimitField and PowerField values. In this case the rmware smoothly increases or decreases the actual power to the new PowerField level over the total number of degrees of rotation specied in TachoLimitField. 6.124.2.15 #dene TachoCountField 4

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.124

Output eld constants

740

Internal tachometer count eld. Contains the current internal tachometer count. Read only. Return the internal position counter value for the specied output. The internal count is reset automatically when a new goal is set using the TachoLimitField and the UF_UPDATE_TACHO_LIMIT ag. Set the UF_UPDATE_RESET_COUNT ag in UpdateFlagsField to reset TachoCountField and cancel any TachoLimitField. The sign of TachoCountField indicates the motor rotation direction. 6.124.2.16 #dene TachoLimitField 5

Tachometer limit eld. Contains the current tachometer limit. Read/write. Specify the number of degrees the motor should rotate. Use UF_UPDATE_TACHO_LIMIT with the UpdateFlagsField eld to commit changes to the TachoLimitField. The value of this eld is a relative distance from the current motor position at the moment when the UF_UPDATE_TACHO_LIMIT ag is processed. 6.124.2.17 #dene TurnRatioField 7

Turn ratio eld. Contains the current turn ratio. Only applicable when synchronizing multiple motors. Read/write. Use this eld to specify a proportional turning ratio. This eld must be used in conjunction with other eld values: OutputModeField must include OUT_MODE_MOTORON and OUT_MODE_REGULATED, RegModeField must be set to OUT_REGMODE_SYNC, RunStateField must not be OUT_RUNSTATE_IDLE, and PowerField must be non-zero. There are only three valid combinations of left and right motors for use with TurnRatioField: OUT_AB, OUT_BC, and OUT_AC. In each of these three options the rst motor listed is considered to be the left motor and the second motor is the right motor, regardless of the physical conguration of the robot. Negative turn ratio values shift power toward the left motor while positive values shift power toward the right motor. An absolute value of 50 usually results in one motor stopping. An absolute value of 100 usually results in two motors turning in opposite directions at equal power. 6.124.2.18 #dene UpdateFlagsField 0

Update ags eld. Contains a combination of the update ag constants. Read/write. Use UF_UPDATE_MODE, UF_UPDATE_SPEED, UF_UPDATE_TACHO_LIMIT, and UF_UPDATE_PID_VALUES along with other elds to commit changes to the state of outputs. Set the appropriate ags after setting one or more of the output elds in order for the changes to actually go into affect.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.125

Output module IOMAP offsets

741

6.125

Output module IOMAP offsets

Constant offsets into the Output module IOMAP structure. Denes #dene OutputOffsetTachoCount(p) (((p)32)+0) #dene OutputOffsetBlockTachoCount(p) (((p)32)+4) #dene OutputOffsetRotationCount(p) (((p)32)+8) #dene OutputOffsetTachoLimit(p) (((p)32)+12) #dene OutputOffsetMotorRPM(p) (((p)32)+16) #dene OutputOffsetFlags(p) (((p)32)+18) #dene OutputOffsetMode(p) (((p)32)+19) #dene OutputOffsetSpeed(p) (((p)32)+20) #dene OutputOffsetActualSpeed(p) (((p)32)+21) #dene OutputOffsetRegPParameter(p) (((p)32)+22) #dene OutputOffsetRegIParameter(p) (((p)32)+23) #dene OutputOffsetRegDParameter(p) (((p)32)+24) #dene OutputOffsetRunState(p) (((p)32)+25) #dene OutputOffsetRegMode(p) (((p)32)+26) #dene OutputOffsetOverloaded(p) (((p)32)+27) #dene OutputOffsetSyncTurnParameter(p) (((p)32)+28) #dene OutputOffsetOptions(p) (((p)32)+29) #dene OutputOffsetMaxSpeed(p) (((p)32)+30) #dene OutputOffsetMaxAccel(p) (((p)32)+31) #dene OutputOffsetRegulationTime 96 #dene OutputOffsetRegulationOptions 97 Detailed Description

6.125.1

Constant offsets into the Output module IOMAP structure. 6.125.2 6.125.2.1 Dene Documentation #dene OutputOffsetActualSpeed(p) (((p)32)+21) R - Holds the current motor speed (1 byte) sbyte 6.125.2.2 #dene OutputOffsetBlockTachoCount(p) (((p)32)+4)

R - Holds current number of counts for the current output block (4 bytes) slong

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.125

Output module IOMAP offsets

742

6.125.2.3

#dene OutputOffsetFlags(p) (((p)32)+18) RW - Holds ags for which data should be updated (1 byte) ubyte

6.125.2.4

#dene OutputOffsetMaxAccel(p) (((p)32)+31)

RW - holds the maximum acceleration for position regulation (1 byte) sbyte (NBC/NXC) 6.125.2.5 #dene OutputOffsetMaxSpeed(p) (((p)32)+30)

RW - holds the maximum speed for position regulation (1 byte) sbyte (NBC/NXC) 6.125.2.6 #dene OutputOffsetMode(p) (((p)32)+19) RW - Holds motor mode: Run, Break, regulated, ... (1 byte) ubyte 6.125.2.7 #dene OutputOffsetMotorRPM(p) (((p)32)+16) Not updated, will be removed later !! (2 bytes) sword 6.125.2.8 #dene OutputOffsetOptions(p) (((p)32)+29)

RW - holds extra motor options related to the tachometer limit (1 byte) ubyte (NBC/NXC) 6.125.2.9 #dene OutputOffsetOverloaded(p) (((p)32)+27)

R - True if the motor has been overloaded within speed control regulation (1 byte) ubyte 6.125.2.10 #dene OutputOffsetRegDParameter(p) (((p)32)+24) RW - Holds the D-constant used in the regulation (1 byte) ubyte 6.125.2.11 #dene OutputOffsetRegIParameter(p) (((p)32)+23) RW - Holds the I-constant used in the regulation (1 byte) ubyte

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.125

Output module IOMAP offsets

743

6.125.2.12

#dene OutputOffsetRegMode(p) (((p)32)+26) RW - Tells which regulation mode should be used (1 byte) ubyte

6.125.2.13

#dene OutputOffsetRegPParameter(p) (((p)32)+22) RW - Holds the P-constant used in the regulation (1 byte) ubyte

6.125.2.14

#dene OutputOffsetRegulationOptions 97 use for position regulation options (1 byte) ubyte (NBC/NXC)

6.125.2.15

#dene OutputOffsetRegulationTime 96

use for frequency of checking regulation mode (1 byte) ubyte (NBC/NXC) 6.125.2.16 #dene OutputOffsetRotationCount(p) (((p)32)+8)

R - Holds current number of counts for the rotation counter to the output (4 bytes) slong 6.125.2.17 #dene OutputOffsetRunState(p) (((p)32)+25)

RW - Holds the current motor run state in the output module (1 byte) ubyte 6.125.2.18 #dene OutputOffsetSpeed(p) (((p)32)+20) RW - Holds the wanted speed (1 byte) sbyte 6.125.2.19 #dene OutputOffsetSyncTurnParameter(p) (((p)32)+28) RW - Holds the turning parameter need within MoveBlock (1 byte) sbyte 6.125.2.20 #dene OutputOffsetTachoCount(p) (((p)32)+0)

R - Holds current number of counts, since last reset, updated every 1 mS (4 bytes) slong

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.126

LowSpeed module constants

744

6.125.2.21

#dene OutputOffsetTachoLimit(p) (((p)32)+12) RW - Holds number of counts to travel, 0 => Run forever (4 bytes) ulong

6.126

LowSpeed module constants

Constants that are part of the NXT rmwares LowSpeed module. Modules LSState constants
Constants for the low speed module LSState function.

LSChannelState constants
Constants for the low speed module LSChannelState function.

LSMode constants
Constants for the low speed module LSMode function.

LSErrorType constants
Constants for the low speed module LSErrorType function.

Low speed module IOMAP offsets


Constant offsets into the low speed module IOMAP structure.

LSNoRestartOnRead constants
Constants for the low speed module LSNoRestartOnRead and SetLSNoRestartOnRead functions.

Standard I2C constants


Constants for use with standard I2C devices.

LEGO I2C address constants


Constants for LEGO I2C device addresses.

Ultrasonic sensor constants


Constants for use with the ultrasonic sensor.

LEGO temperature sensor constants


Constants for use with the LEGO temperature sensor.

E-Meter sensor constants


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.127

LSState constants

745

Constants for use with the e-meter sensor.

6.126.1

Detailed Description

Constants that are part of the NXT rmwares LowSpeed module.

6.127

LSState constants

Constants for the low speed module LSState function. Denes #dene COM_CHANNEL_NONE_ACTIVE 0x00 #dene COM_CHANNEL_ONE_ACTIVE 0x01 #dene COM_CHANNEL_TWO_ACTIVE 0x02 #dene COM_CHANNEL_THREE_ACTIVE 0x04 #dene COM_CHANNEL_FOUR_ACTIVE 0x08 Detailed Description

6.127.1

Constants for the low speed module LSState function. These values are combined together using a bitwise OR operation. See also: LSState() 6.127.2 6.127.2.1 Dene Documentation #dene COM_CHANNEL_FOUR_ACTIVE 0x08 Low speed channel 4 is active 6.127.2.2 #dene COM_CHANNEL_NONE_ACTIVE 0x00 None of the low speed channels are active 6.127.2.3 #dene COM_CHANNEL_ONE_ACTIVE 0x01 Low speed channel 1 is active
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.128

LSChannelState constants

746

6.127.2.4

#dene COM_CHANNEL_THREE_ACTIVE 0x04 Low speed channel 3 is active

6.127.2.5

#dene COM_CHANNEL_TWO_ACTIVE 0x02 Low speed channel 2 is active

6.128

LSChannelState constants

Constants for the low speed module LSChannelState function. Denes #dene LOWSPEED_IDLE 0 #dene LOWSPEED_INIT 1 #dene LOWSPEED_LOAD_BUFFER 2 #dene LOWSPEED_COMMUNICATING 3 #dene LOWSPEED_ERROR 4 #dene LOWSPEED_DONE 5 Detailed Description

6.128.1

Constants for the low speed module LSChannelState function. See also: LSChannelState() 6.128.2 6.128.2.1 Dene Documentation #dene LOWSPEED_COMMUNICATING 3 Channel is actively communicating 6.128.2.2 #dene LOWSPEED_DONE 5 Channel is done communicating 6.128.2.3 #dene LOWSPEED_ERROR 4 Channel is in an error state
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.129

LSMode constants

747

6.128.2.4

#dene LOWSPEED_IDLE 0 Channel is idle

Examples: ex_syscommlscheckstatus.nxc.

6.128.2.5

#dene LOWSPEED_INIT 1 Channel is being initialized

6.128.2.6

#dene LOWSPEED_LOAD_BUFFER 2 Channel buffer is loading

6.129

LSMode constants

Constants for the low speed module LSMode function. Denes #dene LOWSPEED_TRANSMITTING 1 #dene LOWSPEED_RECEIVING 2 #dene LOWSPEED_DATA_RECEIVED 3 6.129.1 Detailed Description

Constants for the low speed module LSMode function. See also: LSMode() 6.129.2 6.129.2.1 Dene Documentation #dene LOWSPEED_DATA_RECEIVED 3 Lowspeed port is in data received mode

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.130

LSErrorType constants

748

6.129.2.2

#dene LOWSPEED_RECEIVING 2 Lowspeed port is in receiving mode

6.129.2.3

#dene LOWSPEED_TRANSMITTING 1 Lowspeed port is in transmitting mode

6.130

LSErrorType constants

Constants for the low speed module LSErrorType function. Denes #dene LOWSPEED_NO_ERROR 0 #dene LOWSPEED_CH_NOT_READY 1 #dene LOWSPEED_TX_ERROR 2 #dene LOWSPEED_RX_ERROR 3 Detailed Description

6.130.1

Constants for the low speed module LSErrorType function. See also: LSErrorType() 6.130.2 6.130.2.1 Dene Documentation #dene LOWSPEED_CH_NOT_READY 1 Lowspeed port is not ready 6.130.2.2 #dene LOWSPEED_NO_ERROR 0 Lowspeed port has no error 6.130.2.3 #dene LOWSPEED_RX_ERROR 3 Lowspeed port encountered an error while receiving data

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.131

Low speed module IOMAP offsets

749

6.130.2.4

#dene LOWSPEED_TX_ERROR 2 Lowspeed port encountered an error while transmitting data

6.131

Low speed module IOMAP offsets

Constant offsets into the low speed module IOMAP structure. Denes #dene LowSpeedOffsetInBufBuf(p) (((p)19)+0) #dene LowSpeedOffsetInBufInPtr(p) (((p)19)+16) #dene LowSpeedOffsetInBufOutPtr(p) (((p)19)+17) #dene LowSpeedOffsetInBufBytesToRx(p) (((p)19)+18) #dene LowSpeedOffsetOutBufBuf(p) (((p)19)+76) #dene LowSpeedOffsetOutBufInPtr(p) (((p)19)+92) #dene LowSpeedOffsetOutBufOutPtr(p) (((p)19)+93) #dene LowSpeedOffsetOutBufBytesToRx(p) (((p)19)+94) #dene LowSpeedOffsetMode(p) ((p)+152) #dene LowSpeedOffsetChannelState(p) ((p)+156) #dene LowSpeedOffsetErrorType(p) ((p)+160) #dene LowSpeedOffsetState 164 #dene LowSpeedOffsetSpeed 165 #dene LowSpeedOffsetNoRestartOnRead 166 Detailed Description

6.131.1

Constant offsets into the low speed module IOMAP structure. 6.131.2 6.131.2.1 Dene Documentation #dene LowSpeedOffsetChannelState(p) ((p)+156) R - Lowspeed channgel state (1 byte) 6.131.2.2 #dene LowSpeedOffsetErrorType(p) ((p)+160) R - Lowspeed port error type (1 byte)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.131

Low speed module IOMAP offsets

750

6.131.2.3

#dene LowSpeedOffsetInBufBuf(p) (((p)19)+0) RW - Input buffer data buffer eld offset (16 bytes)

6.131.2.4

#dene LowSpeedOffsetInBufBytesToRx(p) (((p)19)+18) RW - Input buffer bytes to receive eld offset (1 byte)

6.131.2.5

#dene LowSpeedOffsetInBufInPtr(p) (((p)19)+16) RW - Input buffer in pointer eld offset (1 byte)

6.131.2.6

#dene LowSpeedOffsetInBufOutPtr(p) (((p)19)+17) RW - Input buffer out pointer eld offset (1 byte)

6.131.2.7

#dene LowSpeedOffsetMode(p) ((p)+152) R - Lowspeed port mode (1 byte)

6.131.2.8

#dene LowSpeedOffsetNoRestartOnRead 166 RW - Lowspeed option for no restart on read (all channels) (NBC/NXC)

6.131.2.9

#dene LowSpeedOffsetOutBufBuf(p) (((p)19)+76) RW - Output buffer data buffer eld offset (16 bytes)

6.131.2.10

#dene LowSpeedOffsetOutBufBytesToRx(p) (((p)19)+94) RW - Output buffer bytes to receive eld offset (1 byte)

6.131.2.11

#dene LowSpeedOffsetOutBufInPtr(p) (((p)19)+92) RW - Output buffer in pointer eld offset (1 byte)

6.131.2.12

#dene LowSpeedOffsetOutBufOutPtr(p) (((p)19)+93) RW - Output buffer out pointer eld offset (1 byte)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.132

LSNoRestartOnRead constants

751

6.131.2.13

#dene LowSpeedOffsetSpeed 165 R - Lowspeed speed (unused)

6.131.2.14

#dene LowSpeedOffsetState 164 R - Lowspeed state (all channels)

6.132

LSNoRestartOnRead constants

Constants for the low speed module LSNoRestartOnRead and SetLSNoRestartOnRead functions. Denes #dene LSREAD_RESTART_ALL 0x00 #dene LSREAD_NO_RESTART_1 0x01 #dene LSREAD_NO_RESTART_2 0x02 #dene LSREAD_NO_RESTART_3 0x04 #dene LSREAD_NO_RESTART_4 0x08 #dene LSREAD_RESTART_NONE 0x0F #dene LSREAD_NO_RESTART_MASK 0x10 Detailed Description

6.132.1

Constants for the low speed module LSNoRestartOnRead and SetLSNoRestartOnRead functions. These values are combined with a bitwise OR operation. See also: LSNoRestartOnRead(), SetLSNoRestartOnRead() 6.132.2 6.132.2.1 Dene Documentation #dene LSREAD_NO_RESTART_1 0x01 No restart on read for channel 1 6.132.2.2 #dene LSREAD_NO_RESTART_2 0x02 No restart on read for channel 2

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.133

Standard I2C constants

752

6.132.2.3

#dene LSREAD_NO_RESTART_3 0x04 No restart on read for channel 3

6.132.2.4

#dene LSREAD_NO_RESTART_4 0x08 No restart on read for channel 4

6.132.2.5

#dene LSREAD_NO_RESTART_MASK 0x10 No restart mask

6.132.2.6

#dene LSREAD_RESTART_ALL 0x00 Restart on read for all channels (default)

6.132.2.7

#dene LSREAD_RESTART_NONE 0x0F No restart on read for all channels

6.133

Standard I2C constants

Constants for use with standard I2C devices. Denes #dene I2C_ADDR_DEFAULT 0x02 #dene I2C_REG_VERSION 0x00 #dene I2C_REG_VENDOR_ID 0x08 #dene I2C_REG_DEVICE_ID 0x10 #dene I2C_REG_CMD 0x41 Detailed Description

6.133.1

Constants for use with standard I2C devices.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.133

Standard I2C constants

753

6.133.2 6.133.2.1

Dene Documentation #dene I2C_ADDR_DEFAULT 0x02 Standard NXT I2C device address

Examples: ex_i2cdeviceid.nxc, ex_i2cdeviceinfo.nxc, ex_I2CSendCommand.nxc, ex_i2cvendorid.nxc, ex_i2cversion.nxc, ex_MSDeenergize.nxc, ex_MSEnergize.nxc, ex_MSIRTrain.nxc, ex_MSPFComboDirect.nxc, ex_MSPFComboPWM.nxc, ex_MSPFRawOutput.nxc, ex_MSPFRepeat.nxc, ex_MSPFSingleOutputCST.nxc, ex_MSPFSingleOutputPWM.nxc, ex_MSPFSinglePin.nxc, ex_MSPFTrain.nxc, ex_MSReadValue.nxc, ex_readi2cregister.nxc, and ex_writei2cregister.nxc.

6.133.2.2

#dene I2C_REG_CMD 0x41 Standard NXT I2C device command register

Examples: ex_MSReadValue.nxc, ex_readi2cregister.nxc, and ex_writei2cregister.nxc.

6.133.2.3

#dene I2C_REG_DEVICE_ID 0x10 Standard NXT I2C device ID register

Examples: ex_i2cdeviceinfo.nxc.

6.133.2.4

#dene I2C_REG_VENDOR_ID 0x08 Standard NXT I2C vendor ID register

Examples: ex_i2cdeviceinfo.nxc.

6.133.2.5

#dene I2C_REG_VERSION 0x00 Standard NXT I2C version register

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.134

LEGO I2C address constants

754

Examples: ex_i2cdeviceinfo.nxc.

6.134

LEGO I2C address constants

Constants for LEGO I2C device addresses. Denes #dene LEGO_ADDR_US 0x02 #dene LEGO_ADDR_TEMP 0x98 #dene LEGO_ADDR_EMETER 0x04 6.134.1 Detailed Description

Constants for LEGO I2C device addresses. 6.134.2 6.134.2.1 Dene Documentation #dene LEGO_ADDR_EMETER 0x04 The LEGO e-meter sensors I2C address 6.134.2.2 #dene LEGO_ADDR_TEMP 0x98 The LEGO temperature sensors I2C address 6.134.2.3 #dene LEGO_ADDR_US 0x02 The LEGO ultrasonic sensors I2C address

6.135

Ultrasonic sensor constants

Constants for use with the ultrasonic sensor. Denes #dene US_CMD_OFF 0x00 #dene US_CMD_SINGLESHOT 0x01

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.135

Ultrasonic sensor constants

755

#dene US_CMD_CONTINUOUS 0x02 #dene US_CMD_EVENTCAPTURE 0x03 #dene US_CMD_WARMRESET 0x04 #dene US_REG_CM_INTERVAL 0x40 #dene US_REG_ACTUAL_ZERO 0x50 #dene US_REG_SCALE_FACTOR 0x51 #dene US_REG_SCALE_DIVISOR 0x52 #dene US_REG_FACTORY_ACTUAL_ZERO 0x11 #dene US_REG_FACTORY_SCALE_FACTOR 0x12 #dene US_REG_FACTORY_SCALE_DIVISOR 0x13 #dene US_REG_MEASUREMENT_UNITS 0x14 Detailed Description

6.135.1

Constants for use with the ultrasonic sensor. 6.135.2 6.135.2.1 Dene Documentation #dene US_CMD_CONTINUOUS 0x02

Command to put the ultrasonic sensor into continuous polling mode (default) 6.135.2.2 #dene US_CMD_EVENTCAPTURE 0x03 Command to put the ultrasonic sensor into event capture mode 6.135.2.3 #dene US_CMD_OFF 0x00 Command to turn off the ultrasonic sensor Examples: ex_writei2cregister.nxc.

6.135.2.4

#dene US_CMD_SINGLESHOT 0x01 Command to put the ultrasonic sensor into single shot mode

6.135.2.5

#dene US_CMD_WARMRESET 0x04 Command to warm reset the ultrasonic sensor

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.136

LEGO temperature sensor constants

756

6.135.2.6

#dene US_REG_ACTUAL_ZERO 0x50 The register address used to store the actual zero value

6.135.2.7

#dene US_REG_CM_INTERVAL 0x40 The register address used to store the CM interval

6.135.2.8

#dene US_REG_FACTORY_ACTUAL_ZERO 0x11 The register address containing the factory setting for the actual zero value

6.135.2.9

#dene US_REG_FACTORY_SCALE_DIVISOR 0x13

The register address containing the factory setting for the scale divisor value 6.135.2.10 #dene US_REG_FACTORY_SCALE_FACTOR 0x12

The register address containing the factory setting for the scale factor value 6.135.2.11 #dene US_REG_MEASUREMENT_UNITS 0x14 The register address containing the measurement units (degrees C or F) 6.135.2.12 #dene US_REG_SCALE_DIVISOR 0x52 The register address used to store the scale divisor value 6.135.2.13 #dene US_REG_SCALE_FACTOR 0x51 The register address used to store the scale factor value

6.136

LEGO temperature sensor constants

Constants for use with the LEGO temperature sensor.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.136

LEGO temperature sensor constants

757

Denes #dene TEMP_RES_9BIT 0x00 #dene TEMP_RES_10BIT 0x20 #dene TEMP_RES_11BIT 0x40 #dene TEMP_RES_12BIT 0x60 #dene TEMP_SD_CONTINUOUS 0x00 #dene TEMP_SD_SHUTDOWN 0x01 #dene TEMP_TM_COMPARATOR 0x00 #dene TEMP_TM_INTERRUPT 0x02 #dene TEMP_OS_ONESHOT 0x80 #dene TEMP_FQ_1 0x00 #dene TEMP_FQ_2 0x08 #dene TEMP_FQ_4 0x10 #dene TEMP_FQ_6 0x18 #dene TEMP_POL_LOW 0x00 #dene TEMP_POL_HIGH 0x04 #dene TEMP_REG_TEMP 0x00 #dene TEMP_REG_CONFIG 0x01 #dene TEMP_REG_TLOW 0x02 #dene TEMP_REG_THIGH 0x03 Detailed Description

6.136.1

Constants for use with the LEGO temperature sensor. 6.136.2 6.136.2.1 Dene Documentation #dene TEMP_FQ_1 0x00 Set fault queue to 1 fault before alert 6.136.2.2 #dene TEMP_FQ_2 0x08 Set fault queue to 2 faults before alert 6.136.2.3 #dene TEMP_FQ_4 0x10 Set fault queue to 4 faults before alert

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.136

LEGO temperature sensor constants

758

6.136.2.4

#dene TEMP_FQ_6 0x18 Set fault queue to 6 faults before alert

6.136.2.5

#dene TEMP_OS_ONESHOT 0x80

Set the sensor into oneshot mode. When the device is in shutdown mode this will start a single temperature conversion. The device returns to shutdown mode when it completes. 6.136.2.6 #dene TEMP_POL_HIGH 0x04 Set polarity of ALERT pin to be active HIGH 6.136.2.7 #dene TEMP_POL_LOW 0x00 Set polarity of ALERT pin to be active LOW 6.136.2.8 #dene TEMP_REG_CONFIG 0x01 The register for reading/writing sensor conguration values 6.136.2.9 #dene TEMP_REG_TEMP 0x00 The register where temperature values can be read 6.136.2.10 #dene TEMP_REG_THIGH 0x03 The register for reading/writing a user-dened high temperature limit 6.136.2.11 #dene TEMP_REG_TLOW 0x02 The register for reading/writing a user-dened low temperature limit 6.136.2.12 #dene TEMP_RES_10BIT 0x20 Set the temperature conversion resolution to 10 bit

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.137

E-Meter sensor constants

759

6.136.2.13

#dene TEMP_RES_11BIT 0x40 Set the temperature conversion resolution to 11 bit

6.136.2.14

#dene TEMP_RES_12BIT 0x60 Set the temperature conversion resolution to 12 bit

Examples: ex_CongureTemperatureSensor.nxc.

6.136.2.15

#dene TEMP_RES_9BIT 0x00 Set the temperature conversion resolution to 9 bit

6.136.2.16

#dene TEMP_SD_CONTINUOUS 0x00 Set the sensor mode to continuous

6.136.2.17

#dene TEMP_SD_SHUTDOWN 0x01

Set the sensor mode to shutdown. The device will shut down after the current conversion is completed. 6.136.2.18 #dene TEMP_TM_COMPARATOR 0x00 Set the thermostat mode to comparator 6.136.2.19 #dene TEMP_TM_INTERRUPT 0x02 Set the thermostat mode to interrupt

6.137

E-Meter sensor constants

Constants for use with the e-meter sensor.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.137

E-Meter sensor constants

760

Denes #dene EMETER_REG_VIN 0x0a #dene EMETER_REG_AIN 0x0c #dene EMETER_REG_VOUT 0x0e #dene EMETER_REG_AOUT 0x10 #dene EMETER_REG_JOULES 0x12 #dene EMETER_REG_WIN 0x14 #dene EMETER_REG_WOUT 0x16 Detailed Description

6.137.1

Constants for use with the e-meter sensor. 6.137.2 6.137.2.1 Dene Documentation #dene EMETER_REG_AIN 0x0c The register address for amps in 6.137.2.2 #dene EMETER_REG_AOUT 0x10 The register address for amps out 6.137.2.3 #dene EMETER_REG_JOULES 0x12 The register address for joules 6.137.2.4 #dene EMETER_REG_VIN 0x0a The register address for voltage in 6.137.2.5 #dene EMETER_REG_VOUT 0x0e The register address for voltage out 6.137.2.6 #dene EMETER_REG_WIN 0x14 The register address for watts in

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.138

Display module constants

761

6.137.2.7

#dene EMETER_REG_WOUT 0x16 The register address for watts out

6.138

Display module constants

Constants that are part of the NXT rmwares Display module. Modules Line number constants
Line numbers for use with DrawText system function.

DisplayExecuteFunction constants
Constants that are for use with the DisplayExecuteFunction system call.

Drawing option constants


Constants that are for specifying drawing options in several display module API functions.

Display ags
Constants that are for use with the display ags functions.

Display contrast constants


Constants that are for use with the display contrast API functions.

Text line constants


Constants that are for use with getting/setting display data.

Display module IOMAP offsets


Constant offsets into the display module IOMAP structure.

Denes #dene SCREEN_MODE_RESTORE 0x00 #dene SCREEN_MODE_CLEAR 0x01 #dene DISPLAY_HEIGHT 64 #dene DISPLAY_WIDTH 100 #dene DISPLAY_MENUICONS_Y 40 #dene DISPLAY_MENUICONS_X_OFFS 7 #dene DISPLAY_MENUICONS_X_DIFF 31

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.138

Display module constants

762

#dene MENUICON_LEFT 0 #dene MENUICON_CENTER 1 #dene MENUICON_RIGHT 2 #dene MENUICONS 3 #dene FRAME_SELECT 0 #dene STATUSTEXT 1 #dene MENUTEXT 2 #dene STEPLINE 3 #dene TOPLINE 4 #dene SPECIALS 5 #dene STATUSICON_BLUETOOTH 0 #dene STATUSICON_USB 1 #dene STATUSICON_VM 2 #dene STATUSICON_BATTERY 3 #dene STATUSICONS 4 #dene SCREEN_BACKGROUND 0 #dene SCREEN_LARGE 1 #dene SCREEN_SMALL 2 #dene SCREENS 3 #dene BITMAP_1 0 #dene BITMAP_2 1 #dene BITMAP_3 2 #dene BITMAP_4 3 #dene BITMAPS 4 #dene STEPICON_1 0 #dene STEPICON_2 1 #dene STEPICON_3 2 #dene STEPICON_4 3 #dene STEPICON_5 4 #dene STEPICONS 5 Detailed Description

6.138.1

Constants that are part of the NXT rmwares Display module. 6.138.2 6.138.2.1 Dene Documentation #dene BITMAP_1 0 Bitmap 1

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.138

Display module constants

763

6.138.2.2

#dene BITMAP_2 1 Bitmap 2

6.138.2.3

#dene BITMAP_3 2 Bitmap 3

6.138.2.4

#dene BITMAP_4 3 Bitmap 4

6.138.2.5

#dene BITMAPS 4 The number of bitmap bits

6.138.2.6

#dene DISPLAY_HEIGHT 64 The height of the LCD screen in pixels

Examples: ex_LineOut.nxc.

6.138.2.7

#dene DISPLAY_MENUICONS_X_DIFF 31

6.138.2.8

#dene DISPLAY_MENUICONS_X_OFFS 7

6.138.2.9

#dene DISPLAY_MENUICONS_Y 40

6.138.2.10

#dene DISPLAY_WIDTH 100 The width of the LCD screen in pixels

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.138

Display module constants

764

Examples: ex_LineOut.nxc.

6.138.2.11

#dene FRAME_SELECT 0 Center icon select frame

6.138.2.12

#dene MENUICON_CENTER 1 Center icon

6.138.2.13

#dene MENUICON_LEFT 0 Left icon

6.138.2.14

#dene MENUICON_RIGHT 2 Right icon

6.138.2.15

#dene MENUICONS 3 The number of menu icons

6.138.2.16

#dene MENUTEXT 2 Center icon text

6.138.2.17

#dene SCREEN_BACKGROUND 0 Entire screen

6.138.2.18

#dene SCREEN_LARGE 1 Entire screen except status line

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.138

Display module constants

765

6.138.2.19

#dene SCREEN_MODE_CLEAR 0x01 Clear the screen

See also: SetScreenMode()

6.138.2.20

#dene SCREEN_MODE_RESTORE 0x00 Restore the screen

See also: SetScreenMode()

6.138.2.21

#dene SCREEN_SMALL 2 Screen between menu icons and status line

6.138.2.22

#dene SCREENS 3 The number of screen bits

6.138.2.23

#dene SPECIALS 5 The number of special bit values

6.138.2.24

#dene STATUSICON_BATTERY 3 Battery status icon collection

6.138.2.25

#dene STATUSICON_BLUETOOTH 0 BlueTooth status icon collection

6.138.2.26

#dene STATUSICON_USB 1 USB status icon collection

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.138

Display module constants

766

6.138.2.27

#dene STATUSICON_VM 2 VM status icon collection

6.138.2.28

#dene STATUSICONS 4 The number of status icons

6.138.2.29

#dene STATUSTEXT 1 Status text (BT name)

6.138.2.30

#dene STEPICON_1 0 Left most step icon

6.138.2.31

#dene STEPICON_2 1

6.138.2.32

#dene STEPICON_3 2

6.138.2.33

#dene STEPICON_4 3

6.138.2.34

#dene STEPICON_5 4 Right most step icon

6.138.2.35

#dene STEPICONS 5

6.138.2.36

#dene STEPLINE 3 Step collection lines

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.139

DisplayExecuteFunction constants

767

6.138.2.37

#dene TOPLINE 4 Top status underline

6.139

DisplayExecuteFunction constants

Constants that are for use with the DisplayExecuteFunction system call. Denes #dene DISPLAY_ERASE_ALL 0x00 #dene DISPLAY_PIXEL 0x01 #dene DISPLAY_HORIZONTAL_LINE 0x02 #dene DISPLAY_VERTICAL_LINE 0x03 #dene DISPLAY_CHAR 0x04 #dene DISPLAY_ERASE_LINE 0x05 #dene DISPLAY_FILL_REGION 0x06 #dene DISPLAY_FRAME 0x07 Detailed Description

6.139.1

Constants that are for use with the DisplayExecuteFunction system call. 6.139.2 6.139.2.1 Dene Documentation #dene DISPLAY_CHAR 0x04 W - draw char (actual font) (CMD,TRUE,X1,Y1,Char,x) 6.139.2.2 #dene DISPLAY_ERASE_ALL 0x00 W - erase entire screen (CMD,x,x,x,x,x) Examples: ex_sysdisplayexecutefunction.nxc.

6.139.2.3

#dene DISPLAY_ERASE_LINE 0x05 W - erase a single line (CMD,x,LINE,x,x,x)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.140

Drawing option constants

768

6.139.2.4

#dene DISPLAY_FILL_REGION 0x06 W - ll screen region (CMD,TRUE/FALSE,X1,Y1,X2,Y2)

6.139.2.5

#dene DISPLAY_FRAME 0x07 W - draw a frame (on/off) (CMD,TRUE/FALSE,X1,Y1,X2,Y2)

6.139.2.6

#dene DISPLAY_HORIZONTAL_LINE 0x02 W - draw horizontal line (CMD,TRUE/FALSE,X1,Y1,X2,x)

Examples: ex_dispfunc.nxc.

6.139.2.7

#dene DISPLAY_PIXEL 0x01 W - set pixel (on/off) (CMD,TRUE/FALSE,X,Y,x,x)

6.139.2.8

#dene DISPLAY_VERTICAL_LINE 0x03 W - draw vertical line (CMD,TRUE/FALSE,X1,Y1,x,Y2)

6.140

Drawing option constants

Constants that are for specifying drawing options in several display module API functions. Modules Font drawing option constants
These addition drawing option constants are only for use when drawing text and numbers on the LCD using an RIC-based font.

Denes #dene DRAW_OPT_NORMAL (0x0000) #dene DRAW_OPT_CLEAR_WHOLE_SCREEN (0x0001)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.140

Drawing option constants

769

#dene DRAW_OPT_CLEAR_EXCEPT_STATUS_SCREEN (0x0002) #dene DRAW_OPT_CLEAR_PIXELS (0x0004) #dene DRAW_OPT_CLEAR (0x0004) #dene DRAW_OPT_INVERT (0x0004) #dene DRAW_OPT_LOGICAL_COPY (0x0000) #dene DRAW_OPT_LOGICAL_AND (0x0008) #dene DRAW_OPT_LOGICAL_OR (0x0010) #dene DRAW_OPT_LOGICAL_XOR (0x0018) #dene DRAW_OPT_FILL_SHAPE (0x0020) #dene DRAW_OPT_CLEAR_SCREEN_MODES (0x0003) #dene DRAW_OPT_LOGICAL_OPERATIONS (0x0018) #dene DRAW_OPT_POLYGON_POLYLINE (0x0400) Detailed Description

6.140.1

Constants that are for specifying drawing options in several display module API functions. Bits 0 & 1 (values 0,1,2,3) control screen clearing behaviour (Not within RIC les). Bit 2 (value 4) controls the NOT operation, i.e. draw in white or invert text/graphics. Bits 3 & 4 (values 0,8,16,24) control pixel logical combinations (COPY/AND/OR/XOR). Bit 5 (value 32) controls shape lling, or overrides text/graphic bitmaps with set pixels. These may be ORed together for the full instruction (e.g., DRAW_OPT_NORMAL|DRAW_OPT_LOGICAL_XOR) These operations are resolved into the separate, common parameters dened in c_display.iom before any drawing function is called. Note that when drawing a RIC le, the initial DrawingOptions parameter supplied in the drawing instruction controls screen clearing, but nothing else. The CopyOptions parameter from each instruction in the RIC le then controls graphic operations, but the screen-clearing bits are ignored. See also: TextOut(), NumOut(), PointOut(), LineOut(), CircleOut(), RectOut(), PolyOut(), EllipseOut(), FontTextOut(), FontNumOut(), GraphicOut(), GraphicArrayOut() 6.140.2 6.140.2.1 Dene Documentation #dene DRAW_OPT_CLEAR (0x0004) Clear pixels while drawing (aka draw in white) 6.140.2.2 #dene DRAW_OPT_CLEAR_EXCEPT_STATUS_SCREEN (0x0002) Clear the screen except for the status line before drawing

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.140

Drawing option constants

770

6.140.2.3

#dene DRAW_OPT_CLEAR_PIXELS (0x0004) Clear pixels while drawing (aka draw in white)

6.140.2.4

#dene DRAW_OPT_CLEAR_SCREEN_MODES (0x0003) Bit mask for the clear screen modes

6.140.2.5

#dene DRAW_OPT_CLEAR_WHOLE_SCREEN (0x0001) Clear the entire screen before drawing

Examples: ex_dispgoutex.nxc.

6.140.2.6

#dene DRAW_OPT_FILL_SHAPE (0x0020) Fill the shape while drawing (rectangle, circle, ellipses, and polygon)

Examples: ex_CircleOut.nxc, ex_EllipseOut.nxc, ex_PolyOut.nxc, ex_SysDrawEllipse.nxc, and ex_sysdrawpolygon.nxc.

6.140.2.7

#dene DRAW_OPT_INVERT (0x0004) Invert text or graphics

Examples: ex_dispftout.nxc.

6.140.2.8

#dene DRAW_OPT_LOGICAL_AND (0x0008) Draw pixels using a logical AND operation

Examples: ex_dispftout.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.141

Font drawing option constants

771

6.140.2.9

#dene DRAW_OPT_LOGICAL_COPY (0x0000) Draw pixels using a logical copy operation

6.140.2.10

#dene DRAW_OPT_LOGICAL_OPERATIONS (0x0018) Bit mask for the logical drawing operations

6.140.2.11

#dene DRAW_OPT_LOGICAL_OR (0x0010) Draw pixels using a logical OR operation

Examples: ex_dispftout.nxc.

6.140.2.12

#dene DRAW_OPT_LOGICAL_XOR (0x0018) Draw pixels using a logical XOR operation

Examples: ex_CircleOut.nxc, ex_EllipseOut.nxc, ex_LineOut.nxc, ex_PolyOut.nxc, ex_SysDrawEllipse.nxc, and ex_sysdrawpolygon.nxc.

6.140.2.13

#dene DRAW_OPT_NORMAL (0x0000) Normal drawing

Examples: ex_CircleOut.nxc, ex_dispftout.nxc, ex_dispfunc.nxc, and ex_sysdrawfont.nxc.

6.140.2.14

#dene DRAW_OPT_POLYGON_POLYLINE (0x0400) When drawing polygons, do not close (i.e., draw a polyline instead)

6.141

Font drawing option constants

These addition drawing option constants are only for use when drawing text and numbers on the LCD using an RIC-based font.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.141

Font drawing option constants

772

Denes #dene DRAW_OPT_FONT_DIRECTIONS (0x01C0) #dene DRAW_OPT_FONT_WRAP (0x0200) #dene DRAW_OPT_FONT_DIR_L2RB (0x0000) #dene DRAW_OPT_FONT_DIR_L2RT (0x0040) #dene DRAW_OPT_FONT_DIR_R2LB (0x0080) #dene DRAW_OPT_FONT_DIR_R2LT (0x00C0) #dene DRAW_OPT_FONT_DIR_B2TL (0x0100) #dene DRAW_OPT_FONT_DIR_B2TR (0x0140) #dene DRAW_OPT_FONT_DIR_T2BL (0x0180) #dene DRAW_OPT_FONT_DIR_T2BR (0x01C0) Detailed Description

6.141.1

These addition drawing option constants are only for use when drawing text and numbers on the LCD using an RIC-based font. See also: FontTextOut(), FontNumOut() 6.141.2 6.141.2.1 Dene Documentation #dene DRAW_OPT_FONT_DIR_B2TL (0x0100) Font bottom to top left align 6.141.2.2 #dene DRAW_OPT_FONT_DIR_B2TR (0x0140) Font bottom to top right align 6.141.2.3 #dene DRAW_OPT_FONT_DIR_L2RB (0x0000) Font left to right bottom align Examples: ex_dispftout.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.141

Font drawing option constants

773

6.141.2.4

#dene DRAW_OPT_FONT_DIR_L2RT (0x0040) Font left to right top align

Examples: ex_dispftout.nxc, and ex_sysdrawfont.nxc.

6.141.2.5

#dene DRAW_OPT_FONT_DIR_R2LB (0x0080) Font right to left bottom align

6.141.2.6

#dene DRAW_OPT_FONT_DIR_R2LT (0x00C0) Font right to left top align

6.141.2.7

#dene DRAW_OPT_FONT_DIR_T2BL (0x0180) Font top to bottom left align

Examples: ex_dispftout.nxc.

6.141.2.8

#dene DRAW_OPT_FONT_DIR_T2BR (0x01C0) Font top to bottom right align

6.141.2.9

#dene DRAW_OPT_FONT_DIRECTIONS (0x01C0) Bit mask for the font direction bits

6.141.2.10

#dene DRAW_OPT_FONT_WRAP (0x0200) Option to have text wrap in FontNumOut and FontTextOut calls

Examples: ex_dispftout.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.142

Display ags

774

6.142

Display ags

Constants that are for use with the display ags functions. Denes #dene DISPLAY_ON 0x01 #dene DISPLAY_REFRESH 0x02 #dene DISPLAY_POPUP 0x08 #dene DISPLAY_REFRESH_DISABLED 0x40 #dene DISPLAY_BUSY 0x80 Detailed Description

6.142.1

Constants that are for use with the display ags functions. See also: SetDisplayFlags(), DisplayFlags() 6.142.2 6.142.2.1 Dene Documentation #dene DISPLAY_BUSY 0x80 R - Refresh in progress 6.142.2.2 #dene DISPLAY_ON 0x01 W - Display on 6.142.2.3 #dene DISPLAY_POPUP 0x08 W - Use popup display memory Examples: ex_dispmisc.nxc.

6.142.2.4

#dene DISPLAY_REFRESH 0x02 W - Enable refresh

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.143

Display contrast constants

775

6.142.2.5

#dene DISPLAY_REFRESH_DISABLED 0x40 R - Refresh disabled

6.143

Display contrast constants

Constants that are for use with the display contrast API functions. Denes #dene DISPLAY_CONTRAST_DEFAULT 0x5A #dene DISPLAY_CONTRAST_MAX 0x7F 6.143.1 Detailed Description

Constants that are for use with the display contrast API functions. See also: SetDisplayContrast(), DisplayContrast() 6.143.2 6.143.2.1 Dene Documentation #dene DISPLAY_CONTRAST_DEFAULT 0x5A Default display contrast value Examples: ex_contrast.nxc, and ex_setdisplaycontrast.nxc.

6.143.2.2

#dene DISPLAY_CONTRAST_MAX 0x7F Maximum display contrast value

Examples: ex_contrast.nxc.

6.144

Text line constants

Constants that are for use with getting/setting display data.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.144

Text line constants

776

Denes #dene TEXTLINE_1 0 #dene TEXTLINE_2 1 #dene TEXTLINE_3 2 #dene TEXTLINE_4 3 #dene TEXTLINE_5 4 #dene TEXTLINE_6 5 #dene TEXTLINE_7 6 #dene TEXTLINE_8 7 #dene TEXTLINES 8 Detailed Description

6.144.1

Constants that are for use with getting/setting display data. See also: SetDisplayNormal(), Popup() 6.144.2 6.144.2.1 GetDisplayNormal(), SetDisplayPopup(), GetDisplay-

Dene Documentation #dene TEXTLINE_1 0 Text line 1

Examples: ex_GetDisplayNormal.nxc, ex_GetDisplayPopup.nxc, ex_SetDisplayNormal.nxc, and ex_SetDisplayPopup.nxc.

6.144.2.2

#dene TEXTLINE_2 1 Text line 2

6.144.2.3

#dene TEXTLINE_3 2 Text line 3

6.144.2.4

#dene TEXTLINE_4 3 Text line 4

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.145

Display module IOMAP offsets

777

6.144.2.5

#dene TEXTLINE_5 4 Text line 5

6.144.2.6

#dene TEXTLINE_6 5 Text line 6

6.144.2.7

#dene TEXTLINE_7 6 Text line 7

6.144.2.8

#dene TEXTLINE_8 7 Text line 8

6.144.2.9

#dene TEXTLINES 8 The number of text lines on the LCD

6.145

Display module IOMAP offsets

Constant offsets into the display module IOMAP structure. Denes #dene DisplayOffsetPFunc 0 #dene DisplayOffsetEraseMask 4 #dene DisplayOffsetUpdateMask 8 #dene DisplayOffsetPFont 12 #dene DisplayOffsetPTextLines(p) (((p)4)+16) #dene DisplayOffsetPStatusText 48 #dene DisplayOffsetPStatusIcons 52 #dene DisplayOffsetPScreens(p) (((p)4)+56) #dene DisplayOffsetPBitmaps(p) (((p)4)+68) #dene DisplayOffsetPMenuText 84 #dene DisplayOffsetPMenuIcons(p) (((p)4)+88) #dene DisplayOffsetPStepIcons 100 #dene DisplayOffsetDisplay 104 #dene DisplayOffsetStatusIcons(p) ((p)+108)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.145

Display module IOMAP offsets

778

#dene DisplayOffsetStepIcons(p) ((p)+112) #dene DisplayOffsetFlags 117 #dene DisplayOffsetTextLinesCenterFlags 118 #dene DisplayOffsetNormal(l, w) (((l)100)+(w)+119) #dene DisplayOffsetPopup(l, w) (((l)100)+(w)+919) #dene DisplayOffsetContrast 1719 Detailed Description

6.145.1

Constant offsets into the display module IOMAP structure. 6.145.2 6.145.2.1 Dene Documentation #dene DisplayOffsetContrast 1719 Adjust the display contrast with this eld 6.145.2.2 #dene DisplayOffsetDisplay 104 Display content copied to physical display every 17 mS 6.145.2.3 #dene DisplayOffsetEraseMask 4 Section erase mask (executed rst) 6.145.2.4 #dene DisplayOffsetFlags 117 Update ags enumerated above 6.145.2.5 #dene DisplayOffsetNormal(l, w) (((l)100)+(w)+119) Raw display memory for normal screen 6.145.2.6 #dene DisplayOffsetPBitmaps(p) (((p)4)+68) Pointer to free bitmap les 6.145.2.7 #dene DisplayOffsetPFont 12 Pointer to font le
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.145

Display module IOMAP offsets

779

6.145.2.8

#dene DisplayOffsetPFunc 0 Simple draw entry

6.145.2.9

#dene DisplayOffsetPMenuIcons(p) (((p)4)+88) Pointer to menu icon images (NULL == none)

6.145.2.10

#dene DisplayOffsetPMenuText 84 Pointer to menu icon text (NULL == none)

6.145.2.11

#dene DisplayOffsetPopup(l, w) (((l)100)+(w)+919) Raw display memory for popup screen

6.145.2.12

#dene DisplayOffsetPScreens(p) (((p)4)+56) Pointer to screen bitmap le

6.145.2.13

#dene DisplayOffsetPStatusIcons 52 Pointer to status icon collection le

6.145.2.14

#dene DisplayOffsetPStatusText 48 Pointer to status text string

6.145.2.15

#dene DisplayOffsetPStepIcons 100 Pointer to step icon collection le

6.145.2.16

#dene DisplayOffsetPTextLines(p) (((p)4)+16) Pointer to text strings

6.145.2.17

#dene DisplayOffsetStatusIcons(p) ((p)+108) Index in status icon collection le (index = 0 -> none)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.146

Comm module constants

780

6.145.2.18

#dene DisplayOffsetStepIcons(p) ((p)+112) Index in step icon collection le (index = 0 -> none)

6.145.2.19

#dene DisplayOffsetTextLinesCenterFlags 118 Mask to center TextLines

6.145.2.20

#dene DisplayOffsetUpdateMask 8 Section update mask (executed next)

6.146

Comm module constants

Constants that are part of the NXT rmwares Comm module. Modules Mailbox constants
Mailbox number constants should be used to avoid confusing NXT-G users.

Miscellaneous Comm module constants


Miscellaneous constants related to the Comm module.

Bluetooth State constants


Constants related to the bluetooth state.

Data mode constants


Constants related to the bluetooth and hi-speed data modes.

Bluetooth state status constants


Constants related to the bluetooth state status.

Remote connection constants


Constants for specifying remote connection slots.

Bluetooth hardware status constants


Constants related to the bluetooth hardware status.

Hi-speed port constants


Constants related to the hi-speed port.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.147

Miscellaneous Comm module constants

781

Device status constants


Constants refering to DeviceStatus within DeviceTable.

Comm module interface function constants


Constants for all the Comm module interface functions executable via SysCommExecuteFunction.

Comm module status code constants


Constants for Comm module status codes.

Comm module IOMAP offsets


Constant offsets into the Comm module IOMAP structure.

6.146.1

Detailed Description

Constants that are part of the NXT rmwares Comm module.

6.147

Miscellaneous Comm module constants

Miscellaneous constants related to the Comm module. Denes #dene SIZE_OF_USBBUF 64 #dene USB_PROTOCOL_OVERHEAD 2 #dene SIZE_OF_USBDATA 62 #dene SIZE_OF_HSBUF 128 #dene SIZE_OF_BTBUF 128 #dene BT_CMD_BYTE 1 #dene SIZE_OF_BT_DEVICE_TABLE 30 #dene SIZE_OF_BT_CONNECT_TABLE 4 #dene SIZE_OF_BT_NAME 16 #dene SIZE_OF_BRICK_NAME 8 #dene SIZE_OF_CLASS_OF_DEVICE 4 #dene SIZE_OF_BT_PINCODE 16 #dene SIZE_OF_BDADDR 7 #dene MAX_BT_MSG_SIZE 60000 #dene BT_DEFAULT_INQUIRY_MAX 0 #dene BT_DEFAULT_INQUIRY_TIMEOUT_LO 15

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.147

Miscellaneous Comm module constants

782

6.147.1

Detailed Description

Miscellaneous constants related to the Comm module. 6.147.2 6.147.2.1 Dene Documentation #dene BT_CMD_BYTE 1 Size of Bluetooth command 6.147.2.2 #dene BT_DEFAULT_INQUIRY_MAX 0 Bluetooth default inquiry Max (0 == unlimited) 6.147.2.3 #dene BT_DEFAULT_INQUIRY_TIMEOUT_LO 15 Bluetooth inquiry timeout (151.28 sec = 19.2 sec) 6.147.2.4 #dene MAX_BT_MSG_SIZE 60000 Max Bluetooth Message Size 6.147.2.5 #dene SIZE_OF_BDADDR 7 Size of Bluetooth Address 6.147.2.6 #dene SIZE_OF_BRICK_NAME 8 Size of NXT Brick name 6.147.2.7 #dene SIZE_OF_BT_CONNECT_TABLE 4

Size of Bluetooth connection table -- Index 0 is always incoming connection 6.147.2.8 #dene SIZE_OF_BT_DEVICE_TABLE 30 Size of Bluetooth device table

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.148

Bluetooth State constants

783

6.147.2.9

#dene SIZE_OF_BT_NAME 16 Size of Bluetooth name

6.147.2.10

#dene SIZE_OF_BT_PINCODE 16 Size of Bluetooth PIN

6.147.2.11

#dene SIZE_OF_BTBUF 128 Size of Bluetooth buffer

6.147.2.12

#dene SIZE_OF_CLASS_OF_DEVICE 4 Size of class of device

6.147.2.13

#dene SIZE_OF_HSBUF 128 Size of High Speed Port 4 buffer

6.147.2.14

#dene SIZE_OF_USBBUF 64 Size of USB Buffer in bytes

6.147.2.15

#dene SIZE_OF_USBDATA 62 Size of USB Buffer available for data

6.147.2.16

#dene USB_PROTOCOL_OVERHEAD 2 Size of USB Overhead in bytes -- Command type byte + Command

6.148

Bluetooth State constants

Constants related to the bluetooth state.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.149

Data mode constants

784

Denes #dene BT_ARM_OFF 0 #dene BT_ARM_CMD_MODE 1 #dene BT_ARM_DATA_MODE 2 6.148.1 Detailed Description

Constants related to the bluetooth state. 6.148.2 6.148.2.1 Dene Documentation #dene BT_ARM_CMD_MODE 1 BtState constant bluetooth command mode 6.148.2.2 #dene BT_ARM_DATA_MODE 2 BtState constant bluetooth data mode 6.148.2.3 #dene BT_ARM_OFF 0 BtState constant bluetooth off

6.149

Data mode constants

Constants related to the bluetooth and hi-speed data modes. Denes #dene DATA_MODE_NXT 0x00 #dene DATA_MODE_GPS 0x01 #dene DATA_MODE_RAW 0x02 #dene DATA_MODE_MASK 0x07 #dene DATA_MODE_UPDATE 0x08 Detailed Description

6.149.1

Constants related to the bluetooth and hi-speed data modes.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.150

Bluetooth state status constants

785

6.149.2 6.149.2.1

Dene Documentation #dene DATA_MODE_GPS 0x01 Use GPS data mode

Examples: ex_DataMode.nxc.

6.149.2.2

#dene DATA_MODE_MASK 0x07 A mask for the data mode bits.

6.149.2.3

#dene DATA_MODE_NXT 0x00 Use NXT data mode

Examples: ex_DataMode.nxc.

6.149.2.4

#dene DATA_MODE_RAW 0x02 Use RAW data mode

6.149.2.5

#dene DATA_MODE_UPDATE 0x08 Indicates that the data mode has been changed.

6.150

Bluetooth state status constants

Constants related to the bluetooth state status. Denes #dene BT_BRICK_VISIBILITY 0x01 #dene BT_BRICK_PORT_OPEN 0x02 #dene BT_CONNECTION_0_ENABLE 0x10 #dene BT_CONNECTION_1_ENABLE 0x20 #dene BT_CONNECTION_2_ENABLE 0x40 #dene BT_CONNECTION_3_ENABLE 0x80

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.151

Remote connection constants

786

6.150.1

Detailed Description

Constants related to the bluetooth state status. 6.150.2 6.150.2.1 Dene Documentation #dene BT_BRICK_PORT_OPEN 0x02 BtStateStatus port open bit 6.150.2.2 #dene BT_BRICK_VISIBILITY 0x01 BtStateStatus brick visibility bit 6.150.2.3 #dene BT_CONNECTION_0_ENABLE 0x10 BtStateStatus connection 0 enable/disable bit 6.150.2.4 #dene BT_CONNECTION_1_ENABLE 0x20 BtStateStatus connection 1 enable/disable bit 6.150.2.5 #dene BT_CONNECTION_2_ENABLE 0x40 BtStateStatus connection 2 enable/disable bit 6.150.2.6 #dene BT_CONNECTION_3_ENABLE 0x80 BtStateStatus connection 3 enable/disable bit

6.151

Remote connection constants

Constants for specifying remote connection slots. Denes #dene CONN_BT0 0x0 #dene CONN_BT1 0x1 #dene CONN_BT2 0x2 #dene CONN_BT3 0x3

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.151

Remote connection constants

787

#dene CONN_HS4 0x4 #dene CONN_HS_ALL 0x4 #dene CONN_HS_1 0x5 #dene CONN_HS_2 0x6 #dene CONN_HS_3 0x7 #dene CONN_HS_4 0x8 #dene CONN_HS_5 0x9 #dene CONN_HS_6 0xa #dene CONN_HS_7 0xb #dene CONN_HS_8 0xc Detailed Description

6.151.1

Constants for specifying remote connection slots. 6.151.2 6.151.2.1 Dene Documentation #dene CONN_BT0 0x0 Bluetooth connection 0 6.151.2.2 #dene CONN_BT1 0x1 Bluetooth connection 1 Examples: ex_RemoteCloseFile.nxc, ex_RemoteConnectionIdle.nxc, ex_RemoteConnectionWrite.nxc, ex_RemoteDatalogRead.nxc, ex_RemoteDatalogSetTimes.nxc, ex_RemoteDeleteFile.nxc, ex_RemoteDeleteUserFlash.nxc, ex_RemoteFindFirstFile.nxc, ex_RemoteFindNextFile.nxc, ex_RemoteGetBatteryLevel.nxc, ex_RemoteGetBluetoothAddress.nxc, ex_RemoteGetConnectionCount.nxc, ex_RemoteGetConnectionName.nxc, ex_RemoteGetContactCount.nxc, ex_RemoteGetContactName.nxc, ex_RemoteGetCurrentProgramName.nxc, ex_RemoteGetDeviceInfo.nxc, ex_RemoteGetFirmwareVersion.nxc, ex_RemoteGetInputValues.nxc, ex_RemoteGetOutputState.nxc, ex_RemoteGetProperty.nxc, ex_RemoteIOMapRead.nxc, ex_RemoteIOMapWriteBytes.nxc, ex_RemoteIOMapWriteValue.nxc, ex_RemoteLowspeedGetStatus.nxc, ex_RemoteLowspeedRead.nxc, ex_RemoteLowspeedWrite.nxc, ex_RemoteOpenAppendData.nxc,

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.151

Remote connection constants

788

ex_RemoteOpenRead.nxc, ex_RemoteOpenWrite.nxc, ex_RemoteOpenWriteData.nxc, ex_RemoteOpenWriteLinear.nxc, ex_RemotePollCommand.nxc, ex_RemotePollCommandLength.nxc, ex_RemoteRead.nxc, ex_RemoteRenameFile.nxc, ex_RemoteResetTachoCount.nxc, ex_RemoteSetProperty.nxc, and ex_RemoteWrite.nxc.

6.151.2.3

#dene CONN_BT2 0x2 Bluetooth connection 2

6.151.2.4

#dene CONN_BT3 0x3 Bluetooth connection 3

6.151.2.5

#dene CONN_HS4 0x4 RS485 (hi-speed) connection (port 4, all devices)

6.151.2.6

#dene CONN_HS_1 0x5 RS485 (hi-speed) connection (port 4, device address 1)

6.151.2.7

#dene CONN_HS_2 0x6 RS485 (hi-speed) connection (port 4, device address 2)

6.151.2.8

#dene CONN_HS_3 0x7 RS485 (hi-speed) connection (port 4, device address 3)

6.151.2.9

#dene CONN_HS_4 0x8 RS485 (hi-speed) connection (port 4, device address 4)

6.151.2.10

#dene CONN_HS_5 0x9 RS485 (hi-speed) connection (port 4, device address 5)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.152

Bluetooth hardware status constants

789

6.151.2.11

#dene CONN_HS_6 0xa RS485 (hi-speed) connection (port 4, device address 6)

6.151.2.12

#dene CONN_HS_7 0xb RS485 (hi-speed) connection (port 4, device address 7)

6.151.2.13

#dene CONN_HS_8 0xc RS485 (hi-speed) connection (port 4, device address 8)

6.151.2.14

#dene CONN_HS_ALL 0x4 RS485 (hi-speed) connection (port 4, all devices)

6.152

Bluetooth hardware status constants

Constants related to the bluetooth hardware status. Denes #dene BT_ENABLE 0x00 #dene BT_DISABLE 0x01 6.152.1 Detailed Description

Constants related to the bluetooth hardware status. 6.152.2 6.152.2.1 Dene Documentation #dene BT_DISABLE 0x01 BtHwStatus bluetooth disable 6.152.2.2 #dene BT_ENABLE 0x00 BtHwStatus bluetooth enable

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.153

Hi-speed port constants

790

6.153

Hi-speed port constants

Constants related to the hi-speed port. Modules Hi-speed port ags constants
Constants related to the hi-speed port ags.

Hi-speed port state constants


Constants related to the hi-speed port state.

Hi-speed port SysCommHSControl constants


Constants for use with the SysCommHSControl API function.

Hi-speed port baud rate constants


Constants for conguring the hi-speed port baud rate (HsSpeed).

Hi-speed port UART mode constants


Constants referring to HsMode UART conguration settings.

Hi-speed port address constants


Constants that are used to specify the Hi-speed (RS-485) port device address.

6.153.1

Detailed Description

Constants related to the hi-speed port.

6.154

Hi-speed port ags constants

Constants related to the hi-speed port ags. Denes #dene HS_UPDATE 1 6.154.1 Detailed Description

Constants related to the hi-speed port ags.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.155

Hi-speed port state constants

791

6.154.2 6.154.2.1

Dene Documentation #dene HS_UPDATE 1 HsFlags high speed update required

6.155

Hi-speed port state constants

Constants related to the hi-speed port state. Denes #dene HS_INITIALISE 1 #dene HS_INIT_RECEIVER 2 #dene HS_SEND_DATA 3 #dene HS_DISABLE 4 #dene HS_ENABLE 5 Detailed Description

6.155.1

Constants related to the hi-speed port state. 6.155.2 6.155.2.1 Dene Documentation #dene HS_DISABLE 4 HsState disable 6.155.2.2 #dene HS_ENABLE 5 HsState enable 6.155.2.3 #dene HS_INIT_RECEIVER 2 HsState initialize receiver 6.155.2.4 #dene HS_INITIALISE 1 HsState initialize

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.156

Hi-speed port SysCommHSControl constants

792

6.155.2.5

#dene HS_SEND_DATA 3 HsState send data

6.156

Hi-speed port SysCommHSControl constants

Constants for use with the SysCommHSControl API function. Denes #dene HS_CTRL_INIT 0 #dene HS_CTRL_UART 1 #dene HS_CTRL_EXIT 2 6.156.1 Detailed Description

Constants for use with the SysCommHSControl API function. See also: SysCommHSControl() 6.156.2 6.156.2.1 Dene Documentation #dene HS_CTRL_EXIT 2 Ddisable the high speed port 6.156.2.2 #dene HS_CTRL_INIT 0 Enable the high speed port Examples: ex_RS485Receive.nxc, ex_RS485Send.nxc, and ex_SysCommHSControl.nxc.

6.156.2.3

#dene HS_CTRL_UART 1 Setup the high speed port UART conguration

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.157

Hi-speed port baud rate constants

793

6.157

Hi-speed port baud rate constants

Constants for conguring the hi-speed port baud rate (HsSpeed). Denes #dene HS_BAUD_1200 0 #dene HS_BAUD_2400 1 #dene HS_BAUD_3600 2 #dene HS_BAUD_4800 3 #dene HS_BAUD_7200 4 #dene HS_BAUD_9600 5 #dene HS_BAUD_14400 6 #dene HS_BAUD_19200 7 #dene HS_BAUD_28800 8 #dene HS_BAUD_38400 9 #dene HS_BAUD_57600 10 #dene HS_BAUD_76800 11 #dene HS_BAUD_115200 12 #dene HS_BAUD_230400 13 #dene HS_BAUD_460800 14 #dene HS_BAUD_921600 15 #dene HS_BAUD_DEFAULT 15 Detailed Description

6.157.1

Constants for conguring the hi-speed port baud rate (HsSpeed). 6.157.2 6.157.2.1 Dene Documentation #dene HS_BAUD_115200 12 HsSpeed 115200 Baud 6.157.2.2 #dene HS_BAUD_1200 0 HsSpeed 1200 Baud 6.157.2.3 #dene HS_BAUD_14400 6 HsSpeed 14400 Baud
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.157

Hi-speed port baud rate constants

794

6.157.2.4

#dene HS_BAUD_19200 7 HsSpeed 19200 Baud

6.157.2.5

#dene HS_BAUD_230400 13 HsSpeed 230400 Baud

6.157.2.6

#dene HS_BAUD_2400 1 HsSpeed 2400 Baud

6.157.2.7

#dene HS_BAUD_28800 8 HsSpeed 28800 Baud

6.157.2.8

#dene HS_BAUD_3600 2 HsSpeed 3600 Baud

6.157.2.9

#dene HS_BAUD_38400 9 HsSpeed 38400 Baud

6.157.2.10

#dene HS_BAUD_460800 14 HsSpeed 460800 Baud

6.157.2.11

#dene HS_BAUD_4800 3 HsSpeed 4800 Baud

6.157.2.12

#dene HS_BAUD_57600 10 HsSpeed 57600 Baud

6.157.2.13

#dene HS_BAUD_7200 4 HsSpeed 7200 Baud

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.158

Hi-speed port UART mode constants

795

6.157.2.14

#dene HS_BAUD_76800 11 HsSpeed 76800 Baud

6.157.2.15

#dene HS_BAUD_921600 15 HsSpeed 921600 Baud

6.157.2.16

#dene HS_BAUD_9600 5 HsSpeed 9600 Baud

6.157.2.17

#dene HS_BAUD_DEFAULT 15 HsSpeed default Baud (921600)

Examples: ex_RS485Receive.nxc, and ex_RS485Send.nxc.

6.158

Hi-speed port UART mode constants

Constants referring to HsMode UART conguration settings. Modules Hi-speed port data bits constants
Constants referring to HsMode (number of data bits).

Hi-speed port stop bits constants


Constants referring to HsMode (number of stop bits).

Hi-speed port parity constants


Constants referring to HsMode (parity).

Hi-speed port combined UART constants


Constants that combine data bits, parity, and stop bits into a single value.

Denes #dene HS_MODE_DEFAULT HS_MODE_8N1


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.159

Hi-speed port data bits constants

796

6.158.1

Detailed Description

Constants referring to HsMode UART conguration settings. 6.158.2 6.158.2.1 Dene Documentation #dene HS_MODE_DEFAULT HS_MODE_8N1 HsMode default mode (8 data bits, no parity, 1 stop bit) Examples: ex_RS485Receive.nxc, and ex_RS485Send.nxc.

6.159

Hi-speed port data bits constants

Constants referring to HsMode (number of data bits). Denes #dene HS_MODE_5_DATA 0x0000 #dene HS_MODE_6_DATA 0x0040 #dene HS_MODE_7_DATA 0x0080 #dene HS_MODE_8_DATA 0x00C0 Detailed Description

6.159.1

Constants referring to HsMode (number of data bits). 6.159.2 6.159.2.1 Dene Documentation #dene HS_MODE_5_DATA 0x0000 HsMode 5 data bits 6.159.2.2 #dene HS_MODE_6_DATA 0x0040 HsMode 6 data bits

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.160

Hi-speed port stop bits constants

797

6.159.2.3

#dene HS_MODE_7_DATA 0x0080 HsMode 7 data bits

6.159.2.4

#dene HS_MODE_8_DATA 0x00C0 HsMode 8 data bits

6.160

Hi-speed port stop bits constants

Constants referring to HsMode (number of stop bits). Denes #dene HS_MODE_10_STOP 0x0000 #dene HS_MODE_15_STOP 0x1000 #dene HS_MODE_20_STOP 0x2000 6.160.1 Detailed Description

Constants referring to HsMode (number of stop bits). 6.160.2 6.160.2.1 Dene Documentation #dene HS_MODE_10_STOP 0x0000 HsMode 1 stop bit 6.160.2.2 #dene HS_MODE_15_STOP 0x1000 HsMode 1.5 stop bits 6.160.2.3 #dene HS_MODE_20_STOP 0x2000 HsMode 2 stop bits

6.161

Hi-speed port parity constants

Constants referring to HsMode (parity).

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.162

Hi-speed port combined UART constants

798

Denes #dene HS_MODE_E_PARITY 0x0000 #dene HS_MODE_O_PARITY 0x0200 #dene HS_MODE_S_PARITY 0x0400 #dene HS_MODE_M_PARITY 0x0600 #dene HS_MODE_N_PARITY 0x0800 Detailed Description

6.161.1

Constants referring to HsMode (parity). 6.161.2 6.161.2.1 Dene Documentation #dene HS_MODE_E_PARITY 0x0000 HsMode Even parity 6.161.2.2 #dene HS_MODE_M_PARITY 0x0600 HsMode Mark parity 6.161.2.3 #dene HS_MODE_N_PARITY 0x0800 HsMode No parity 6.161.2.4 #dene HS_MODE_O_PARITY 0x0200 HsMode Odd parity 6.161.2.5 #dene HS_MODE_S_PARITY 0x0400 HsMode Space parity

6.162

Hi-speed port combined UART constants

Constants that combine data bits, parity, and stop bits into a single value.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.163

Hi-speed port address constants

799

Denes #dene HS_MODE_8N1 (HS_MODE_8_DATA|HS_MODE_N_PARITY|HS_MODE_10_STOP) #dene HS_MODE_7E1 (HS_MODE_7_DATA|HS_MODE_E_PARITY|HS_MODE_10_STOP) 6.162.1 Detailed Description

Constants that combine data bits, parity, and stop bits into a single value. 6.162.2 6.162.2.1 Dene Documentation #dene HS_MODE_7E1 (HS_MODE_7_DATA|HS_MODE_E_PARITY|HS_MODE_10_STOP) HsMode 7 data bits, even parity, 1 stop bit 6.162.2.2 #dene HS_MODE_8N1 (HS_MODE_8_DATA|HS_MODE_N_PARITY|HS_MODE_10_STOP) HsMode 8 data bits, no parity, 1 stop bit Examples: ex_sethsmode.nxc.

6.163

Hi-speed port address constants

Constants that are used to specify the Hi-speed (RS-485) port device address. Denes #dene HS_ADDRESS_ALL 0 #dene HS_ADDRESS_1 1 #dene HS_ADDRESS_2 2 #dene HS_ADDRESS_3 3 #dene HS_ADDRESS_4 4 #dene HS_ADDRESS_5 5 #dene HS_ADDRESS_6 6 #dene HS_ADDRESS_7 7 #dene HS_ADDRESS_8 8

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.163

Hi-speed port address constants

800

6.163.1

Detailed Description

Constants that are used to specify the Hi-speed (RS-485) port device address. 6.163.2 6.163.2.1 Dene Documentation #dene HS_ADDRESS_1 1 HsAddress device address 1 6.163.2.2 #dene HS_ADDRESS_2 2 HsAddress device address 2 6.163.2.3 #dene HS_ADDRESS_3 3 HsAddress device address 3 6.163.2.4 #dene HS_ADDRESS_4 4 HsAddress device address 4 6.163.2.5 #dene HS_ADDRESS_5 5 HsAddress device address 5 6.163.2.6 #dene HS_ADDRESS_6 6 HsAddress device address 6 6.163.2.7 #dene HS_ADDRESS_7 7 HsAddress device address 7 6.163.2.8 #dene HS_ADDRESS_8 8 HsAddress device address 8

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.164

Device status constants

801

6.163.2.9

#dene HS_ADDRESS_ALL 0 HsAddress all devices

6.164

Device status constants

Constants refering to DeviceStatus within DeviceTable. Denes #dene BT_DEVICE_EMPTY 0x00 #dene BT_DEVICE_UNKNOWN 0x01 #dene BT_DEVICE_KNOWN 0x02 #dene BT_DEVICE_NAME 0x40 #dene BT_DEVICE_AWAY 0x80 Detailed Description

6.164.1

Constants refering to DeviceStatus within DeviceTable. 6.164.2 6.164.2.1 Dene Documentation #dene BT_DEVICE_AWAY 0x80 Bluetooth device away 6.164.2.2 #dene BT_DEVICE_EMPTY 0x00 Bluetooth device table empty 6.164.2.3 #dene BT_DEVICE_KNOWN 0x02 Bluetooth device known 6.164.2.4 #dene BT_DEVICE_NAME 0x40 Bluetooth device name

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.165

Comm module interface function constants

802

6.164.2.5

#dene BT_DEVICE_UNKNOWN 0x01 Bluetooth device unknown

6.165

Comm module interface function constants

Constants for all the Comm module interface functions executable via SysCommExecuteFunction. Denes #dene INTF_SENDFILE 0 #dene INTF_SEARCH 1 #dene INTF_STOPSEARCH 2 #dene INTF_CONNECT 3 #dene INTF_DISCONNECT 4 #dene INTF_DISCONNECTALL 5 #dene INTF_REMOVEDEVICE 6 #dene INTF_VISIBILITY 7 #dene INTF_SETCMDMODE 8 #dene INTF_OPENSTREAM 9 #dene INTF_SENDDATA 10 #dene INTF_FACTORYRESET 11 #dene INTF_BTON 12 #dene INTF_BTOFF 13 #dene INTF_SETBTNAME 14 #dene INTF_EXTREAD 15 #dene INTF_PINREQ 16 #dene INTF_CONNECTREQ 17 #dene INTF_CONNECTBYNAME 18 Detailed Description

6.165.1

Constants for all the Comm module interface functions executable via SysCommExecuteFunction. See also: SysCommExecuteFunction()

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.165

Comm module interface function constants

803

6.165.2 6.165.2.1

Dene Documentation #dene INTF_BTOFF 13 Turn off the bluetooth radio

Examples: ex_syscommexecutefunction.nxc.

6.165.2.2

#dene INTF_BTON 12 Turn on the bluetooth radio

6.165.2.3

#dene INTF_CONNECT 3 Connect to one of the known devices

6.165.2.4

#dene INTF_CONNECTBYNAME 18 Connect to a bluetooth device by name

6.165.2.5

#dene INTF_CONNECTREQ 17 Connection request from another device

6.165.2.6

#dene INTF_DISCONNECT 4 Disconnect from one of the connected devices

6.165.2.7

#dene INTF_DISCONNECTALL 5 Disconnect all devices

6.165.2.8

#dene INTF_EXTREAD 15 External read request

6.165.2.9

#dene INTF_FACTORYRESET 11 Reset bluetooth settings to factory values

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.165

Comm module interface function constants

804

6.165.2.10

#dene INTF_OPENSTREAM 9 Open a bluetooth stream

6.165.2.11

#dene INTF_PINREQ 16 Bluetooth PIN request

6.165.2.12

#dene INTF_REMOVEDEVICE 6 Remove a device from the known devices table

6.165.2.13

#dene INTF_SEARCH 1 Search for bluetooth devices

6.165.2.14

#dene INTF_SENDDATA 10 Send data over a bluetooth connection

6.165.2.15

#dene INTF_SENDFILE 0 Send a le via bluetooth to another device

6.165.2.16

#dene INTF_SETBTNAME 14 Set the bluetooth name

6.165.2.17

#dene INTF_SETCMDMODE 8 Set bluetooth into command mode

6.165.2.18

#dene INTF_STOPSEARCH 2 Stop searching for bluetooth devices

6.165.2.19

#dene INTF_VISIBILITY 7 Set the bluetooth visibility on or off

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.166

Comm module status code constants

805

6.166

Comm module status code constants

Constants for Comm module status codes. Denes #dene LR_SUCCESS 0x50 #dene LR_COULD_NOT_SAVE 0x51 #dene LR_STORE_IS_FULL 0x52 #dene LR_ENTRY_REMOVED 0x53 #dene LR_UNKNOWN_ADDR 0x54 #dene USB_CMD_READY 0x01 #dene BT_CMD_READY 0x02 #dene HS_CMD_READY 0x04 Detailed Description

6.166.1

Constants for Comm module status codes. 6.166.2 6.166.2.1 Dene Documentation #dene BT_CMD_READY 0x02 A constant representing bluetooth direct command 6.166.2.2 #dene HS_CMD_READY 0x04 A constant representing high speed direct command 6.166.2.3 #dene LR_COULD_NOT_SAVE 0x51 Bluetooth list result could not save 6.166.2.4 #dene LR_ENTRY_REMOVED 0x53 Bluetooth list result entry removed 6.166.2.5 #dene LR_STORE_IS_FULL 0x52 Bluetooth list result store is full

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.167

Comm module IOMAP offsets

806

6.166.2.6

#dene LR_SUCCESS 0x50 Bluetooth list result success

6.166.2.7

#dene LR_UNKNOWN_ADDR 0x54 Bluetooth list result unknown address

6.166.2.8

#dene USB_CMD_READY 0x01 A constant representing usb direct command

6.167

Comm module IOMAP offsets

Constant offsets into the Comm module IOMAP structure. Denes #dene CommOffsetPFunc 0 #dene CommOffsetPFuncTwo 4 #dene CommOffsetBtDeviceTableName(p) (((p)31)+8) #dene CommOffsetBtDeviceTableClassOfDevice(p) (((p)31)+24) #dene CommOffsetBtDeviceTableBdAddr(p) (((p)31)+28) #dene CommOffsetBtDeviceTableDeviceStatus(p) (((p)31)+35) #dene CommOffsetBtConnectTableName(p) (((p)47)+938) #dene CommOffsetBtConnectTableClassOfDevice(p) (((p)47)+954) #dene CommOffsetBtConnectTablePinCode(p) (((p)47)+958) #dene CommOffsetBtConnectTableBdAddr(p) (((p)47)+974) #dene CommOffsetBtConnectTableHandleNr(p) (((p)47)+981) #dene CommOffsetBtConnectTableStreamStatus(p) (((p)47)+982) #dene CommOffsetBtConnectTableLinkQuality(p) (((p)47)+983) #dene CommOffsetBrickDataName 1126 #dene CommOffsetBrickDataBluecoreVersion 1142 #dene CommOffsetBrickDataBdAddr 1144 #dene CommOffsetBrickDataBtStateStatus 1151 #dene CommOffsetBrickDataBtHwStatus 1152 #dene CommOffsetBrickDataTimeOutValue 1153 #dene CommOffsetBtInBufBuf 1157 #dene CommOffsetBtInBufInPtr 1285 #dene CommOffsetBtInBufOutPtr 1286 #dene CommOffsetBtOutBufBuf 1289

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.167

Comm module IOMAP offsets

807

#dene CommOffsetBtOutBufInPtr 1417 #dene CommOffsetBtOutBufOutPtr 1418 #dene CommOffsetHsInBufBuf 1421 #dene CommOffsetHsInBufInPtr 1549 #dene CommOffsetHsInBufOutPtr 1550 #dene CommOffsetHsOutBufBuf 1553 #dene CommOffsetHsOutBufInPtr 1681 #dene CommOffsetHsOutBufOutPtr 1682 #dene CommOffsetUsbInBufBuf 1685 #dene CommOffsetUsbInBufInPtr 1749 #dene CommOffsetUsbInBufOutPtr 1750 #dene CommOffsetUsbOutBufBuf 1753 #dene CommOffsetUsbOutBufInPtr 1817 #dene CommOffsetUsbOutBufOutPtr 1818 #dene CommOffsetUsbPollBufBuf 1821 #dene CommOffsetUsbPollBufInPtr 1885 #dene CommOffsetUsbPollBufOutPtr 1886 #dene CommOffsetBtDeviceCnt 1889 #dene CommOffsetBtDeviceNameCnt 1890 #dene CommOffsetHsFlags 1891 #dene CommOffsetHsSpeed 1892 #dene CommOffsetHsState 1893 #dene CommOffsetUsbState 1894 #dene CommOffsetHsMode 1896 #dene CommOffsetBtDataMode 1898 #dene CommOffsetHsDataMode 1899 Detailed Description

6.167.1

Constant offsets into the Comm module IOMAP structure. 6.167.2 6.167.2.1 Dene Documentation #dene CommOffsetBrickDataBdAddr 1144 Offset to Bluetooth address (7 bytes) 6.167.2.2 #dene CommOffsetBrickDataBluecoreVersion 1142 Offset to Bluecore version (2 bytes)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.167

Comm module IOMAP offsets

808

6.167.2.3

#dene CommOffsetBrickDataBtHwStatus 1152 Offset to BtHwStatus (1 byte)

6.167.2.4

#dene CommOffsetBrickDataBtStateStatus 1151 Offset to BtStateStatus (1 byte)

6.167.2.5

#dene CommOffsetBrickDataName 1126 Offset to brick name (16 bytes)

6.167.2.6

#dene CommOffsetBrickDataTimeOutValue 1153 Offset to data timeout value (1 byte)

6.167.2.7

#dene CommOffsetBtConnectTableBdAddr(p) (((p)47)+974) Offset to Bluetooth connect table address (7 bytes)

6.167.2.8

#dene CommOffsetBtConnectTableClassOfDevice(p) (((p)47)+954) Offset to Bluetooth connect table device class (4 bytes)

6.167.2.9

#dene CommOffsetBtConnectTableHandleNr(p) (((p)47)+981) Offset to Bluetooth connect table handle (1 byte)

6.167.2.10

#dene CommOffsetBtConnectTableLinkQuality(p) (((p)47)+983) Offset to Bluetooth connect table link quality (1 byte)

6.167.2.11

#dene CommOffsetBtConnectTableName(p) (((p)47)+938) Offset to Bluetooth connect table name (16 bytes)

6.167.2.12

#dene CommOffsetBtConnectTablePinCode(p) (((p)47)+958) Offset to Bluetooth connect table pin code (16 bytes)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.167

Comm module IOMAP offsets

809

6.167.2.13

#dene CommOffsetBtConnectTableStreamStatus(p) (((p)47)+982) Offset to Bluetooth connect table stream status (1 byte)

6.167.2.14

#dene CommOffsetBtDataMode 1898 Offset to Bluetooth data mode (1 byte)

6.167.2.15

#dene CommOffsetBtDeviceCnt 1889 Offset to Bluetooth device count (1 byte)

6.167.2.16

#dene CommOffsetBtDeviceNameCnt 1890 Offset to Bluetooth device name count (1 byte)

6.167.2.17

#dene CommOffsetBtDeviceTableBdAddr(p) (((p)31)+28) Offset to Bluetooth device table address (7 bytes)

6.167.2.18

#dene CommOffsetBtDeviceTableClassOfDevice(p) (((p)31)+24) Offset to Bluetooth device table device class (4 bytes)

6.167.2.19

#dene CommOffsetBtDeviceTableDeviceStatus(p) (((p)31)+35) Offset to Bluetooth device table status (1 byte)

6.167.2.20

#dene CommOffsetBtDeviceTableName(p) (((p)31)+8) Offset to BT device table name (16 bytes)

6.167.2.21

#dene CommOffsetBtInBufBuf 1157 Offset to Bluetooth input buffer data (128 bytes)

6.167.2.22

#dene CommOffsetBtInBufInPtr 1285 Offset to Bluetooth input buffer front pointer (1 byte)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.167

Comm module IOMAP offsets

810

6.167.2.23

#dene CommOffsetBtInBufOutPtr 1286 Offset to Bluetooth output buffer back pointer (1 byte)

6.167.2.24

#dene CommOffsetBtOutBufBuf 1289 Offset to Bluetooth output buffer offset data (128 bytes)

6.167.2.25

#dene CommOffsetBtOutBufInPtr 1417 Offset to Bluetooth output buffer front pointer (1 byte)

6.167.2.26

#dene CommOffsetBtOutBufOutPtr 1418 Offset to Bluetooth output buffer back pointer (1 byte)

6.167.2.27

#dene CommOffsetHsDataMode 1899 Offset to High Speed data mode (1 byte)

6.167.2.28

#dene CommOffsetHsFlags 1891 Offset to High Speed ags (1 byte)

6.167.2.29

#dene CommOffsetHsInBufBuf 1421 Offset to High Speed input buffer data (128 bytes)

6.167.2.30

#dene CommOffsetHsInBufInPtr 1549 Offset to High Speed input buffer front pointer (1 byte)

6.167.2.31

#dene CommOffsetHsInBufOutPtr 1550 Offset to High Speed input buffer back pointer (1 byte)

6.167.2.32

#dene CommOffsetHsMode 1896 Offset to High Speed mode (2 bytes)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.167

Comm module IOMAP offsets

811

6.167.2.33

#dene CommOffsetHsOutBufBuf 1553 Offset to High Speed output buffer data (128 bytes)

6.167.2.34

#dene CommOffsetHsOutBufInPtr 1681 Offset to High Speed output buffer front pointer (1 byte)

6.167.2.35

#dene CommOffsetHsOutBufOutPtr 1682 Offset to High Speed output buffer back pointer (1 byte)

6.167.2.36

#dene CommOffsetHsSpeed 1892 Offset to High Speed speed (1 byte)

6.167.2.37

#dene CommOffsetHsState 1893 Offset to High Speed state (1 byte)

6.167.2.38

#dene CommOffsetPFunc 0 Offset to the Comm module rst function pointer (4 bytes)

6.167.2.39

#dene CommOffsetPFuncTwo 4 Offset to the Comm module second function pointer (4 bytes)

6.167.2.40

#dene CommOffsetUsbInBufBuf 1685 Offset to Usb input buffer data (64 bytes)

6.167.2.41

#dene CommOffsetUsbInBufInPtr 1749 Offset to Usb input buffer front pointer (1 byte)

6.167.2.42

#dene CommOffsetUsbInBufOutPtr 1750 Offset to Usb input buffer back pointer (1 byte)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.168

RCX constants

812

6.167.2.43

#dene CommOffsetUsbOutBufBuf 1753 Offset to Usb output buffer data (64 bytes)

6.167.2.44

#dene CommOffsetUsbOutBufInPtr 1817 Offset to Usb output buffer front pointer (1 byte)

6.167.2.45

#dene CommOffsetUsbOutBufOutPtr 1818 Offset to Usb output buffer back pointer (1 byte)

6.167.2.46

#dene CommOffsetUsbPollBufBuf 1821 Offset to Usb Poll buffer data (64 bytes)

6.167.2.47

#dene CommOffsetUsbPollBufInPtr 1885 Offset to Usb Poll buffer front pointer (1 byte)

6.167.2.48

#dene CommOffsetUsbPollBufOutPtr 1886 Offset to Usb Poll buffer back pointer (1 byte)

6.167.2.49

#dene CommOffsetUsbState 1894 Offset to Usb State (1 byte)

6.168

RCX constants

Constants that are for use with devices that communicate with the RCX or Scout programmable bricks via IR such as the HiTechnic IRLink or the MindSensors nRLink. Modules RCX output constants
Constants for use when choosing RCX outputs.

RCX output mode constants

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.169

RCX output constants

813

Constants for use when conguring RCX output mode.

RCX output direction constants


Constants for use when conguring RCX output direction.

RCX output power constants


Constants for use when conguring RCX output power.

RCX IR remote constants


Constants for use when simulating RCX IR remote messages.

RCX and Scout sound constants


Constants for use when playing standard RCX and Scout sounds.

Scout constants
Constants for use when controlling the Scout brick.

RCX and Scout source constants


Constants for use when specifying RCX and Scout sources.

RCX and Scout opcode constants


Constants for use when specifying RCX and Scout opcodes.

6.168.1

Detailed Description

Constants that are for use with devices that communicate with the RCX or Scout programmable bricks via IR such as the HiTechnic IRLink or the MindSensors nRLink.

6.169

RCX output constants

Constants for use when choosing RCX outputs. Denes #dene RCX_OUT_A 0x01 #dene RCX_OUT_B 0x02 #dene RCX_OUT_C 0x04 #dene RCX_OUT_AB 0x03 #dene RCX_OUT_AC 0x05 #dene RCX_OUT_BC 0x06 #dene RCX_OUT_ABC 0x07

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.169

RCX output constants

814

6.169.1

Detailed Description

Constants for use when choosing RCX outputs. 6.169.2 6.169.2.1 Dene Documentation #dene RCX_OUT_A 0x01 RCX Output A Examples: ex_HTRCXDisableOutput.nxc, ex_HTRCXEnableOutput.nxc, ex_HTRCXFloat.nxc, ex_HTRCXFwd.nxc, ex_HTRCXInvertOutput.nxc, ex_HTRCXObvertOutput.nxc, ex_HTRCXOff.nxc, ex_HTRCXOn.nxc, ex_HTRCXOnFor.nxc, ex_HTRCXOnFwd.nxc, ex_HTRCXOnRev.nxc, ex_HTRCXRev.nxc, ex_HTRCXSetDirection.nxc, ex_HTRCXSetGlobalDirection.nxc, ex_HTRCXSetGlobalOutput.nxc, ex_HTRCXSetMaxPower.nxc, ex_HTRCXSetOutput.nxc, ex_HTRCXSetPower.nxc, ex_HTRCXToggle.nxc, ex_MSRCXDisableOutput.nxc, ex_MSRCXEnableOutput.nxc, ex_MSRCXFloat.nxc, ex_MSRCXFwd.nxc, ex_MSRCXInvertOutput.nxc, ex_MSRCXObvertOutput.nxc, ex_MSRCXOff.nxc, ex_MSRCXOn.nxc, ex_MSRCXOnFor.nxc, ex_MSRCXOnFwd.nxc, ex_MSRCXOnRev.nxc, ex_MSRCXRev.nxc, ex_MSRCXSetDirection.nxc, ex_MSRCXSetGlobalDirection.nxc, ex_MSRCXSetGlobalOutput.nxc, ex_MSRCXSetMaxPower.nxc, ex_MSRCXSetOutput.nxc, ex_MSRCXSetPower.nxc, and ex_MSRCXToggle.nxc.

6.169.2.2

#dene RCX_OUT_AB 0x03 RCX Outputs A and B

6.169.2.3

#dene RCX_OUT_ABC 0x07 RCX Outputs A, B, and C

6.169.2.4

#dene RCX_OUT_AC 0x05 RCX Outputs A and C

6.169.2.5

#dene RCX_OUT_B 0x02 RCX Output B

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.170

RCX output mode constants

815

6.169.2.6

#dene RCX_OUT_BC 0x06 RCX Outputs B and C

6.169.2.7

#dene RCX_OUT_C 0x04 RCX Output C

6.170

RCX output mode constants

Constants for use when conguring RCX output mode. Denes #dene RCX_OUT_FLOAT 0 #dene RCX_OUT_OFF 0x40 #dene RCX_OUT_ON 0x80 6.170.1 Detailed Description

Constants for use when conguring RCX output mode. 6.170.2 6.170.2.1 Dene Documentation #dene RCX_OUT_FLOAT 0 Set RCX output to oat 6.170.2.2 #dene RCX_OUT_OFF 0x40 Set RCX output to off 6.170.2.3 #dene RCX_OUT_ON 0x80 Set RCX output to on Examples: ex_HTRCXSetGlobalOutput.nxc, ex_HTRCXSetOutput.nxc, MSRCXSetGlobalOutput.nxc, and ex_MSRCXSetOutput.nxc. ex_-

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.171

RCX output direction constants

816

6.171

RCX output direction constants

Constants for use when conguring RCX output direction. Denes #dene RCX_OUT_REV 0 #dene RCX_OUT_TOGGLE 0x40 #dene RCX_OUT_FWD 0x80 6.171.1 Detailed Description

Constants for use when conguring RCX output direction. 6.171.2 6.171.2.1 Dene Documentation #dene RCX_OUT_FWD 0x80 Set RCX output direction to forward Examples: ex_HTRCXSetDirection.nxc, ex_HTRCXSetGlobalDirection.nxc, MSRCXSetDirection.nxc, and ex_MSRCXSetGlobalDirection.nxc. ex_-

6.171.2.2

#dene RCX_OUT_REV 0 Set RCX output direction to reverse

6.171.2.3

#dene RCX_OUT_TOGGLE 0x40 Set RCX output direction to toggle

6.172

RCX output power constants

Constants for use when conguring RCX output power. Denes #dene RCX_OUT_LOW 0

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.173

RCX IR remote constants

817

#dene RCX_OUT_HALF 3 #dene RCX_OUT_FULL 7 6.172.1 Detailed Description

Constants for use when conguring RCX output power. 6.172.2 6.172.2.1 Dene Documentation #dene RCX_OUT_FULL 7 Set RCX output power level to full Examples: ex_HTRCXSetPower.nxc, and ex_MSRCXSetPower.nxc.

6.172.2.2

#dene RCX_OUT_HALF 3 Set RCX output power level to half

6.172.2.3

#dene RCX_OUT_LOW 0 Set RCX output power level to low

6.173

RCX IR remote constants

Constants for use when simulating RCX IR remote messages. Denes #dene RCX_RemoteKeysReleased 0x0000 #dene RCX_RemotePBMessage1 0x0100 #dene RCX_RemotePBMessage2 0x0200 #dene RCX_RemotePBMessage3 0x0400 #dene RCX_RemoteOutAForward 0x0800 #dene RCX_RemoteOutBForward 0x1000 #dene RCX_RemoteOutCForward 0x2000 #dene RCX_RemoteOutABackward 0x4000 #dene RCX_RemoteOutBBackward 0x8000

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.173

RCX IR remote constants

818

#dene RCX_RemoteOutCBackward 0x0001 #dene RCX_RemoteSelProgram1 0x0002 #dene RCX_RemoteSelProgram2 0x0004 #dene RCX_RemoteSelProgram3 0x0008 #dene RCX_RemoteSelProgram4 0x0010 #dene RCX_RemoteSelProgram5 0x0020 #dene RCX_RemoteStopOutOff 0x0040 #dene RCX_RemotePlayASound 0x0080 Detailed Description

6.173.1

Constants for use when simulating RCX IR remote messages. 6.173.2 6.173.2.1 Dene Documentation #dene RCX_RemoteKeysReleased 0x0000 All remote keys have been released 6.173.2.2 #dene RCX_RemoteOutABackward 0x4000 Set output A backward 6.173.2.3 #dene RCX_RemoteOutAForward 0x0800 Set output A forward 6.173.2.4 #dene RCX_RemoteOutBBackward 0x8000 Set output B backward 6.173.2.5 #dene RCX_RemoteOutBForward 0x1000 Set output B forward 6.173.2.6 #dene RCX_RemoteOutCBackward 0x0001 Set output C backward

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.173

RCX IR remote constants

819

6.173.2.7

#dene RCX_RemoteOutCForward 0x2000 Set output C forward

6.173.2.8

#dene RCX_RemotePBMessage1 0x0100 Send PB message 1

6.173.2.9

#dene RCX_RemotePBMessage2 0x0200 Send PB message 2

6.173.2.10

#dene RCX_RemotePBMessage3 0x0400 Send PB message 3

6.173.2.11

#dene RCX_RemotePlayASound 0x0080 Play a sound

Examples: ex_HTRCXRemote.nxc, and ex_MSRCXRemote.nxc.

6.173.2.12

#dene RCX_RemoteSelProgram1 0x0002 Select program 1

6.173.2.13

#dene RCX_RemoteSelProgram2 0x0004 Select program 2

6.173.2.14

#dene RCX_RemoteSelProgram3 0x0008 Select program 3

6.173.2.15

#dene RCX_RemoteSelProgram4 0x0010 Select program 4

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.174

RCX and Scout sound constants

820

6.173.2.16

#dene RCX_RemoteSelProgram5 0x0020 Select program 5

6.173.2.17

#dene RCX_RemoteStopOutOff 0x0040 Stop and turn off outputs

6.174

RCX and Scout sound constants

Constants for use when playing standard RCX and Scout sounds. Denes #dene SOUND_CLICK 0 #dene SOUND_DOUBLE_BEEP 1 #dene SOUND_DOWN 2 #dene SOUND_UP 3 #dene SOUND_LOW_BEEP 4 #dene SOUND_FAST_UP 5 Detailed Description

6.174.1

Constants for use when playing standard RCX and Scout sounds. 6.174.2 6.174.2.1 Dene Documentation #dene SOUND_CLICK 0 Play the standard key click sound 6.174.2.2 #dene SOUND_DOUBLE_BEEP 1 Play the standard double beep sound 6.174.2.3 #dene SOUND_DOWN 2 Play the standard sweep down sound

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.175

Scout constants

821

Examples: ex_playsound.nxc.

6.174.2.4

#dene SOUND_FAST_UP 5 Play the standard fast up sound

Examples: ex_playsound.nxc.

6.174.2.5

#dene SOUND_LOW_BEEP 4 Play the standard low beep sound

Examples: ex_playsound.nxc.

6.174.2.6

#dene SOUND_UP 3 Play the standard sweep up sound

Examples: ex_playsound.nxc.

6.175

Scout constants

Constants for use when controlling the Scout brick. Modules Scout light constants
Constants for use when controlling the Scout light settings.

Scout sound constants


Constants for use when playing standard Scout sounds.

Scout sound set constants

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.176

Scout light constants

822

Constants for use when choosing standard Scout sound sets.

Scout mode constants


Constants for use when setting the scout mode.

Scout motion rule constants


Constants for use when setting the scout motion rule.

Scout touch rule constants


Constants for use when setting the scout touch rule.

Scout light rule constants


Constants for use when setting the scout light rule.

Scout transmit rule constants


Constants for use when setting the scout transmit rule.

Scout special effect constants


Constants for use when setting the scout special effect.

6.175.1

Detailed Description

Constants for use when controlling the Scout brick.

6.176

Scout light constants

Constants for use when controlling the Scout light settings. Denes #dene SCOUT_LIGHT_ON 0x80 #dene SCOUT_LIGHT_OFF 0 6.176.1 Detailed Description

Constants for use when controlling the Scout light settings.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.177

Scout sound constants

823

6.176.2 6.176.2.1

Dene Documentation #dene SCOUT_LIGHT_OFF 0 Turn off the scout light

6.176.2.2

#dene SCOUT_LIGHT_ON 0x80 Turn on the scout light

Examples: ex_HTScoutSetLight.nxc.

6.177

Scout sound constants

Constants for use when playing standard Scout sounds. Denes #dene SCOUT_SOUND_REMOTE 6 #dene SCOUT_SOUND_ENTERSA 7 #dene SCOUT_SOUND_KEYERROR 8 #dene SCOUT_SOUND_NONE 9 #dene SCOUT_SOUND_TOUCH1_PRES 10 #dene SCOUT_SOUND_TOUCH1_REL 11 #dene SCOUT_SOUND_TOUCH2_PRES 12 #dene SCOUT_SOUND_TOUCH2_REL 13 #dene SCOUT_SOUND_ENTER_BRIGHT 14 #dene SCOUT_SOUND_ENTER_NORMAL 15 #dene SCOUT_SOUND_ENTER_DARK 16 #dene SCOUT_SOUND_1_BLINK 17 #dene SCOUT_SOUND_2_BLINK 18 #dene SCOUT_SOUND_COUNTER1 19 #dene SCOUT_SOUND_COUNTER2 20 #dene SCOUT_SOUND_TIMER1 21 #dene SCOUT_SOUND_TIMER2 22 #dene SCOUT_SOUND_TIMER3 23 #dene SCOUT_SOUND_MAIL_RECEIVED 24 #dene SCOUT_SOUND_SPECIAL1 25 #dene SCOUT_SOUND_SPECIAL2 26 #dene SCOUT_SOUND_SPECIAL3 27

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.177

Scout sound constants

824

6.177.1

Detailed Description

Constants for use when playing standard Scout sounds. 6.177.2 6.177.2.1 Dene Documentation #dene SCOUT_SOUND_1_BLINK 17 Play the Scout 1 blink sound 6.177.2.2 #dene SCOUT_SOUND_2_BLINK 18 Play the Scout 2 blink sound 6.177.2.3 #dene SCOUT_SOUND_COUNTER1 19 Play the Scout counter 1 sound 6.177.2.4 #dene SCOUT_SOUND_COUNTER2 20 Play the Scout counter 2 sound 6.177.2.5 #dene SCOUT_SOUND_ENTER_BRIGHT 14 Play the Scout enter bright sound 6.177.2.6 #dene SCOUT_SOUND_ENTER_DARK 16 Play the Scout enter dark sound 6.177.2.7 #dene SCOUT_SOUND_ENTER_NORMAL 15 Play the Scout enter normal sound 6.177.2.8 #dene SCOUT_SOUND_ENTERSA 7 Play the Scout enter standalone sound

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.177

Scout sound constants

825

6.177.2.9

#dene SCOUT_SOUND_KEYERROR 8 Play the Scout key error sound

6.177.2.10

#dene SCOUT_SOUND_MAIL_RECEIVED 24 Play the Scout mail received sound

6.177.2.11

#dene SCOUT_SOUND_NONE 9 Play the Scout none sound

6.177.2.12

#dene SCOUT_SOUND_REMOTE 6 Play the Scout remote sound

6.177.2.13

#dene SCOUT_SOUND_SPECIAL1 25 Play the Scout special 1 sound

6.177.2.14

#dene SCOUT_SOUND_SPECIAL2 26 Play the Scout special 2 sound

6.177.2.15

#dene SCOUT_SOUND_SPECIAL3 27 Play the Scout special 3 sound

6.177.2.16

#dene SCOUT_SOUND_TIMER1 21 Play the Scout timer 1 sound

6.177.2.17

#dene SCOUT_SOUND_TIMER2 22 Play the Scout timer 2 sound

6.177.2.18

#dene SCOUT_SOUND_TIMER3 23 Play the Scout timer 3 sound

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.178

Scout sound set constants

826

6.177.2.19

#dene SCOUT_SOUND_TOUCH1_PRES 10 Play the Scout touch 1 pressed sound

6.177.2.20

#dene SCOUT_SOUND_TOUCH1_REL 11 Play the Scout touch 1 released sound

6.177.2.21

#dene SCOUT_SOUND_TOUCH2_PRES 12 Play the Scout touch 2 pressed sound

6.177.2.22

#dene SCOUT_SOUND_TOUCH2_REL 13 Play the Scout touch 2 released sound

6.178

Scout sound set constants

Constants for use when choosing standard Scout sound sets. Denes #dene SCOUT_SNDSET_NONE 0 #dene SCOUT_SNDSET_BASIC 1 #dene SCOUT_SNDSET_BUG 2 #dene SCOUT_SNDSET_ALARM 3 #dene SCOUT_SNDSET_RANDOM 4 #dene SCOUT_SNDSET_SCIENCE 5 Detailed Description

6.178.1

Constants for use when choosing standard Scout sound sets. 6.178.2 6.178.2.1 Dene Documentation #dene SCOUT_SNDSET_ALARM 3 Set sound set to alarm

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.179

Scout mode constants

827

6.178.2.2

#dene SCOUT_SNDSET_BASIC 1 Set sound set to basic

6.178.2.3

#dene SCOUT_SNDSET_BUG 2 Set sound set to bug

6.178.2.4

#dene SCOUT_SNDSET_NONE 0 Set sound set to none

6.178.2.5

#dene SCOUT_SNDSET_RANDOM 4 Set sound set to random

6.178.2.6

#dene SCOUT_SNDSET_SCIENCE 5 Set sound set to science

6.179

Scout mode constants

Constants for use when setting the scout mode. Denes #dene SCOUT_MODE_STANDALONE 0 #dene SCOUT_MODE_POWER 1 6.179.1 Detailed Description

Constants for use when setting the scout mode. 6.179.2 6.179.2.1 Dene Documentation #dene SCOUT_MODE_POWER 1 Enter power mode

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.180

Scout motion rule constants

828

Examples: ex_HTScoutSetScoutMode.nxc, and ex_MSScoutSetScoutMode.nxc.

6.179.2.2

#dene SCOUT_MODE_STANDALONE 0 Enter stand alone mode

6.180

Scout motion rule constants

Constants for use when setting the scout motion rule. Denes #dene SCOUT_MR_NO_MOTION 0 #dene SCOUT_MR_FORWARD 1 #dene SCOUT_MR_ZIGZAG 2 #dene SCOUT_MR_CIRCLE_RIGHT 3 #dene SCOUT_MR_CIRCLE_LEFT 4 #dene SCOUT_MR_LOOP_A 5 #dene SCOUT_MR_LOOP_B 6 #dene SCOUT_MR_LOOP_AB 7 Detailed Description

6.180.1

Constants for use when setting the scout motion rule. 6.180.2 6.180.2.1 Dene Documentation #dene SCOUT_MR_CIRCLE_LEFT 4 Motion rule circle left 6.180.2.2 #dene SCOUT_MR_CIRCLE_RIGHT 3 Motion rule circle right

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.181

Scout touch rule constants

829

6.180.2.3

#dene SCOUT_MR_FORWARD 1 Motion rule forward

Examples: ex_MSScoutSetScoutRules.nxc.

6.180.2.4

#dene SCOUT_MR_LOOP_A 5 Motion rule loop A

6.180.2.5

#dene SCOUT_MR_LOOP_AB 7 Motion rule loop A then B

6.180.2.6

#dene SCOUT_MR_LOOP_B 6 Motion rule loop B

6.180.2.7

#dene SCOUT_MR_NO_MOTION 0 Motion rule none

6.180.2.8

#dene SCOUT_MR_ZIGZAG 2 Motion rule zigzag

6.181

Scout touch rule constants

Constants for use when setting the scout touch rule. Denes #dene SCOUT_TR_IGNORE 0 #dene SCOUT_TR_REVERSE 1 #dene SCOUT_TR_AVOID 2 #dene SCOUT_TR_WAIT_FOR 3 #dene SCOUT_TR_OFF_WHEN 4

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.182

Scout light rule constants

830

6.181.1

Detailed Description

Constants for use when setting the scout touch rule. 6.181.2 6.181.2.1 Dene Documentation #dene SCOUT_TR_AVOID 2 Touch rule avoid 6.181.2.2 #dene SCOUT_TR_IGNORE 0 Touch rule ignore 6.181.2.3 #dene SCOUT_TR_OFF_WHEN 4 Touch rule off when 6.181.2.4 #dene SCOUT_TR_REVERSE 1 Touch rule reverse Examples: ex_MSScoutSetScoutRules.nxc.

6.181.2.5

#dene SCOUT_TR_WAIT_FOR 3 Touch rule wait for

6.182

Scout light rule constants

Constants for use when setting the scout light rule. Denes #dene SCOUT_LR_IGNORE 0 #dene SCOUT_LR_SEEK_LIGHT 1 #dene SCOUT_LR_SEEK_DARK 2 #dene SCOUT_LR_AVOID 3

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.183

Scout transmit rule constants

831

#dene SCOUT_LR_WAIT_FOR 4 #dene SCOUT_LR_OFF_WHEN 5 6.182.1 Detailed Description

Constants for use when setting the scout light rule. 6.182.2 6.182.2.1 Dene Documentation #dene SCOUT_LR_AVOID 3 Light rule avoid 6.182.2.2 #dene SCOUT_LR_IGNORE 0 Light rule ignore Examples: ex_MSScoutSetScoutRules.nxc.

6.182.2.3

#dene SCOUT_LR_OFF_WHEN 5 Light rule off when

6.182.2.4

#dene SCOUT_LR_SEEK_DARK 2 Light rule seek dark

6.182.2.5

#dene SCOUT_LR_SEEK_LIGHT 1 Light rule seek light

6.182.2.6

#dene SCOUT_LR_WAIT_FOR 4 Light rule wait for

6.183

Scout transmit rule constants

Constants for use when setting the scout transmit rule.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.184

Scout special effect constants

832

Denes #dene SCOUT_TGS_SHORT 0 #dene SCOUT_TGS_MEDIUM 1 #dene SCOUT_TGS_LONG 2 6.183.1 Detailed Description

Constants for use when setting the scout transmit rule. 6.183.2 6.183.2.1 Dene Documentation #dene SCOUT_TGS_LONG 2 Transmit level long 6.183.2.2 #dene SCOUT_TGS_MEDIUM 1 Transmit level medium 6.183.2.3 #dene SCOUT_TGS_SHORT 0 Transmit level short Examples: ex_MSScoutSetScoutRules.nxc.

6.184

Scout special effect constants

Constants for use when setting the scout special effect. Denes #dene SCOUT_FXR_NONE 0 #dene SCOUT_FXR_BUG 1 #dene SCOUT_FXR_ALARM 2 #dene SCOUT_FXR_RANDOM 3 #dene SCOUT_FXR_SCIENCE 4

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.185

RCX and Scout source constants

833

6.184.1

Detailed Description

Constants for use when setting the scout special effect. 6.184.2 6.184.2.1 Dene Documentation #dene SCOUT_FXR_ALARM 2 Alarm special effects 6.184.2.2 #dene SCOUT_FXR_BUG 1 Bug special effects Examples: ex_MSScoutSetScoutRules.nxc.

6.184.2.3

#dene SCOUT_FXR_NONE 0 No special effects

6.184.2.4

#dene SCOUT_FXR_RANDOM 3 Random special effects

6.184.2.5

#dene SCOUT_FXR_SCIENCE 4 Science special effects

6.185

RCX and Scout source constants

Constants for use when specifying RCX and Scout sources. Denes #dene RCX_VariableSrc 0 #dene RCX_TimerSrc 1 #dene RCX_ConstantSrc 2 #dene RCX_OutputStatusSrc 3

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.185

RCX and Scout source constants

834

#dene RCX_RandomSrc 4 #dene RCX_ProgramSlotSrc 8 #dene RCX_InputValueSrc 9 #dene RCX_InputTypeSrc 10 #dene RCX_InputModeSrc 11 #dene RCX_InputRawSrc 12 #dene RCX_InputBooleanSrc 13 #dene RCX_WatchSrc 14 #dene RCX_MessageSrc 15 #dene RCX_GlobalMotorStatusSrc 17 #dene RCX_ScoutRulesSrc 18 #dene RCX_ScoutLightParamsSrc 19 #dene RCX_ScoutTimerLimitSrc 20 #dene RCX_CounterSrc 21 #dene RCX_ScoutCounterLimitSrc 22 #dene RCX_TaskEventsSrc 23 #dene RCX_ScoutEventFBSrc 24 #dene RCX_EventStateSrc 25 #dene RCX_TenMSTimerSrc 26 #dene RCX_ClickCounterSrc 27 #dene RCX_UpperThresholdSrc 28 #dene RCX_LowerThresholdSrc 29 #dene RCX_HysteresisSrc 30 #dene RCX_DurationSrc 31 #dene RCX_UARTSetupSrc 33 #dene RCX_BatteryLevelSrc 34 #dene RCX_FirmwareVersionSrc 35 #dene RCX_IndirectVarSrc 36 #dene RCX_DatalogSrcIndirectSrc 37 #dene RCX_DatalogSrcDirectSrc 38 #dene RCX_DatalogValueIndirectSrc 39 #dene RCX_DatalogValueDirectSrc 40 #dene RCX_DatalogRawIndirectSrc 41 #dene RCX_DatalogRawDirectSrc 42 Detailed Description

6.185.1

Constants for use when specifying RCX and Scout sources.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.185

RCX and Scout source constants

835

6.185.2 6.185.2.1

Dene Documentation #dene RCX_BatteryLevelSrc 34 The RCX battery level source

6.185.2.2

#dene RCX_ClickCounterSrc 27 The RCX event click counter source

6.185.2.3

#dene RCX_ConstantSrc 2 The RCX constant value source

Examples: ex_HTRCXEvent.nxc, ex_HTRCXSetEvent.nxc, ex_HTRCXSetMaxPower.nxc, ex_HTRCXSetPower.nxc, ex_HTScoutSendVLL.nxc, ex_HTScoutSetEventFeedback.nxc, ex_HTScoutSetSensorClickTime.nxc, ex_HTScoutSetSensorHysteresis.nxc, ex_MSRCXAndVar.nxc, ex_MSRCXDivVar.nxc, ex_MSRCXEvent.nxc, ex_MSRCXOrVar.nxc, ex_MSRCXSetEvent.nxc, ex_MSRCXSetMaxPower.nxc, ex_MSRCXSetPower.nxc, ex_MSScoutSendVLL.nxc, ex_MSScoutSetCounterLimit.nxc, ex_MSScoutSetEventFeedback.nxc, ex_MSScoutSetSensorClickTime.nxc, ex_MSScoutSetSensorHysteresis.nxc, and ex_MSScoutSetTimerLimit.nxc.

6.185.2.4

#dene RCX_CounterSrc 21 The RCX counter source

6.185.2.5

#dene RCX_DatalogRawDirectSrc 42 The RCX direct datalog raw source

6.185.2.6

#dene RCX_DatalogRawIndirectSrc 41 The RCX indirect datalog raw source

6.185.2.7

#dene RCX_DatalogSrcDirectSrc 38 The RCX direct datalog source source

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.185

RCX and Scout source constants

836

6.185.2.8

#dene RCX_DatalogSrcIndirectSrc 37 The RCX indirect datalog source source

6.185.2.9

#dene RCX_DatalogValueDirectSrc 40 The RCX direct datalog value source

6.185.2.10

#dene RCX_DatalogValueIndirectSrc 39 The RCX indirect datalog value source

6.185.2.11

#dene RCX_DurationSrc 31 The RCX event duration source

6.185.2.12

#dene RCX_EventStateSrc 25 The RCX event static source

6.185.2.13

#dene RCX_FirmwareVersionSrc 35 The RCX rmware version source

6.185.2.14

#dene RCX_GlobalMotorStatusSrc 17 The RCX global motor status source

6.185.2.15

#dene RCX_HysteresisSrc 30 The RCX event hysteresis source

6.185.2.16

#dene RCX_IndirectVarSrc 36 The RCX indirect variable source

6.185.2.17

#dene RCX_InputBooleanSrc 13 The RCX input boolean source

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.185

RCX and Scout source constants

837

6.185.2.18

#dene RCX_InputModeSrc 11 The RCX input mode source

6.185.2.19

#dene RCX_InputRawSrc 12 The RCX input raw source

6.185.2.20

#dene RCX_InputTypeSrc 10 The RCX input type source

6.185.2.21

#dene RCX_InputValueSrc 9 The RCX input value source

Examples: ex_HTRCXAddToDatalog.nxc, MSRCXSumVar.nxc. ex_MSRCXAddToDatalog.nxc, and ex_-

6.185.2.22

#dene RCX_LowerThresholdSrc 29 The RCX event lower threshold source

6.185.2.23

#dene RCX_MessageSrc 15 The RCX message source

6.185.2.24

#dene RCX_OutputStatusSrc 3 The RCX output status source

6.185.2.25

#dene RCX_ProgramSlotSrc 8 The RCX program slot source

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.185

RCX and Scout source constants

838

6.185.2.26

#dene RCX_RandomSrc 4 The RCX random number source

Examples: ex_MSRCXSet.nxc, and ex_MSRCXSubVar.nxc.

6.185.2.27

#dene RCX_ScoutCounterLimitSrc 22 The Scout counter limit source

6.185.2.28

#dene RCX_ScoutEventFBSrc 24 The Scout event feedback source

6.185.2.29

#dene RCX_ScoutLightParamsSrc 19 The Scout light parameters source

6.185.2.30

#dene RCX_ScoutRulesSrc 18 The Scout rules source

6.185.2.31

#dene RCX_ScoutTimerLimitSrc 20 The Scout timer limit source

6.185.2.32

#dene RCX_TaskEventsSrc 23 The RCX task events source

6.185.2.33

#dene RCX_TenMSTimerSrc 26 The RCX 10ms timer source

6.185.2.34

#dene RCX_TimerSrc 1 The RCX timer source

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.186

RCX and Scout opcode constants

839

6.185.2.35

#dene RCX_UARTSetupSrc 33 The RCX UART setup source

6.185.2.36

#dene RCX_UpperThresholdSrc 28 The RCX event upper threshold source

6.185.2.37

#dene RCX_VariableSrc 0 The RCX variable source

Examples: ex_HTRCXPoll.nxc, ex_HTRCXSelectDisplay.nxc, ex_HTScoutSetSensorLowerLimit.nxc, ex_HTScoutSetSensorUpperLimit.nxc, ex_MSRCXAbsVar.nxc, ex_MSRCXMulVar.nxc, ex_MSRCXPoll.nxc, ex_MSRCXSelectDisplay.nxc, ex_MSRCXSet.nxc, ex_MSRCXSetUserDisplay.nxc, ex_MSRCXSetVar.nxc, ex_MSRCXSgnVar.nxc, ex_MSScoutSetSensorLowerLimit.nxc, and ex_MSScoutSetSensorUpperLimit.nxc.

6.185.2.38

#dene RCX_WatchSrc 14 The RCX watch source

6.186

RCX and Scout opcode constants

Constants for use when specifying RCX and Scout opcodes. Denes #dene RCX_PingOp 0x10 #dene RCX_BatteryLevelOp 0x30 #dene RCX_DeleteTasksOp 0x40 #dene RCX_StopAllTasksOp 0x50 #dene RCX_PBTurnOffOp 0x60 #dene RCX_DeleteSubsOp 0x70 #dene RCX_ClearSoundOp 0x80 #dene RCX_ClearMsgOp 0x90 #dene RCX_LSCalibrateOp 0xc0

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.186

RCX and Scout opcode constants

840

#dene RCX_MuteSoundOp 0xd0 #dene RCX_UnmuteSoundOp 0xe0 #dene RCX_ClearAllEventsOp 0x06 #dene RCX_OnOffFloatOp 0x21 #dene RCX_IRModeOp 0x31 #dene RCX_PlaySoundOp 0x51 #dene RCX_DeleteTaskOp 0x61 #dene RCX_StartTaskOp 0x71 #dene RCX_StopTaskOp 0x81 #dene RCX_SelectProgramOp 0x91 #dene RCX_ClearTimerOp 0xa1 #dene RCX_AutoOffOp 0xb1 #dene RCX_DeleteSubOp 0xc1 #dene RCX_ClearSensorOp 0xd1 #dene RCX_OutputDirOp 0xe1 #dene RCX_PlayToneVarOp 0x02 #dene RCX_PollOp 0x12 #dene RCX_SetWatchOp 0x22 #dene RCX_InputTypeOp 0x32 #dene RCX_InputModeOp 0x42 #dene RCX_SetDatalogOp 0x52 #dene RCX_DatalogOp 0x62 #dene RCX_SendUARTDataOp 0xc2 #dene RCX_RemoteOp 0xd2 #dene RCX_VLLOp 0xe2 #dene RCX_DirectEventOp 0x03 #dene RCX_OutputPowerOp 0x13 #dene RCX_PlayToneOp 0x23 #dene RCX_DisplayOp 0x33 #dene RCX_PollMemoryOp 0x63 #dene RCX_SetFeedbackOp 0x83 #dene RCX_SetEventOp 0x93 #dene RCX_GOutputPowerOp 0xa3 #dene RCX_LSUpperThreshOp 0xb3 #dene RCX_LSLowerThreshOp 0xc3 #dene RCX_LSHysteresisOp 0xd3 #dene RCX_LSBlinkTimeOp 0xe3 #dene RCX_CalibrateEventOp 0x04 #dene RCX_SetVarOp 0x14 #dene RCX_SumVarOp 0x24 #dene RCX_SubVarOp 0x34 #dene RCX_DivVarOp 0x44 #dene RCX_MulVarOp 0x54

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.186

RCX and Scout opcode constants

841

#dene RCX_SgnVarOp 0x64 #dene RCX_AbsVarOp 0x74 #dene RCX_AndVarOp 0x84 #dene RCX_OrVarOp 0x94 #dene RCX_UploadDatalogOp 0xa4 #dene RCX_SetTimerLimitOp 0xc4 #dene RCX_SetCounterOp 0xd4 #dene RCX_SetSourceValueOp 0x05 #dene RCX_UnlockOp 0x15 #dene RCX_BootModeOp 0x65 #dene RCX_UnlockFirmOp 0xa5 #dene RCX_ScoutRulesOp 0xd5 #dene RCX_ViewSourceValOp 0xe5 #dene RCX_ScoutOp 0x47 #dene RCX_SoundOp 0x57 #dene RCX_GOutputModeOp 0x67 #dene RCX_GOutputDirOp 0x77 #dene RCX_LightOp 0x87 #dene RCX_IncCounterOp 0x97 #dene RCX_DecCounterOp 0xa7 #dene RCX_ClearCounterOp 0xb7 #dene RCX_SetPriorityOp 0xd7 #dene RCX_MessageOp 0xf7 Detailed Description

6.186.1

Constants for use when specifying RCX and Scout opcodes. 6.186.2 6.186.2.1 Dene Documentation #dene RCX_AbsVarOp 0x74 Absolute value function 6.186.2.2 #dene RCX_AndVarOp 0x84 AND function 6.186.2.3 #dene RCX_AutoOffOp 0xb1 Set auto off timer

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.186

RCX and Scout opcode constants

842

6.186.2.4

#dene RCX_BatteryLevelOp 0x30 Read the battery level

6.186.2.5

#dene RCX_BootModeOp 0x65 Set into book mode

6.186.2.6

#dene RCX_CalibrateEventOp 0x04 Calibrate event

6.186.2.7

#dene RCX_ClearAllEventsOp 0x06 Clear all events

6.186.2.8

#dene RCX_ClearCounterOp 0xb7 Clear a counter

6.186.2.9

#dene RCX_ClearMsgOp 0x90 Clear message

6.186.2.10

#dene RCX_ClearSensorOp 0xd1 Clear a sensor

6.186.2.11

#dene RCX_ClearSoundOp 0x80 Clear sound

6.186.2.12

#dene RCX_ClearTimerOp 0xa1 Clear a timer

6.186.2.13

#dene RCX_DatalogOp 0x62 Datalog the specied source/value

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.186

RCX and Scout opcode constants

843

6.186.2.14

#dene RCX_DecCounterOp 0xa7 Decrement a counter

6.186.2.15

#dene RCX_DeleteSubOp 0xc1 Delete a subroutine

6.186.2.16

#dene RCX_DeleteSubsOp 0x70 Delete subroutines

6.186.2.17

#dene RCX_DeleteTaskOp 0x61 Delete a task

6.186.2.18

#dene RCX_DeleteTasksOp 0x40 Delete tasks

6.186.2.19

#dene RCX_DirectEventOp 0x03 Fire an event

6.186.2.20

#dene RCX_DisplayOp 0x33 Set LCD display value

6.186.2.21

#dene RCX_DivVarOp 0x44 Divide function

6.186.2.22

#dene RCX_GOutputDirOp 0x77 Set global motor direction

6.186.2.23

#dene RCX_GOutputModeOp 0x67 Set global motor mode

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.186

RCX and Scout opcode constants

844

6.186.2.24

#dene RCX_GOutputPowerOp 0xa3 Set global motor power levels

6.186.2.25

#dene RCX_IncCounterOp 0x97 Increment a counter

6.186.2.26

#dene RCX_InputModeOp 0x42 Set the input mode

6.186.2.27

#dene RCX_InputTypeOp 0x32 Set the input type

6.186.2.28

#dene RCX_IRModeOp 0x31 Set the IR transmit mode

6.186.2.29

#dene RCX_LightOp 0x87 Light opcode

6.186.2.30

#dene RCX_LSBlinkTimeOp 0xe3 Set the light sensor blink time

6.186.2.31

#dene RCX_LSCalibrateOp 0xc0 Calibrate the light sensor

6.186.2.32

#dene RCX_LSHysteresisOp 0xd3 Set the light sensor hysteresis

6.186.2.33

#dene RCX_LSLowerThreshOp 0xc3 Set the light sensor lower threshold

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.186

RCX and Scout opcode constants

845

6.186.2.34

#dene RCX_LSUpperThreshOp 0xb3 Set the light sensor upper threshold

6.186.2.35

#dene RCX_MessageOp 0xf7 Set message

6.186.2.36

#dene RCX_MulVarOp 0x54 Multiply function

6.186.2.37

#dene RCX_MuteSoundOp 0xd0 Mute sound

6.186.2.38

#dene RCX_OnOffFloatOp 0x21 Control motor state - on, off, oat

6.186.2.39

#dene RCX_OrVarOp 0x94 OR function

6.186.2.40

#dene RCX_OutputDirOp 0xe1 Set the motor direction

6.186.2.41

#dene RCX_OutputPowerOp 0x13 Set the motor power level

6.186.2.42

#dene RCX_PBTurnOffOp 0x60 Turn off the brick

6.186.2.43

#dene RCX_PingOp 0x10 Ping the brick

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.186

RCX and Scout opcode constants

846

6.186.2.44

#dene RCX_PlaySoundOp 0x51 Play a sound

6.186.2.45

#dene RCX_PlayToneOp 0x23 Play a tone

6.186.2.46

#dene RCX_PlayToneVarOp 0x02 Play a tone using a variable

6.186.2.47

#dene RCX_PollMemoryOp 0x63 Poll a memory location

6.186.2.48

#dene RCX_PollOp 0x12 Poll a source/value combination

6.186.2.49

#dene RCX_RemoteOp 0xd2 Execute simulated remote control buttons

6.186.2.50

#dene RCX_ScoutOp 0x47 Scout opcode

6.186.2.51

#dene RCX_ScoutRulesOp 0xd5 Set Scout rules

6.186.2.52

#dene RCX_SelectProgramOp 0x91 Select a program slot

6.186.2.53

#dene RCX_SendUARTDataOp 0xc2 Send data via IR using UART settings

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.186

RCX and Scout opcode constants

847

6.186.2.54

#dene RCX_SetCounterOp 0xd4 Set counter value

6.186.2.55

#dene RCX_SetDatalogOp 0x52 Set the datalog size

6.186.2.56

#dene RCX_SetEventOp 0x93 Set an event

6.186.2.57

#dene RCX_SetFeedbackOp 0x83 Set Scout feedback

6.186.2.58

#dene RCX_SetPriorityOp 0xd7 Set task priority

6.186.2.59

#dene RCX_SetSourceValueOp 0x05 Set a source/value

6.186.2.60

#dene RCX_SetTimerLimitOp 0xc4 Set timer limit

6.186.2.61

#dene RCX_SetVarOp 0x14 Set function

6.186.2.62

#dene RCX_SetWatchOp 0x22 Set the watch source/value

6.186.2.63

#dene RCX_SgnVarOp 0x64 Sign function

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.186

RCX and Scout opcode constants

848

6.186.2.64

#dene RCX_SoundOp 0x57 Sound opcode

6.186.2.65

#dene RCX_StartTaskOp 0x71 Start a task

6.186.2.66

#dene RCX_StopAllTasksOp 0x50 Stop all tasks

6.186.2.67

#dene RCX_StopTaskOp 0x81 Stop a task

6.186.2.68

#dene RCX_SubVarOp 0x34 Subtract function

6.186.2.69

#dene RCX_SumVarOp 0x24 Sum function

6.186.2.70

#dene RCX_UnlockFirmOp 0xa5 Unlock the rmware

6.186.2.71

#dene RCX_UnlockOp 0x15 Unlock the brick

6.186.2.72

#dene RCX_UnmuteSoundOp 0xe0 Unmute sound

6.186.2.73

#dene RCX_UploadDatalogOp 0xa4 Upload datalog contents

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.187

HiTechnic/mindsensors Power Function/IR Train constants

849

6.186.2.74

#dene RCX_ViewSourceValOp 0xe5 View a source/value

6.186.2.75

#dene RCX_VLLOp 0xe2 Send visual light link (VLL) data

6.187

HiTechnic/mindsensors Power Function/IR Train constants

Constants that are for use with the HiTechnic IRLink or mindsensors nRLink in Power Function or IR Train mode. Modules Power Function command constants
Constants that are for sending Power Function commands.

Power Function channel constants


Constants that are for specifying Power Function channels.

Power Function mode constants


Constants that are for choosing Power Function modes.

PF/IR Train function constants


Constants that are for sending PF/IR Train functions.

IR Train channel constants


Constants that are for specifying IR Train channels.

Power Function output constants


Constants that are for choosing a Power Function output.

Power Function pin constants


Constants that are for choosing a Power Function pin.

Power Function single pin function constants


Constants that are for sending Power Function single pin functions.

Power Function CST options constants


Constants that are for specifying Power Function CST options.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.188

Power Function command constants

850

Power Function PWM option constants


Constants that are for specifying Power Function PWM options.

6.187.1

Detailed Description

Constants that are for use with the HiTechnic IRLink or mindsensors nRLink in Power Function or IR Train mode.

6.188

Power Function command constants

Constants that are for sending Power Function commands. Denes #dene PF_CMD_STOP 0 #dene PF_CMD_FLOAT 0 #dene PF_CMD_FWD 1 #dene PF_CMD_REV 2 #dene PF_CMD_BRAKE 3 Detailed Description

6.188.1

Constants that are for sending Power Function commands. 6.188.2 6.188.2.1 Dene Documentation #dene PF_CMD_BRAKE 3 Power function command brake 6.188.2.2 #dene PF_CMD_FLOAT 0 Power function command oat (same as stop) 6.188.2.3 #dene PF_CMD_FWD 1 Power function command forward

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.189

Power Function channel constants

851

Examples: ex_HTPFComboDirect.nxc, ex_MSPFComboDirect.nxc, and ex_PFMate.nxc.

6.188.2.4

#dene PF_CMD_REV 2 Power function command reverse

Examples: ex_PFMate.nxc.

6.188.2.5

#dene PF_CMD_STOP 0 Power function command stop

Examples: ex_HTPFComboDirect.nxc, and ex_MSPFComboDirect.nxc.

6.189

Power Function channel constants

Constants that are for specifying Power Function channels. Denes #dene PF_CHANNEL_1 0 #dene PF_CHANNEL_2 1 #dene PF_CHANNEL_3 2 #dene PF_CHANNEL_4 3 Detailed Description

6.189.1

Constants that are for specifying Power Function channels. 6.189.2 6.189.2.1 Dene Documentation #dene PF_CHANNEL_1 0 Power function channel 1

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.190

Power Function mode constants

852

Examples: ex_HTPFComboDirect.nxc, ex_HTPFComboPWM.nxc, ex_HTPFSingleOutputCST.nxc, ex_HTPFSingleOutputPWM.nxc, ex_HTPFSinglePin.nxc, ex_HTPFTrain.nxc, ex_MSPFComboDirect.nxc, ex_MSPFComboPWM.nxc, ex_MSPFSingleOutputCST.nxc, ex_MSPFSingleOutputPWM.nxc, ex_MSPFSinglePin.nxc, and ex_MSPFTrain.nxc.

6.189.2.2

#dene PF_CHANNEL_2 1 Power function channel 2

6.189.2.3

#dene PF_CHANNEL_3 2 Power function channel 3

6.189.2.4

#dene PF_CHANNEL_4 3 Power function channel 4

6.190

Power Function mode constants

Constants that are for choosing Power Function modes. Denes #dene PF_MODE_TRAIN 0 #dene PF_MODE_COMBO_DIRECT 1 #dene PF_MODE_SINGLE_PIN_CONT 2 #dene PF_MODE_SINGLE_PIN_TIME 3 #dene PF_MODE_COMBO_PWM 4 #dene PF_MODE_SINGLE_OUTPUT_PWM 4 #dene PF_MODE_SINGLE_OUTPUT_CST 6 Detailed Description

6.190.1

Constants that are for choosing Power Function modes.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.191

PF/IR Train function constants

853

6.190.2 6.190.2.1

Dene Documentation #dene PF_MODE_COMBO_DIRECT 1 Power function mode combo direct

6.190.2.2

#dene PF_MODE_COMBO_PWM 4 Power function mode combo pulse width modulation (PWM)

6.190.2.3

#dene PF_MODE_SINGLE_OUTPUT_CST 6 Power function mode single output clear, set, toggle (CST)

6.190.2.4

#dene PF_MODE_SINGLE_OUTPUT_PWM 4 Power function mode single output pulse width modulation (PWM)

6.190.2.5

#dene PF_MODE_SINGLE_PIN_CONT 2 Power function mode single pin continuous

6.190.2.6

#dene PF_MODE_SINGLE_PIN_TIME 3 Power function mode single pin timed

6.190.2.7

#dene PF_MODE_TRAIN 0 Power function mode IR Train

6.191

PF/IR Train function constants

Constants that are for sending PF/IR Train functions. Denes #dene TRAIN_FUNC_STOP 0 #dene TRAIN_FUNC_INCR_SPEED 1 #dene TRAIN_FUNC_DECR_SPEED 2 #dene TRAIN_FUNC_TOGGLE_LIGHT 4

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.192

IR Train channel constants

854

6.191.1

Detailed Description

Constants that are for sending PF/IR Train functions. 6.191.2 6.191.2.1 Dene Documentation #dene TRAIN_FUNC_DECR_SPEED 2 PF/IR Train function decrement speed 6.191.2.2 #dene TRAIN_FUNC_INCR_SPEED 1 PF/IR Train function increment speed Examples: ex_HTIRTrain.nxc, MSPFTrain.nxc. ex_HTPFTrain.nxc, ex_MSIRTrain.nxc, and ex_-

6.191.2.3

#dene TRAIN_FUNC_STOP 0 PF/IR Train function stop

6.191.2.4

#dene TRAIN_FUNC_TOGGLE_LIGHT 4 PF/IR Train function toggle light

6.192

IR Train channel constants

Constants that are for specifying IR Train channels. Denes #dene TRAIN_CHANNEL_1 0 #dene TRAIN_CHANNEL_2 1 #dene TRAIN_CHANNEL_3 2 #dene TRAIN_CHANNEL_ALL 3 Detailed Description

6.192.1

Constants that are for specifying IR Train channels.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.193

Power Function output constants

855

6.192.2 6.192.2.1

Dene Documentation #dene TRAIN_CHANNEL_1 0 IR Train channel 1

Examples: ex_HTIRTrain.nxc, and ex_MSIRTrain.nxc.

6.192.2.2

#dene TRAIN_CHANNEL_2 1 IR Train channel 2

6.192.2.3

#dene TRAIN_CHANNEL_3 2 IR Train channel 3

6.192.2.4

#dene TRAIN_CHANNEL_ALL 3 IR Train channel all

6.193

Power Function output constants

Constants that are for choosing a Power Function output. Denes #dene PF_OUT_A 0 #dene PF_OUT_B 1 6.193.1 Detailed Description

Constants that are for choosing a Power Function output. 6.193.2 6.193.2.1 Dene Documentation #dene PF_OUT_A 0 Power function output A

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.194

Power Function pin constants

856

Examples: ex_HTPFSingleOutputCST.nxc, ex_HTPFSingleOutputPWM.nxc, ex_HTPFSinglePin.nxc, ex_MSPFSingleOutputCST.nxc, ex_MSPFSingleOutputPWM.nxc, and ex_MSPFSinglePin.nxc.

6.193.2.2

#dene PF_OUT_B 1 Power function output B

6.194

Power Function pin constants

Constants that are for choosing a Power Function pin. Denes #dene PF_PIN_C1 0 #dene PF_PIN_C2 1 6.194.1 Detailed Description

Constants that are for choosing a Power Function pin. 6.194.2 6.194.2.1 Dene Documentation #dene PF_PIN_C1 0 Power function pin C1 Examples: ex_HTPFSinglePin.nxc, and ex_MSPFSinglePin.nxc.

6.194.2.2

#dene PF_PIN_C2 1 Power function pin C2

6.195

Power Function single pin function constants

Constants that are for sending Power Function single pin functions.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.196

Power Function CST options constants

857

Denes #dene PF_FUNC_NOCHANGE 0 #dene PF_FUNC_CLEAR 1 #dene PF_FUNC_SET 2 #dene PF_FUNC_TOGGLE 3 Detailed Description

6.195.1

Constants that are for sending Power Function single pin functions. 6.195.2 6.195.2.1 Dene Documentation #dene PF_FUNC_CLEAR 1 Power function single pin - clear 6.195.2.2 #dene PF_FUNC_NOCHANGE 0 Power function single pin - no change 6.195.2.3 #dene PF_FUNC_SET 2 Power function single pin - set Examples: ex_HTPFSinglePin.nxc, and ex_MSPFSinglePin.nxc.

6.195.2.4

#dene PF_FUNC_TOGGLE 3 Power function single pin - toggle

6.196

Power Function CST options constants

Constants that are for specifying Power Function CST options.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.196

Power Function CST options constants

858

Denes #dene PF_CST_CLEAR1_CLEAR2 0 #dene PF_CST_SET1_CLEAR2 1 #dene PF_CST_CLEAR1_SET2 2 #dene PF_CST_SET1_SET2 3 #dene PF_CST_INCREMENT_PWM 4 #dene PF_CST_DECREMENT_PWM 5 #dene PF_CST_FULL_FWD 6 #dene PF_CST_FULL_REV 7 #dene PF_CST_TOGGLE_DIR 8 Detailed Description

6.196.1

Constants that are for specifying Power Function CST options. 6.196.2 6.196.2.1 Dene Documentation #dene PF_CST_CLEAR1_CLEAR2 0 Power function CST clear 1 and clear 2 6.196.2.2 #dene PF_CST_CLEAR1_SET2 2 Power function CST clear 1 and set 2 6.196.2.3 #dene PF_CST_DECREMENT_PWM 5 Power function CST decrement PWM 6.196.2.4 #dene PF_CST_FULL_FWD 6 Power function CST full forward 6.196.2.5 #dene PF_CST_FULL_REV 7 Power function CST full reverse 6.196.2.6 #dene PF_CST_INCREMENT_PWM 4 Power function CST increment PWM
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.197

Power Function PWM option constants

859

6.196.2.7

#dene PF_CST_SET1_CLEAR2 1 Power function CST set 1 and clear 2

6.196.2.8

#dene PF_CST_SET1_SET2 3 Power function CST set 1 and set 2

Examples: ex_HTPFSingleOutputCST.nxc, and ex_MSPFSingleOutputCST.nxc.

6.196.2.9

#dene PF_CST_TOGGLE_DIR 8 Power function CST toggle direction

6.197

Power Function PWM option constants

Constants that are for specifying Power Function PWM options. Denes #dene PF_PWM_FLOAT 0 #dene PF_PWM_FWD1 1 #dene PF_PWM_FWD2 2 #dene PF_PWM_FWD3 3 #dene PF_PWM_FWD4 4 #dene PF_PWM_FWD5 5 #dene PF_PWM_FWD6 6 #dene PF_PWM_FWD7 7 #dene PF_PWM_BRAKE 8 #dene PF_PWM_REV7 9 #dene PF_PWM_REV6 10 #dene PF_PWM_REV5 11 #dene PF_PWM_REV4 12 #dene PF_PWM_REV3 13 #dene PF_PWM_REV2 14 #dene PF_PWM_REV1 15 Detailed Description

6.197.1

Constants that are for specifying Power Function PWM options.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.197

Power Function PWM option constants

860

6.197.2 6.197.2.1

Dene Documentation #dene PF_PWM_BRAKE 8 Power function PWM brake

6.197.2.2

#dene PF_PWM_FLOAT 0 Power function PWM oat

6.197.2.3

#dene PF_PWM_FWD1 1 Power function PWM foward level 1

6.197.2.4

#dene PF_PWM_FWD2 2 Power function PWM foward level 2

6.197.2.5

#dene PF_PWM_FWD3 3 Power function PWM foward level 3

6.197.2.6

#dene PF_PWM_FWD4 4 Power function PWM foward level 4

6.197.2.7

#dene PF_PWM_FWD5 5 Power function PWM foward level 5

Examples: ex_HTPFComboPWM.nxc, ex_HTPFSingleOutputPWM.nxc, MSPFComboPWM.nxc, and ex_MSPFSingleOutputPWM.nxc. ex_-

6.197.2.8

#dene PF_PWM_FWD6 6 Power function PWM foward level 6

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.198

HiTechnic device constants

861

6.197.2.9

#dene PF_PWM_FWD7 7 Power function PWM foward level 7

6.197.2.10

#dene PF_PWM_REV1 15 Power function PWM reverse level 1

6.197.2.11

#dene PF_PWM_REV2 14 Power function PWM reverse level 2

6.197.2.12

#dene PF_PWM_REV3 13 Power function PWM reverse level 3

6.197.2.13

#dene PF_PWM_REV4 12 Power function PWM reverse level 4

Examples: ex_HTPFComboPWM.nxc, and ex_MSPFComboPWM.nxc.

6.197.2.14

#dene PF_PWM_REV5 11 Power function PWM reverse level 5

6.197.2.15

#dene PF_PWM_REV6 10 Power function PWM reverse level 6

6.197.2.16

#dene PF_PWM_REV7 9 Power function PWM reverse level 7

6.198

HiTechnic device constants

Constants that are for use with HiTechnic devices.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.198

HiTechnic device constants

862

Modules HiTechnic IRSeeker2 constants


Constants that are for use with the HiTechnic IRSeeker2 device.

HiTechnic IRReceiver constants


Constants that are for use with the HiTechnic IRReceiver device.

HiTechnic Color2 constants


Constants that are for use with the HiTechnic Color2 device.

HiTechnic Angle sensor constants


Constants that are for use with the HiTechnic Angle sensor device.

Denes #dene HT_ADDR_IRSEEKER 0x02 #dene HT_ADDR_IRSEEKER2 0x10 #dene HT_ADDR_IRRECEIVER 0x02 #dene HT_ADDR_COMPASS 0x02 #dene HT_ADDR_ACCEL 0x02 #dene HT_ADDR_COLOR 0x02 #dene HT_ADDR_COLOR2 0x02 #dene HT_ADDR_IRLINK 0x02 #dene HT_ADDR_ANGLE 0x02 Detailed Description

6.198.1

Constants that are for use with HiTechnic devices. 6.198.2 6.198.2.1 Dene Documentation #dene HT_ADDR_ACCEL 0x02 HiTechnic Accel I2C address 6.198.2.2 #dene HT_ADDR_ANGLE 0x02 HiTechnic Angle I2C address

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.199

HiTechnic IRSeeker2 constants

863

6.198.2.3

#dene HT_ADDR_COLOR 0x02 HiTechnic Color I2C address

6.198.2.4

#dene HT_ADDR_COLOR2 0x02 HiTechnic Color2 I2C address

6.198.2.5

#dene HT_ADDR_COMPASS 0x02 HiTechnic Compass I2C address

6.198.2.6

#dene HT_ADDR_IRLINK 0x02 HiTechnic IRLink I2C address

6.198.2.7

#dene HT_ADDR_IRRECEIVER 0x02 HiTechnic IRReceiver I2C address

6.198.2.8

#dene HT_ADDR_IRSEEKER 0x02 HiTechnic IRSeeker I2C address

6.198.2.9

#dene HT_ADDR_IRSEEKER2 0x10 HiTechnic IRSeeker2 I2C address

6.199

HiTechnic IRSeeker2 constants

Constants that are for use with the HiTechnic IRSeeker2 device. Denes #dene HTIR2_MODE_1200 0 #dene HTIR2_MODE_600 1 #dene HTIR2_REG_MODE 0x41 #dene HTIR2_REG_DCDIR 0x42 #dene HTIR2_REG_DC01 0x43

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.199

HiTechnic IRSeeker2 constants

864

#dene HTIR2_REG_DC02 0x44 #dene HTIR2_REG_DC03 0x45 #dene HTIR2_REG_DC04 0x46 #dene HTIR2_REG_DC05 0x47 #dene HTIR2_REG_DCAVG 0x48 #dene HTIR2_REG_ACDIR 0x49 #dene HTIR2_REG_AC01 0x4A #dene HTIR2_REG_AC02 0x4B #dene HTIR2_REG_AC03 0x4C #dene HTIR2_REG_AC04 0x4D #dene HTIR2_REG_AC05 0x4E Detailed Description

6.199.1

Constants that are for use with the HiTechnic IRSeeker2 device. 6.199.2 6.199.2.1 Dene Documentation #dene HTIR2_MODE_1200 0 Set IRSeeker2 to 1200 mode Examples: ex_sethtirseeker2mode.nxc, and ex_setsensorboolean.nxc.

6.199.2.2

#dene HTIR2_MODE_600 1 Set IRSeeker2 to 600 mode

6.199.2.3

#dene HTIR2_REG_AC01 0x4A IRSeeker2 AC 01 register

6.199.2.4

#dene HTIR2_REG_AC02 0x4B IRSeeker2 AC 02 register

6.199.2.5

#dene HTIR2_REG_AC03 0x4C IRSeeker2 AC 03 register

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.199

HiTechnic IRSeeker2 constants

865

6.199.2.6

#dene HTIR2_REG_AC04 0x4D IRSeeker2 AC 04 register

6.199.2.7

#dene HTIR2_REG_AC05 0x4E IRSeeker2 AC 05 register

6.199.2.8

#dene HTIR2_REG_ACDIR 0x49 IRSeeker2 AC direction register

6.199.2.9

#dene HTIR2_REG_DC01 0x43 IRSeeker2 DC 01 register

6.199.2.10

#dene HTIR2_REG_DC02 0x44 IRSeeker2 DC 02 register

6.199.2.11

#dene HTIR2_REG_DC03 0x45 IRSeeker2 DC 03 register

6.199.2.12

#dene HTIR2_REG_DC04 0x46 IRSeeker2 DC 04 register

6.199.2.13

#dene HTIR2_REG_DC05 0x47 IRSeeker2 DC 05 register

6.199.2.14

#dene HTIR2_REG_DCAVG 0x48 IRSeeker2 DC average register

Examples: ex_SensorHTIRSeeker2Addr.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.200

HiTechnic IRReceiver constants

866

6.199.2.15

#dene HTIR2_REG_DCDIR 0x42 IRSeeker2 DC direction register

6.199.2.16

#dene HTIR2_REG_MODE 0x41 IRSeeker2 mode register

6.200

HiTechnic IRReceiver constants

Constants that are for use with the HiTechnic IRReceiver device. Denes #dene HT_CH1_A 0 #dene HT_CH1_B 1 #dene HT_CH2_A 2 #dene HT_CH2_B 3 #dene HT_CH3_A 4 #dene HT_CH3_B 5 #dene HT_CH4_A 6 #dene HT_CH4_B 7 Detailed Description

6.200.1

Constants that are for use with the HiTechnic IRReceiver device. 6.200.2 6.200.2.1 Dene Documentation #dene HT_CH1_A 0 Use IRReceiver channel 1 output A Examples: ex_ReadSensorHTIRReceiverEx.nxc.

6.200.2.2

#dene HT_CH1_B 1 Use IRReceiver channel 1 output B

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.201

HiTechnic Color2 constants

867

6.200.2.3

#dene HT_CH2_A 2 Use IRReceiver channel 2 output A

6.200.2.4

#dene HT_CH2_B 3 Use IRReceiver channel 2 output B

6.200.2.5

#dene HT_CH3_A 4 Use IRReceiver channel 3 output A

6.200.2.6

#dene HT_CH3_B 5 Use IRReceiver channel 3 output B

6.200.2.7

#dene HT_CH4_A 6 Use IRReceiver channel 4 output A

6.200.2.8

#dene HT_CH4_B 7 Use IRReceiver channel 4 output B

6.201

HiTechnic Color2 constants

Constants that are for use with the HiTechnic Color2 device. Denes #dene HT_CMD_COLOR2_ACTIVE 0x00 #dene HT_CMD_COLOR2_PASSIVE 0x01 #dene HT_CMD_COLOR2_RAW 0x03 #dene HT_CMD_COLOR2_50HZ 0x35 #dene HT_CMD_COLOR2_60HZ 0x36 #dene HT_CMD_COLOR2_BLCAL 0x42 #dene HT_CMD_COLOR2_WBCAL 0x43 #dene HT_CMD_COLOR2_FAR 0x46 #dene HT_CMD_COLOR2_LED_HI 0x48 #dene HT_CMD_COLOR2_LED_LOW 0x4C #dene HT_CMD_COLOR2_NEAR 0x4E

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.201

HiTechnic Color2 constants

868

6.201.1

Detailed Description

Constants that are for use with the HiTechnic Color2 device. 6.201.2 6.201.2.1 Dene Documentation #dene HT_CMD_COLOR2_50HZ 0x35 Set the Color2 sensor to 50Hz mode 6.201.2.2 #dene HT_CMD_COLOR2_60HZ 0x36 Set the Color2 sensor to 60Hz mode 6.201.2.3 #dene HT_CMD_COLOR2_ACTIVE 0x00 Set the Color2 sensor to active mode Examples: ex_I2CSendCommand.nxc, and ex_sethtcolor2mode.nxc.

6.201.2.4

#dene HT_CMD_COLOR2_BLCAL 0x42 Set the Color2 sensor to black level calibration mode

6.201.2.5

#dene HT_CMD_COLOR2_FAR 0x46 Set the Color2 sensor to far mode

6.201.2.6

#dene HT_CMD_COLOR2_LED_HI 0x48 Set the Color2 sensor to LED high mode

6.201.2.7

#dene HT_CMD_COLOR2_LED_LOW 0x4C Set the Color2 sensor to LED low mode

6.201.2.8

#dene HT_CMD_COLOR2_NEAR 0x4E Set the Color2 sensor to near mode

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.202

HiTechnic Angle sensor constants

869

6.201.2.9

#dene HT_CMD_COLOR2_PASSIVE 0x01 Set the Color2 sensor to passive mode

6.201.2.10

#dene HT_CMD_COLOR2_RAW 0x03 Set the Color2 sensor to raw mode

6.201.2.11

#dene HT_CMD_COLOR2_WBCAL 0x43 Set the Color2 sensor to white level calibration mode

6.202

HiTechnic Angle sensor constants

Constants that are for use with the HiTechnic Angle sensor device. Denes #dene HTANGLE_MODE_NORMAL 0x00 #dene HTANGLE_MODE_CALIBRATE 0x43 #dene HTANGLE_MODE_RESET 0x52 #dene HTANGLE_REG_MODE 0x41 #dene HTANGLE_REG_DCDIR 0x42 #dene HTANGLE_REG_DC01 0x43 #dene HTANGLE_REG_DC02 0x44 #dene HTANGLE_REG_DC03 0x45 #dene HTANGLE_REG_DC04 0x46 #dene HTANGLE_REG_DC05 0x47 #dene HTANGLE_REG_DCAVG 0x48 #dene HTANGLE_REG_ACDIR 0x49 Detailed Description

6.202.1

Constants that are for use with the HiTechnic Angle sensor device. 6.202.2 6.202.2.1 Dene Documentation #dene HTANGLE_MODE_CALIBRATE 0x43 Resets 0 degree position to current shaft angle

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.202

HiTechnic Angle sensor constants

870

6.202.2.2

#dene HTANGLE_MODE_NORMAL 0x00 Normal angle measurement mode

6.202.2.3

#dene HTANGLE_MODE_RESET 0x52 Resets the accumulated angle

Examples: ex_ResetSensorHTAngle.nxc.

6.202.2.4

#dene HTANGLE_REG_ACDIR 0x49 Angle 16 bit revolutions per minute, low byte register

6.202.2.5

#dene HTANGLE_REG_DC01 0x43 Angle current angle (1 degree adder) register

6.202.2.6

#dene HTANGLE_REG_DC02 0x44 Angle 32 bit accumulated angle, high byte register

6.202.2.7

#dene HTANGLE_REG_DC03 0x45 Angle 32 bit accumulated angle, mid byte register

6.202.2.8

#dene HTANGLE_REG_DC04 0x46 Angle 32 bit accumulated angle, mid byte register

6.202.2.9

#dene HTANGLE_REG_DC05 0x47 Angle 32 bit accumulated angle, low byte register

6.202.2.10

#dene HTANGLE_REG_DCAVG 0x48 Angle 16 bit revolutions per minute, high byte register

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.203

MindSensors device constants

871

6.202.2.11

#dene HTANGLE_REG_DCDIR 0x42 Angle current angle (2 degree increments) register

6.202.2.12

#dene HTANGLE_REG_MODE 0x41 Angle mode register

6.203

MindSensors device constants

Constants that are for use with MindSensors devices. Modules MindSensors DIST-Nx constants
Constants that are for use with the MindSensors DIST-Nx device.

MindSensors PSP-Nx constants


Constants that are for use with the MindSensors PSP-Nx device.

MindSensors nRLink constants


Constants that are for use with the MindSensors nRLink device.

MindSensors ACCL-Nx constants


Constants that are for use with the MindSensors ACCL-Nx device.

MindSensors PFMate constants


Constants that are for use with the MindSensors PFMate device.

MindSensors NXTServo constants


Constants that are for use with the MindSensors NXTServo device.

MindSensors NXTHID constants


Constants that are for use with the MindSensors NXTHID device.

MindSensors NXTPowerMeter constants


Constants that are for use with the MindSensors NXTPowerMeter device.

MindSensors NXTSumoEyes constants


Constants that are for use with the MindSensors NXTSumoEyes device.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.203

MindSensors device constants

872

MindSensors NXTLineLeader constants


Constants that are for use with the MindSensors NXTLineLeader device.

Denes #dene MS_CMD_ENERGIZED 0x45 #dene MS_CMD_DEENERGIZED 0x44 #dene MS_CMD_ADPA_ON 0x4E #dene MS_CMD_ADPA_OFF 0x4F #dene MS_ADDR_RTCLOCK 0xD0 #dene MS_ADDR_DISTNX 0x02 #dene MS_ADDR_NRLINK 0x02 #dene MS_ADDR_ACCLNX 0x02 #dene MS_ADDR_CMPSNX 0x02 #dene MS_ADDR_PSPNX 0x02 #dene MS_ADDR_LINELDR 0x02 #dene MS_ADDR_NXTCAM 0x02 #dene MS_ADDR_NXTHID 0x04 #dene MS_ADDR_NXTSERVO 0xB0 #dene MS_ADDR_NXTSERVO_EM 0x40 #dene MS_ADDR_PFMATE 0x48 #dene MS_ADDR_MTRMUX 0xB4 #dene MS_ADDR_NXTMMX 0x06 #dene MS_ADDR_IVSENS 0x12 #dene MS_ADDR_RXMUX 0x7E Detailed Description

6.203.1

Constants that are for use with MindSensors devices. 6.203.2 6.203.2.1 Dene Documentation #dene MS_ADDR_ACCLNX 0x02 MindSensors ACCL-Nx I2C address Examples: ex_ACCLNxCalibrateX.nxc, ex_ACCLNxCalibrateXEnd.nxc, ex_ACCLNxCalibrateY.nxc, ex_ACCLNxCalibrateYEnd.nxc, ex_ACCLNxCalibrateZ.nxc, ex_ACCLNxCalibrateZEnd.nxc, ex_ACCLNxResetCalibration.nxc, ex_ACCLNxSensitivity.nxc, ex_ACCLNxXOffset.nxc, ex_ACCLNxXRange.nxc, ex_ACCLNxYOffset.nxc,
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.203

MindSensors device constants

873

ex_ACCLNxYRange.nxc, ex_ACCLNxZOffset.nxc, ex_ACCLNxZRange.nxc, ex_ReadSensorMSAccel.nxc, ex_ReadSensorMSTilt.nxc, and ex_SetACCLNxSensitivity.nxc.

6.203.2.2

#dene MS_ADDR_CMPSNX 0x02 MindSensors CMPS-Nx I2C address

Examples: ex_SensorMSCompass.nxc.

6.203.2.3

#dene MS_ADDR_DISTNX 0x02 MindSensors DIST-Nx I2C address

Examples: ex_DISTNxDistance.nxc, ex_DISTNxGP2D12.nxc, ex_DISTNxGP2D120.nxc, ex_DISTNxGP2YA02.nxc, ex_DISTNxGP2YA21.nxc, ex_DISTNxMaxDistance.nxc, ex_DISTNxMinDistance.nxc, ex_DISTNxModuleType.nxc, ex_DISTNxNumPoints.nxc, ex_DISTNxVoltage.nxc, ex_MSADPAOff.nxc, and ex_MSADPAOn.nxc.

6.203.2.4

#dene MS_ADDR_IVSENS 0x12 MindSensors IVSens (NXTPowerMeter) I2C address

Examples: ex_NXTPowerMeter.nxc.

6.203.2.5

#dene MS_ADDR_LINELDR 0x02 MindSensors LineLdr I2C address

Examples: ex_NXTLineLeader.nxc.

6.203.2.6

#dene MS_ADDR_MTRMUX 0xB4 MindSensors MTRMux I2C address

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.203

MindSensors device constants

874

6.203.2.7

#dene MS_ADDR_NRLINK 0x02 MindSensors NRLink I2C address

Examples: ex_MSRCXSetNRLinkPort.nxc, ex_NRLink2400.nxc, ex_NRLink4800.nxc, ex_NRLinkFlush.nxc, ex_NRLinkIRLong.nxc, ex_NRLinkIRShort.nxc, ex_NRLinkSetPF.nxc, ex_NRLinkSetRCX.nxc, ex_NRLinkSetTrain.nxc, ex_NRLinkStatus.nxc, ex_NRLinkTxRaw.nxc, ex_ReadNRLinkBytes.nxc, ex_RunNRLinkMacro.nxc, and ex_writenrlinkbytes.nxc.

6.203.2.8

#dene MS_ADDR_NXTCAM 0x02 MindSensors NXTCam I2C address

6.203.2.9

#dene MS_ADDR_NXTHID 0x04 MindSensors NXTHID I2C address

Examples: ex_NXTHID.nxc.

6.203.2.10

#dene MS_ADDR_NXTMMX 0x06 MindSensors NXTMMX I2C address

6.203.2.11

#dene MS_ADDR_NXTSERVO 0xB0 MindSensors NXTServo I2C address

Examples: ex_NXTHID.nxc, and ex_NXTServo.nxc.

6.203.2.12

#dene MS_ADDR_NXTSERVO_EM 0x40 MindSensors NXTServo in edit macro mode I2C address

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.203

MindSensors device constants

875

6.203.2.13

#dene MS_ADDR_PFMATE 0x48 MindSensors PFMate I2C address

Examples: ex_PFMate.nxc.

6.203.2.14

#dene MS_ADDR_PSPNX 0x02 MindSensors PSP-Nx I2C address

Examples: ex_PSPNxAnalog.nxc, ex_PSPNxDigital.nxc, ReadSensorMSPlayStation.nxc. and ex_-

6.203.2.15

#dene MS_ADDR_RTCLOCK 0xD0 MindSensors RTClock I2C address

6.203.2.16

#dene MS_ADDR_RXMUX 0x7E MindSensors RXMux I2C address

6.203.2.17

#dene MS_CMD_ADPA_OFF 0x4F Turn MindSensors ADPA mode off

6.203.2.18

#dene MS_CMD_ADPA_ON 0x4E Turn MindSensors ADPA mode on

6.203.2.19

#dene MS_CMD_DEENERGIZED 0x44 De-energize the MindSensors device

6.203.2.20

#dene MS_CMD_ENERGIZED 0x45 Energize the MindSensors device

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.204

MindSensors DIST-Nx constants

876

6.204

MindSensors DIST-Nx constants

Constants that are for use with the MindSensors DIST-Nx device. Denes #dene DIST_CMD_GP2D12 0x31 #dene DIST_CMD_GP2D120 0x32 #dene DIST_CMD_GP2YA21 0x33 #dene DIST_CMD_GP2YA02 0x34 #dene DIST_CMD_CUSTOM 0x35 #dene DIST_REG_DIST 0x42 #dene DIST_REG_VOLT 0x44 #dene DIST_REG_MODULE_TYPE 0x50 #dene DIST_REG_NUM_POINTS 0x51 #dene DIST_REG_DIST_MIN 0x52 #dene DIST_REG_DIST_MAX 0x54 #dene DIST_REG_VOLT1 0x56 #dene DIST_REG_DIST1 0x58 Detailed Description

6.204.1

Constants that are for use with the MindSensors DIST-Nx device. 6.204.2 6.204.2.1 Dene Documentation #dene DIST_CMD_CUSTOM 0x35 Set the DIST-Nx to a custom mode 6.204.2.2 #dene DIST_CMD_GP2D12 0x31 Set the DIST-Nx to GP2D12 mode 6.204.2.3 #dene DIST_CMD_GP2D120 0x32 Set the DIST-Nx to GP2D120 mode 6.204.2.4 #dene DIST_CMD_GP2YA02 0x34 Set the DIST-Nx to GP2YA02 mode
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.205

MindSensors PSP-Nx constants

877

6.204.2.5

#dene DIST_CMD_GP2YA21 0x33 Set the DIST-Nx to GP2YA21 mode

6.204.2.6

#dene DIST_REG_DIST 0x42 The DIST-Nx distance register

6.204.2.7

#dene DIST_REG_DIST1 0x58 The DIST-Nx distance 1 register

6.204.2.8

#dene DIST_REG_DIST_MAX 0x54 The DIST-Nx maximum distance register

6.204.2.9

#dene DIST_REG_DIST_MIN 0x52 The DIST-Nx minimum distance register

6.204.2.10

#dene DIST_REG_MODULE_TYPE 0x50 The DIST-Nx module type register

6.204.2.11

#dene DIST_REG_NUM_POINTS 0x51 The DIST-Nx number of data points in Custom curve register

6.204.2.12

#dene DIST_REG_VOLT 0x44 The DIST-Nx voltage register

6.204.2.13

#dene DIST_REG_VOLT1 0x56 The DIST-Nx voltage 1 register

6.205

MindSensors PSP-Nx constants

Constants that are for use with the MindSensors PSP-Nx device.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.205

MindSensors PSP-Nx constants

878

Modules MindSensors PSP-Nx button set 1 constants


Constants that are for interpretting MindSensors PSP-Nx button set 1 values.

MindSensors PSP-Nx button set 2 constants


Constants that are for interpretting MindSensors PSP-Nx button set 2 values.

Denes #dene PSP_CMD_DIGITAL 0x41 #dene PSP_CMD_ANALOG 0x73 #dene PSP_REG_BTNSET1 0x42 #dene PSP_REG_BTNSET2 0x43 #dene PSP_REG_XLEFT 0x44 #dene PSP_REG_YLEFT 0x45 #dene PSP_REG_XRIGHT 0x46 #dene PSP_REG_YRIGHT 0x47 Detailed Description

6.205.1

Constants that are for use with the MindSensors PSP-Nx device. 6.205.2 6.205.2.1 Dene Documentation #dene PSP_CMD_ANALOG 0x73 Set the PSP-Nx to analog mode 6.205.2.2 #dene PSP_CMD_DIGITAL 0x41 Set the PSP-Nx to digital mode 6.205.2.3 #dene PSP_REG_BTNSET1 0x42 The PSP-Nx button set 1 register 6.205.2.4 #dene PSP_REG_BTNSET2 0x43 The PSP-Nx button set 2 register
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.206

MindSensors PSP-Nx button set 1 constants

879

6.205.2.5

#dene PSP_REG_XLEFT 0x44 The PSP-Nx X left register

6.205.2.6

#dene PSP_REG_XRIGHT 0x46 The PSP-Nx X right register

6.205.2.7

#dene PSP_REG_YLEFT 0x45 The PSP-Nx Y left register

6.205.2.8

#dene PSP_REG_YRIGHT 0x47 The PSP-Nx Y right register

6.206

MindSensors PSP-Nx button set 1 constants

Constants that are for interpretting MindSensors PSP-Nx button set 1 values. Denes #dene PSP_BTNSET1_LEFT 0x01 #dene PSP_BTNSET1_DOWN 0x02 #dene PSP_BTNSET1_RIGHT 0x04 #dene PSP_BTNSET1_UP 0x08 #dene PSP_BTNSET1_R3 0x20 #dene PSP_BTNSET1_L3 0x40 Detailed Description

6.206.1

Constants that are for interpretting MindSensors PSP-Nx button set 1 values. 6.206.2 6.206.2.1 Dene Documentation #dene PSP_BTNSET1_DOWN 0x02 The PSP-Nx button set 1 down arrow

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.207

MindSensors PSP-Nx button set 2 constants

880

6.206.2.2

#dene PSP_BTNSET1_L3 0x40 The PSP-Nx button set 1 L3

6.206.2.3

#dene PSP_BTNSET1_LEFT 0x01 The PSP-Nx button set 1 left arrow

6.206.2.4

#dene PSP_BTNSET1_R3 0x20 The PSP-Nx button set 1 R3

6.206.2.5

#dene PSP_BTNSET1_RIGHT 0x04 The PSP-Nx button set 1 right arrow

6.206.2.6

#dene PSP_BTNSET1_UP 0x08 The PSP-Nx button set 1 up arrow

6.207

MindSensors PSP-Nx button set 2 constants

Constants that are for interpretting MindSensors PSP-Nx button set 2 values. Denes #dene PSP_BTNSET2_SQUARE 0x01 #dene PSP_BTNSET2_CROSS 0x02 #dene PSP_BTNSET2_CIRCLE 0x04 #dene PSP_BTNSET2_TRIANGLE 0x08 #dene PSP_BTNSET2_R1 0x10 #dene PSP_BTNSET2_L1 0x20 #dene PSP_BTNSET2_R2 0x40 #dene PSP_BTNSET2_L2 0x80 Detailed Description

6.207.1

Constants that are for interpretting MindSensors PSP-Nx button set 2 values.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.208

MindSensors nRLink constants

881

6.207.2 6.207.2.1

Dene Documentation #dene PSP_BTNSET2_CIRCLE 0x04 The PSP-Nx button set 2 circle

6.207.2.2

#dene PSP_BTNSET2_CROSS 0x02 The PSP-Nx button set 2 cross

6.207.2.3

#dene PSP_BTNSET2_L1 0x20 The PSP-Nx button set 2 L1

6.207.2.4

#dene PSP_BTNSET2_L2 0x80 The PSP-Nx button set 2 L2

6.207.2.5

#dene PSP_BTNSET2_R1 0x10 The PSP-Nx button set 2 R1

6.207.2.6

#dene PSP_BTNSET2_R2 0x40 The PSP-Nx button set 2 R2

6.207.2.7

#dene PSP_BTNSET2_SQUARE 0x01 The PSP-Nx button set 2 square

6.207.2.8

#dene PSP_BTNSET2_TRIANGLE 0x08 The PSP-Nx button set 2 triangle

6.208

MindSensors nRLink constants

Constants that are for use with the MindSensors nRLink device.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.208

MindSensors nRLink constants

882

Denes #dene NRLINK_CMD_2400 0x44 #dene NRLINK_CMD_FLUSH 0x46 #dene NRLINK_CMD_4800 0x48 #dene NRLINK_CMD_IR_LONG 0x4C #dene NRLINK_CMD_IR_SHORT 0x53 #dene NRLINK_CMD_RUN_MACRO 0x52 #dene NRLINK_CMD_TX_RAW 0x55 #dene NRLINK_CMD_SET_RCX 0x58 #dene NRLINK_CMD_SET_TRAIN 0x54 #dene NRLINK_CMD_SET_PF 0x50 #dene NRLINK_REG_BYTES 0x40 #dene NRLINK_REG_DATA 0x42 #dene NRLINK_REG_EEPROM 0x50 Detailed Description

6.208.1

Constants that are for use with the MindSensors nRLink device. 6.208.2 6.208.2.1 Dene Documentation #dene NRLINK_CMD_2400 0x44 Set NRLink to 2400 baud 6.208.2.2 #dene NRLINK_CMD_4800 0x48 Set NRLink to 4800 baud 6.208.2.3 #dene NRLINK_CMD_FLUSH 0x46 Flush the NRLink 6.208.2.4 #dene NRLINK_CMD_IR_LONG 0x4C Set the NRLink to long range IR 6.208.2.5 #dene NRLINK_CMD_IR_SHORT 0x53 Set the NRLink to short range IR
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.209

MindSensors ACCL-Nx constants

883

6.208.2.6

#dene NRLINK_CMD_RUN_MACRO 0x52 Run an NRLink macro

6.208.2.7

#dene NRLINK_CMD_SET_PF 0x50 Set the NRLink to Power Function mode

6.208.2.8

#dene NRLINK_CMD_SET_RCX 0x58 Set the NRLink to RCX mode

6.208.2.9

#dene NRLINK_CMD_SET_TRAIN 0x54 Set the NRLink to IR Train mode

6.208.2.10

#dene NRLINK_CMD_TX_RAW 0x55 Set the NRLink to transmit raw bytes

6.208.2.11

#dene NRLINK_REG_BYTES 0x40 The NRLink bytes register

6.208.2.12

#dene NRLINK_REG_DATA 0x42 The NRLink data register

6.208.2.13

#dene NRLINK_REG_EEPROM 0x50 The NRLink eeprom register

6.209

MindSensors ACCL-Nx constants

Constants that are for use with the MindSensors ACCL-Nx device.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.209

MindSensors ACCL-Nx constants

884

Modules MindSensors ACCL-Nx sensitivity level constants


Constants that are for setting the MindSensors ACCL-Nx sensitivity level.

Denes #dene ACCL_CMD_X_CAL 0x58 #dene ACCL_CMD_Y_CAL 0x59 #dene ACCL_CMD_Z_CAL 0x5a #dene ACCL_CMD_X_CAL_END 0x78 #dene ACCL_CMD_Y_CAL_END 0x79 #dene ACCL_CMD_Z_CAL_END 0x7a #dene ACCL_CMD_RESET_CAL 0x52 #dene ACCL_REG_SENS_LVL 0x19 #dene ACCL_REG_X_TILT 0x42 #dene ACCL_REG_Y_TILT 0x43 #dene ACCL_REG_Z_TILT 0x44 #dene ACCL_REG_X_ACCEL 0x45 #dene ACCL_REG_Y_ACCEL 0x47 #dene ACCL_REG_Z_ACCEL 0x49 #dene ACCL_REG_X_OFFSET 0x4b #dene ACCL_REG_X_RANGE 0x4d #dene ACCL_REG_Y_OFFSET 0x4f #dene ACCL_REG_Y_RANGE 0x51 #dene ACCL_REG_Z_OFFSET 0x53 #dene ACCL_REG_Z_RANGE 0x55 Detailed Description

6.209.1

Constants that are for use with the MindSensors ACCL-Nx device. 6.209.2 6.209.2.1 Dene Documentation #dene ACCL_CMD_RESET_CAL 0x52 Reset to factory calibration 6.209.2.2 #dene ACCL_CMD_X_CAL 0x58 Acquire X-axis calibration point
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.209

MindSensors ACCL-Nx constants

885

6.209.2.3

#dene ACCL_CMD_X_CAL_END 0x78 Acquire X-axis calibration point and end calibration

6.209.2.4

#dene ACCL_CMD_Y_CAL 0x59 Acquire Y-axis calibration point

6.209.2.5

#dene ACCL_CMD_Y_CAL_END 0x79 Acquire Y-axis calibration point and end calibration

6.209.2.6

#dene ACCL_CMD_Z_CAL 0x5a Acquire Z-axis calibration point

6.209.2.7

#dene ACCL_CMD_Z_CAL_END 0x7a Acquire Z-axis calibration point and end calibration

6.209.2.8

#dene ACCL_REG_SENS_LVL 0x19 The current sensitivity

6.209.2.9

#dene ACCL_REG_X_ACCEL 0x45 The X-axis acceleration data

6.209.2.10

#dene ACCL_REG_X_OFFSET 0x4b The X-axis offset

6.209.2.11

#dene ACCL_REG_X_RANGE 0x4d The X-axis range

6.209.2.12

#dene ACCL_REG_X_TILT 0x42 The X-axis tilt data

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.210

MindSensors ACCL-Nx sensitivity level constants

886

6.209.2.13

#dene ACCL_REG_Y_ACCEL 0x47 The Y-axis acceleration data

6.209.2.14

#dene ACCL_REG_Y_OFFSET 0x4f The Y-axis offset

6.209.2.15

#dene ACCL_REG_Y_RANGE 0x51 The Y-axis range

6.209.2.16

#dene ACCL_REG_Y_TILT 0x43 The Y-axis tilt data

6.209.2.17

#dene ACCL_REG_Z_ACCEL 0x49 The Z-axis acceleration data

6.209.2.18

#dene ACCL_REG_Z_OFFSET 0x53 The Z-axis offset

6.209.2.19

#dene ACCL_REG_Z_RANGE 0x55 The Z-axis range

6.209.2.20

#dene ACCL_REG_Z_TILT 0x44 The Z-axis tilt data

6.210

MindSensors ACCL-Nx sensitivity level constants

Constants that are for setting the MindSensors ACCL-Nx sensitivity level.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.211

MindSensors PFMate constants

887

Denes #dene ACCL_SENSITIVITY_LEVEL_1 0x31 #dene ACCL_SENSITIVITY_LEVEL_2 0x32 #dene ACCL_SENSITIVITY_LEVEL_3 0x33 #dene ACCL_SENSITIVITY_LEVEL_4 0x34 Detailed Description

6.210.1

Constants that are for setting the MindSensors ACCL-Nx sensitivity level. 6.210.2 6.210.2.1 Dene Documentation #dene ACCL_SENSITIVITY_LEVEL_1 0x31 The ACCL-Nx sensitivity level 1 Examples: ex_SetACCLNxSensitivity.nxc.

6.210.2.2

#dene ACCL_SENSITIVITY_LEVEL_2 0x32 The ACCL-Nx sensitivity level 2

6.210.2.3

#dene ACCL_SENSITIVITY_LEVEL_3 0x33 The ACCL-Nx sensitivity level 3

6.210.2.4

#dene ACCL_SENSITIVITY_LEVEL_4 0x34 The ACCL-Nx sensitivity level 4

6.211

MindSensors PFMate constants

Constants that are for use with the MindSensors PFMate device.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.211

MindSensors PFMate constants

888

Modules PFMate motor constants


Constants that are for specifying PFMate motors.

PFMate channel constants


Constants that are for specifying PFMate channels.

Denes #dene PFMATE_REG_CMD 0x41 #dene PFMATE_REG_CHANNEL 0x42 #dene PFMATE_REG_MOTORS 0x43 #dene PFMATE_REG_A_CMD 0x44 #dene PFMATE_REG_A_SPEED 0x45 #dene PFMATE_REG_B_CMD 0x46 #dene PFMATE_REG_B_SPEED 0x47 #dene PFMATE_CMD_GO 0x47 #dene PFMATE_CMD_RAW 0x52 Detailed Description

6.211.1

Constants that are for use with the MindSensors PFMate device. 6.211.2 6.211.2.1 Dene Documentation #dene PFMATE_CMD_GO 0x47 Send IR signal to IR receiver 6.211.2.2 #dene PFMATE_CMD_RAW 0x52 Send raw IR signal to IR receiver 6.211.2.3 #dene PFMATE_REG_A_CMD 0x44

PF command for motor A? (PF_CMD_FLOAT, PF_CMD_FWD, PF_CMD_REV, PF_CMD_BRAKE)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.212

PFMate motor constants

889

6.211.2.4

#dene PFMATE_REG_A_SPEED 0x45 PF speed for motor A? (0-7)

6.211.2.5

#dene PFMATE_REG_B_CMD 0x46

PF command for motor B? (PF_CMD_FLOAT, PF_CMD_FWD, PF_CMD_REV, PF_CMD_BRAKE) 6.211.2.6 #dene PFMATE_REG_B_SPEED 0x47 PF speed for motor B? (0-7) 6.211.2.7 #dene PFMATE_REG_CHANNEL 0x42 PF channel? 1, 2, 3, or 4 6.211.2.8 #dene PFMATE_REG_CMD 0x41 PFMate command 6.211.2.9 #dene PFMATE_REG_MOTORS 0x43 PF motors? (0 = both, 1 = A, 2 = B)

6.212

PFMate motor constants

Constants that are for specifying PFMate motors. Denes #dene PFMATE_MOTORS_BOTH 0x00 #dene PFMATE_MOTORS_A 0x01 #dene PFMATE_MOTORS_B 0x02 6.212.1 Detailed Description

Constants that are for specifying PFMate motors.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.213

PFMate channel constants

890

6.212.2 6.212.2.1

Dene Documentation #dene PFMATE_MOTORS_A 0x01 Control only motor A

6.212.2.2

#dene PFMATE_MOTORS_B 0x02 Control only motor B

6.212.2.3

#dene PFMATE_MOTORS_BOTH 0x00 Control both motors

Examples: ex_PFMate.nxc.

6.213

PFMate channel constants

Constants that are for specifying PFMate channels. Denes #dene PFMATE_CHANNEL_1 1 #dene PFMATE_CHANNEL_2 2 #dene PFMATE_CHANNEL_3 3 #dene PFMATE_CHANNEL_4 4 Detailed Description

6.213.1

Constants that are for specifying PFMate channels. 6.213.2 6.213.2.1 Dene Documentation #dene PFMATE_CHANNEL_1 1 Power function channel 1 Examples: ex_PFMate.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.214

MindSensors NXTServo constants

891

6.213.2.2

#dene PFMATE_CHANNEL_2 2 Power function channel 2

6.213.2.3

#dene PFMATE_CHANNEL_3 3 Power function channel 3

6.213.2.4

#dene PFMATE_CHANNEL_4 4 Power function channel 4

6.214

MindSensors NXTServo constants

Constants that are for use with the MindSensors NXTServo device. Modules MindSensors NXTServo registers
NXTServo device register constants.

MindSensors NXTServo position constants


NXTServo device position constants.

MindSensors NXTServo quick position constants


NXTServo device quick position constants.

MindSensors NXTServo servo numbers


NXTServo device servo number constants.

MindSensors NXTServo commands


NXTServo device command constants.

6.214.1

Detailed Description

Constants that are for use with the MindSensors NXTServo device.

6.215

MindSensors NXTServo registers

NXTServo device register constants.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.215

MindSensors NXTServo registers

892

Denes #dene NXTSERVO_REG_VOLTAGE 0x41 #dene NXTSERVO_REG_CMD 0x41 #dene NXTSERVO_REG_S1_POS 0x42 #dene NXTSERVO_REG_S2_POS 0x44 #dene NXTSERVO_REG_S3_POS 0x46 #dene NXTSERVO_REG_S4_POS 0x48 #dene NXTSERVO_REG_S5_POS 0x4A #dene NXTSERVO_REG_S6_POS 0x4C #dene NXTSERVO_REG_S7_POS 0x4E #dene NXTSERVO_REG_S8_POS 0x50 #dene NXTSERVO_REG_S1_SPEED 0x52 #dene NXTSERVO_REG_S2_SPEED 0x53 #dene NXTSERVO_REG_S3_SPEED 0x54 #dene NXTSERVO_REG_S4_SPEED 0x55 #dene NXTSERVO_REG_S5_SPEED 0x56 #dene NXTSERVO_REG_S6_SPEED 0x57 #dene NXTSERVO_REG_S7_SPEED 0x58 #dene NXTSERVO_REG_S8_SPEED 0x59 #dene NXTSERVO_REG_S1_QPOS 0x5A #dene NXTSERVO_REG_S2_QPOS 0x5B #dene NXTSERVO_REG_S3_QPOS 0x5C #dene NXTSERVO_REG_S4_QPOS 0x5D #dene NXTSERVO_REG_S5_QPOS 0x5E #dene NXTSERVO_REG_S6_QPOS 0x5F #dene NXTSERVO_REG_S7_QPOS 0x60 #dene NXTSERVO_REG_S8_QPOS 0x61 #dene NXTSERVO_EM_REG_CMD 0x00 #dene NXTSERVO_EM_REG_EEPROM_START 0x21 #dene NXTSERVO_EM_REG_EEPROM_END 0xFF Detailed Description

6.215.1

NXTServo device register constants. 6.215.2 6.215.2.1 Dene Documentation #dene NXTSERVO_EM_REG_CMD 0x00 NXTServo in macro edit mode command register.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.215

MindSensors NXTServo registers

893

6.215.2.2

#dene NXTSERVO_EM_REG_EEPROM_END 0xFF NXTServo in macro edit mode EEPROM end register.

6.215.2.3

#dene NXTSERVO_EM_REG_EEPROM_START 0x21 NXTServo in macro edit mode EEPROM start register.

6.215.2.4

#dene NXTSERVO_REG_CMD 0x41

NXTServo command register. See MindSensors NXTServo commands group. (write only) 6.215.2.5 #dene NXTSERVO_REG_S1_POS 0x42 NXTServo servo 1 position register. 6.215.2.6 #dene NXTSERVO_REG_S1_QPOS 0x5A NXTServo servo 1 quick position register. (write only) 6.215.2.7 #dene NXTSERVO_REG_S1_SPEED 0x52 NXTServo servo 1 speed register. 6.215.2.8 #dene NXTSERVO_REG_S2_POS 0x44 NXTServo servo 2 position register. 6.215.2.9 #dene NXTSERVO_REG_S2_QPOS 0x5B NXTServo servo 2 quick position register. (write only) 6.215.2.10 #dene NXTSERVO_REG_S2_SPEED 0x53 NXTServo servo 2 speed register. 6.215.2.11 #dene NXTSERVO_REG_S3_POS 0x46 NXTServo servo 3 position register.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.215

MindSensors NXTServo registers

894

6.215.2.12

#dene NXTSERVO_REG_S3_QPOS 0x5C NXTServo servo 3 quick position register. (write only)

6.215.2.13

#dene NXTSERVO_REG_S3_SPEED 0x54 NXTServo servo 3 speed register.

6.215.2.14

#dene NXTSERVO_REG_S4_POS 0x48 NXTServo servo 4 position register.

6.215.2.15

#dene NXTSERVO_REG_S4_QPOS 0x5D NXTServo servo 4 quick position register. (write only)

6.215.2.16

#dene NXTSERVO_REG_S4_SPEED 0x55 NXTServo servo 4 speed register.

6.215.2.17

#dene NXTSERVO_REG_S5_POS 0x4A NXTServo servo 5 position register.

6.215.2.18

#dene NXTSERVO_REG_S5_QPOS 0x5E NXTServo servo 5 quick position register. (write only)

6.215.2.19

#dene NXTSERVO_REG_S5_SPEED 0x56 NXTServo servo 5 speed register.

6.215.2.20

#dene NXTSERVO_REG_S6_POS 0x4C NXTServo servo 6 position register.

6.215.2.21

#dene NXTSERVO_REG_S6_QPOS 0x5F NXTServo servo 6 quick position register. (write only)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.216

MindSensors NXTServo position constants

895

6.215.2.22

#dene NXTSERVO_REG_S6_SPEED 0x57 NXTServo servo 6 speed register.

6.215.2.23

#dene NXTSERVO_REG_S7_POS 0x4E NXTServo servo 7 position register.

6.215.2.24

#dene NXTSERVO_REG_S7_QPOS 0x60 NXTServo servo 7 quick position register. (write only)

6.215.2.25

#dene NXTSERVO_REG_S7_SPEED 0x58 NXTServo servo 7 speed register.

6.215.2.26

#dene NXTSERVO_REG_S8_POS 0x50 NXTServo servo 8 position register.

6.215.2.27

#dene NXTSERVO_REG_S8_QPOS 0x61 NXTServo servo 8 quick position register. (write only)

6.215.2.28

#dene NXTSERVO_REG_S8_SPEED 0x59 NXTServo servo 8 speed register.

6.215.2.29

#dene NXTSERVO_REG_VOLTAGE 0x41 Battery voltage register. (read only)

6.216

MindSensors NXTServo position constants

NXTServo device position constants.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.217

MindSensors NXTServo quick position constants

896

Denes #dene NXTSERVO_POS_CENTER 1500 #dene NXTSERVO_POS_MIN 500 #dene NXTSERVO_POS_MAX 2500 6.216.1 Detailed Description

NXTServo device position constants. 6.216.2 6.216.2.1 Dene Documentation #dene NXTSERVO_POS_CENTER 1500 Center position for 1500us servos. Examples: ex_NXTServo.nxc.

6.216.2.2

#dene NXTSERVO_POS_MAX 2500 Maximum position for 1500us servos.

6.216.2.3

#dene NXTSERVO_POS_MIN 500 Minimum position for 1500us servos.

6.217

MindSensors NXTServo quick position constants

NXTServo device quick position constants. Denes #dene NXTSERVO_QPOS_CENTER 150 #dene NXTSERVO_QPOS_MIN 50 #dene NXTSERVO_QPOS_MAX 250 6.217.1 Detailed Description

NXTServo device quick position constants.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.218

MindSensors NXTServo servo numbers

897

6.217.2 6.217.2.1

Dene Documentation #dene NXTSERVO_QPOS_CENTER 150 Center quick position for 1500us servos.

6.217.2.2

#dene NXTSERVO_QPOS_MAX 250 Maximum quick position for 1500us servos.

6.217.2.3

#dene NXTSERVO_QPOS_MIN 50 Minimum quick position for 1500us servos.

Examples: ex_NXTServo.nxc.

6.218

MindSensors NXTServo servo numbers

NXTServo device servo number constants. Denes #dene NXTSERVO_SERVO_1 0 #dene NXTSERVO_SERVO_2 1 #dene NXTSERVO_SERVO_3 2 #dene NXTSERVO_SERVO_4 3 #dene NXTSERVO_SERVO_5 4 #dene NXTSERVO_SERVO_6 5 #dene NXTSERVO_SERVO_7 6 #dene NXTSERVO_SERVO_8 7 Detailed Description

6.218.1

NXTServo device servo number constants. 6.218.2 6.218.2.1 Dene Documentation #dene NXTSERVO_SERVO_1 0 NXTServo server number 1.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.219

MindSensors NXTServo commands

898

Examples: ex_NXTServo.nxc.

6.218.2.2

#dene NXTSERVO_SERVO_2 1 NXTServo server number 2.

6.218.2.3

#dene NXTSERVO_SERVO_3 2 NXTServo server number 3.

6.218.2.4

#dene NXTSERVO_SERVO_4 3 NXTServo server number 4.

6.218.2.5

#dene NXTSERVO_SERVO_5 4 NXTServo server number 5.

6.218.2.6

#dene NXTSERVO_SERVO_6 5 NXTServo server number 6.

6.218.2.7

#dene NXTSERVO_SERVO_7 6 NXTServo server number 7.

6.218.2.8

#dene NXTSERVO_SERVO_8 7 NXTServo server number 8.

6.219

MindSensors NXTServo commands

NXTServo device command constants.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.219

MindSensors NXTServo commands

899

Denes #dene NXTSERVO_CMD_INIT 0x49 #dene NXTSERVO_CMD_RESET 0x53 #dene NXTSERVO_CMD_HALT 0x48 #dene NXTSERVO_CMD_RESUME 0x52 #dene NXTSERVO_CMD_GOTO 0x47 #dene NXTSERVO_CMD_PAUSE 0x50 #dene NXTSERVO_CMD_EDIT1 0x45 #dene NXTSERVO_CMD_EDIT2 0x4D #dene NXTSERVO_EM_CMD_QUIT 0x51 Detailed Description

6.219.1

NXTServo device command constants. These are written to the command register to control the device. 6.219.2 6.219.2.1 Dene Documentation #dene NXTSERVO_CMD_EDIT1 0x45 Edit Macro (part 1 of 2 character command sequence) 6.219.2.2 #dene NXTSERVO_CMD_EDIT2 0x4D Edit Macro (part 2 of 2 character command sequence) 6.219.2.3 #dene NXTSERVO_CMD_GOTO 0x47

Goto EEPROM position x. This command re-initializes the macro environment. 6.219.2.4 #dene NXTSERVO_CMD_HALT 0x48 Halt Macro. This command re-initializes the macro environment. 6.219.2.5 #dene NXTSERVO_CMD_INIT 0x49

Store the initial speed and position properties of the servo motor n. Current speed and position values of the nth servo is read from the servo speed register and servo position register and written to permanent memory.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.220

MindSensors NXTHID constants

900

6.219.2.6

#dene NXTSERVO_CMD_PAUSE 0x50

Pause Macro. This command will pause the macro, and save the environment for subsequent resumption. 6.219.2.7 #dene NXTSERVO_CMD_RESET 0x53

Reset servo properties to factory default. Initial Position of servos to 1500, and speed to 0. 6.219.2.8 #dene NXTSERVO_CMD_RESUME 0x52

Resume macro Execution. This command resumes macro where it was paused last, using the same environment. 6.219.2.9 #dene NXTSERVO_EM_CMD_QUIT 0x51 Exit edit macro mode

6.220

MindSensors NXTHID constants

Constants that are for use with the MindSensors NXTHID device. Modules MindSensors NXTHID registers
NXTHID device register constants.

MindSensors NXTHID modier keys


NXTHID device modier key constants.

MindSensors NXTHID commands


NXTHID device command constants.

6.220.1

Detailed Description

Constants that are for use with the MindSensors NXTHID device.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.221

MindSensors NXTHID registers

901

6.221

MindSensors NXTHID registers

NXTHID device register constants. Denes #dene NXTHID_REG_CMD 0x41 #dene NXTHID_REG_MODIFIER 0x42 #dene NXTHID_REG_DATA 0x43 6.221.1 Detailed Description

NXTHID device register constants. 6.221.2 6.221.2.1 Dene Documentation #dene NXTHID_REG_CMD 0x41

NXTHID command register. See MindSensors NXTHID commands group. 6.221.2.2 #dene NXTHID_REG_DATA 0x43 NXTHID data register. 6.221.2.3 #dene NXTHID_REG_MODIFIER 0x42

NXTHID modier register. See MindSensors NXTHID modier keys group.

6.222

MindSensors NXTHID modier keys

NXTHID device modier key constants. Denes #dene NXTHID_MOD_NONE 0x00 #dene NXTHID_MOD_LEFT_CTRL 0x01 #dene NXTHID_MOD_LEFT_SHIFT 0x02 #dene NXTHID_MOD_LEFT_ALT 0x04 #dene NXTHID_MOD_LEFT_GUI 0x08 #dene NXTHID_MOD_RIGHT_CTRL 0x10

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.222

MindSensors NXTHID modier keys

902

#dene NXTHID_MOD_RIGHT_SHIFT 0x20 #dene NXTHID_MOD_RIGHT_ALT 0x40 #dene NXTHID_MOD_RIGHT_GUI 0x80 6.222.1 Detailed Description

NXTHID device modier key constants. 6.222.2 6.222.2.1 Dene Documentation #dene NXTHID_MOD_LEFT_ALT 0x04 NXTHID left alt modier. 6.222.2.2 #dene NXTHID_MOD_LEFT_CTRL 0x01 NXTHID left control modier. Examples: ex_NXTHID.nxc.

6.222.2.3

#dene NXTHID_MOD_LEFT_GUI 0x08 NXTHID left gui modier.

6.222.2.4

#dene NXTHID_MOD_LEFT_SHIFT 0x02 NXTHID left shift modier.

6.222.2.5

#dene NXTHID_MOD_NONE 0x00 NXTHID no modier.

Examples: ex_NXTHID.nxc.

6.222.2.6

#dene NXTHID_MOD_RIGHT_ALT 0x40 NXTHID right alt modier.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.223

MindSensors NXTHID commands

903

6.222.2.7

#dene NXTHID_MOD_RIGHT_CTRL 0x10 NXTHID right control modier.

6.222.2.8

#dene NXTHID_MOD_RIGHT_GUI 0x80 NXTHID right gui modier.

6.222.2.9

#dene NXTHID_MOD_RIGHT_SHIFT 0x20 NXTHID right shift modier.

6.223

MindSensors NXTHID commands

NXTHID device command constants. Denes #dene NXTHID_CMD_ASCII 0x41 #dene NXTHID_CMD_DIRECT 0x44 #dene NXTHID_CMD_TRANSMIT 0x54 6.223.1 Detailed Description

NXTHID device command constants. These are written to the command register to control the device. 6.223.2 6.223.2.1 Dene Documentation #dene NXTHID_CMD_ASCII 0x41

Use ASCII data mode. In ASCII mode no non-printable characters can be sent. 6.223.2.2 #dene NXTHID_CMD_DIRECT 0x44 Use direct data mode In direct mode any character can be sent. 6.223.2.3 #dene NXTHID_CMD_TRANSMIT 0x54 Transmit data to the host computer.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.224

MindSensors NXTPowerMeter constants

904

6.224

MindSensors NXTPowerMeter constants

Constants that are for use with the MindSensors NXTPowerMeter device. Modules MindSensors NXTPowerMeter registers
NXTPowerMeter device register constants.

MindSensors NXTPowerMeter commands


NXTPowerMeter device command constants.

6.224.1

Detailed Description

Constants that are for use with the MindSensors NXTPowerMeter device.

6.225

MindSensors NXTPowerMeter registers

NXTPowerMeter device register constants. Denes #dene NXTPM_REG_CMD 0x41 #dene NXTPM_REG_CURRENT 0x42 #dene NXTPM_REG_VOLTAGE 0x44 #dene NXTPM_REG_CAPACITY 0x46 #dene NXTPM_REG_POWER 0x48 #dene NXTPM_REG_TOTALPOWER 0x4A #dene NXTPM_REG_MAXCURRENT 0x4E #dene NXTPM_REG_MINCURRENT 0x50 #dene NXTPM_REG_MAXVOLTAGE 0x52 #dene NXTPM_REG_MINVOLTAGE 0x54 #dene NXTPM_REG_TIME 0x56 #dene NXTPM_REG_USERGAIN 0x5A #dene NXTPM_REG_GAIN 0x5E #dene NXTPM_REG_ERRORCOUNT 0x5F Detailed Description

6.225.1

NXTPowerMeter device register constants.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.225

MindSensors NXTPowerMeter registers

905

6.225.2 6.225.2.1

Dene Documentation #dene NXTPM_REG_CAPACITY 0x46 NXTPowerMeter capacity used since last reset register. (2 bytes)

6.225.2.2

#dene NXTPM_REG_CMD 0x41

NXTPowerMeter command register. See the MindSensors NXTPowerMeter commands group. 6.225.2.3 #dene NXTPM_REG_CURRENT 0x42 NXTPowerMeter present current in mA register. (2 bytes) 6.225.2.4 #dene NXTPM_REG_ERRORCOUNT 0x5F NXTPowerMeter error count register. (2 bytes) 6.225.2.5 #dene NXTPM_REG_GAIN 0x5E NXTPowerMeter gain register. (1 byte) 6.225.2.6 #dene NXTPM_REG_MAXCURRENT 0x4E NXTPowerMeter max current register. (2 bytes) 6.225.2.7 #dene NXTPM_REG_MAXVOLTAGE 0x52 NXTPowerMeter max voltage register. (2 bytes) 6.225.2.8 #dene NXTPM_REG_MINCURRENT 0x50 NXTPowerMeter min current register. (2 bytes) 6.225.2.9 #dene NXTPM_REG_MINVOLTAGE 0x54 NXTPowerMeter min voltage register. (2 bytes)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.226

MindSensors NXTPowerMeter commands

906

6.225.2.10

#dene NXTPM_REG_POWER 0x48 NXTPowerMeter present power register. (2 bytes)

6.225.2.11

#dene NXTPM_REG_TIME 0x56 NXTPowerMeter time register. (4 bytes)

6.225.2.12

#dene NXTPM_REG_TOTALPOWER 0x4A NXTPowerMeter total power consumed since last reset register. (4 bytes)

6.225.2.13

#dene NXTPM_REG_USERGAIN 0x5A NXTPowerMeter user gain register. Not yet implemented. (4 bytes)

6.225.2.14

#dene NXTPM_REG_VOLTAGE 0x44 NXTPowerMeter present voltage in mV register. (2 bytes)

6.226

MindSensors NXTPowerMeter commands

NXTPowerMeter device command constants. Denes #dene NXTPM_CMD_RESET 0x52 6.226.1 Detailed Description

NXTPowerMeter device command constants. These are written to the command register to control the device. 6.226.2 6.226.2.1 Dene Documentation #dene NXTPM_CMD_RESET 0x52 Reset counters.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.227

MindSensors NXTSumoEyes constants

907

6.227

MindSensors NXTSumoEyes constants

Constants that are for use with the MindSensors NXTSumoEyes device. Denes #dene NXTSE_ZONE_NONE 0 #dene NXTSE_ZONE_FRONT 1 #dene NXTSE_ZONE_LEFT 2 #dene NXTSE_ZONE_RIGHT 3 Detailed Description

6.227.1

Constants that are for use with the MindSensors NXTSumoEyes device. 6.227.2 6.227.2.1 Dene Documentation #dene NXTSE_ZONE_FRONT 1 Obstacle zone front. Examples: ex_NXTSumoEyes.nxc.

6.227.2.2

#dene NXTSE_ZONE_LEFT 2 Obstacle zone left.

Examples: ex_NXTSumoEyes.nxc.

6.227.2.3

#dene NXTSE_ZONE_NONE 0 Obstacle zone none.

6.227.2.4

#dene NXTSE_ZONE_RIGHT 3 Obstacle zone right.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.228

MindSensors NXTLineLeader constants

908

Examples: ex_NXTSumoEyes.nxc.

6.228

MindSensors NXTLineLeader constants

Constants that are for use with the MindSensors NXTLineLeader device. Modules MindSensors NXTLineLeader registers
NXTLineLeader device register constants.

MindSensors NXTLineLeader commands


NXTLineLeader device command constants.

6.228.1

Detailed Description

Constants that are for use with the MindSensors NXTLineLeader device.

6.229

MindSensors NXTLineLeader registers

NXTLineLeader device register constants. Denes #dene NXTLL_REG_CMD 0x41 #dene NXTLL_REG_STEERING 0x42 #dene NXTLL_REG_AVERAGE 0x43 #dene NXTLL_REG_RESULT 0x44 #dene NXTLL_REG_SETPOINT 0x45 #dene NXTLL_REG_KP_VALUE 0x46 #dene NXTLL_REG_KI_VALUE 0x47 #dene NXTLL_REG_KD_VALUE 0x48 #dene NXTLL_REG_CALIBRATED 0x49 #dene NXTLL_REG_WHITELIMITS 0x51 #dene NXTLL_REG_BLACKLIMITS 0x59 #dene NXTLL_REG_KP_FACTOR 0x61 #dene NXTLL_REG_KI_FACTOR 0x62 #dene NXTLL_REG_KD_FACTOR 0x63

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.229

MindSensors NXTLineLeader registers

909

#dene NXTLL_REG_WHITEDATA 0x64 #dene NXTLL_REG_BLACKDATA 0x6C #dene NXTLL_REG_RAWVOLTAGE 0x74 6.229.1 Detailed Description

NXTLineLeader device register constants. 6.229.2 6.229.2.1 Dene Documentation #dene NXTLL_REG_AVERAGE 0x43 NXTLineLeader average result register. 6.229.2.2 #dene NXTLL_REG_BLACKDATA 0x6C NXTLineLeader black calibration data registers. 8 bytes. 6.229.2.3 #dene NXTLL_REG_BLACKLIMITS 0x59 NXTLineLeader black limit registers. 8 bytes. 6.229.2.4 #dene NXTLL_REG_CALIBRATED 0x49 NXTLineLeader calibrated sensor reading registers. 8 bytes. 6.229.2.5 #dene NXTLL_REG_CMD 0x41

NXTLineLeader command register. See the MindSensors NXTLineLeader commands group. 6.229.2.6 #dene NXTLL_REG_KD_FACTOR 0x63 NXTLineLeader Kd factor register. Default = 32. 6.229.2.7 #dene NXTLL_REG_KD_VALUE 0x48 NXTLineLeader Kd value register. Default = 8.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.229

MindSensors NXTLineLeader registers

910

6.229.2.8

#dene NXTLL_REG_KI_FACTOR 0x62 NXTLineLeader Ki factor register. Default = 32.

6.229.2.9

#dene NXTLL_REG_KI_VALUE 0x47 NXTLineLeader Ki value register. Default = 0.

6.229.2.10

#dene NXTLL_REG_KP_FACTOR 0x61 NXTLineLeader Kp factor register. Default = 32.

6.229.2.11

#dene NXTLL_REG_KP_VALUE 0x46 NXTLineLeader Kp value register. Default = 25.

6.229.2.12

#dene NXTLL_REG_RAWVOLTAGE 0x74 NXTLineLeader uncalibrated sensor voltage registers. 16 bytes.

6.229.2.13

#dene NXTLL_REG_RESULT 0x44 NXTLineLeader result register (sensor bit values).

6.229.2.14

#dene NXTLL_REG_SETPOINT 0x45 NXTLineLeader user settable average (setpoint) register. Default = 45.

6.229.2.15

#dene NXTLL_REG_STEERING 0x42 NXTLineLeader steering register.

6.229.2.16

#dene NXTLL_REG_WHITEDATA 0x64 NXTLineLeader white calibration data registers. 8 bytes.

6.229.2.17

#dene NXTLL_REG_WHITELIMITS 0x51 NXTLineLeader white limit registers. 8 bytes.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.230

MindSensors NXTLineLeader commands

911

6.230

MindSensors NXTLineLeader commands

NXTLineLeader device command constants. Denes #dene NXTLL_CMD_USA 0x41 #dene NXTLL_CMD_BLACK 0x42 #dene NXTLL_CMD_POWERDOWN 0x44 #dene NXTLL_CMD_EUROPEAN 0x45 #dene NXTLL_CMD_INVERT 0x49 #dene NXTLL_CMD_POWERUP 0x50 #dene NXTLL_CMD_RESET 0x52 #dene NXTLL_CMD_SNAPSHOT 0x53 #dene NXTLL_CMD_UNIVERSAL 0x55 #dene NXTLL_CMD_WHITE 0x57 Detailed Description

6.230.1

NXTLineLeader device command constants. These are written to the command register to control the device. 6.230.2 6.230.2.1 Dene Documentation #dene NXTLL_CMD_BLACK 0x42 Black calibration. 6.230.2.2 #dene NXTLL_CMD_EUROPEAN 0x45 European power frequency. (50hz) 6.230.2.3 #dene NXTLL_CMD_INVERT 0x49 Invert color. 6.230.2.4 #dene NXTLL_CMD_POWERDOWN 0x44 Power down the device.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.231

Codatex device constants

912

6.230.2.5

#dene NXTLL_CMD_POWERUP 0x50 Power up the device.

6.230.2.6

#dene NXTLL_CMD_RESET 0x52 Reset inversion.

6.230.2.7

#dene NXTLL_CMD_SNAPSHOT 0x53 Setpoint based on snapshot (automatically sets invert if needed).

6.230.2.8

#dene NXTLL_CMD_UNIVERSAL 0x55

Universal power frequency. The sensor auto adjusts for any frequency. This is the default mode. 6.230.2.9 #dene NXTLL_CMD_USA 0x41 USA power frequency. (60hz) 6.230.2.10 #dene NXTLL_CMD_WHITE 0x57 White balance calibration.

6.231

Codatex device constants

Constants that are for use with Codatex devices. Modules Codatex RFID sensor constants
Constants that are for use with the Codatex RFID sensor device.

6.231.1

Detailed Description

Constants that are for use with Codatex devices.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.232

Codatex RFID sensor constants

913

6.232

Codatex RFID sensor constants

Constants that are for use with the Codatex RFID sensor device. Modules Codatex RFID sensor modes
Constants that are for conguring the Codatex RFID sensor mode.

Denes #dene CT_ADDR_RFID 0x04 #dene CT_REG_STATUS 0x32 #dene CT_REG_MODE 0x41 #dene CT_REG_DATA 0x42 Detailed Description

6.232.1

Constants that are for use with the Codatex RFID sensor device. 6.232.2 6.232.2.1 Dene Documentation #dene CT_ADDR_RFID 0x04 RFID I2C address 6.232.2.2 #dene CT_REG_DATA 0x42 RFID data register 6.232.2.3 #dene CT_REG_MODE 0x41 RFID mode register 6.232.2.4 #dene CT_REG_STATUS 0x32 RFID status register

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.233

Codatex RFID sensor modes

914

6.233

Codatex RFID sensor modes

Constants that are for conguring the Codatex RFID sensor mode. Denes #dene RFID_MODE_STOP 0 #dene RFID_MODE_SINGLE 1 #dene RFID_MODE_CONTINUOUS 2 6.233.1 Detailed Description

Constants that are for conguring the Codatex RFID sensor mode. 6.233.2 6.233.2.1 Dene Documentation #dene RFID_MODE_CONTINUOUS 2 Congure the RFID device for continuous reading Examples: ex_RFIDMode.nxc.

6.233.2.2

#dene RFID_MODE_SINGLE 1 Congure the RFID device for a single reading

6.233.2.3

#dene RFID_MODE_STOP 0 Stop the RFID device

6.234

Data type limits

Constants that dene various data type limits. Denes #dene CHAR_BIT 8 #dene SCHAR_MIN -128

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.234

Data type limits

915

#dene SCHAR_MAX 127 #dene UCHAR_MAX 255 #dene CHAR_MIN -128 #dene CHAR_MAX 127 #dene SHRT_MIN -32768 #dene SHRT_MAX 32767 #dene USHRT_MAX 65535 #dene INT_MIN -32768 #dene INT_MAX 32767 #dene UINT_MAX 65535 #dene LONG_MIN -2147483648 #dene LONG_MAX 2147483647 #dene ULONG_MAX 4294967295 #dene RAND_MAX 32768 Detailed Description

6.234.1

Constants that dene various data type limits. 6.234.2 6.234.2.1 Dene Documentation #dene CHAR_BIT 8 The number of bits in the char type 6.234.2.2 #dene CHAR_MAX 127 The maximum value of the char type 6.234.2.3 #dene CHAR_MIN -128 The minimum value of the char type 6.234.2.4 #dene INT_MAX 32767 The maximum value of the int type 6.234.2.5 #dene INT_MIN -32768 The minimum value of the int type

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.234

Data type limits

916

6.234.2.6

#dene LONG_MAX 2147483647 The maximum value of the long type

6.234.2.7

#dene LONG_MIN -2147483648 The minimum value of the long type

6.234.2.8

#dene RAND_MAX 32768 The maximum unsigned int random number returned by rand

6.234.2.9

#dene SCHAR_MAX 127 The maximum value of the signed char type

6.234.2.10

#dene SCHAR_MIN -128 The minimum value of the signed char type

6.234.2.11

#dene SHRT_MAX 32767 The maximum value of the short type

6.234.2.12

#dene SHRT_MIN -32768 The minimum value of the short type

6.234.2.13

#dene UCHAR_MAX 255 The maximum value of the unsigned char type

6.234.2.14

#dene UINT_MAX 65535 The maximum value of the unsigned int type

6.234.2.15

#dene ULONG_MAX 4294967295 The maximum value of the unsigned long type

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.235

Graphics library begin modes

917

6.234.2.16

#dene USHRT_MAX 65535 The maximum value of the unsigned short type

6.235

Graphics library begin modes

Constants that are used to specify the polygon surface begin mode. Denes #dene GL_POLYGON 1 #dene GL_LINE 2 #dene GL_POINT 3 #dene GL_CIRCLE 4 Detailed Description

6.235.1

Constants that are used to specify the polygon surface begin mode. 6.235.2 6.235.2.1 Dene Documentation #dene GL_CIRCLE 4 Use circle mode. Examples: glCircleDemo.nxc.

6.235.2.2

#dene GL_LINE 2 Use line mode.

6.235.2.3

#dene GL_POINT 3 Use point mode.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.236

Graphics library actions

918

6.235.2.4

#dene GL_POLYGON 1 Use polygon mode.

Examples: glBoxDemo.nxc, glCircleDemo.nxc, glRotateDemo.nxc, glScaleDemo.nxc, and glTranslateDemo.nxc.

6.236

Graphics library actions

Constants that are used to specify a graphics library action. Denes #dene GL_TRANSLATE_X 1 #dene GL_TRANSLATE_Y 2 #dene GL_TRANSLATE_Z 3 #dene GL_ROTATE_X 4 #dene GL_ROTATE_Y 5 #dene GL_ROTATE_Z 6 #dene GL_SCALE_X 7 #dene GL_SCALE_Y 8 #dene GL_SCALE_Z 9 Detailed Description

6.236.1

Constants that are used to specify a graphics library action. 6.236.2 6.236.2.1 Dene Documentation #dene GL_ROTATE_X 4 Rotate around the X axis. Examples: glRotateDemo.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.236

Graphics library actions

919

6.236.2.2

#dene GL_ROTATE_Y 5 Rotate around the Y axis.

Examples: glRotateDemo.nxc.

6.236.2.3

#dene GL_ROTATE_Z 6 Rotate around the Z axis.

6.236.2.4

#dene GL_SCALE_X 7 Scale along the X axis.

Examples: glScaleDemo.nxc.

6.236.2.5

#dene GL_SCALE_Y 8 Scale along the Y axis.

6.236.2.6

#dene GL_SCALE_Z 9 Scale along the Z axis.

6.236.2.7

#dene GL_TRANSLATE_X 1 Translate along the X axis.

Examples: glBoxDemo.nxc, and glTranslateDemo.nxc.

6.236.2.8

#dene GL_TRANSLATE_Y 2 Translate along the Y axis.

Examples: glTranslateDemo.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.237

Graphics library settings

920

6.236.2.9

#dene GL_TRANSLATE_Z 3 Translate along the Z axis.

Examples: glTranslateDemo.nxc.

6.237

Graphics library settings

Constants that are used to congure the graphics library settings. Denes #dene GL_CIRCLE_SIZE 1 #dene GL_CULL_MODE 2 #dene GL_CAMERA_DEPTH 3 #dene GL_ZOOM_FACTOR 4 Detailed Description

6.237.1

Constants that are used to congure the graphics library settings. 6.237.2 6.237.2.1 Dene Documentation #dene GL_CAMERA_DEPTH 3 Set the camera depth. 6.237.2.2 #dene GL_CIRCLE_SIZE 1 Set the circle size. 6.237.2.3 #dene GL_CULL_MODE 2 Set the cull mode. Examples: glCircleDemo.nxc, and glTranslateDemo.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

6.238

Graphics library cull mode

921

6.237.2.4

#dene GL_ZOOM_FACTOR 4 Set the zoom factor.

6.238

Graphics library cull mode

Constants to use when setting the graphics library cull mode. Denes #dene GL_CULL_BACK 2 #dene GL_CULL_FRONT 3 #dene GL_CULL_NONE 4 6.238.1 Detailed Description

Constants to use when setting the graphics library cull mode. 6.238.2 6.238.2.1 Dene Documentation #dene GL_CULL_BACK 2 Cull lines in back. 6.238.2.2 #dene GL_CULL_FRONT 3 Cull lines in front. 6.238.2.3 #dene GL_CULL_NONE 4 Do not cull any lines. Examples: glCircleDemo.nxc, and glTranslateDemo.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7 Data Structure Documentation

922

7
7.1

Data Structure Documentation


ColorSensorReadType Struct Reference

Parameters for the ColorSensorRead system call. #include <NXCDefs.h> Data Fields 7.1.1 char Result byte Port int ColorValue unsigned int RawArray [ ] unsigned int NormalizedArray [ ] int ScaledArray [ ] bool Invalid Detailed Description

Parameters for the ColorSensorRead system call. This structure is used when calling the SysColorSensorRead system call function. Choose the sensor port (Input port constants) and after calling the function read the sensor values from the ColorValue eld or the raw, normalized, or scaled value arrays. See also: SysColorSensorRead() Examples: ex_SysColorSensorRead.nxc. 7.1.2 7.1.2.1 Field Documentation int ColorSensorReadType::ColorValue The color value returned by the sensor. See the Color values group. Examples: ex_SysColorSensorRead.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.2

CommBTCheckStatusType Struct Reference

923

7.1.2.2

bool ColorSensorReadType::Invalid Are the sensor values valid?

7.1.2.3

unsigned int ColorSensorReadType::NormalizedArray[ ]

Normalized color values returned by the sensor. See the Color sensor array indices group. 7.1.2.4 byte ColorSensorReadType::Port The sensor port. See the constants in the Input port constants group. Examples: ex_SysColorSensorRead.nxc.

7.1.2.5

unsigned int ColorSensorReadType::RawArray[ ]

Raw color values returned by the sensor. See the Color sensor array indices group. 7.1.2.6 char ColorSensorReadType::Result The function call result. NO_ERR means it succeeded. Examples: ex_SysColorSensorRead.nxc.

7.1.2.7

int ColorSensorReadType::ScaledArray[ ]

Scaled color values returned by the sensor. See the Color sensor array indices group. The documentation for this struct was generated from the following le: NXCDefs.h

7.2

CommBTCheckStatusType Struct Reference

Parameters for the CommBTCheckStatus system call. #include <NXCDefs.h>


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.3

CommBTConnectionType Struct Reference

924

Data Fields char Result byte Connection 7.2.1 Detailed Description

Parameters for the CommBTCheckStatus system call. This structure is used when calling the SysCommBTCheckStatus system call function. See also: SysCommBTCheckStatus() Examples: ex_syscommbtcheckstatus.nxc. 7.2.2 7.2.2.1 Field Documentation byte CommBTCheckStatusType::Connection The connection to check. Examples: ex_syscommbtcheckstatus.nxc.

7.2.2.2

char CommBTCheckStatusType::Result

The function call result. Possible values include ERR_INVALID_PORT, STAT_COMM_PENDING, ERR_COMM_CHAN_NOT_READY, and LDR_SUCCESS. Examples: ex_syscommbtcheckstatus.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.3

CommBTConnectionType Struct Reference

Parameters for the CommBTConnection system call. #include <NXCDefs.h>


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.3

CommBTConnectionType Struct Reference

925

Data Fields 7.3.1 unsigned int Result byte Action string Name byte ConnectionSlot Detailed Description

Parameters for the CommBTConnection system call. This structure is used when calling the SysCommBTConnection system call function. See also: SysCommBTConnection() Examples: ex_syscommbtconnection.nxc. 7.3.2 7.3.2.1 Field Documentation byte CommBTConnectionType::Action The connection action (connect or disconnect). Examples: ex_syscommbtconnection.nxc.

7.3.2.2

byte CommBTConnectionType::ConnectionSlot The connection slot to connect or disconnect.

Examples: ex_syscommbtconnection.nxc.

7.3.2.3

string CommBTConnectionType::Name The name of the device to connect or disconnect.

Examples: ex_syscommbtconnection.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.4

CommBTOnOffType Struct Reference

926

7.3.2.4

unsigned int CommBTConnectionType::Result The function call result.

Examples: ex_syscommbtconnection.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.4

CommBTOnOffType Struct Reference

Parameters for the CommBTOnOff system call. #include <NXCDefs.h> Data Fields unsigned int Result bool PowerState 7.4.1 Detailed Description

Parameters for the CommBTOnOff system call. This structure is used when calling the SysCommBTOnOff system call function. See also: SysCommBTOnOff() Examples: ex_SysCommBTOnOff.nxc. 7.4.2 7.4.2.1 Field Documentation bool CommBTOnOffType::PowerState If true then turn on bluetooth, otherwise, turn it off. Examples: ex_SysCommBTOnOff.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.5

CommBTWriteType Struct Reference

927

7.4.2.2

unsigned int CommBTOnOffType::Result The function call result.

Examples: ex_SysCommBTOnOff.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.5

CommBTWriteType Struct Reference

Parameters for the CommBTWrite system call. #include <NXCDefs.h> Data Fields char Result byte Connection byte Buffer [ ] 7.5.1 Detailed Description

Parameters for the CommBTWrite system call. This structure is used when calling the SysCommBTWrite system call function. See also: SysCommBTWrite() Examples: ex_syscommbtwrite.nxc. 7.5.2 7.5.2.1 Field Documentation byte CommBTWriteType::Buffer[ ] The data to write to the connection. Examples: ex_syscommbtwrite.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.6

CommExecuteFunctionType Struct Reference

928

7.5.2.2

byte CommBTWriteType::Connection The connection to use.

Examples: ex_syscommbtwrite.nxc.

7.5.2.3

char CommBTWriteType::Result

The function call result. Possible values include ERR_COMM_CHAN_NOT_READY and STAT_COMM_PENDING (write accepted). The documentation for this struct was generated from the following le: NXCDefs.h

7.6

CommExecuteFunctionType Struct Reference

Parameters for the CommExecuteFunction system call. #include <NXCDefs.h> Data Fields 7.6.1 unsigned int Result byte Cmd byte Param1 byte Param2 byte Param3 string Name unsigned int RetVal Detailed Description

Parameters for the CommExecuteFunction system call. This structure is used when calling the SysCommExecuteFunction system call function. The elds usage depends on the requested command and are documented in the table below. If a eld member is shown as x it is ignored by the specied command.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.6

CommExecuteFunctionType Struct Reference

929

Cmd INTF_SENDFILE INTF_SEARCH INTF_STOPSEARCH INTF_CONNECT INTF_DISCONNECT INTF_DISCONNECTALL INTF_REMOVEDEVICE INTF_VISIBILITY INTF_SETCMDMODE INTF_OPENSTREAM INTF_SENDDATA INTF_FACTORYRESET INTF_BTON INTF_BTOFF INTF_SETBTNAME INTF_EXTREAD INTF_PINREQ INTF_CONNECTREQ

Meaning Send a le over a Bluetooth connection Search for Bluetooth devices Stop searching for Bluetooth devices Connect to a Bluetooth device Disconnect a Bluetooth device Disconnect all Bluetooth devices Remove device from My Contacts Set Bluetooth visibility Set command mode Open a stream Send data Bluetooth factory reset Turn Bluetooth on Turn Bluetooth off Set Bluetooth name Handle external? read Handle Blueooth PIN request Handle Bluetooth connect request (Param1,Param2,Param3,Name) (Connection,x,x,Filename) (x,x,x,x) (x,x,x,x) (DeviceIndex,Connection,x,x) (Connection,x,x,x) (x,x,x,x) (DeviceIndex,x,x,x) (true/false,x,x,x) (x,x,x,x) (x,Connection,x,x) (Length, Connection, WaitForIt, Buffer) (x,x,x,x) (x,x,x,x) (x,x,x,x) (x,x,x,x) (x,x,x,x) (x,x,x,x) (x,x,x,x)

See also: SysCommExecuteFunction() Examples: ex_syscommexecutefunction.nxc. 7.6.2 7.6.2.1 Field Documentation byte CommExecuteFunctionType::Cmd The command to execute.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.7

CommHSCheckStatusType Struct Reference

930

Examples: ex_syscommexecutefunction.nxc.

7.6.2.2

string CommExecuteFunctionType::Name The name parameter, see table.

7.6.2.3

byte CommExecuteFunctionType::Param1 The rst parameter, see table.

7.6.2.4

byte CommExecuteFunctionType::Param2 The second parameter, see table.

7.6.2.5

byte CommExecuteFunctionType::Param3 The third parameter, see table.

7.6.2.6

unsigned int CommExecuteFunctionType::Result The function call result. Possible values include Loader module error codes.

7.6.2.7

unsigned int CommExecuteFunctionType::RetVal

The function call return value. Possible values include Loader module error codes. The documentation for this struct was generated from the following le: NXCDefs.h

7.7

CommHSCheckStatusType Struct Reference

Parameters for the CommHSCheckStatus system call. #include <NXCDefs.h> Data Fields bool SendingData bool DataAvailable
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.8

CommHSControlType Struct Reference

931

7.7.1

Detailed Description

Parameters for the CommHSCheckStatus system call. This structure is used when calling the SysCommHSCheckStatus system call function. See also: SysCommHSCheckStatus() Examples: ex_SysCommHSCheckStatus.nxc. 7.7.2 7.7.2.1 Field Documentation bool CommHSCheckStatusType::DataAvailable Is data available for reading? Examples: ex_SysCommHSCheckStatus.nxc.

7.7.2.2

bool CommHSCheckStatusType::SendingData Is data currently being sent?

Examples: ex_SysCommHSCheckStatus.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.8

CommHSControlType Struct Reference

Parameters for the CommHSControl system call. #include <NXCDefs.h> Data Fields char Result
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.8

CommHSControlType Struct Reference

932

byte Command byte BaudRate unsigned int Mode 7.8.1 Detailed Description

Parameters for the CommHSControl system call. This structure is used when calling the SysCommHSControl system call function. See also: SysCommHSControl() Examples: ex_SysCommHSControl.nxc. 7.8.2 7.8.2.1 Field Documentation byte CommHSControlType::BaudRate The hi-speed port baud rate. See Hi-speed port baud rate constants. 7.8.2.2 byte CommHSControlType::Command

The hi-speed port conguration command. See Hi-speed port SysCommHSControl constants. Examples: ex_SysCommHSControl.nxc.

7.8.2.3

unsigned int CommHSControlType::Mode

The hi-speed port mode. See Hi-speed port data bits constants, Hi-speed port stop bits constants, Hi-speed port parity constants, and Hi-speed port combined UART constants. 7.8.2.4 char CommHSControlType::Result The function call result.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.9

CommHSReadWriteType Struct Reference

933

Todo values? Examples: ex_SysCommHSControl.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.9

CommHSReadWriteType Struct Reference

Parameters for the CommHSReadWrite system call. #include <NXCDefs.h> Data Fields char Status byte Buffer [ ] 7.9.1 Detailed Description

Parameters for the CommHSReadWrite system call. This structure is used when calling the SysCommHSRead and SysCommHSWrite system call functions. See also: SysCommHSRead(), SysCommHSWrite() Examples: ex_SysCommHSRead.nxc, and ex_SysCommHSWrite.nxc. 7.9.2 7.9.2.1 Field Documentation byte CommHSReadWriteType::Buffer[ ]

The buffer of data to write or to contain the data read from the hi-speed port. Examples: ex_SysCommHSRead.nxc, and ex_SysCommHSWrite.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.10

CommLSCheckStatusType Struct Reference

934

7.9.2.2

char CommHSReadWriteType::Status The result of the function call.

Examples: ex_SysCommHSRead.nxc, and ex_SysCommHSWrite.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.10

CommLSCheckStatusType Struct Reference

Parameters for the CommLSCheckStatus system call. #include <NXCDefs.h> Data Fields char Result byte Port byte BytesReady 7.10.1 Detailed Description

Parameters for the CommLSCheckStatus system call. This structure is used when calling the SysCommLSCheckStatus system call function. See also: SysCommLSCheckStatus() Examples: ex_syscommlscheckstatus.nxc. 7.10.2 7.10.2.1 Field Documentation byte CommLSCheckStatusType::BytesReady The number of bytes ready to read from the specied port.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.11

CommLSReadType Struct Reference

935

7.10.2.2

byte CommLSCheckStatusType::Port The port to which the I2C device is connected.

Examples: ex_syscommlscheckstatus.nxc.

7.10.2.3

char CommLSCheckStatusType::Result

The function call result. Possible values include ERR_COMM_BUS_ERR, ERR_COMM_CHAN_INVALID, ERR_COMM_CHAN_NOT_READY, STAT_COMM_PENDING, and NO_ERR. Examples: ex_syscommlscheckstatus.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.11

CommLSReadType Struct Reference

Parameters for the CommLSRead system call. #include <NXCDefs.h> Data Fields 7.11.1 char Result byte Port byte Buffer [ ] byte BufferLen Detailed Description

Parameters for the CommLSRead system call. This structure is used when calling the SysCommLSRead system call function. See also: SysCommLSRead()

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.11

CommLSReadType Struct Reference

936

Examples: ex_syscommlsread.nxc. 7.11.2 7.11.2.1 Field Documentation byte CommLSReadType::Buffer[ ] The buffer used to store the bytes read from the I2C device. Examples: ex_syscommlsread.nxc.

7.11.2.2

byte CommLSReadType::BufferLen

The size of the output buffer on input. This eld is not updated during the function call. Examples: ex_syscommlsread.nxc.

7.11.2.3

byte CommLSReadType::Port The port to which the I2C device is connected.

Examples: ex_syscommlsread.nxc.

7.11.2.4

char CommLSReadType::Result

The function call result. Possible values include ERR_COMM_BUS_ERR, ERR_COMM_CHAN_INVALID, ERR_COMM_CHAN_NOT_READY, ERR_INVALID_SIZE, STAT_COMM_PENDING, and NO_ERR. The documentation for this struct was generated from the following le: NXCDefs.h

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.12

CommLSWriteExType Struct Reference

937

7.12

CommLSWriteExType Struct Reference

Parameters for the CommLSWriteEx system call. #include <NXCDefs.h> Data Fields 7.12.1 char Result byte Port byte Buffer [ ] byte ReturnLen bool NoRestartOnRead Detailed Description

Parameters for the CommLSWriteEx system call. This structure is used when calling the SysCommLSWriteEx system call function. See also: SysCommLSWriteEx() Examples: ex_syscommlswriteex.nxc. 7.12.2 7.12.2.1 Field Documentation byte CommLSWriteExType::Buffer[ ] The buffer written to the I2C device. Examples: ex_syscommlswriteex.nxc.

7.12.2.2

bool CommLSWriteExType::NoRestartOnRead Should a restart occur before reading from the device?

Examples: ex_syscommlswriteex.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.13

CommLSWriteType Struct Reference

938

7.12.2.3

byte CommLSWriteExType::Port The port to which the I2C device is connected.

Examples: ex_syscommlswriteex.nxc.

7.12.2.4

char CommLSWriteExType::Result

The function call result. Possible values include ERR_COMM_CHAN_INVALID, ERR_COMM_CHAN_NOT_READY, ERR_INVALID_SIZE, and NO_ERR. Examples: ex_syscommlswriteex.nxc.

7.12.2.5

byte CommLSWriteExType::ReturnLen The number of bytes that you want to read from the I2C device.

Examples: ex_syscommlswriteex.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.13

CommLSWriteType Struct Reference

Parameters for the CommLSWrite system call. #include <NXCDefs.h> Data Fields char Result byte Port byte Buffer [ ] byte ReturnLen

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.13

CommLSWriteType Struct Reference

939

7.13.1

Detailed Description

Parameters for the CommLSWrite system call. This structure is used when calling the SysCommLSWrite system call function. See also: SysCommLSWrite() Examples: ex_syscommlswrite.nxc. 7.13.2 7.13.2.1 Field Documentation byte CommLSWriteType::Buffer[ ] The buffer containing data to be written to the I2C device. Examples: ex_syscommlswrite.nxc.

7.13.2.2

byte CommLSWriteType::Port The port to which the I2C device is connected.

Examples: ex_syscommlswrite.nxc.

7.13.2.3

char CommLSWriteType::Result

The function call result. Possible values include ERR_COMM_CHAN_INVALID, ERR_COMM_CHAN_NOT_READY, ERR_INVALID_SIZE, and NO_ERR. 7.13.2.4 byte CommLSWriteType::ReturnLen

The number of bytes that you want to read from the I2C device after writing the data. If no read is planned set this to zero. Examples: ex_syscommlswrite.nxc.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.14

ComputeCalibValueType Struct Reference

940

The documentation for this struct was generated from the following le: NXCDefs.h

7.14

ComputeCalibValueType Struct Reference

Parameters for the ComputeCalibValue system call. #include <NXCDefs.h> Data Fields byte Result string Name unsigned int RawVal 7.14.1 Detailed Description

Parameters for the ComputeCalibValue system call. This structure is used when calling the SysComputeCalibValue system call function. See also: SysComputeCalibValue() Examples: ex_SysComputeCalibValue.nxc. 7.14.2 7.14.2.1 Field Documentation string ComputeCalibValueType::Name The name of the sensor calibration cache. Todo ?. Examples: ex_SysComputeCalibValue.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.15

DatalogGetTimesType Struct Reference

941

7.14.2.2

unsigned int ComputeCalibValueType::RawVal The raw value.

Todo ?. Examples: ex_SysComputeCalibValue.nxc.

7.14.2.3

byte ComputeCalibValueType::Result The function call result.

Todo ?. Examples: ex_SysComputeCalibValue.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.15

DatalogGetTimesType Struct Reference

Parameters for the DatalogGetTimes system call. #include <NXCDefs.h> Data Fields unsigned long SyncTime unsigned long SyncTick 7.15.1 Detailed Description

Parameters for the DatalogGetTimes system call. This structure is used when calling the SysDatalogGetTimes system call function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.16

DatalogWriteType Struct Reference

942

See also: SysDatalogGetTimes() Examples: ex_sysdataloggettimes.nxc. 7.15.2 7.15.2.1 Field Documentation unsigned long DatalogGetTimesType::SyncTick The datalog synchronized tick. Examples: ex_sysdataloggettimes.nxc.

7.15.2.2

unsigned long DatalogGetTimesType::SyncTime The datalog synchronized time.

Examples: ex_sysdataloggettimes.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.16

DatalogWriteType Struct Reference

Parameters for the DatalogWrite system call. #include <NXCDefs.h> Data Fields char Result byte Message [ ]

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.17

DisplayExecuteFunctionType Struct Reference

943

7.16.1

Detailed Description

Parameters for the DatalogWrite system call. This structure is used when calling the SysDatalogWrite system call function. See also: SysDatalogWrite() Examples: ex_SysDatalogWrite.nxc. 7.16.2 7.16.2.1 Field Documentation byte DatalogWriteType::Message[ ] A buffer containing data to write to the datalog. Examples: ex_SysDatalogWrite.nxc.

7.16.2.2

char DatalogWriteType::Result The function call result. NO_ERR means it succeeded.

Examples: ex_SysDatalogWrite.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.17

DisplayExecuteFunctionType Struct Reference

Parameters for the DisplayExecuteFunction system call. #include <NXCDefs.h> Data Fields byte Status
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.17

DisplayExecuteFunctionType Struct Reference

944

7.17.1

byte Cmd bool On byte X1 byte Y1 byte X2 byte Y2 Detailed Description

Parameters for the DisplayExecuteFunction system call. This structure is used when calling the SysDisplayExecuteFunction system call function. The elds usage depends on the requested command and are documented in the table below. If a eld member is shown as x it is ignored by the specied display command. Cmd DISPLAY_ERASE_ALL DISPLAY_PIXEL DISPLAY_HORIZONTAL_LINE DISPLAY_VERTICAL_LINE DISPLAY_CHAR DISPLAY_ERASE_LINE DISPLAY_FILL_REGION DISPLAY_FILLED_FRAME See also: SysDisplayExecuteFunction() Examples: ex_dispfunc.nxc, and ex_sysdisplayexecutefunction.nxc. 7.17.2 7.17.2.1 Field Documentation byte DisplayExecuteFunctionType::Cmd The command to execute. Examples: ex_dispfunc.nxc, and ex_sysdisplayexecutefunction.nxc. Meaning erase entire screen set pixel (on/off) draw horizontal line draw vertical line draw char (actual font) erase a single line ll screen region draw a frame (on / off) Expected parameters () (true/false,X1,Y1,x,x) (true/false,X1,Y1,X2,x) (true/false,X1,Y1,x,Y2) (true/false,X1,Y1,Char,x) (x,LINE,x,x,x) (true/false,X1,Y1,X2,Y2) (true/false,X1,Y1,X2,Y2)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.17

DisplayExecuteFunctionType Struct Reference

945

7.17.2.2

bool DisplayExecuteFunctionType::On The On parameter, see table.

Examples: ex_dispfunc.nxc.

7.17.2.3

byte DisplayExecuteFunctionType::Status The function call result, always NO_ERR.

7.17.2.4

byte DisplayExecuteFunctionType::X1 The X1 parameter, see table.

Examples: ex_dispfunc.nxc.

7.17.2.5

byte DisplayExecuteFunctionType::X2 The X2 parameter, see table.

Examples: ex_dispfunc.nxc.

7.17.2.6

byte DisplayExecuteFunctionType::Y1 The Y1 parameter, see table.

Examples: ex_dispfunc.nxc.

7.17.2.7

byte DisplayExecuteFunctionType::Y2 The Y2 parameter, see table.

The documentation for this struct was generated from the following le: NXCDefs.h
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.18

div_t Struct Reference

946

7.18

div_t Struct Reference

Output type of the div function. #include <NXCDefs.h> Data Fields int quot int rem 7.18.1 Detailed Description

Output type of the div function. div_t structure. Structure used to represent the value of an integral division performed by div. It has two members of the same type, dened in either order as: int quot; int rem;. See also: div() Examples: ex_div.nxc. 7.18.2 7.18.2.1 Field Documentation int div_t::quot

Represents the quotient of the integral division operation performed by div, which is the integer of lesser magnitude that is nearest to the algebraic quotient. Examples: ex_div.nxc.

7.18.2.2

int div_t::rem

Represents the remainder of the integral division operation performed by div, which is the integer resulting from subtracting quot to the numerator of the operation. Examples: ex_div.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.19

DrawCircleType Struct Reference

947

The documentation for this struct was generated from the following le: NXCDefs.h

7.19

DrawCircleType Struct Reference

Parameters for the DrawCircle system call. #include <NXCDefs.h> Data Fields 7.19.1 char Result LocationType Center byte Size unsigned long Options Detailed Description

Parameters for the DrawCircle system call. This structure is used when calling the SysDrawCircle system call function. It lets you specify the center of the circle to draw using the LocationType structure member, the radius, as well as drawing options dened in the Drawing option constants group. See also: SysDrawCircle() Examples: ex_sysdrawcircle.nxc. 7.19.2 7.19.2.1 Field Documentation LocationType DrawCircleType::Center The location of the circle center. Examples: ex_sysdrawcircle.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.20

DrawEllipseType Struct Reference

948

7.19.2.2

unsigned long DrawCircleType::Options The options to use when writing to the LCD. Drawing option constants

Examples: ex_sysdrawcircle.nxc.

7.19.2.3

char DrawCircleType::Result The function call result. NO_ERR means it succeeded.

7.19.2.4

byte DrawCircleType::Size The circle radius.

Examples: ex_sysdrawcircle.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.20

DrawEllipseType Struct Reference

Parameters for the DrawEllipse system call. #include <NXCDefs.h> Data Fields 7.20.1 char Result LocationType Center byte SizeX byte SizeY unsigned long Options Detailed Description

Parameters for the DrawEllipse system call. This structure is used when calling the SysDrawEllipse system call function. It lets you specify the center of the ellipse using the LocationType structure member, the x and y axis radii, as well as drawing options dened in the Drawing option constants group.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.20

DrawEllipseType Struct Reference

949

See also: SysDrawEllipse() Examples: ex_SysDrawEllipse.nxc. 7.20.2 7.20.2.1 Field Documentation LocationType DrawEllipseType::Center The location of the ellipse center. Examples: ex_SysDrawEllipse.nxc.

7.20.2.2

unsigned long DrawEllipseType::Options The options to use when writing to the LCD. Drawing option constants

Examples: ex_SysDrawEllipse.nxc.

7.20.2.3

char DrawEllipseType::Result The function call result. NO_ERR means it succeeded.

7.20.2.4

byte DrawEllipseType::SizeX The horizontal ellipse radius.

Examples: ex_SysDrawEllipse.nxc.

7.20.2.5

byte DrawEllipseType::SizeY The vertical ellipse radius.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.21

DrawFontType Struct Reference

950

Examples: ex_SysDrawEllipse.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.21

DrawFontType Struct Reference

Parameters for the DrawFont system call. #include <NXCDefs.h> Data Fields 7.21.1 char Result LocationType Location string Filename string Text unsigned long Options Detailed Description

Parameters for the DrawFont system call. This structure is used when calling the SysDrawFont system call function. It lets you specify the text to draw, the LCD line and horizontal position using the LocationType structure member, as well as drawing options dened in the Drawing option constants group. See also: SysDrawFont() Examples: ex_dispftout.nxc, and ex_sysdrawfont.nxc. 7.21.2 7.21.2.1 Field Documentation string DrawFontType::Filename The lename of the RIC-based font le. Examples: ex_dispftout.nxc, and ex_sysdrawfont.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.22

DrawGraphicArrayType Struct Reference

951

7.21.2.2

LocationType DrawFontType::Location The location in X, LCD line number coordinates.

Examples: ex_dispftout.nxc, and ex_sysdrawfont.nxc.

7.21.2.3

unsigned long DrawFontType::Options The options to use when writing to the LCD. Drawing option constants

Examples: ex_dispftout.nxc, and ex_sysdrawfont.nxc.

7.21.2.4

char DrawFontType::Result The function call result. NO_ERR means it succeeded.

7.21.2.5

string DrawFontType::Text The text to draw on the LCD.

Examples: ex_dispftout.nxc, and ex_sysdrawfont.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.22

DrawGraphicArrayType Struct Reference

Parameters for the DrawGraphicArray system call. #include <NXCDefs.h> Data Fields char Result LocationType Location byte Data [ ] long Variables [ ] unsigned long Options

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.22

DrawGraphicArrayType Struct Reference

952

7.22.1

Detailed Description

Parameters for the DrawGraphicArray system call. This structure is used when calling the SysDrawGraphicArray system call function. It lets you specify the screen location at which to draw the image using the LocationType structure member, the graphic image data array, the image parameters (if needed), as well as drawing options dened in the Drawing option constants group. See also: SysDrawGraphicArray() Examples: ex_dispgout.nxc, and ex_sysdrawgraphicarray.nxc. 7.22.2 7.22.2.1 Field Documentation byte DrawGraphicArrayType::Data[ ] A byte array containing the RIC opcodes. RIC Macro Wrappers Examples: ex_dispgout.nxc, and ex_sysdrawgraphicarray.nxc.

7.22.2.2

LocationType DrawGraphicArrayType::Location The location on screen.

Examples: ex_dispgout.nxc, and ex_sysdrawgraphicarray.nxc.

7.22.2.3

unsigned long DrawGraphicArrayType::Options The options to use when writing to the LCD. Drawing option constants

Examples: ex_dispgout.nxc.

7.22.2.4

char DrawGraphicArrayType::Result The function call result. NO_ERR means it succeeded.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.23

DrawGraphicType Struct Reference

953

7.22.2.5

long DrawGraphicArrayType::Variables[ ] The variables passed as RIC arguments.

The documentation for this struct was generated from the following le: NXCDefs.h

7.23

DrawGraphicType Struct Reference

Parameters for the DrawGraphic system call. #include <NXCDefs.h> Data Fields 7.23.1 char Result LocationType Location string Filename long Variables [ ] unsigned long Options Detailed Description

Parameters for the DrawGraphic system call. This structure is used when calling the SysDrawGraphic system call function. It lets you specify the screen location at which to draw the image using the LocationType structure member, the lename of the graphic image, the image parameters (if needed), as well as drawing options dened in the Drawing option constants group. See also: SysDrawGraphic() Examples: ex_sysdrawgraphic.nxc. 7.23.2 7.23.2.1 Field Documentation string DrawGraphicType::Filename The RIC le name.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.24

DrawLineType Struct Reference

954

Examples: ex_sysdrawgraphic.nxc.

7.23.2.2

LocationType DrawGraphicType::Location The location on screen.

Examples: ex_sysdrawgraphic.nxc.

7.23.2.3

unsigned long DrawGraphicType::Options The options to use when writing to the LCD. Drawing option constants

Examples: ex_sysdrawgraphic.nxc.

7.23.2.4

char DrawGraphicType::Result

The function call result. Possible values include Loader module error codes, ERR_FILE, and NO_ERR. 7.23.2.5 long DrawGraphicType::Variables[ ] The variables passed as RIC arguments. Examples: ex_sysdrawgraphic.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.24

DrawLineType Struct Reference

Parameters for the DrawLine system call. #include <NXCDefs.h>

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.24

DrawLineType Struct Reference

955

Data Fields 7.24.1 char Result LocationType StartLoc LocationType EndLoc unsigned long Options Detailed Description

Parameters for the DrawLine system call. This structure is used when calling the SysDrawLine system call function. It lets you specify the end points of the line to draw using two LocationType structure member, as well as drawing options dened in the Drawing option constants group. See also: SysDrawLine() Examples: ex_sysdrawline.nxc. 7.24.2 7.24.2.1 Field Documentation LocationType DrawLineType::EndLoc The location of the ending point. Examples: ex_sysdrawline.nxc.

7.24.2.2

unsigned long DrawLineType::Options The options to use when writing to the LCD. Drawing option constants

Examples: ex_sysdrawline.nxc.

7.24.2.3

char DrawLineType::Result The function call result. NO_ERR means it succeeded.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.25

DrawPointType Struct Reference

956

7.24.2.4

LocationType DrawLineType::StartLoc The location of the starting point.

Examples: ex_sysdrawline.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.25

DrawPointType Struct Reference

Parameters for the DrawPoint system call. #include <NXCDefs.h> Data Fields char Result LocationType Location unsigned long Options 7.25.1 Detailed Description

Parameters for the DrawPoint system call. This structure is used when calling the SysDrawPoint system call function. It lets you specify the pixel to draw using the LocationType structure member, as well as drawing options dened in the Drawing option constants group. See also: SysDrawPoint() Examples: ex_sysdrawpoint.nxc. 7.25.2 7.25.2.1 Field Documentation LocationType DrawPointType::Location The point location on screen.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.26

DrawPolygonType Struct Reference

957

Examples: ex_sysdrawpoint.nxc.

7.25.2.2

unsigned long DrawPointType::Options The options to use when writing to the LCD. Drawing option constants

Examples: ex_sysdrawpoint.nxc.

7.25.2.3

char DrawPointType::Result The function call result. NO_ERR means it succeeded.

The documentation for this struct was generated from the following le: NXCDefs.h

7.26

DrawPolygonType Struct Reference

Parameters for the DrawPolygon system call. #include <NXCDefs.h> Data Fields char Result LocationType Points [ ] unsigned long Options 7.26.1 Detailed Description

Parameters for the DrawPolygon system call. This structure is used when calling the SysDrawPolygon system call function. It lets you specify the points of the polygon to draw using the LocationType array structure member, as well as drawing options dened in the Drawing option constants group. See also: SysDrawPolygon()

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.27

DrawRectType Struct Reference

958

Examples: ex_sysdrawpolygon.nxc. 7.26.2 7.26.2.1 Field Documentation unsigned long DrawPolygonType::Options The options to use when writing to the LCD. Drawing option constants Examples: ex_sysdrawpolygon.nxc.

7.26.2.2

LocationType DrawPolygonType::Points[ ] An array of LocationType structures which dene the polygons shape.

Examples: ex_sysdrawpolygon.nxc.

7.26.2.3

char DrawPolygonType::Result The function call result. NO_ERR means it succeeded.

The documentation for this struct was generated from the following le: NXCDefs.h

7.27

DrawRectType Struct Reference

Parameters for the DrawRect system call. #include <NXCDefs.h> Data Fields char Result LocationType Location SizeType Size unsigned long Options

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.27

DrawRectType Struct Reference

959

7.27.1

Detailed Description

Parameters for the DrawRect system call. This structure is used when calling the SysDrawRect system call function. It lets you specify the corner of the rectangle using the LocationType structure member, the width and height of the rectangle using the SizeType structure member, as well as drawing options dened in the Drawing option constants group. See also: SysDrawRect() Examples: ex_sysdrawrect.nxc. 7.27.2 7.27.2.1 Field Documentation LocationType DrawRectType::Location The top left corner location. Examples: ex_sysdrawrect.nxc.

7.27.2.2

unsigned long DrawRectType::Options The options to use when writing to the LCD. Drawing option constants

Examples: ex_sysdrawrect.nxc.

7.27.2.3

char DrawRectType::Result The function call result. NO_ERR means it succeeded.

7.27.2.4

SizeType DrawRectType::Size The width and height of the rectangle.

Examples: ex_sysdrawrect.nxc.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.28

DrawTextType Struct Reference

960

The documentation for this struct was generated from the following le: NXCDefs.h

7.28

DrawTextType Struct Reference

Parameters for the DrawText system call. #include <NXCDefs.h> Data Fields 7.28.1 char Result LocationType Location string Text unsigned long Options Detailed Description

Parameters for the DrawText system call. This structure is used when calling the SysDrawText system call function. It lets you specify the text to draw, the LCD line and horizontal position using the LocationType structure member, as well as drawing options dened in the Drawing option constants group. See also: SysDrawText() Examples: ex_syscall.nxc, and ex_sysdrawtext.nxc. 7.28.2 7.28.2.1 Field Documentation LocationType DrawTextType::Location The location in X, LCD line number coordinates. Examples: ex_syscall.nxc, and ex_sysdrawtext.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.29

FileCloseType Struct Reference

961

7.28.2.2

unsigned long DrawTextType::Options The options to use when writing to the LCD. Drawing option constants

Examples: ex_sysdrawtext.nxc.

7.28.2.3

char DrawTextType::Result The function call result. NO_ERR means it succeeded.

7.28.2.4

string DrawTextType::Text The text to draw on the LCD.

Examples: ex_syscall.nxc, and ex_sysdrawtext.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.29

FileCloseType Struct Reference

Parameters for the FileClose system call. #include <NXCDefs.h> Data Fields unsigned int Result byte FileHandle 7.29.1 Detailed Description

Parameters for the FileClose system call. This structure is used when calling the SysFileClose system call function. See also: SysFileClose()

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.30

FileDeleteType Struct Reference

962

Examples: ex_sysleclose.nxc. 7.29.2 7.29.2.1 Field Documentation byte FileCloseType::FileHandle The le handle to close. Examples: ex_sysleclose.nxc.

7.29.2.2

unsigned int FileCloseType::Result The function call result. Possible values include Loader module error codes.

The documentation for this struct was generated from the following le: NXCDefs.h

7.30

FileDeleteType Struct Reference

Parameters for the FileDelete system call. #include <NXCDefs.h> Data Fields unsigned int Result string Filename 7.30.1 Detailed Description

Parameters for the FileDelete system call. This structure is used when calling the SysFileDelete system call function. See also: SysFileDelete() Examples: ex_sysledelete.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.31

FileFindType Struct Reference

963

7.30.2 7.30.2.1

Field Documentation string FileDeleteType::Filename The name of the le to delete.

Examples: ex_sysledelete.nxc.

7.30.2.2

unsigned int FileDeleteType::Result The function call result. Possible values include Loader module error codes.

The documentation for this struct was generated from the following le: NXCDefs.h

7.31

FileFindType Struct Reference

Parameters for the FileFind system call. #include <NXCDefs.h> Data Fields 7.31.1 unsigned int Result byte FileHandle string Filename unsigned long Length Detailed Description

Parameters for the FileFind system call. This structure is used when calling the SysFileFindFirst and SysFileFindNext system call functions. See also: SysFileFindFirst() and SysFileFindNext() Examples: ex_syslendrst.nxc, and ex_syslendnext.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.32

FileOpenType Struct Reference

964

7.31.2 7.31.2.1

Field Documentation byte FileFindType::FileHandle

The returned le handle to be used to continue iterations. Close it after usage. Examples: ex_syslendnext.nxc.

7.31.2.2

string FileFindType::Filename The pattern to match le name, then the returned found le name.

Examples: ex_syslendrst.nxc, and ex_syslendnext.nxc.

7.31.2.3

unsigned long FileFindType::Length The found le length.

7.31.2.4

unsigned int FileFindType::Result The function call result. Possible values include Loader module error codes.

The documentation for this struct was generated from the following le: NXCDefs.h

7.32

FileOpenType Struct Reference

Parameters for the FileOpen system call. #include <NXCDefs.h> Data Fields unsigned int Result byte FileHandle string Filename unsigned long Length

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.32

FileOpenType Struct Reference

965

7.32.1

Detailed Description

Parameters for the FileOpen system call. This structure is used when calling the SysFileOpenAppend, SysFileOpenRead, SysFileOpenWrite, SysFileOpenReadLinear, SysFileOpenWriteLinear and SysFileOpenWriteNonLinear system call functions. See also: SysFileOpenAppend(), SysFileOpenRead(), SysFileOpenWrite(), SysFileOpenReadLinear(), SysFileOpenWriteLinear() Examples: ex_sysleopenappend.nxc, ex_sysleopenread.nxc, ex_sysleopenreadlinear.nxc, ex_sysleopenwrite.nxc, ex_sysleopenwritelinear.nxc, and ex_sysleopenwritenonlinear.nxc. 7.32.2 7.32.2.1 Field Documentation byte FileOpenType::FileHandle The returned le handle to use for subsequent le operations. 7.32.2.2 string FileOpenType::Filename The name of the le to open or create. Examples: ex_sysleopenappend.nxc, ex_sysleopenread.nxc, ex_sysleopenreadlinear.nxc, ex_sysleopenwrite.nxc, ex_sysleopenwritelinear.nxc, and ex_sysleopenwritenonlinear.nxc.

7.32.2.3

unsigned long FileOpenType::Length

For SysFileOpenWrite(), SysFileOpenWriteLinear() and SysFileOpenWriteNonLinear(): the desired maximum le capacity. For SysFileOpenAppend(), SysFileOpenRead() and SysFileOpenReadLinear(): the returned available length in the le. Examples: ex_sysleopenwrite.nxc, ex_sysleopenwritelinear.nxc, sysleopenwritenonlinear.nxc. and ex_-

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.33

FileReadWriteType Struct Reference

966

7.32.2.4

unsigned int FileOpenType::Result

The function call result. Possible values include Loader module error codes. Examples: ex_sysleopenappend.nxc, ex_sysleopenread.nxc, ex_sysleopenreadlinear.nxc, ex_sysleopenwrite.nxc, ex_sysleopenwritelinear.nxc, and ex_sysleopenwritenonlinear.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.33

FileReadWriteType Struct Reference

Parameters for the FileReadWrite system call. #include <NXCDefs.h> Data Fields 7.33.1 unsigned int Result byte FileHandle string Buffer unsigned long Length Detailed Description

Parameters for the FileReadWrite system call. This structure is used when calling the SysFileRead and SysFileWrite system call functions. See also: SysFileRead() and SysFileWrite() Examples: ex_sysleread.nxc, and ex_syslewrite.nxc. 7.33.2 7.33.2.1 Field Documentation string FileReadWriteType::Buffer The buffer to store read bytes or containing bytes to write.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.34

FileRenameType Struct Reference

967

Examples: ex_sysleread.nxc, and ex_syslewrite.nxc.

7.33.2.2

byte FileReadWriteType::FileHandle The le handle to access.

Examples: ex_sysleread.nxc, and ex_syslewrite.nxc.

7.33.2.3

unsigned long FileReadWriteType::Length The number of bytes to read or the returned number of bytes written.

Examples: ex_sysleread.nxc, and ex_syslewrite.nxc.

7.33.2.4

unsigned int FileReadWriteType::Result

The function call result. Possible values include Loader module error codes. Examples: ex_sysleread.nxc, and ex_syslewrite.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.34

FileRenameType Struct Reference

Parameters for the FileRename system call. #include <NXCDefs.h> Data Fields unsigned int Result string OldFilename string NewFilename

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.34

FileRenameType Struct Reference

968

7.34.1

Detailed Description

Parameters for the FileRename system call. This structure is used when calling the SysFileRename system call function. See also: SysFileRename() Examples: ex_syslerename.nxc. 7.34.2 7.34.2.1 Field Documentation string FileRenameType::NewFilename The new name to give to the le. Examples: ex_syslerename.nxc.

7.34.2.2

string FileRenameType::OldFilename The name of the le to be renamed.

Examples: ex_syslerename.nxc.

7.34.2.3

unsigned int FileRenameType::Result

The function call result. Possible values include Loader module error codes. Examples: ex_syslerename.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.35

FileResizeType Struct Reference

969

7.35

FileResizeType Struct Reference

Parameters for the FileResize system call. #include <NXCDefs.h> Data Fields unsigned int Result byte FileHandle unsigned int NewSize 7.35.1 Detailed Description

Parameters for the FileResize system call. This structure is used when calling the SysFileResize system call function. See also: SysFileResize() Examples: ex_sysleresize.nxc. 7.35.2 7.35.2.1 Field Documentation byte FileResizeType::FileHandle The handle of the le to resize. Examples: ex_sysleresize.nxc.

7.35.2.2

unsigned int FileResizeType::NewSize The new le size.

Examples: ex_sysleresize.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.36

FileResolveHandleType Struct Reference

970

7.35.2.3

unsigned int FileResizeType::Result

The function call result. Possible values include Loader module error codes. Examples: ex_sysleresize.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.36

FileResolveHandleType Struct Reference

Parameters for the FileResolveHandle system call. #include <NXCDefs.h> Data Fields 7.36.1 unsigned int Result byte FileHandle bool WriteHandle string Filename Detailed Description

Parameters for the FileResolveHandle system call. This structure is used when calling the SysFileResolveHandle system call function. See also: SysFileResolveHandle() Examples: ex_sysleresolvehandle.nxc. 7.36.2 7.36.2.1 Field Documentation byte FileResolveHandleType::FileHandle The returned resolved le handle.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.37

FileSeekType Struct Reference

971

7.36.2.2

string FileResolveHandleType::Filename The name of the le for which to resolve a handle.

Examples: ex_sysleresolvehandle.nxc.

7.36.2.3

unsigned int FileResolveHandleType::Result

The function call result. Possible values include LDR_HANDLEALREADYCLOSED and LDR_SUCCESS. Examples: ex_sysleresolvehandle.nxc.

7.36.2.4

bool FileResolveHandleType::WriteHandle True if the returned handle is a write handle.

Examples: ex_sysleresolvehandle.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.37

FileSeekType Struct Reference

Parameters for the FileSeek system call. #include <NXCDefs.h> Data Fields unsigned int Result byte FileHandle byte Origin long Length

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.37

FileSeekType Struct Reference

972

7.37.1

Detailed Description

Parameters for the FileSeek system call. This structure is used when calling the SysFileSeek system call function. See also: SysFileSeek() Examples: ex_sysleseek.nxc. 7.37.2 7.37.2.1 Field Documentation byte FileSeekType::FileHandle The handle of the le to seek in. Examples: ex_sysleseek.nxc.

7.37.2.2

long FileSeekType::Length The offset from the origin to seek to.

Examples: ex_sysleseek.nxc.

7.37.2.3

byte FileSeekType::Origin The origin of the le seek operation. See fseek origin constants.

Examples: ex_sysleseek.nxc.

7.37.2.4

unsigned int FileSeekType::Result

The function call result. Possible values include Loader module error codes.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.38

FileTellType Struct Reference

973

Examples: ex_sysleseek.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.38

FileTellType Struct Reference

Parameters for the FileTell system call. #include <NXCDefs.h> Data Fields unsigned int Result byte FileHandle unsigned long Position 7.38.1 Detailed Description

Parameters for the FileTell system call. This structure is used when calling the SysFileTell system call function. See also: SysFileTell() 7.38.2 7.38.2.1 Field Documentation byte FileTellType::FileHandle The handle of the open le. 7.38.2.2 unsigned long FileTellType::Position The current le position in the open le. 7.38.2.3 unsigned int FileTellType::Result The function call result. Possible values include Loader module error codes. The documentation for this struct was generated from the following le:
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.39

GetStartTickType Struct Reference

974

NXCDefs.h

7.39

GetStartTickType Struct Reference

Parameters for the GetStartTick system call. #include <NXCDefs.h> Data Fields unsigned long Result 7.39.1 Detailed Description

Parameters for the GetStartTick system call. This structure is used when calling the SysGetStartTick system call function. See also: SysGetStartTick() Examples: ex_sysgetstarttick.nxc. 7.39.2 7.39.2.1 Field Documentation unsigned long GetStartTickType::Result The returned tick value. Examples: ex_sysgetstarttick.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.40

InputValuesType Struct Reference

Parameters for the RemoteGetInputValues function. #include <NXCDefs.h>


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.40

InputValuesType Struct Reference

975

Data Fields 7.40.1 byte Port bool Valid bool Calibrated byte SensorType byte SensorMode unsigned int RawValue unsigned int NormalizedValue int ScaledValue int CalibratedValue Detailed Description

Parameters for the RemoteGetInputValues function. This structure is used when calling the RemoteGetInputValues function. Choose the sensor port (Input port constants) and after calling the function read the sensor values from the various structure elds. Examples: ex_RemoteGetInputValues.nxc. 7.40.2 7.40.2.1 Field Documentation bool InputValuesType::Calibrated Is the sensor calibrated? 7.40.2.2 int InputValuesType::CalibratedValue The calibrated value. 7.40.2.3 unsigned int InputValuesType::NormalizedValue The normalized value. 7.40.2.4 byte InputValuesType::Port The sensor port. See the Input port constants group.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.41

IOMapReadByIDType Struct Reference

976

7.40.2.5

unsigned int InputValuesType::RawValue The raw value.

7.40.2.6

int InputValuesType::ScaledValue The scaled value.

7.40.2.7

byte InputValuesType::SensorMode The sensor mode. See the Sensor mode constants group.

7.40.2.8

byte InputValuesType::SensorType The sensor type. See the Sensor type constants group.

7.40.2.9

bool InputValuesType::Valid Is the sensor value valid?

The documentation for this struct was generated from the following le: NXCDefs.h

7.41

IOMapReadByIDType Struct Reference

Parameters for the IOMapReadByID system call. #include <NXCDefs.h> Data Fields char Result unsigned long ModuleID unsigned int Offset unsigned int Count byte Buffer [ ]

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.41

IOMapReadByIDType Struct Reference

977

7.41.1

Detailed Description

Parameters for the IOMapReadByID system call. This structure is used when calling the SysIOMapReadByID system call function. See also: SysIOMapReadByID() Examples: ex_reladdressof.nxc, and ex_sysiomapreadbyid.nxc. 7.41.2 7.41.2.1 Field Documentation byte IOMapReadByIDType::Buffer[ ] The buffer used to store read bytes. Examples: ex_reladdressof.nxc.

7.41.2.2

unsigned int IOMapReadByIDType::Count The number of bytes to read.

Examples: ex_reladdressof.nxc, and ex_sysiomapreadbyid.nxc.

7.41.2.3

unsigned long IOMapReadByIDType::ModuleID The identier of the module to read from. See the NXT rmware module IDs

group. Examples: ex_reladdressof.nxc, and ex_sysiomapreadbyid.nxc.

7.41.2.4

unsigned int IOMapReadByIDType::Offset The offset in the module IOMap where to start reading.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.42

IOMapReadType Struct Reference

978

Examples: ex_reladdressof.nxc, and ex_sysiomapreadbyid.nxc.

7.41.2.5

char IOMapReadByIDType::Result The function call result. NO_ERR means it succeeded.

Examples: ex_sysiomapreadbyid.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.42

IOMapReadType Struct Reference

Parameters for the IOMapRead system call. #include <NXCDefs.h> Data Fields 7.42.1 char Result string ModuleName unsigned int Offset unsigned int Count byte Buffer [ ] Detailed Description

Parameters for the IOMapRead system call. This structure is used when calling the SysIOMapRead system call function. See also: SysIOMapRead() Examples: ex_sysiomapread.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.42

IOMapReadType Struct Reference

979

7.42.2 7.42.2.1

Field Documentation byte IOMapReadType::Buffer[ ] The buffer used to store read bytes.

7.42.2.2

unsigned int IOMapReadType::Count The number of bytes to read.

Examples: ex_sysiomapread.nxc.

7.42.2.3

string IOMapReadType::ModuleName The name of the module to read from. See the NXT rmware module names

group. Examples: ex_sysiomapread.nxc.

7.42.2.4

unsigned int IOMapReadType::Offset The offset in the module IOMap where to start reading.

Examples: ex_sysiomapread.nxc.

7.42.2.5

char IOMapReadType::Result The function call result. NO_ERR means it succeeded.

Examples: ex_sysiomapread.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.43

IOMapWriteByIDType Struct Reference

980

7.43

IOMapWriteByIDType Struct Reference

Parameters for the IOMapWriteByID system call. #include <NXCDefs.h> Data Fields 7.43.1 char Result unsigned long ModuleID unsigned int Offset byte Buffer [ ] Detailed Description

Parameters for the IOMapWriteByID system call. This structure is used when calling the SysIOMapWriteByID system call function. See also: SysIOMapWriteByID() Examples: ex_reladdressof.nxc, and ex_sysiomapwritebyid.nxc. 7.43.2 7.43.2.1 Field Documentation byte IOMapWriteByIDType::Buffer[ ] The buffer containing bytes to write. Examples: ex_reladdressof.nxc, and ex_sysiomapwritebyid.nxc.

7.43.2.2

unsigned long IOMapWriteByIDType::ModuleID

The identier of the module to write to. See the NXT rmware module IDs group. Examples: ex_reladdressof.nxc, and ex_sysiomapwritebyid.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.44

IOMapWriteType Struct Reference

981

7.43.2.3

unsigned int IOMapWriteByIDType::Offset The offset in the module IOMap where to start writing.

Examples: ex_reladdressof.nxc, and ex_sysiomapwritebyid.nxc.

7.43.2.4

char IOMapWriteByIDType::Result The function call result. NO_ERR means it succeeded.

The documentation for this struct was generated from the following le: NXCDefs.h

7.44

IOMapWriteType Struct Reference

Parameters for the IOMapWrite system call. #include <NXCDefs.h> Data Fields 7.44.1 char Result string ModuleName unsigned int Offset byte Buffer [ ] Detailed Description

Parameters for the IOMapWrite system call. This structure is used when calling the SysIOMapWrite system call function. See also: SysIOMapWrite() Examples: ex_sysiomapwrite.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.45

KeepAliveType Struct Reference

982

7.44.2 7.44.2.1

Field Documentation byte IOMapWriteType::Buffer[ ] The buffer containing bytes to write.

Examples: ex_sysiomapwrite.nxc.

7.44.2.2

string IOMapWriteType::ModuleName

The name of the module to write to. See the NXT rmware module names group. Examples: ex_sysiomapwrite.nxc.

7.44.2.3

unsigned int IOMapWriteType::Offset The offset in the module IOMap where to start writing.

Examples: ex_sysiomapwrite.nxc.

7.44.2.4

char IOMapWriteType::Result The function call result. NO_ERR means it succeeded.

The documentation for this struct was generated from the following le: NXCDefs.h

7.45

KeepAliveType Struct Reference

Parameters for the KeepAlive system call. #include <NXCDefs.h> Data Fields unsigned long Result

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.46

ldiv_t Struct Reference

983

7.45.1

Detailed Description

Parameters for the KeepAlive system call. This structure is used when calling the SysKeepAlive system call function. See also: SysKeepAlive() Examples: ex_syskeepalive.nxc. 7.45.2 7.45.2.1 Field Documentation unsigned long KeepAliveType::Result The current sleep timeout in milliseconds. The documentation for this struct was generated from the following le: NXCDefs.h

7.46

ldiv_t Struct Reference

Output type of the ldiv function. #include <NXCDefs.h> Data Fields long quot long rem 7.46.1 Detailed Description

Output type of the ldiv function. Structure used to represent the value of an integral division performed by ldiv. It has two members of the same type, dened in either order as: long quot; long rem;. See also: ldiv() Examples: ex_ldiv.nxc.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.47

ListFilesType Struct Reference

984

7.46.2 7.46.2.1

Field Documentation long ldiv_t::quot

Represents the quotient of the integral division operation performed by div, which is the integer of lesser magnitude that is nearest to the algebraic quotient. Examples: ex_ldiv.nxc.

7.46.2.2

long ldiv_t::rem

Represents the remainder of the integral division operation performed by div, which is the integer resulting from subtracting quot to the numerator of the operation. Examples: ex_ldiv.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.47

ListFilesType Struct Reference

Parameters for the ListFiles system call. #include <NXCDefs.h> Data Fields char Result string Pattern string FileList [ ] 7.47.1 Detailed Description

Parameters for the ListFiles system call. This structure is used when calling the SysListFiles system call function. See also: SysListFiles()
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.48

LoaderExecuteFunctionType Struct Reference

985

Examples: ex_syslistles.nxc. 7.47.2 7.47.2.1 Field Documentation string ListFilesType::FileList[ ]

An array of strings containing the list of lenames that matched the le search pattern. Examples: ex_syslistles.nxc.

7.47.2.2

string ListFilesType::Pattern The le search pattern.

Examples: ex_syslistles.nxc.

7.47.2.3

char ListFilesType::Result

The function call result. Possible values include Loader module error codes. Examples: ex_syslistles.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.48

LoaderExecuteFunctionType Struct Reference

Parameters for the LoaderExecuteFunction system call. #include <NXCDefs.h>

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.48

LoaderExecuteFunctionType Struct Reference

986

Data Fields 7.48.1 unsigned int Result byte Cmd string Filename byte Buffer [ ] unsigned long Length Detailed Description

Parameters for the LoaderExecuteFunction system call. This structure is used when calling the SysLoaderExecuteFunction system call function. The elds usage depends on the requested command and are documented in the table below.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.48

LoaderExecuteFunctionType Struct Reference

987

Cmd LDR_CMD_OPENREAD LDR_CMD_OPENWRITE LDR_CMD_READ LDR_CMD_WRITE LDR_CMD_CLOSE LDR_CMD_DELETE LDR_CMD_FINDFIRST LDR_CMD_FINDNEXT LDR_CMD_OPENWRITELINEAR LDR_CMD_OPENREADLINEAR LDR_CMD_OPENAPPENDDATA LDR_CMD_FINDFIRSTMODULE LDR_CMD_FINDNEXTMODULE LDR_CMD_CLOSEMODHANDLE LDR_CMD_IOMAPREAD LDR_CMD_IOMAPWRITE LDR_CMD_DELETEUSERFLASH LDR_CMD_RENAMEFILE See also:

Meaning Open a le for reading Create a le Read from a le Write to a le Close a le Delete a le Start iterating les Continue iterating les Create a linear le Read a linear le Open a le for writing Start iterating modules Continue iterating modules Close module handle Read IOMap data Write IOMap data Delete all les Rename le

Expected Parameters (Filename, Length) (Filename, Length) (Filename, Buffer, Length) (Filename, Buffer, Length) (Filename) (Filename) (Filename, Buffer, Length) (Filename, Buffer, Length) (Filename, Length) (Filename, Buffer, Length) (Filename, Length) (Filename, Buffer) (Buffer) () (Filename, Buffer, Length) (Filename, Buffer, Length) () (Filename, Buffer, Length)

SysLoaderExecuteFunction() Examples: ex_sysloaderexecutefunction.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.49

LocationType Struct Reference

988

7.48.2 7.48.2.1

Field Documentation byte LoaderExecuteFunctionType::Buffer[ ] The Buffer parameter, see table.

7.48.2.2

byte LoaderExecuteFunctionType::Cmd The command to execute.

Examples: ex_sysloaderexecutefunction.nxc.

7.48.2.3

string LoaderExecuteFunctionType::Filename The Filename parameter, see table.

7.48.2.4

unsigned long LoaderExecuteFunctionType::Length The Length parameter, see table.

7.48.2.5

unsigned int LoaderExecuteFunctionType::Result The function call result. Possible values include Loader module error codes.

The documentation for this struct was generated from the following le: NXCDefs.h

7.49

LocationType Struct Reference

A point on the NXT LCD screen. #include <NXCDefs.h> Data Fields int X int Y

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.49

LocationType Struct Reference

989

7.49.1

Detailed Description

A point on the NXT LCD screen. This structure is by other system call structures to specify an X, Y LCD screen coordinate. See also: DrawTextType, DrawPointType, DrawLineType, DrawCircleType, DrawRectType, DrawGraphicType, DrawGraphicArrayType, DrawPolygonType, DrawEllipseType, DrawFontType Examples: ex_PolyOut.nxc, and ex_sysdrawpolygon.nxc. 7.49.2 7.49.2.1 Field Documentation int LocationType::X The X coordinate. Valid range is from 0 to 99 inclusive. Examples: ex_dispftout.nxc, ex_dispgout.nxc, ex_syscall.nxc, ex_sysdrawcircle.nxc, ex_SysDrawEllipse.nxc, ex_sysdrawfont.nxc, ex_sysdrawgraphic.nxc, ex_sysdrawgraphicarray.nxc, ex_sysdrawline.nxc, ex_sysdrawpoint.nxc, ex_sysdrawrect.nxc, and ex_sysdrawtext.nxc.

7.49.2.2

int LocationType::Y

The Y coordinate. Valid range is from 0 to 63 inclusive. For text drawing this value must be a multiple of 8. Examples: ex_dispftout.nxc, ex_dispgout.nxc, ex_syscall.nxc, ex_sysdrawcircle.nxc, ex_SysDrawEllipse.nxc, ex_sysdrawfont.nxc, ex_sysdrawgraphic.nxc, ex_sysdrawgraphicarray.nxc, ex_sysdrawline.nxc, ex_sysdrawpoint.nxc, ex_sysdrawrect.nxc, and ex_sysdrawtext.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.50

MemoryManagerType Struct Reference

990

7.50

MemoryManagerType Struct Reference

Parameters for the MemoryManager system call. #include <NXCDefs.h> Data Fields 7.50.1 char Result bool Compact unsigned int PoolSize unsigned int DataspaceSize Detailed Description

Parameters for the MemoryManager system call. This structure is used when calling the SysMemoryManager system call function. See also: SysMemoryManager() Examples: ex_sysmemorymanager.nxc. 7.50.2 7.50.2.1 Field Documentation bool MemoryManagerType::Compact Should the dataspace be compacted or not. Examples: ex_sysmemorymanager.nxc.

7.50.2.2

unsigned int MemoryManagerType::DataspaceSize The returned dataspace size.

Examples: ex_sysmemorymanager.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.51

MessageReadType Struct Reference

991

7.50.2.3

unsigned int MemoryManagerType::PoolSize The returned pool size.

Examples: ex_sysmemorymanager.nxc.

7.50.2.4

char MemoryManagerType::Result The returned status value.

The documentation for this struct was generated from the following le: NXCDefs.h

7.51

MessageReadType Struct Reference

Parameters for the MessageRead system call. #include <NXCDefs.h> Data Fields 7.51.1 char Result byte QueueID bool Remove string Message Detailed Description

Parameters for the MessageRead system call. This structure is used when calling the SysMessageRead system call function. See also: SysMessageRead() Examples: ex_sysmessageread.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.52

MessageWriteType Struct Reference

992

7.51.2 7.51.2.1

Field Documentation string MessageReadType::Message The contents of the mailbox/queue.

Examples: ex_sysmessageread.nxc.

7.51.2.2

byte MessageReadType::QueueID The queue identier. See the Mailbox constants group.

Examples: ex_sysmessageread.nxc.

7.51.2.3

bool MessageReadType::Remove If true, remove the read message from the queue.

Examples: ex_sysmessageread.nxc.

7.51.2.4

char MessageReadType::Result The function call result. NO_ERR means it succeeded.

Examples: ex_sysmessageread.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.52

MessageWriteType Struct Reference

Parameters for the MessageWrite system call. #include <NXCDefs.h>


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.52

MessageWriteType Struct Reference

993

Data Fields char Result byte QueueID string Message 7.52.1 Detailed Description

Parameters for the MessageWrite system call. This structure is used when calling the SysMessageWrite system call function. See also: SysMessageWrite() Examples: ex_sysmessagewrite.nxc. 7.52.2 7.52.2.1 Field Documentation string MessageWriteType::Message The message to write. Examples: ex_sysmessagewrite.nxc.

7.52.2.2

byte MessageWriteType::QueueID The queue identier. See the Mailbox constants group.

Examples: ex_sysmessagewrite.nxc.

7.52.2.3

char MessageWriteType::Result The function call result. NO_ERR means it succeeded.

The documentation for this struct was generated from the following le: NXCDefs.h
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.53

OutputStateType Struct Reference

994

7.53

OutputStateType Struct Reference

Parameters for the RemoteGetOutputState function. #include <NXCDefs.h> Data Fields 7.53.1 byte Port char Power byte Mode byte RegMode char TurnRatio byte RunState unsigned long TachoLimit long TachoCount long BlockTachoCount long RotationCount Detailed Description

Parameters for the RemoteGetOutputState function. This structure is used when calling the RemoteGetOutputState function. Choose the sensor port (Output port constants) and after calling the function read the output status values from the various structure elds. Examples: ex_RemoteGetOutputState.nxc. 7.53.2 7.53.2.1 Field Documentation long OutputStateType::BlockTachoCount The current block tachometer count. 7.53.2.2 byte OutputStateType::Mode The output mode. See Output port mode constants group. 7.53.2.3 byte OutputStateType::Port The output port. See the Output port constants group.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.54

RandomNumberType Struct Reference

995

7.53.2.4

char OutputStateType::Power The output power level (-100..100).

7.53.2.5

byte OutputStateType::RegMode

The output regulation mode. See Output port regulation mode constants group. 7.53.2.6 long OutputStateType::RotationCount The current rotation count. 7.53.2.7 byte OutputStateType::RunState The output run state. See Output port run state constants group. 7.53.2.8 long OutputStateType::TachoCount The current tachometer count. 7.53.2.9 unsigned long OutputStateType::TachoLimit The tachometer limit. 7.53.2.10 char OutputStateType::TurnRatio The output turning ratio (-100..100). The documentation for this struct was generated from the following le: NXCDefs.h

7.54

RandomNumberType Struct Reference

Parameters for the RandomNumber system call. #include <NXCDefs.h> Data Fields int Result
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.55

ReadButtonType Struct Reference

996

7.54.1

Detailed Description

Parameters for the RandomNumber system call. This structure is used when calling the SysRandomNumber system call function. See also: SysRandomNumber() Examples: ex_sysrandomnumber.nxc. 7.54.2 7.54.2.1 Field Documentation int RandomNumberType::Result The random number. Examples: ex_sysrandomnumber.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.55

ReadButtonType Struct Reference

Parameters for the ReadButton system call. #include <NXCDefs.h> Data Fields 7.55.1 char Result byte Index bool Pressed byte Count bool Reset Detailed Description

Parameters for the ReadButton system call. This structure is used when calling the SysReadButton system call function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.55

ReadButtonType Struct Reference

997

See also: SysReadButton() Examples: ex_sysreadbutton.nxc. 7.55.2 7.55.2.1 Field Documentation byte ReadButtonType::Count The returned button pressed count. 7.55.2.2 byte ReadButtonType::Index The requested button index. See the Button name constants group. Examples: ex_sysreadbutton.nxc.

7.55.2.3

bool ReadButtonType::Pressed The returned button state.

Examples: ex_sysreadbutton.nxc.

7.55.2.4

bool ReadButtonType::Reset If true, the count is reset after reading.

7.55.2.5

char ReadButtonType::Result The function call result, ERR_INVALID_PORT or NO_ERR.

The documentation for this struct was generated from the following le: NXCDefs.h

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.56

ReadLastResponseType Struct Reference

998

7.56

ReadLastResponseType Struct Reference

Parameters for the ReadLastResponse system call. #include <NXCDefs.h> Data Fields 7.56.1 char Result bool Clear byte Length byte Command byte Buffer [ ] Detailed Description

Parameters for the ReadLastResponse system call. This structure is used when calling the SysReadLastResponse system call function. See also: SysReadLastResponse() Examples: ex_SysReadLastResponse.nxc. 7.56.2 7.56.2.1 Field Documentation byte ReadLastResponseType::Buffer[ ] The response packet buffer. 7.56.2.2 bool ReadLastResponseType::Clear Clear the response after reading it or not. Examples: ex_SysReadLastResponse.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.57

ReadSemDataType Struct Reference

999

7.56.2.3

byte ReadLastResponseType::Command The response packet command byte.

Examples: ex_SysReadLastResponse.nxc.

7.56.2.4

byte ReadLastResponseType::Length The response packet length.

Examples: ex_SysReadLastResponse.nxc.

7.56.2.5

char ReadLastResponseType::Result The response packet status value.

Examples: ex_SysReadLastResponse.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.57

ReadSemDataType Struct Reference

Parameters for the ReadSemData system call. #include <NXCDefs.h> Data Fields byte SemData bool Request 7.57.1 Detailed Description

Parameters for the ReadSemData system call. This structure is used when calling the SysReadSemData system call function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.58

SetScreenModeType Struct Reference

1000

See also: SysReadSemData() Examples: ex_SysReadSemData.nxc. 7.57.2 7.57.2.1 Field Documentation bool ReadSemDataType::Request Which semaphore am I reading from, usage or request? Examples: ex_SysReadSemData.nxc.

7.57.2.2

byte ReadSemDataType::SemData The semaphore data returned by the function call.

Examples: ex_SysReadSemData.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.58

SetScreenModeType Struct Reference

Parameters for the SetScreenMode system call. #include <NXCDefs.h> Data Fields char Result unsigned long ScreenMode

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.59

SetSleepTimeoutType Struct Reference

1001

7.58.1

Detailed Description

Parameters for the SetScreenMode system call. This structure is used when calling the SysSetScreenMode system call function. See also: SysSetScreenMode() Examples: ex_syssetscreenmode.nxc. 7.58.2 7.58.2.1 Field Documentation char SetScreenModeType::Result The function call result, always NO_ERR. 7.58.2.2 unsigned long SetScreenModeType::ScreenMode The requested screen mode. The standard NXT rmware only supports setting the ScreenMode to SCREEN_MODE_RESTORE. If you install the NBC/NXC enhanced standard NXT rmware this system function also supports setting the ScreenMode to SCREEN_MODE_CLEAR. Examples: ex_syssetscreenmode.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.59

SetSleepTimeoutType Struct Reference

Parameters for the SetSleepTimeout system call. #include <NXCDefs.h> Data Fields char Result unsigned long TheSleepTimeoutMS

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.60

SizeType Struct Reference

1002

7.59.1

Detailed Description

Parameters for the SetSleepTimeout system call. This structure is used when calling the SysSetSleepTimeout system call function. See also: SysSetSleepTimeout() Examples: ex_SysSetSleepTimeout.nxc. 7.59.2 7.59.2.1 Field Documentation char SetSleepTimeoutType::Result The result of the system call function. 7.59.2.2 unsigned long SetSleepTimeoutType::TheSleepTimeoutMS The new sleep timeout value in milliseconds. Examples: ex_SysSetSleepTimeout.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.60

SizeType Struct Reference

Width and height dimensions for the DrawRect system call. #include <NXCDefs.h> Data Fields int Width int Height

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.61

SoundGetStateType Struct Reference

1003

7.60.1

Detailed Description

Width and height dimensions for the DrawRect system call. This structure is by the DrawRectType to specify a width and height for a rectangle. See also: DrawRectType 7.60.2 7.60.2.1 Field Documentation int SizeType::Height The rectangle height. Examples: ex_sysdrawrect.nxc.

7.60.2.2

int SizeType::Width The rectangle width.

Examples: ex_sysdrawrect.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.61

SoundGetStateType Struct Reference

Parameters for the SoundGetState system call. #include <NXCDefs.h> Data Fields byte State byte Flags

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.62

SoundPlayFileType Struct Reference

1004

7.61.1

Detailed Description

Parameters for the SoundGetState system call. This structure is used when calling the SysSoundGetState system call function. See also: SysSoundGetState() Examples: ex_syssoundgetstate.nxc. 7.61.2 7.61.2.1 Field Documentation byte SoundGetStateType::Flags The returned sound ags. See the SoundFlags constants group. 7.61.2.2 byte SoundGetStateType::State The returned sound state. See the SoundState constants group. Examples: ex_syssoundgetstate.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.62

SoundPlayFileType Struct Reference

Parameters for the SoundPlayFile system call. #include <NXCDefs.h> Data Fields char Result string Filename bool Loop byte SoundLevel

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.62

SoundPlayFileType Struct Reference

1005

7.62.1

Detailed Description

Parameters for the SoundPlayFile system call. This structure is used when calling the SysSoundPlayFile system call function. See also: SysSoundPlayFile() Examples: ex_syssoundplayle.nxc. 7.62.2 7.62.2.1 Field Documentation string SoundPlayFileType::Filename The name of the le to play. Examples: ex_syssoundplayle.nxc.

7.62.2.2

bool SoundPlayFileType::Loop If true, loops at end of le.

Examples: ex_syssoundplayle.nxc.

7.62.2.3

char SoundPlayFileType::Result The function call result, always NO_ERR.

7.62.2.4

byte SoundPlayFileType::SoundLevel The sound level. Valid values range from 0 to 4.

Examples: ex_syssoundplayle.nxc. The documentation for this struct was generated from the following le: NXCDefs.h
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.63

SoundPlayToneType Struct Reference

1006

7.63

SoundPlayToneType Struct Reference

Parameters for the SoundPlayTone system call. #include <NXCDefs.h> Data Fields 7.63.1 char Result unsigned int Frequency unsigned int Duration bool Loop byte SoundLevel Detailed Description

Parameters for the SoundPlayTone system call. This structure is used when calling the SysSoundPlayTone system call function. See also: SysSoundPlayTone() Examples: ex_syssoundplaytone.nxc. 7.63.2 7.63.2.1 Field Documentation unsigned int SoundPlayToneType::Duration The tone duration in milliseconds. See the Time constants group. Examples: ex_syssoundplaytone.nxc.

7.63.2.2

unsigned int SoundPlayToneType::Frequency The tone frequency. See the Tone constants group.

Examples: ex_syssoundplaytone.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.64

SoundSetStateType Struct Reference

1007

7.63.2.3

bool SoundPlayToneType::Loop If true, loops forever.

Examples: ex_syssoundplaytone.nxc.

7.63.2.4

char SoundPlayToneType::Result The function call result, always NO_ERR.

7.63.2.5

byte SoundPlayToneType::SoundLevel The sound level. Valid values range from 0 to 4.

Examples: ex_syssoundplaytone.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.64

SoundSetStateType Struct Reference

Parameters for the SoundSetState system call. #include <NXCDefs.h> Data Fields byte Result byte State byte Flags 7.64.1 Detailed Description

Parameters for the SoundSetState system call. This structure is used when calling the SysSoundSetState system call function. See also: SysSoundSetState()
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.65

Tone Struct Reference

1008

Examples: ex_syssoundsetstate.nxc. 7.64.2 7.64.2.1 Field Documentation byte SoundSetStateType::Flags The new sound ags. See the SoundFlags constants group. 7.64.2.2 byte SoundSetStateType::Result The function call result, same as State. 7.64.2.3 byte SoundSetStateType::State The new sound state. See the SoundState constants group. Examples: ex_syssoundsetstate.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

7.65

Tone Struct Reference

Type used with the PlayTones API function. #include <NXCDefs.h> Data Fields unsigned int Frequency unsigned int Duration 7.65.1 Detailed Description

Type used with the PlayTones API function. An array of this structure is used when calling the PlayTones API function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.66

UpdateCalibCacheInfoType Struct Reference

1009

See also: PlayTones() Examples: ex_playtones.nxc. 7.65.2 7.65.2.1 Field Documentation unsigned int Tone::Duration The tone duration in milliseconds. See the Time constants group. 7.65.2.2 unsigned int Tone::Frequency The tone frequency. See the Tone constants group. The documentation for this struct was generated from the following le: NXCDefs.h

7.66

UpdateCalibCacheInfoType Struct Reference

Parameters for the UpdateCalibCacheInfo system call. #include <NXCDefs.h> Data Fields 7.66.1 byte Result string Name unsigned int MinVal unsigned int MaxVal Detailed Description

Parameters for the UpdateCalibCacheInfo system call. This structure is used when calling the SysUpdateCalibCacheInfo system call function. See also: SysUpdateCalibCacheInfo()

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.66

UpdateCalibCacheInfoType Struct Reference

1010

Examples: ex_SysUpdateCalibCacheInfo.nxc. 7.66.2 7.66.2.1 Field Documentation unsigned int UpdateCalibCacheInfoType::MaxVal The maximum calibrated value. Examples: ex_SysUpdateCalibCacheInfo.nxc.

7.66.2.2

unsigned int UpdateCalibCacheInfoType::MinVal The minimum calibrated value.

Examples: ex_SysUpdateCalibCacheInfo.nxc.

7.66.2.3

string UpdateCalibCacheInfoType::Name The name of the sensor calibration cache.

Todo ?. Examples: ex_SysUpdateCalibCacheInfo.nxc.

7.66.2.4

byte UpdateCalibCacheInfoType::Result The function call result.

Todo ?. Examples: ex_SysUpdateCalibCacheInfo.nxc.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

7.67

WriteSemDataType Struct Reference

1011

The documentation for this struct was generated from the following le: NXCDefs.h

7.67

WriteSemDataType Struct Reference

Parameters for the WriteSemData system call. #include <NXCDefs.h> Data Fields 7.67.1 byte SemData bool Request byte NewVal bool ClearBits Detailed Description

Parameters for the WriteSemData system call. This structure is used when calling the SysWriteSemData system call function. See also: SysWriteSemData() Examples: ex_SysWriteSemData.nxc. 7.67.2 7.67.2.1 Field Documentation bool WriteSemDataType::ClearBits Should I clear existing bits? Examples: ex_SysWriteSemData.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8 File Documentation

1012

7.67.2.2

byte WriteSemDataType::NewVal The new semaphore data.

Examples: ex_SysWriteSemData.nxc.

7.67.2.3

bool WriteSemDataType::Request Which semaphore am I writing to, usage or request?

Examples: ex_SysWriteSemData.nxc.

7.67.2.4

byte WriteSemDataType::SemData The modied semaphore data returned by the function call.

Examples: ex_SysWriteSemData.nxc. The documentation for this struct was generated from the following le: NXCDefs.h

8
8.1

File Documentation
NBCCommon.h File Reference

Constants and macros common to both NBC and NXC. Denes #dene TRUE 1 #dene FALSE 0 #dene NA 0xFFFF #dene RC_PROP_BTONOFF 0x0 #dene RC_PROP_SOUND_LEVEL 0x1

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1013

#dene RC_PROP_SLEEP_TIMEOUT 0x2 #dene RC_PROP_DEBUGGING 0xF #dene OPARR_SUM 0x00 #dene OPARR_MEAN 0x01 #dene OPARR_SUMSQR 0x02 #dene OPARR_STD 0x03 #dene OPARR_MIN 0x04 #dene OPARR_MAX 0x05 #dene OPARR_SORT 0x06 #dene PI 3.141593 #dene RADIANS_PER_DEGREE PI/180 #dene DEGREES_PER_RADIAN 180/PI #dene FileOpenRead 0 #dene FileOpenWrite 1 #dene FileOpenAppend 2 #dene FileRead 3 #dene FileWrite 4 #dene FileClose 5 #dene FileResolveHandle 6 #dene FileRename 7 #dene FileDelete 8 #dene SoundPlayFile 9 #dene SoundPlayTone 10 #dene SoundGetState 11 #dene SoundSetState 12 #dene DrawText 13 #dene DrawPoint 14 #dene DrawLine 15 #dene DrawCircle 16 #dene DrawRect 17 #dene DrawGraphic 18 #dene SetScreenMode 19 #dene ReadButton 20 #dene CommLSWrite 21 #dene CommLSRead 22 #dene CommLSCheckStatus 23 #dene RandomNumber 24 #dene GetStartTick 25 #dene MessageWrite 26 #dene MessageRead 27 #dene CommBTCheckStatus 28 #dene CommBTWrite 29 #dene CommBTRead 30

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1014

#dene KeepAlive 31 #dene IOMapRead 32 #dene IOMapWrite 33 #dene ColorSensorRead 34 #dene CommBTOnOff 35 #dene CommBTConnection 36 #dene CommHSWrite 37 #dene CommHSRead 38 #dene CommHSCheckStatus 39 #dene ReadSemData 40 #dene WriteSemData 41 #dene ComputeCalibValue 42 #dene UpdateCalibCacheInfo 43 #dene DatalogWrite 44 #dene DatalogGetTimes 45 #dene SetSleepTimeoutVal 46 #dene ListFiles 47 #dene IOMapReadByID 78 #dene IOMapWriteByID 79 #dene DisplayExecuteFunction 80 #dene CommExecuteFunction 81 #dene LoaderExecuteFunction 82 #dene FileFindFirst 83 #dene FileFindNext 84 #dene FileOpenWriteLinear 85 #dene FileOpenWriteNonLinear 86 #dene FileOpenReadLinear 87 #dene CommHSControl 88 #dene CommLSWriteEx 89 #dene FileSeek 90 #dene FileResize 91 #dene DrawGraphicArray 92 #dene DrawPolygon 93 #dene DrawEllipse 94 #dene DrawFont 95 #dene MemoryManager 96 #dene ReadLastResponse 97 #dene FileTell 98 #dene LCD_LINE8 0 #dene LCD_LINE7 8 #dene LCD_LINE6 16 #dene LCD_LINE5 24 #dene LCD_LINE4 32

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1015

#dene LCD_LINE3 40 #dene LCD_LINE2 48 #dene LCD_LINE1 56 #dene MS_1 1 #dene MS_2 2 #dene MS_3 3 #dene MS_4 4 #dene MS_5 5 #dene MS_6 6 #dene MS_7 7 #dene MS_8 8 #dene MS_9 9 #dene MS_10 10 #dene MS_20 20 #dene MS_30 30 #dene MS_40 40 #dene MS_50 50 #dene MS_60 60 #dene MS_70 70 #dene MS_80 80 #dene MS_90 90 #dene MS_100 100 #dene MS_150 150 #dene MS_200 200 #dene MS_250 250 #dene MS_300 300 #dene MS_350 350 #dene MS_400 400 #dene MS_450 450 #dene MS_500 500 #dene MS_600 600 #dene MS_700 700 #dene MS_800 800 #dene MS_900 900 #dene SEC_1 1000 #dene SEC_2 2000 #dene SEC_3 3000 #dene SEC_4 4000 #dene SEC_5 5000 #dene SEC_6 6000 #dene SEC_7 7000 #dene SEC_8 8000 #dene SEC_9 9000

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1016

#dene SEC_10 10000 #dene SEC_15 15000 #dene SEC_20 20000 #dene SEC_30 30000 #dene MIN_1 60000 #dene MAILBOX1 0 #dene MAILBOX2 1 #dene MAILBOX3 2 #dene MAILBOX4 3 #dene MAILBOX5 4 #dene MAILBOX6 5 #dene MAILBOX7 6 #dene MAILBOX8 7 #dene MAILBOX9 8 #dene MAILBOX10 9 #dene CommandModuleName "Command.mod" #dene IOCtrlModuleName "IOCtrl.mod" #dene LoaderModuleName "Loader.mod" #dene SoundModuleName "Sound.mod" #dene ButtonModuleName "Button.mod" #dene UIModuleName "Ui.mod" #dene InputModuleName "Input.mod" #dene OutputModuleName "Output.mod" #dene LowSpeedModuleName "Low Speed.mod" #dene DisplayModuleName "Display.mod" #dene CommModuleName "Comm.mod" #dene CommandModuleID 0x00010001 #dene IOCtrlModuleID 0x00060001 #dene LoaderModuleID 0x00090001 #dene SoundModuleID 0x00080001 #dene ButtonModuleID 0x00040001 #dene UIModuleID 0x000C0001 #dene InputModuleID 0x00030001 #dene OutputModuleID 0x00020001 #dene LowSpeedModuleID 0x000B0001 #dene DisplayModuleID 0x000A0001 #dene CommModuleID 0x00050001 #dene STAT_MSG_EMPTY_MAILBOX 64 #dene STAT_COMM_PENDING 32 #dene POOL_MAX_SIZE 32768 #dene TIMES_UP 6 #dene ROTATE_QUEUE 5 #dene STOP_REQ 4

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1017

#dene BREAKOUT_REQ 3 #dene CLUMP_SUSPEND 2 #dene CLUMP_DONE 1 #dene NO_ERR 0 #dene ERR_ARG -1 #dene ERR_INSTR -2 #dene ERR_FILE -3 #dene ERR_VER -4 #dene ERR_MEM -5 #dene ERR_BAD_PTR -6 #dene ERR_CLUMP_COUNT -7 #dene ERR_NO_CODE -8 #dene ERR_INSANE_OFFSET -9 #dene ERR_BAD_POOL_SIZE -10 #dene ERR_LOADER_ERR -11 #dene ERR_SPOTCHECK_FAIL -12 #dene ERR_NO_ACTIVE_CLUMP -13 #dene ERR_DEFAULT_OFFSETS -14 #dene ERR_MEMMGR_FAIL -15 #dene ERR_NON_FATAL -16 #dene ERR_INVALID_PORT -16 #dene ERR_INVALID_FIELD -17 #dene ERR_INVALID_QUEUE -18 #dene ERR_INVALID_SIZE -19 #dene ERR_NO_PROG -20 #dene ERR_COMM_CHAN_NOT_READY -32 #dene ERR_COMM_CHAN_INVALID -33 #dene ERR_COMM_BUFFER_FULL -34 #dene ERR_COMM_BUS_ERR -35 #dene ERR_RC_ILLEGAL_VAL -64 #dene ERR_RC_BAD_PACKET -65 #dene ERR_RC_UNKNOWN_CMD -66 #dene ERR_RC_FAILED -67 #dene PROG_IDLE 0 #dene PROG_OK 1 #dene PROG_RUNNING 2 #dene PROG_ERROR 3 #dene PROG_ABORT 4 #dene PROG_RESET 5 #dene CommandOffsetFormatString 0 #dene CommandOffsetPRCHandler 16 #dene CommandOffsetTick 20 #dene CommandOffsetOffsetDS 24

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1018

#dene CommandOffsetOffsetDVA 26 #dene CommandOffsetProgStatus 28 #dene CommandOffsetAwake 29 #dene CommandOffsetActivateFlag 30 #dene CommandOffsetDeactivateFlag 31 #dene CommandOffsetFileName 32 #dene CommandOffsetMemoryPool 52 #dene CommandOffsetSyncTime 32820 #dene CommandOffsetSyncTick 32824 #dene IOCTRL_POWERDOWN 0x5A00 #dene IOCTRL_BOOT 0xA55A #dene IOCtrlOffsetPowerOn 0 #dene LoaderOffsetPFunc 0 #dene LoaderOffsetFreeUserFlash 4 #dene EOF -1 #dene NULL 0 #dene LDR_SUCCESS 0x0000 #dene LDR_INPROGRESS 0x0001 #dene LDR_REQPIN 0x0002 #dene LDR_NOMOREHANDLES 0x8100 #dene LDR_NOSPACE 0x8200 #dene LDR_NOMOREFILES 0x8300 #dene LDR_EOFEXPECTED 0x8400 #dene LDR_ENDOFFILE 0x8500 #dene LDR_NOTLINEARFILE 0x8600 #dene LDR_FILENOTFOUND 0x8700 #dene LDR_HANDLEALREADYCLOSED 0x8800 #dene LDR_NOLINEARSPACE 0x8900 #dene LDR_UNDEFINEDERROR 0x8A00 #dene LDR_FILEISBUSY 0x8B00 #dene LDR_NOWRITEBUFFERS 0x8C00 #dene LDR_APPENDNOTPOSSIBLE 0x8D00 #dene LDR_FILEISFULL 0x8E00 #dene LDR_FILEEXISTS 0x8F00 #dene LDR_MODULENOTFOUND 0x9000 #dene LDR_OUTOFBOUNDARY 0x9100 #dene LDR_ILLEGALFILENAME 0x9200 #dene LDR_ILLEGALHANDLE 0x9300 #dene LDR_BTBUSY 0x9400 #dene LDR_BTCONNECTFAIL 0x9500 #dene LDR_BTTIMEOUT 0x9600 #dene LDR_FILETX_TIMEOUT 0x9700 #dene LDR_FILETX_DSTEXISTS 0x9800

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1019

#dene LDR_FILETX_SRCMISSING 0x9900 #dene LDR_FILETX_STREAMERROR 0x9A00 #dene LDR_FILETX_CLOSEERROR 0x9B00 #dene LDR_INVALIDSEEK 0x9C00 #dene LDR_CMD_OPENREAD 0x80 #dene LDR_CMD_OPENWRITE 0x81 #dene LDR_CMD_READ 0x82 #dene LDR_CMD_WRITE 0x83 #dene LDR_CMD_CLOSE 0x84 #dene LDR_CMD_DELETE 0x85 #dene LDR_CMD_FINDFIRST 0x86 #dene LDR_CMD_FINDNEXT 0x87 #dene LDR_CMD_VERSIONS 0x88 #dene LDR_CMD_OPENWRITELINEAR 0x89 #dene LDR_CMD_OPENREADLINEAR 0x8A #dene LDR_CMD_OPENWRITEDATA 0x8B #dene LDR_CMD_OPENAPPENDDATA 0x8C #dene LDR_CMD_CROPDATAFILE 0x8D #dene LDR_CMD_FINDFIRSTMODULE 0x90 #dene LDR_CMD_FINDNEXTMODULE 0x91 #dene LDR_CMD_CLOSEMODHANDLE 0x92 #dene LDR_CMD_IOMAPREAD 0x94 #dene LDR_CMD_IOMAPWRITE 0x95 #dene LDR_CMD_BOOTCMD 0x97 #dene LDR_CMD_SETBRICKNAME 0x98 #dene LDR_CMD_BTGETADR 0x9A #dene LDR_CMD_DEVICEINFO 0x9B #dene LDR_CMD_DELETEUSERFLASH 0xA0 #dene LDR_CMD_POLLCMDLEN 0xA1 #dene LDR_CMD_POLLCMD 0xA2 #dene LDR_CMD_RENAMEFILE 0xA3 #dene LDR_CMD_BTFACTORYRESET 0xA4 #dene LDR_CMD_RESIZEDATAFILE 0xD0 #dene LDR_CMD_SEEKFROMSTART 0xD1 #dene LDR_CMD_SEEKFROMCURRENT 0xD2 #dene LDR_CMD_SEEKFROMEND 0xD3 #dene SOUND_FLAGS_IDLE 0x00 #dene SOUND_FLAGS_UPDATE 0x01 #dene SOUND_FLAGS_RUNNING 0x02 #dene SOUND_STATE_IDLE 0x00 #dene SOUND_STATE_FILE 0x02 #dene SOUND_STATE_TONE 0x03 #dene SOUND_STATE_STOP 0x04

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1020

#dene SOUND_MODE_ONCE 0x00 #dene SOUND_MODE_LOOP 0x01 #dene SOUND_MODE_TONE 0x02 #dene SoundOffsetFreq 0 #dene SoundOffsetDuration 2 #dene SoundOffsetSampleRate 4 #dene SoundOffsetSoundFilename 6 #dene SoundOffsetFlags 26 #dene SoundOffsetState 27 #dene SoundOffsetMode 28 #dene SoundOffsetVolume 29 #dene FREQUENCY_MIN 220 #dene FREQUENCY_MAX 14080 #dene SAMPLERATE_MIN 2000 #dene SAMPLERATE_DEFAULT 8000 #dene SAMPLERATE_MAX 16000 #dene TONE_A3 220 #dene TONE_AS3 233 #dene TONE_B3 247 #dene TONE_C4 262 #dene TONE_CS4 277 #dene TONE_D4 294 #dene TONE_DS4 311 #dene TONE_E4 330 #dene TONE_F4 349 #dene TONE_FS4 370 #dene TONE_G4 392 #dene TONE_GS4 415 #dene TONE_A4 440 #dene TONE_AS4 466 #dene TONE_B4 494 #dene TONE_C5 523 #dene TONE_CS5 554 #dene TONE_D5 587 #dene TONE_DS5 622 #dene TONE_E5 659 #dene TONE_F5 698 #dene TONE_FS5 740 #dene TONE_G5 784 #dene TONE_GS5 831 #dene TONE_A5 880 #dene TONE_AS5 932 #dene TONE_B5 988

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1021

#dene TONE_C6 1047 #dene TONE_CS6 1109 #dene TONE_D6 1175 #dene TONE_DS6 1245 #dene TONE_E6 1319 #dene TONE_F6 1397 #dene TONE_FS6 1480 #dene TONE_G6 1568 #dene TONE_GS6 1661 #dene TONE_A6 1760 #dene TONE_AS6 1865 #dene TONE_B6 1976 #dene TONE_C7 2093 #dene TONE_CS7 2217 #dene TONE_D7 2349 #dene TONE_DS7 2489 #dene TONE_E7 2637 #dene TONE_F7 2794 #dene TONE_FS7 2960 #dene TONE_G7 3136 #dene TONE_GS7 3322 #dene TONE_A7 3520 #dene TONE_AS7 3729 #dene TONE_B7 3951 #dene BTN1 0 #dene BTN2 1 #dene BTN3 2 #dene BTN4 3 #dene BTNEXIT BTN1 #dene BTNRIGHT BTN2 #dene BTNLEFT BTN3 #dene BTNCENTER BTN4 #dene NO_OF_BTNS 4 #dene BTNSTATE_PRESSED_EV 0x01 #dene BTNSTATE_SHORT_RELEASED_EV 0x02 #dene BTNSTATE_LONG_PRESSED_EV 0x04 #dene BTNSTATE_LONG_RELEASED_EV 0x08 #dene BTNSTATE_PRESSED_STATE 0x80 #dene BTNSTATE_NONE 0x10 #dene ButtonOffsetPressedCnt(b) (((b)8)+0) #dene ButtonOffsetLongPressCnt(b) (((b)8)+1) #dene ButtonOffsetShortRelCnt(b) (((b)8)+2) #dene ButtonOffsetLongRelCnt(b) (((b)8)+3)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1022

#dene ButtonOffsetRelCnt(b) (((b)8)+4) #dene ButtonOffsetState(b) ((b)+32) #dene UI_FLAGS_UPDATE 0x01 #dene UI_FLAGS_DISABLE_LEFT_RIGHT_ENTER 0x02 #dene UI_FLAGS_DISABLE_EXIT 0x04 #dene UI_FLAGS_REDRAW_STATUS 0x08 #dene UI_FLAGS_RESET_SLEEP_TIMER 0x10 #dene UI_FLAGS_EXECUTE_LMS_FILE 0x20 #dene UI_FLAGS_BUSY 0x40 #dene UI_FLAGS_ENABLE_STATUS_UPDATE 0x80 #dene UI_STATE_INIT_DISPLAY 0 #dene UI_STATE_INIT_LOW_BATTERY 1 #dene UI_STATE_INIT_INTRO 2 #dene UI_STATE_INIT_WAIT 3 #dene UI_STATE_INIT_MENU 4 #dene UI_STATE_NEXT_MENU 5 #dene UI_STATE_DRAW_MENU 6 #dene UI_STATE_TEST_BUTTONS 7 #dene UI_STATE_LEFT_PRESSED 8 #dene UI_STATE_RIGHT_PRESSED 9 #dene UI_STATE_ENTER_PRESSED 10 #dene UI_STATE_EXIT_PRESSED 11 #dene UI_STATE_CONNECT_REQUEST 12 #dene UI_STATE_EXECUTE_FILE 13 #dene UI_STATE_EXECUTING_FILE 14 #dene UI_STATE_LOW_BATTERY 15 #dene UI_STATE_BT_ERROR 16 #dene UI_BUTTON_NONE 0 #dene UI_BUTTON_LEFT 1 #dene UI_BUTTON_ENTER 2 #dene UI_BUTTON_RIGHT 3 #dene UI_BUTTON_EXIT 4 #dene UI_BT_STATE_VISIBLE 0x01 #dene UI_BT_STATE_CONNECTED 0x02 #dene UI_BT_STATE_OFF 0x04 #dene UI_BT_ERROR_ATTENTION 0x08 #dene UI_BT_CONNECT_REQUEST 0x40 #dene UI_BT_PIN_REQUEST 0x80 #dene UI_VM_IDLE 0 #dene UI_VM_RUN_FREE 1 #dene UI_VM_RUN_SINGLE 2 #dene UI_VM_RUN_PAUSE 3 #dene UI_VM_RESET1 4

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1023

#dene UI_VM_RESET2 5 #dene UIOffsetPMenu 0 #dene UIOffsetBatteryVoltage 4 #dene UIOffsetLMSlename 6 #dene UIOffsetFlags 26 #dene UIOffsetState 27 #dene UIOffsetButton 28 #dene UIOffsetRunState 29 #dene UIOffsetBatteryState 30 #dene UIOffsetBluetoothState 31 #dene UIOffsetUsbState 32 #dene UIOffsetSleepTimeout 33 #dene UIOffsetSleepTimer 34 #dene UIOffsetRechargeable 35 #dene UIOffsetVolume 36 #dene UIOffsetError 37 #dene UIOffsetOBPPointer 38 #dene UIOffsetForceOff 39 #dene UIOffsetAbortFlag 40 #dene IN_1 0x00 #dene IN_2 0x01 #dene IN_3 0x02 #dene IN_4 0x03 #dene IN_TYPE_NO_SENSOR 0x00 #dene IN_TYPE_SWITCH 0x01 #dene IN_TYPE_TEMPERATURE 0x02 #dene IN_TYPE_REFLECTION 0x03 #dene IN_TYPE_ANGLE 0x04 #dene IN_TYPE_LIGHT_ACTIVE 0x05 #dene IN_TYPE_LIGHT_INACTIVE 0x06 #dene IN_TYPE_SOUND_DB 0x07 #dene IN_TYPE_SOUND_DBA 0x08 #dene IN_TYPE_CUSTOM 0x09 #dene IN_TYPE_LOWSPEED 0x0A #dene IN_TYPE_LOWSPEED_9V 0x0B #dene IN_TYPE_HISPEED 0x0C #dene IN_TYPE_COLORFULL 0x0D #dene IN_TYPE_COLORRED 0x0E #dene IN_TYPE_COLORGREEN 0x0F #dene IN_TYPE_COLORBLUE 0x10 #dene IN_TYPE_COLORNONE 0x11 #dene IN_TYPE_COLOREXIT 0x12 #dene IN_MODE_RAW 0x00

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1024

#dene IN_MODE_BOOLEAN 0x20 #dene IN_MODE_TRANSITIONCNT 0x40 #dene IN_MODE_PERIODCOUNTER 0x60 #dene IN_MODE_PCTFULLSCALE 0x80 #dene IN_MODE_CELSIUS 0xA0 #dene IN_MODE_FAHRENHEIT 0xC0 #dene IN_MODE_ANGLESTEP 0xE0 #dene IN_MODE_SLOPEMASK 0x1F #dene IN_MODE_MODEMASK 0xE0 #dene TypeField 0 #dene InputModeField 1 #dene RawValueField 2 #dene NormalizedValueField 3 #dene ScaledValueField 4 #dene InvalidDataField 5 #dene INPUT_DIGI0 0x01 #dene INPUT_DIGI1 0x02 #dene INPUT_CUSTOMINACTIVE 0x00 #dene INPUT_CUSTOM9V 0x01 #dene INPUT_CUSTOMACTIVE 0x02 #dene INPUT_INVALID_DATA 0x01 #dene INPUT_RED 0 #dene INPUT_GREEN 1 #dene INPUT_BLUE 2 #dene INPUT_BLANK 3 #dene INPUT_NO_OF_COLORS 4 #dene INPUT_BLACKCOLOR 1 #dene INPUT_BLUECOLOR 2 #dene INPUT_GREENCOLOR 3 #dene INPUT_YELLOWCOLOR 4 #dene INPUT_REDCOLOR 5 #dene INPUT_WHITECOLOR 6 #dene INPUT_SENSORCAL 0x01 #dene INPUT_SENSOROFF 0x02 #dene INPUT_RUNNINGCAL 0x20 #dene INPUT_STARTCAL 0x40 #dene INPUT_RESETCAL 0x80 #dene INPUT_CAL_POINT_0 0 #dene INPUT_CAL_POINT_1 1 #dene INPUT_CAL_POINT_2 2 #dene INPUT_NO_OF_POINTS 3 #dene InputOffsetCustomZeroOffset(p) (((p)20)+0) #dene InputOffsetADRaw(p) (((p)20)+2)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1025

#dene InputOffsetSensorRaw(p) (((p)20)+4) #dene InputOffsetSensorValue(p) (((p)20)+6) #dene InputOffsetSensorType(p) (((p)20)+8) #dene InputOffsetSensorMode(p) (((p)20)+9) #dene InputOffsetSensorBoolean(p) (((p)20)+10) #dene InputOffsetDigiPinsDir(p) (((p)20)+11) #dene InputOffsetDigiPinsIn(p) (((p)20)+12) #dene InputOffsetDigiPinsOut(p) (((p)20)+13) #dene InputOffsetCustomPctFullScale(p) (((p)20)+14) #dene InputOffsetCustomActiveStatus(p) (((p)20)+15) #dene InputOffsetInvalidData(p) (((p)20)+16) #dene InputOffsetColorCalibration(p, np, nc) (80+((p)84)+0+((np)16)+((nc)4)) #dene InputOffsetColorCalLimits(p, np) (80+((p)84)+48+((np)2)) #dene InputOffsetColorADRaw(p, nc) (80+((p)84)+52+((nc)2)) #dene InputOffsetColorSensorRaw(p, nc) (80+((p)84)+60+((nc)2)) #dene InputOffsetColorSensorValue(p, nc) (80+((p)84)+68+((nc)2)) #dene InputOffsetColorBoolean(p, nc) (80+((p)84)+76+((nc)2)) #dene InputOffsetColorCalibrationState(p) (80+((p)84)+80) #dene OUT_A 0x00 #dene OUT_B 0x01 #dene OUT_C 0x02 #dene OUT_AB 0x03 #dene OUT_AC 0x04 #dene OUT_BC 0x05 #dene OUT_ABC 0x06 #dene PID_0 0 #dene PID_1 32 #dene PID_2 64 #dene PID_3 96 #dene PID_4 128 #dene PID_5 160 #dene PID_6 192 #dene PID_7 224 #dene UF_UPDATE_MODE 0x01 #dene UF_UPDATE_SPEED 0x02 #dene UF_UPDATE_TACHO_LIMIT 0x04 #dene UF_UPDATE_RESET_COUNT 0x08 #dene UF_UPDATE_PID_VALUES 0x10 #dene UF_UPDATE_RESET_BLOCK_COUNT 0x20 #dene UF_UPDATE_RESET_ROTATION_COUNT 0x40 #dene UF_PENDING_UPDATES 0x80 #dene RESET_NONE 0x00 #dene RESET_COUNT 0x08

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1026

#dene RESET_BLOCK_COUNT 0x20 #dene RESET_ROTATION_COUNT 0x40 #dene RESET_BLOCKANDTACHO 0x28 #dene RESET_ALL 0x68 #dene OUT_MODE_COAST 0x00 #dene OUT_MODE_MOTORON 0x01 #dene OUT_MODE_BRAKE 0x02 #dene OUT_MODE_REGULATED 0x04 #dene OUT_MODE_REGMETHOD 0xF0 #dene OUT_OPTION_HOLDATLIMIT 0x10 #dene OUT_OPTION_RAMPDOWNTOLIMIT 0x20 #dene OUT_REGOPTION_NO_SATURATION 0x01 #dene OUT_RUNSTATE_IDLE 0x00 #dene OUT_RUNSTATE_RAMPUP 0x10 #dene OUT_RUNSTATE_RUNNING 0x20 #dene OUT_RUNSTATE_RAMPDOWN 0x40 #dene OUT_RUNSTATE_HOLD 0x60 #dene OUT_REGMODE_IDLE 0 #dene OUT_REGMODE_SPEED 1 #dene OUT_REGMODE_SYNC 2 #dene OUT_REGMODE_POS 4 #dene UpdateFlagsField 0
Update ags eld.

#dene OutputModeField 1
Mode eld.

#dene PowerField 2
Power eld.

#dene ActualSpeedField 3
Actual speed eld.

#dene TachoCountField 4
Internal tachometer count eld.

#dene TachoLimitField 5
Tachometer limit eld.

#dene RunStateField 6
Run state eld.

#dene TurnRatioField 7
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1027

Turn ratio eld.

#dene RegModeField 8
Regulation mode eld.

#dene OverloadField 9
Overload eld.

#dene RegPValueField 10
Proportional eld.

#dene RegIValueField 11
Integral eld.

#dene RegDValueField 12
Derivative eld.

#dene BlockTachoCountField 13
NXT-G block tachometer count eld.

#dene RotationCountField 14
Rotation counter eld.

#dene OutputOptionsField 15
Options eld.

#dene MaxSpeedField 16
MaxSpeed eld.

#dene MaxAccelerationField 17
MaxAcceleration eld.

#dene OutputOffsetTachoCount(p) (((p)32)+0) #dene OutputOffsetBlockTachoCount(p) (((p)32)+4) #dene OutputOffsetRotationCount(p) (((p)32)+8) #dene OutputOffsetTachoLimit(p) (((p)32)+12) #dene OutputOffsetMotorRPM(p) (((p)32)+16) #dene OutputOffsetFlags(p) (((p)32)+18) #dene OutputOffsetMode(p) (((p)32)+19) #dene OutputOffsetSpeed(p) (((p)32)+20) #dene OutputOffsetActualSpeed(p) (((p)32)+21) #dene OutputOffsetRegPParameter(p) (((p)32)+22) #dene OutputOffsetRegIParameter(p) (((p)32)+23)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1028

#dene OutputOffsetRegDParameter(p) (((p)32)+24) #dene OutputOffsetRunState(p) (((p)32)+25) #dene OutputOffsetRegMode(p) (((p)32)+26) #dene OutputOffsetOverloaded(p) (((p)32)+27) #dene OutputOffsetSyncTurnParameter(p) (((p)32)+28) #dene OutputOffsetOptions(p) (((p)32)+29) #dene OutputOffsetMaxSpeed(p) (((p)32)+30) #dene OutputOffsetMaxAccel(p) (((p)32)+31) #dene OutputOffsetRegulationTime 96 #dene OutputOffsetRegulationOptions 97 #dene COM_CHANNEL_NONE_ACTIVE 0x00 #dene COM_CHANNEL_ONE_ACTIVE 0x01 #dene COM_CHANNEL_TWO_ACTIVE 0x02 #dene COM_CHANNEL_THREE_ACTIVE 0x04 #dene COM_CHANNEL_FOUR_ACTIVE 0x08 #dene LOWSPEED_IDLE 0 #dene LOWSPEED_INIT 1 #dene LOWSPEED_LOAD_BUFFER 2 #dene LOWSPEED_COMMUNICATING 3 #dene LOWSPEED_ERROR 4 #dene LOWSPEED_DONE 5 #dene LOWSPEED_TRANSMITTING 1 #dene LOWSPEED_RECEIVING 2 #dene LOWSPEED_DATA_RECEIVED 3 #dene LOWSPEED_NO_ERROR 0 #dene LOWSPEED_CH_NOT_READY 1 #dene LOWSPEED_TX_ERROR 2 #dene LOWSPEED_RX_ERROR 3 #dene LowSpeedOffsetInBufBuf(p) (((p)19)+0) #dene LowSpeedOffsetInBufInPtr(p) (((p)19)+16) #dene LowSpeedOffsetInBufOutPtr(p) (((p)19)+17) #dene LowSpeedOffsetInBufBytesToRx(p) (((p)19)+18) #dene LowSpeedOffsetOutBufBuf(p) (((p)19)+76) #dene LowSpeedOffsetOutBufInPtr(p) (((p)19)+92) #dene LowSpeedOffsetOutBufOutPtr(p) (((p)19)+93) #dene LowSpeedOffsetOutBufBytesToRx(p) (((p)19)+94) #dene LowSpeedOffsetMode(p) ((p)+152) #dene LowSpeedOffsetChannelState(p) ((p)+156) #dene LowSpeedOffsetErrorType(p) ((p)+160) #dene LowSpeedOffsetState 164 #dene LowSpeedOffsetSpeed 165 #dene LowSpeedOffsetNoRestartOnRead 166 #dene LSREAD_RESTART_ALL 0x00

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1029

#dene LSREAD_NO_RESTART_1 0x01 #dene LSREAD_NO_RESTART_2 0x02 #dene LSREAD_NO_RESTART_3 0x04 #dene LSREAD_NO_RESTART_4 0x08 #dene LSREAD_RESTART_NONE 0x0F #dene LSREAD_NO_RESTART_MASK 0x10 #dene I2C_ADDR_DEFAULT 0x02 #dene I2C_REG_VERSION 0x00 #dene I2C_REG_VENDOR_ID 0x08 #dene I2C_REG_DEVICE_ID 0x10 #dene I2C_REG_CMD 0x41 #dene LEGO_ADDR_US 0x02 #dene LEGO_ADDR_TEMP 0x98 #dene LEGO_ADDR_EMETER 0x04 #dene US_CMD_OFF 0x00 #dene US_CMD_SINGLESHOT 0x01 #dene US_CMD_CONTINUOUS 0x02 #dene US_CMD_EVENTCAPTURE 0x03 #dene US_CMD_WARMRESET 0x04 #dene US_REG_CM_INTERVAL 0x40 #dene US_REG_ACTUAL_ZERO 0x50 #dene US_REG_SCALE_FACTOR 0x51 #dene US_REG_SCALE_DIVISOR 0x52 #dene US_REG_FACTORY_ACTUAL_ZERO 0x11 #dene US_REG_FACTORY_SCALE_FACTOR 0x12 #dene US_REG_FACTORY_SCALE_DIVISOR 0x13 #dene US_REG_MEASUREMENT_UNITS 0x14 #dene TEMP_RES_9BIT 0x00 #dene TEMP_RES_10BIT 0x20 #dene TEMP_RES_11BIT 0x40 #dene TEMP_RES_12BIT 0x60 #dene TEMP_SD_CONTINUOUS 0x00 #dene TEMP_SD_SHUTDOWN 0x01 #dene TEMP_TM_COMPARATOR 0x00 #dene TEMP_TM_INTERRUPT 0x02 #dene TEMP_OS_ONESHOT 0x80 #dene TEMP_FQ_1 0x00 #dene TEMP_FQ_2 0x08 #dene TEMP_FQ_4 0x10 #dene TEMP_FQ_6 0x18 #dene TEMP_POL_LOW 0x00 #dene TEMP_POL_HIGH 0x04 #dene TEMP_REG_TEMP 0x00

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1030

#dene TEMP_REG_CONFIG 0x01 #dene TEMP_REG_TLOW 0x02 #dene TEMP_REG_THIGH 0x03 #dene EMETER_REG_VIN 0x0a #dene EMETER_REG_AIN 0x0c #dene EMETER_REG_VOUT 0x0e #dene EMETER_REG_AOUT 0x10 #dene EMETER_REG_JOULES 0x12 #dene EMETER_REG_WIN 0x14 #dene EMETER_REG_WOUT 0x16 #dene DISPLAY_ERASE_ALL 0x00 #dene DISPLAY_PIXEL 0x01 #dene DISPLAY_HORIZONTAL_LINE 0x02 #dene DISPLAY_VERTICAL_LINE 0x03 #dene DISPLAY_CHAR 0x04 #dene DISPLAY_ERASE_LINE 0x05 #dene DISPLAY_FILL_REGION 0x06 #dene DISPLAY_FRAME 0x07 #dene DRAW_OPT_NORMAL (0x0000) #dene DRAW_OPT_CLEAR_WHOLE_SCREEN (0x0001) #dene DRAW_OPT_CLEAR_EXCEPT_STATUS_SCREEN (0x0002) #dene DRAW_OPT_CLEAR_PIXELS (0x0004) #dene DRAW_OPT_CLEAR (0x0004) #dene DRAW_OPT_INVERT (0x0004) #dene DRAW_OPT_LOGICAL_COPY (0x0000) #dene DRAW_OPT_LOGICAL_AND (0x0008) #dene DRAW_OPT_LOGICAL_OR (0x0010) #dene DRAW_OPT_LOGICAL_XOR (0x0018) #dene DRAW_OPT_FILL_SHAPE (0x0020) #dene DRAW_OPT_CLEAR_SCREEN_MODES (0x0003) #dene DRAW_OPT_LOGICAL_OPERATIONS (0x0018) #dene DRAW_OPT_POLYGON_POLYLINE (0x0400) #dene DRAW_OPT_FONT_DIRECTIONS (0x01C0) #dene DRAW_OPT_FONT_WRAP (0x0200) #dene DRAW_OPT_FONT_DIR_L2RB (0x0000) #dene DRAW_OPT_FONT_DIR_L2RT (0x0040) #dene DRAW_OPT_FONT_DIR_R2LB (0x0080) #dene DRAW_OPT_FONT_DIR_R2LT (0x00C0) #dene DRAW_OPT_FONT_DIR_B2TL (0x0100) #dene DRAW_OPT_FONT_DIR_B2TR (0x0140) #dene DRAW_OPT_FONT_DIR_T2BL (0x0180) #dene DRAW_OPT_FONT_DIR_T2BR (0x01C0) #dene DISPLAY_ON 0x01

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1031

#dene DISPLAY_REFRESH 0x02 #dene DISPLAY_POPUP 0x08 #dene DISPLAY_REFRESH_DISABLED 0x40 #dene DISPLAY_BUSY 0x80 #dene DISPLAY_CONTRAST_DEFAULT 0x5A #dene DISPLAY_CONTRAST_MAX 0x7F #dene SCREEN_MODE_RESTORE 0x00 #dene SCREEN_MODE_CLEAR 0x01 #dene DISPLAY_HEIGHT 64 #dene DISPLAY_WIDTH 100 #dene DISPLAY_MENUICONS_Y 40 #dene DISPLAY_MENUICONS_X_OFFS 7 #dene DISPLAY_MENUICONS_X_DIFF 31 #dene TEXTLINE_1 0 #dene TEXTLINE_2 1 #dene TEXTLINE_3 2 #dene TEXTLINE_4 3 #dene TEXTLINE_5 4 #dene TEXTLINE_6 5 #dene TEXTLINE_7 6 #dene TEXTLINE_8 7 #dene TEXTLINES 8 #dene MENUICON_LEFT 0 #dene MENUICON_CENTER 1 #dene MENUICON_RIGHT 2 #dene MENUICONS 3 #dene FRAME_SELECT 0 #dene STATUSTEXT 1 #dene MENUTEXT 2 #dene STEPLINE 3 #dene TOPLINE 4 #dene SPECIALS 5 #dene STATUSICON_BLUETOOTH 0 #dene STATUSICON_USB 1 #dene STATUSICON_VM 2 #dene STATUSICON_BATTERY 3 #dene STATUSICONS 4 #dene SCREEN_BACKGROUND 0 #dene SCREEN_LARGE 1 #dene SCREEN_SMALL 2 #dene SCREENS 3 #dene BITMAP_1 0 #dene BITMAP_2 1

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1032

#dene BITMAP_3 2 #dene BITMAP_4 3 #dene BITMAPS 4 #dene STEPICON_1 0 #dene STEPICON_2 1 #dene STEPICON_3 2 #dene STEPICON_4 3 #dene STEPICON_5 4 #dene STEPICONS 5 #dene DisplayOffsetPFunc 0 #dene DisplayOffsetEraseMask 4 #dene DisplayOffsetUpdateMask 8 #dene DisplayOffsetPFont 12 #dene DisplayOffsetPTextLines(p) (((p)4)+16) #dene DisplayOffsetPStatusText 48 #dene DisplayOffsetPStatusIcons 52 #dene DisplayOffsetPScreens(p) (((p)4)+56) #dene DisplayOffsetPBitmaps(p) (((p)4)+68) #dene DisplayOffsetPMenuText 84 #dene DisplayOffsetPMenuIcons(p) (((p)4)+88) #dene DisplayOffsetPStepIcons 100 #dene DisplayOffsetDisplay 104 #dene DisplayOffsetStatusIcons(p) ((p)+108) #dene DisplayOffsetStepIcons(p) ((p)+112) #dene DisplayOffsetFlags 117 #dene DisplayOffsetTextLinesCenterFlags 118 #dene DisplayOffsetNormal(l, w) (((l)100)+(w)+119) #dene DisplayOffsetPopup(l, w) (((l)100)+(w)+919) #dene DisplayOffsetContrast 1719 #dene SIZE_OF_USBBUF 64 #dene USB_PROTOCOL_OVERHEAD 2 #dene SIZE_OF_USBDATA 62 #dene SIZE_OF_HSBUF 128 #dene SIZE_OF_BTBUF 128 #dene BT_CMD_BYTE 1 #dene SIZE_OF_BT_DEVICE_TABLE 30 #dene SIZE_OF_BT_CONNECT_TABLE 4 #dene SIZE_OF_BT_NAME 16 #dene SIZE_OF_BRICK_NAME 8 #dene SIZE_OF_CLASS_OF_DEVICE 4 #dene SIZE_OF_BT_PINCODE 16 #dene SIZE_OF_BDADDR 7 #dene MAX_BT_MSG_SIZE 60000

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1033

#dene BT_DEFAULT_INQUIRY_MAX 0 #dene BT_DEFAULT_INQUIRY_TIMEOUT_LO 15 #dene BT_ARM_OFF 0 #dene BT_ARM_CMD_MODE 1 #dene BT_ARM_DATA_MODE 2 #dene DATA_MODE_NXT 0x00 #dene DATA_MODE_GPS 0x01 #dene DATA_MODE_RAW 0x02 #dene DATA_MODE_MASK 0x07 #dene DATA_MODE_UPDATE 0x08 #dene BT_BRICK_VISIBILITY 0x01 #dene BT_BRICK_PORT_OPEN 0x02 #dene BT_CONNECTION_0_ENABLE 0x10 #dene BT_CONNECTION_1_ENABLE 0x20 #dene BT_CONNECTION_2_ENABLE 0x40 #dene BT_CONNECTION_3_ENABLE 0x80 #dene CONN_BT0 0x0 #dene CONN_BT1 0x1 #dene CONN_BT2 0x2 #dene CONN_BT3 0x3 #dene CONN_HS4 0x4 #dene CONN_HS_ALL 0x4 #dene CONN_HS_1 0x5 #dene CONN_HS_2 0x6 #dene CONN_HS_3 0x7 #dene CONN_HS_4 0x8 #dene CONN_HS_5 0x9 #dene CONN_HS_6 0xa #dene CONN_HS_7 0xb #dene CONN_HS_8 0xc #dene BT_ENABLE 0x00 #dene BT_DISABLE 0x01 #dene HS_UPDATE 1 #dene HS_INITIALISE 1 #dene HS_INIT_RECEIVER 2 #dene HS_SEND_DATA 3 #dene HS_DISABLE 4 #dene HS_ENABLE 5 #dene HS_CTRL_INIT 0 #dene HS_CTRL_UART 1 #dene HS_CTRL_EXIT 2 #dene HS_BAUD_1200 0 #dene HS_BAUD_2400 1

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1034

#dene HS_BAUD_3600 2 #dene HS_BAUD_4800 3 #dene HS_BAUD_7200 4 #dene HS_BAUD_9600 5 #dene HS_BAUD_14400 6 #dene HS_BAUD_19200 7 #dene HS_BAUD_28800 8 #dene HS_BAUD_38400 9 #dene HS_BAUD_57600 10 #dene HS_BAUD_76800 11 #dene HS_BAUD_115200 12 #dene HS_BAUD_230400 13 #dene HS_BAUD_460800 14 #dene HS_BAUD_921600 15 #dene HS_BAUD_DEFAULT 15 #dene HS_MODE_DEFAULT HS_MODE_8N1 #dene HS_MODE_5_DATA 0x0000 #dene HS_MODE_6_DATA 0x0040 #dene HS_MODE_7_DATA 0x0080 #dene HS_MODE_8_DATA 0x00C0 #dene HS_MODE_10_STOP 0x0000 #dene HS_MODE_15_STOP 0x1000 #dene HS_MODE_20_STOP 0x2000 #dene HS_MODE_E_PARITY 0x0000 #dene HS_MODE_O_PARITY 0x0200 #dene HS_MODE_S_PARITY 0x0400 #dene HS_MODE_M_PARITY 0x0600 #dene HS_MODE_N_PARITY 0x0800 #dene HS_MODE_8N1 (HS_MODE_8_DATA|HS_MODE_N_PARITY|HS_MODE_10_STOP) #dene HS_MODE_7E1 (HS_MODE_7_DATA|HS_MODE_E_PARITY|HS_MODE_10_STOP) #dene HS_ADDRESS_ALL 0 #dene HS_ADDRESS_1 1 #dene HS_ADDRESS_2 2 #dene HS_ADDRESS_3 3 #dene HS_ADDRESS_4 4 #dene HS_ADDRESS_5 5 #dene HS_ADDRESS_6 6 #dene HS_ADDRESS_7 7 #dene HS_ADDRESS_8 8 #dene BT_DEVICE_EMPTY 0x00 #dene BT_DEVICE_UNKNOWN 0x01

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1035

#dene BT_DEVICE_KNOWN 0x02 #dene BT_DEVICE_NAME 0x40 #dene BT_DEVICE_AWAY 0x80 #dene INTF_SENDFILE 0 #dene INTF_SEARCH 1 #dene INTF_STOPSEARCH 2 #dene INTF_CONNECT 3 #dene INTF_DISCONNECT 4 #dene INTF_DISCONNECTALL 5 #dene INTF_REMOVEDEVICE 6 #dene INTF_VISIBILITY 7 #dene INTF_SETCMDMODE 8 #dene INTF_OPENSTREAM 9 #dene INTF_SENDDATA 10 #dene INTF_FACTORYRESET 11 #dene INTF_BTON 12 #dene INTF_BTOFF 13 #dene INTF_SETBTNAME 14 #dene INTF_EXTREAD 15 #dene INTF_PINREQ 16 #dene INTF_CONNECTREQ 17 #dene INTF_CONNECTBYNAME 18 #dene LR_SUCCESS 0x50 #dene LR_COULD_NOT_SAVE 0x51 #dene LR_STORE_IS_FULL 0x52 #dene LR_ENTRY_REMOVED 0x53 #dene LR_UNKNOWN_ADDR 0x54 #dene USB_CMD_READY 0x01 #dene BT_CMD_READY 0x02 #dene HS_CMD_READY 0x04 #dene CommOffsetPFunc 0 #dene CommOffsetPFuncTwo 4 #dene CommOffsetBtDeviceTableName(p) (((p)31)+8) #dene CommOffsetBtDeviceTableClassOfDevice(p) (((p)31)+24) #dene CommOffsetBtDeviceTableBdAddr(p) (((p)31)+28) #dene CommOffsetBtDeviceTableDeviceStatus(p) (((p)31)+35) #dene CommOffsetBtConnectTableName(p) (((p)47)+938) #dene CommOffsetBtConnectTableClassOfDevice(p) (((p)47)+954) #dene CommOffsetBtConnectTablePinCode(p) (((p)47)+958) #dene CommOffsetBtConnectTableBdAddr(p) (((p)47)+974) #dene CommOffsetBtConnectTableHandleNr(p) (((p)47)+981) #dene CommOffsetBtConnectTableStreamStatus(p) (((p)47)+982) #dene CommOffsetBtConnectTableLinkQuality(p) (((p)47)+983)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1036

#dene CommOffsetBrickDataName 1126 #dene CommOffsetBrickDataBluecoreVersion 1142 #dene CommOffsetBrickDataBdAddr 1144 #dene CommOffsetBrickDataBtStateStatus 1151 #dene CommOffsetBrickDataBtHwStatus 1152 #dene CommOffsetBrickDataTimeOutValue 1153 #dene CommOffsetBtInBufBuf 1157 #dene CommOffsetBtInBufInPtr 1285 #dene CommOffsetBtInBufOutPtr 1286 #dene CommOffsetBtOutBufBuf 1289 #dene CommOffsetBtOutBufInPtr 1417 #dene CommOffsetBtOutBufOutPtr 1418 #dene CommOffsetHsInBufBuf 1421 #dene CommOffsetHsInBufInPtr 1549 #dene CommOffsetHsInBufOutPtr 1550 #dene CommOffsetHsOutBufBuf 1553 #dene CommOffsetHsOutBufInPtr 1681 #dene CommOffsetHsOutBufOutPtr 1682 #dene CommOffsetUsbInBufBuf 1685 #dene CommOffsetUsbInBufInPtr 1749 #dene CommOffsetUsbInBufOutPtr 1750 #dene CommOffsetUsbOutBufBuf 1753 #dene CommOffsetUsbOutBufInPtr 1817 #dene CommOffsetUsbOutBufOutPtr 1818 #dene CommOffsetUsbPollBufBuf 1821 #dene CommOffsetUsbPollBufInPtr 1885 #dene CommOffsetUsbPollBufOutPtr 1886 #dene CommOffsetBtDeviceCnt 1889 #dene CommOffsetBtDeviceNameCnt 1890 #dene CommOffsetHsFlags 1891 #dene CommOffsetHsSpeed 1892 #dene CommOffsetHsState 1893 #dene CommOffsetUsbState 1894 #dene CommOffsetHsMode 1896 #dene CommOffsetBtDataMode 1898 #dene CommOffsetHsDataMode 1899 #dene RCX_OUT_A 0x01 #dene RCX_OUT_B 0x02 #dene RCX_OUT_C 0x04 #dene RCX_OUT_AB 0x03 #dene RCX_OUT_AC 0x05 #dene RCX_OUT_BC 0x06 #dene RCX_OUT_ABC 0x07

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1037

#dene RCX_OUT_FLOAT 0 #dene RCX_OUT_OFF 0x40 #dene RCX_OUT_ON 0x80 #dene RCX_OUT_REV 0 #dene RCX_OUT_TOGGLE 0x40 #dene RCX_OUT_FWD 0x80 #dene RCX_OUT_LOW 0 #dene RCX_OUT_HALF 3 #dene RCX_OUT_FULL 7 #dene RCX_RemoteKeysReleased 0x0000 #dene RCX_RemotePBMessage1 0x0100 #dene RCX_RemotePBMessage2 0x0200 #dene RCX_RemotePBMessage3 0x0400 #dene RCX_RemoteOutAForward 0x0800 #dene RCX_RemoteOutBForward 0x1000 #dene RCX_RemoteOutCForward 0x2000 #dene RCX_RemoteOutABackward 0x4000 #dene RCX_RemoteOutBBackward 0x8000 #dene RCX_RemoteOutCBackward 0x0001 #dene RCX_RemoteSelProgram1 0x0002 #dene RCX_RemoteSelProgram2 0x0004 #dene RCX_RemoteSelProgram3 0x0008 #dene RCX_RemoteSelProgram4 0x0010 #dene RCX_RemoteSelProgram5 0x0020 #dene RCX_RemoteStopOutOff 0x0040 #dene RCX_RemotePlayASound 0x0080 #dene SOUND_CLICK 0 #dene SOUND_DOUBLE_BEEP 1 #dene SOUND_DOWN 2 #dene SOUND_UP 3 #dene SOUND_LOW_BEEP 4 #dene SOUND_FAST_UP 5 #dene SCOUT_LIGHT_ON 0x80 #dene SCOUT_LIGHT_OFF 0 #dene SCOUT_SOUND_REMOTE 6 #dene SCOUT_SOUND_ENTERSA 7 #dene SCOUT_SOUND_KEYERROR 8 #dene SCOUT_SOUND_NONE 9 #dene SCOUT_SOUND_TOUCH1_PRES 10 #dene SCOUT_SOUND_TOUCH1_REL 11 #dene SCOUT_SOUND_TOUCH2_PRES 12 #dene SCOUT_SOUND_TOUCH2_REL 13 #dene SCOUT_SOUND_ENTER_BRIGHT 14

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1038

#dene SCOUT_SOUND_ENTER_NORMAL 15 #dene SCOUT_SOUND_ENTER_DARK 16 #dene SCOUT_SOUND_1_BLINK 17 #dene SCOUT_SOUND_2_BLINK 18 #dene SCOUT_SOUND_COUNTER1 19 #dene SCOUT_SOUND_COUNTER2 20 #dene SCOUT_SOUND_TIMER1 21 #dene SCOUT_SOUND_TIMER2 22 #dene SCOUT_SOUND_TIMER3 23 #dene SCOUT_SOUND_MAIL_RECEIVED 24 #dene SCOUT_SOUND_SPECIAL1 25 #dene SCOUT_SOUND_SPECIAL2 26 #dene SCOUT_SOUND_SPECIAL3 27 #dene SCOUT_SNDSET_NONE 0 #dene SCOUT_SNDSET_BASIC 1 #dene SCOUT_SNDSET_BUG 2 #dene SCOUT_SNDSET_ALARM 3 #dene SCOUT_SNDSET_RANDOM 4 #dene SCOUT_SNDSET_SCIENCE 5 #dene SCOUT_MODE_STANDALONE 0 #dene SCOUT_MODE_POWER 1 #dene SCOUT_MR_NO_MOTION 0 #dene SCOUT_MR_FORWARD 1 #dene SCOUT_MR_ZIGZAG 2 #dene SCOUT_MR_CIRCLE_RIGHT 3 #dene SCOUT_MR_CIRCLE_LEFT 4 #dene SCOUT_MR_LOOP_A 5 #dene SCOUT_MR_LOOP_B 6 #dene SCOUT_MR_LOOP_AB 7 #dene SCOUT_TR_IGNORE 0 #dene SCOUT_TR_REVERSE 1 #dene SCOUT_TR_AVOID 2 #dene SCOUT_TR_WAIT_FOR 3 #dene SCOUT_TR_OFF_WHEN 4 #dene SCOUT_LR_IGNORE 0 #dene SCOUT_LR_SEEK_LIGHT 1 #dene SCOUT_LR_SEEK_DARK 2 #dene SCOUT_LR_AVOID 3 #dene SCOUT_LR_WAIT_FOR 4 #dene SCOUT_LR_OFF_WHEN 5 #dene SCOUT_TGS_SHORT 0 #dene SCOUT_TGS_MEDIUM 1 #dene SCOUT_TGS_LONG 2

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1039

#dene SCOUT_FXR_NONE 0 #dene SCOUT_FXR_BUG 1 #dene SCOUT_FXR_ALARM 2 #dene SCOUT_FXR_RANDOM 3 #dene SCOUT_FXR_SCIENCE 4 #dene RCX_VariableSrc 0 #dene RCX_TimerSrc 1 #dene RCX_ConstantSrc 2 #dene RCX_OutputStatusSrc 3 #dene RCX_RandomSrc 4 #dene RCX_ProgramSlotSrc 8 #dene RCX_InputValueSrc 9 #dene RCX_InputTypeSrc 10 #dene RCX_InputModeSrc 11 #dene RCX_InputRawSrc 12 #dene RCX_InputBooleanSrc 13 #dene RCX_WatchSrc 14 #dene RCX_MessageSrc 15 #dene RCX_GlobalMotorStatusSrc 17 #dene RCX_ScoutRulesSrc 18 #dene RCX_ScoutLightParamsSrc 19 #dene RCX_ScoutTimerLimitSrc 20 #dene RCX_CounterSrc 21 #dene RCX_ScoutCounterLimitSrc 22 #dene RCX_TaskEventsSrc 23 #dene RCX_ScoutEventFBSrc 24 #dene RCX_EventStateSrc 25 #dene RCX_TenMSTimerSrc 26 #dene RCX_ClickCounterSrc 27 #dene RCX_UpperThresholdSrc 28 #dene RCX_LowerThresholdSrc 29 #dene RCX_HysteresisSrc 30 #dene RCX_DurationSrc 31 #dene RCX_UARTSetupSrc 33 #dene RCX_BatteryLevelSrc 34 #dene RCX_FirmwareVersionSrc 35 #dene RCX_IndirectVarSrc 36 #dene RCX_DatalogSrcIndirectSrc 37 #dene RCX_DatalogSrcDirectSrc 38 #dene RCX_DatalogValueIndirectSrc 39 #dene RCX_DatalogValueDirectSrc 40 #dene RCX_DatalogRawIndirectSrc 41 #dene RCX_DatalogRawDirectSrc 42

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1040

#dene RCX_PingOp 0x10 #dene RCX_BatteryLevelOp 0x30 #dene RCX_DeleteTasksOp 0x40 #dene RCX_StopAllTasksOp 0x50 #dene RCX_PBTurnOffOp 0x60 #dene RCX_DeleteSubsOp 0x70 #dene RCX_ClearSoundOp 0x80 #dene RCX_ClearMsgOp 0x90 #dene RCX_LSCalibrateOp 0xc0 #dene RCX_MuteSoundOp 0xd0 #dene RCX_UnmuteSoundOp 0xe0 #dene RCX_ClearAllEventsOp 0x06 #dene RCX_OnOffFloatOp 0x21 #dene RCX_IRModeOp 0x31 #dene RCX_PlaySoundOp 0x51 #dene RCX_DeleteTaskOp 0x61 #dene RCX_StartTaskOp 0x71 #dene RCX_StopTaskOp 0x81 #dene RCX_SelectProgramOp 0x91 #dene RCX_ClearTimerOp 0xa1 #dene RCX_AutoOffOp 0xb1 #dene RCX_DeleteSubOp 0xc1 #dene RCX_ClearSensorOp 0xd1 #dene RCX_OutputDirOp 0xe1 #dene RCX_PlayToneVarOp 0x02 #dene RCX_PollOp 0x12 #dene RCX_SetWatchOp 0x22 #dene RCX_InputTypeOp 0x32 #dene RCX_InputModeOp 0x42 #dene RCX_SetDatalogOp 0x52 #dene RCX_DatalogOp 0x62 #dene RCX_SendUARTDataOp 0xc2 #dene RCX_RemoteOp 0xd2 #dene RCX_VLLOp 0xe2 #dene RCX_DirectEventOp 0x03 #dene RCX_OutputPowerOp 0x13 #dene RCX_PlayToneOp 0x23 #dene RCX_DisplayOp 0x33 #dene RCX_PollMemoryOp 0x63 #dene RCX_SetFeedbackOp 0x83 #dene RCX_SetEventOp 0x93 #dene RCX_GOutputPowerOp 0xa3 #dene RCX_LSUpperThreshOp 0xb3

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1041

#dene RCX_LSLowerThreshOp 0xc3 #dene RCX_LSHysteresisOp 0xd3 #dene RCX_LSBlinkTimeOp 0xe3 #dene RCX_CalibrateEventOp 0x04 #dene RCX_SetVarOp 0x14 #dene RCX_SumVarOp 0x24 #dene RCX_SubVarOp 0x34 #dene RCX_DivVarOp 0x44 #dene RCX_MulVarOp 0x54 #dene RCX_SgnVarOp 0x64 #dene RCX_AbsVarOp 0x74 #dene RCX_AndVarOp 0x84 #dene RCX_OrVarOp 0x94 #dene RCX_UploadDatalogOp 0xa4 #dene RCX_SetTimerLimitOp 0xc4 #dene RCX_SetCounterOp 0xd4 #dene RCX_SetSourceValueOp 0x05 #dene RCX_UnlockOp 0x15 #dene RCX_BootModeOp 0x65 #dene RCX_UnlockFirmOp 0xa5 #dene RCX_ScoutRulesOp 0xd5 #dene RCX_ViewSourceValOp 0xe5 #dene RCX_ScoutOp 0x47 #dene RCX_SoundOp 0x57 #dene RCX_GOutputModeOp 0x67 #dene RCX_GOutputDirOp 0x77 #dene RCX_LightOp 0x87 #dene RCX_IncCounterOp 0x97 #dene RCX_DecCounterOp 0xa7 #dene RCX_ClearCounterOp 0xb7 #dene RCX_SetPriorityOp 0xd7 #dene RCX_MessageOp 0xf7 #dene PF_CMD_STOP 0 #dene PF_CMD_FLOAT 0 #dene PF_CMD_FWD 1 #dene PF_CMD_REV 2 #dene PF_CMD_BRAKE 3 #dene PF_CHANNEL_1 0 #dene PF_CHANNEL_2 1 #dene PF_CHANNEL_3 2 #dene PF_CHANNEL_4 3 #dene PF_MODE_TRAIN 0 #dene PF_MODE_COMBO_DIRECT 1

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1042

#dene PF_MODE_SINGLE_PIN_CONT 2 #dene PF_MODE_SINGLE_PIN_TIME 3 #dene PF_MODE_COMBO_PWM 4 #dene PF_MODE_SINGLE_OUTPUT_PWM 4 #dene PF_MODE_SINGLE_OUTPUT_CST 6 #dene TRAIN_FUNC_STOP 0 #dene TRAIN_FUNC_INCR_SPEED 1 #dene TRAIN_FUNC_DECR_SPEED 2 #dene TRAIN_FUNC_TOGGLE_LIGHT 4 #dene TRAIN_CHANNEL_1 0 #dene TRAIN_CHANNEL_2 1 #dene TRAIN_CHANNEL_3 2 #dene TRAIN_CHANNEL_ALL 3 #dene PF_OUT_A 0 #dene PF_OUT_B 1 #dene PF_PIN_C1 0 #dene PF_PIN_C2 1 #dene PF_FUNC_NOCHANGE 0 #dene PF_FUNC_CLEAR 1 #dene PF_FUNC_SET 2 #dene PF_FUNC_TOGGLE 3 #dene PF_CST_CLEAR1_CLEAR2 0 #dene PF_CST_SET1_CLEAR2 1 #dene PF_CST_CLEAR1_SET2 2 #dene PF_CST_SET1_SET2 3 #dene PF_CST_INCREMENT_PWM 4 #dene PF_CST_DECREMENT_PWM 5 #dene PF_CST_FULL_FWD 6 #dene PF_CST_FULL_REV 7 #dene PF_CST_TOGGLE_DIR 8 #dene PF_PWM_FLOAT 0 #dene PF_PWM_FWD1 1 #dene PF_PWM_FWD2 2 #dene PF_PWM_FWD3 3 #dene PF_PWM_FWD4 4 #dene PF_PWM_FWD5 5 #dene PF_PWM_FWD6 6 #dene PF_PWM_FWD7 7 #dene PF_PWM_BRAKE 8 #dene PF_PWM_REV7 9 #dene PF_PWM_REV6 10 #dene PF_PWM_REV5 11 #dene PF_PWM_REV4 12

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1043

#dene PF_PWM_REV3 13 #dene PF_PWM_REV2 14 #dene PF_PWM_REV1 15 #dene HT_ADDR_IRSEEKER 0x02 #dene HT_ADDR_IRSEEKER2 0x10 #dene HT_ADDR_IRRECEIVER 0x02 #dene HT_ADDR_COMPASS 0x02 #dene HT_ADDR_ACCEL 0x02 #dene HT_ADDR_COLOR 0x02 #dene HT_ADDR_COLOR2 0x02 #dene HT_ADDR_IRLINK 0x02 #dene HT_ADDR_ANGLE 0x02 #dene HTIR2_MODE_1200 0 #dene HTIR2_MODE_600 1 #dene HTIR2_REG_MODE 0x41 #dene HTIR2_REG_DCDIR 0x42 #dene HTIR2_REG_DC01 0x43 #dene HTIR2_REG_DC02 0x44 #dene HTIR2_REG_DC03 0x45 #dene HTIR2_REG_DC04 0x46 #dene HTIR2_REG_DC05 0x47 #dene HTIR2_REG_DCAVG 0x48 #dene HTIR2_REG_ACDIR 0x49 #dene HTIR2_REG_AC01 0x4A #dene HTIR2_REG_AC02 0x4B #dene HTIR2_REG_AC03 0x4C #dene HTIR2_REG_AC04 0x4D #dene HTIR2_REG_AC05 0x4E #dene HT_CH1_A 0 #dene HT_CH1_B 1 #dene HT_CH2_A 2 #dene HT_CH2_B 3 #dene HT_CH3_A 4 #dene HT_CH3_B 5 #dene HT_CH4_A 6 #dene HT_CH4_B 7 #dene HT_CMD_COLOR2_ACTIVE 0x00 #dene HT_CMD_COLOR2_PASSIVE 0x01 #dene HT_CMD_COLOR2_RAW 0x03 #dene HT_CMD_COLOR2_50HZ 0x35 #dene HT_CMD_COLOR2_60HZ 0x36 #dene HT_CMD_COLOR2_BLCAL 0x42 #dene HT_CMD_COLOR2_WBCAL 0x43

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1044

#dene HT_CMD_COLOR2_FAR 0x46 #dene HT_CMD_COLOR2_LED_HI 0x48 #dene HT_CMD_COLOR2_LED_LOW 0x4C #dene HT_CMD_COLOR2_NEAR 0x4E #dene HTANGLE_MODE_NORMAL 0x00 #dene HTANGLE_MODE_CALIBRATE 0x43 #dene HTANGLE_MODE_RESET 0x52 #dene HTANGLE_REG_MODE 0x41 #dene HTANGLE_REG_DCDIR 0x42 #dene HTANGLE_REG_DC01 0x43 #dene HTANGLE_REG_DC02 0x44 #dene HTANGLE_REG_DC03 0x45 #dene HTANGLE_REG_DC04 0x46 #dene HTANGLE_REG_DC05 0x47 #dene HTANGLE_REG_DCAVG 0x48 #dene HTANGLE_REG_ACDIR 0x49 #dene MS_CMD_ENERGIZED 0x45 #dene MS_CMD_DEENERGIZED 0x44 #dene MS_CMD_ADPA_ON 0x4E #dene MS_CMD_ADPA_OFF 0x4F #dene MS_ADDR_RTCLOCK 0xD0 #dene MS_ADDR_DISTNX 0x02 #dene MS_ADDR_NRLINK 0x02 #dene MS_ADDR_ACCLNX 0x02 #dene MS_ADDR_CMPSNX 0x02 #dene MS_ADDR_PSPNX 0x02 #dene MS_ADDR_LINELDR 0x02 #dene MS_ADDR_NXTCAM 0x02 #dene MS_ADDR_NXTHID 0x04 #dene MS_ADDR_NXTSERVO 0xB0 #dene MS_ADDR_NXTSERVO_EM 0x40 #dene MS_ADDR_PFMATE 0x48 #dene MS_ADDR_MTRMUX 0xB4 #dene MS_ADDR_NXTMMX 0x06 #dene MS_ADDR_IVSENS 0x12 #dene MS_ADDR_RXMUX 0x7E #dene DIST_CMD_GP2D12 0x31 #dene DIST_CMD_GP2D120 0x32 #dene DIST_CMD_GP2YA21 0x33 #dene DIST_CMD_GP2YA02 0x34 #dene DIST_CMD_CUSTOM 0x35 #dene DIST_REG_DIST 0x42 #dene DIST_REG_VOLT 0x44

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1045

#dene DIST_REG_MODULE_TYPE 0x50 #dene DIST_REG_NUM_POINTS 0x51 #dene DIST_REG_DIST_MIN 0x52 #dene DIST_REG_DIST_MAX 0x54 #dene DIST_REG_VOLT1 0x56 #dene DIST_REG_DIST1 0x58 #dene PSP_CMD_DIGITAL 0x41 #dene PSP_CMD_ANALOG 0x73 #dene PSP_REG_BTNSET1 0x42 #dene PSP_REG_BTNSET2 0x43 #dene PSP_REG_XLEFT 0x44 #dene PSP_REG_YLEFT 0x45 #dene PSP_REG_XRIGHT 0x46 #dene PSP_REG_YRIGHT 0x47 #dene PSP_BTNSET1_LEFT 0x01 #dene PSP_BTNSET1_DOWN 0x02 #dene PSP_BTNSET1_RIGHT 0x04 #dene PSP_BTNSET1_UP 0x08 #dene PSP_BTNSET1_R3 0x20 #dene PSP_BTNSET1_L3 0x40 #dene PSP_BTNSET2_SQUARE 0x01 #dene PSP_BTNSET2_CROSS 0x02 #dene PSP_BTNSET2_CIRCLE 0x04 #dene PSP_BTNSET2_TRIANGLE 0x08 #dene PSP_BTNSET2_R1 0x10 #dene PSP_BTNSET2_L1 0x20 #dene PSP_BTNSET2_R2 0x40 #dene PSP_BTNSET2_L2 0x80 #dene NRLINK_CMD_2400 0x44 #dene NRLINK_CMD_FLUSH 0x46 #dene NRLINK_CMD_4800 0x48 #dene NRLINK_CMD_IR_LONG 0x4C #dene NRLINK_CMD_IR_SHORT 0x53 #dene NRLINK_CMD_RUN_MACRO 0x52 #dene NRLINK_CMD_TX_RAW 0x55 #dene NRLINK_CMD_SET_RCX 0x58 #dene NRLINK_CMD_SET_TRAIN 0x54 #dene NRLINK_CMD_SET_PF 0x50 #dene NRLINK_REG_BYTES 0x40 #dene NRLINK_REG_DATA 0x42 #dene NRLINK_REG_EEPROM 0x50 #dene ACCL_CMD_X_CAL 0x58 #dene ACCL_CMD_Y_CAL 0x59

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1046

#dene ACCL_CMD_Z_CAL 0x5a #dene ACCL_CMD_X_CAL_END 0x78 #dene ACCL_CMD_Y_CAL_END 0x79 #dene ACCL_CMD_Z_CAL_END 0x7a #dene ACCL_CMD_RESET_CAL 0x52 #dene ACCL_REG_SENS_LVL 0x19 #dene ACCL_REG_X_TILT 0x42 #dene ACCL_REG_Y_TILT 0x43 #dene ACCL_REG_Z_TILT 0x44 #dene ACCL_REG_X_ACCEL 0x45 #dene ACCL_REG_Y_ACCEL 0x47 #dene ACCL_REG_Z_ACCEL 0x49 #dene ACCL_REG_X_OFFSET 0x4b #dene ACCL_REG_X_RANGE 0x4d #dene ACCL_REG_Y_OFFSET 0x4f #dene ACCL_REG_Y_RANGE 0x51 #dene ACCL_REG_Z_OFFSET 0x53 #dene ACCL_REG_Z_RANGE 0x55 #dene ACCL_SENSITIVITY_LEVEL_1 0x31 #dene ACCL_SENSITIVITY_LEVEL_2 0x32 #dene ACCL_SENSITIVITY_LEVEL_3 0x33 #dene ACCL_SENSITIVITY_LEVEL_4 0x34 #dene PFMATE_REG_CMD 0x41 #dene PFMATE_REG_CHANNEL 0x42 #dene PFMATE_REG_MOTORS 0x43 #dene PFMATE_REG_A_CMD 0x44 #dene PFMATE_REG_A_SPEED 0x45 #dene PFMATE_REG_B_CMD 0x46 #dene PFMATE_REG_B_SPEED 0x47 #dene PFMATE_CMD_GO 0x47 #dene PFMATE_CMD_RAW 0x52 #dene PFMATE_MOTORS_BOTH 0x00 #dene PFMATE_MOTORS_A 0x01 #dene PFMATE_MOTORS_B 0x02 #dene PFMATE_CHANNEL_1 1 #dene PFMATE_CHANNEL_2 2 #dene PFMATE_CHANNEL_3 3 #dene PFMATE_CHANNEL_4 4 #dene NXTSERVO_REG_VOLTAGE 0x41 #dene NXTSERVO_REG_CMD 0x41 #dene NXTSERVO_REG_S1_POS 0x42 #dene NXTSERVO_REG_S2_POS 0x44 #dene NXTSERVO_REG_S3_POS 0x46

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1047

#dene NXTSERVO_REG_S4_POS 0x48 #dene NXTSERVO_REG_S5_POS 0x4A #dene NXTSERVO_REG_S6_POS 0x4C #dene NXTSERVO_REG_S7_POS 0x4E #dene NXTSERVO_REG_S8_POS 0x50 #dene NXTSERVO_REG_S1_SPEED 0x52 #dene NXTSERVO_REG_S2_SPEED 0x53 #dene NXTSERVO_REG_S3_SPEED 0x54 #dene NXTSERVO_REG_S4_SPEED 0x55 #dene NXTSERVO_REG_S5_SPEED 0x56 #dene NXTSERVO_REG_S6_SPEED 0x57 #dene NXTSERVO_REG_S7_SPEED 0x58 #dene NXTSERVO_REG_S8_SPEED 0x59 #dene NXTSERVO_REG_S1_QPOS 0x5A #dene NXTSERVO_REG_S2_QPOS 0x5B #dene NXTSERVO_REG_S3_QPOS 0x5C #dene NXTSERVO_REG_S4_QPOS 0x5D #dene NXTSERVO_REG_S5_QPOS 0x5E #dene NXTSERVO_REG_S6_QPOS 0x5F #dene NXTSERVO_REG_S7_QPOS 0x60 #dene NXTSERVO_REG_S8_QPOS 0x61 #dene NXTSERVO_EM_REG_CMD 0x00 #dene NXTSERVO_EM_REG_EEPROM_START 0x21 #dene NXTSERVO_EM_REG_EEPROM_END 0xFF #dene NXTSERVO_POS_CENTER 1500 #dene NXTSERVO_POS_MIN 500 #dene NXTSERVO_POS_MAX 2500 #dene NXTSERVO_QPOS_CENTER 150 #dene NXTSERVO_QPOS_MIN 50 #dene NXTSERVO_QPOS_MAX 250 #dene NXTSERVO_SERVO_1 0 #dene NXTSERVO_SERVO_2 1 #dene NXTSERVO_SERVO_3 2 #dene NXTSERVO_SERVO_4 3 #dene NXTSERVO_SERVO_5 4 #dene NXTSERVO_SERVO_6 5 #dene NXTSERVO_SERVO_7 6 #dene NXTSERVO_SERVO_8 7 #dene NXTSERVO_CMD_INIT 0x49 #dene NXTSERVO_CMD_RESET 0x53 #dene NXTSERVO_CMD_HALT 0x48 #dene NXTSERVO_CMD_RESUME 0x52 #dene NXTSERVO_CMD_GOTO 0x47

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1048

#dene NXTSERVO_CMD_PAUSE 0x50 #dene NXTSERVO_CMD_EDIT1 0x45 #dene NXTSERVO_CMD_EDIT2 0x4D #dene NXTSERVO_EM_CMD_QUIT 0x51 #dene NXTHID_REG_CMD 0x41 #dene NXTHID_REG_MODIFIER 0x42 #dene NXTHID_REG_DATA 0x43 #dene NXTHID_MOD_NONE 0x00 #dene NXTHID_MOD_LEFT_CTRL 0x01 #dene NXTHID_MOD_LEFT_SHIFT 0x02 #dene NXTHID_MOD_LEFT_ALT 0x04 #dene NXTHID_MOD_LEFT_GUI 0x08 #dene NXTHID_MOD_RIGHT_CTRL 0x10 #dene NXTHID_MOD_RIGHT_SHIFT 0x20 #dene NXTHID_MOD_RIGHT_ALT 0x40 #dene NXTHID_MOD_RIGHT_GUI 0x80 #dene NXTHID_CMD_ASCII 0x41 #dene NXTHID_CMD_DIRECT 0x44 #dene NXTHID_CMD_TRANSMIT 0x54 #dene NXTPM_REG_CMD 0x41 #dene NXTPM_REG_CURRENT 0x42 #dene NXTPM_REG_VOLTAGE 0x44 #dene NXTPM_REG_CAPACITY 0x46 #dene NXTPM_REG_POWER 0x48 #dene NXTPM_REG_TOTALPOWER 0x4A #dene NXTPM_REG_MAXCURRENT 0x4E #dene NXTPM_REG_MINCURRENT 0x50 #dene NXTPM_REG_MAXVOLTAGE 0x52 #dene NXTPM_REG_MINVOLTAGE 0x54 #dene NXTPM_REG_TIME 0x56 #dene NXTPM_REG_USERGAIN 0x5A #dene NXTPM_REG_GAIN 0x5E #dene NXTPM_REG_ERRORCOUNT 0x5F #dene NXTPM_CMD_RESET 0x52 #dene NXTSE_ZONE_NONE 0 #dene NXTSE_ZONE_FRONT 1 #dene NXTSE_ZONE_LEFT 2 #dene NXTSE_ZONE_RIGHT 3 #dene NXTLL_REG_CMD 0x41 #dene NXTLL_REG_STEERING 0x42 #dene NXTLL_REG_AVERAGE 0x43 #dene NXTLL_REG_RESULT 0x44 #dene NXTLL_REG_SETPOINT 0x45

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1049

#dene NXTLL_REG_KP_VALUE 0x46 #dene NXTLL_REG_KI_VALUE 0x47 #dene NXTLL_REG_KD_VALUE 0x48 #dene NXTLL_REG_CALIBRATED 0x49 #dene NXTLL_REG_WHITELIMITS 0x51 #dene NXTLL_REG_BLACKLIMITS 0x59 #dene NXTLL_REG_KP_FACTOR 0x61 #dene NXTLL_REG_KI_FACTOR 0x62 #dene NXTLL_REG_KD_FACTOR 0x63 #dene NXTLL_REG_WHITEDATA 0x64 #dene NXTLL_REG_BLACKDATA 0x6C #dene NXTLL_REG_RAWVOLTAGE 0x74 #dene NXTLL_CMD_USA 0x41 #dene NXTLL_CMD_BLACK 0x42 #dene NXTLL_CMD_POWERDOWN 0x44 #dene NXTLL_CMD_EUROPEAN 0x45 #dene NXTLL_CMD_INVERT 0x49 #dene NXTLL_CMD_POWERUP 0x50 #dene NXTLL_CMD_RESET 0x52 #dene NXTLL_CMD_SNAPSHOT 0x53 #dene NXTLL_CMD_UNIVERSAL 0x55 #dene NXTLL_CMD_WHITE 0x57 #dene RFID_MODE_STOP 0 #dene RFID_MODE_SINGLE 1 #dene RFID_MODE_CONTINUOUS 2 #dene CT_ADDR_RFID 0x04 #dene CT_REG_STATUS 0x32 #dene CT_REG_MODE 0x41 #dene CT_REG_DATA 0x42 #dene RICImgPoint(_X, _Y) (_X)&0xFF, (_X)>>8, (_Y)&0xFF, (_Y)>>8
Output an RIC ImgPoint structure.

#dene RICImgRect(_Pt, _W, _H) _Pt, (_W)&0xFF, (_W)>>8, (_H)&0xFF, (_H)>>8


Output an RIC ImgRect structure.

#dene RICOpDescription(_Options, _Width, _Height) 8, 0, 0, 0, (_Options)&0xFF, (_Options)>>8, (_Width)&0xFF, (_Width)>>8, (_Height)&0xFF, (_Height)>>8
Output an RIC Description opcode.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1050

#dene RICOpCopyBits(_CopyOptions, _DataAddr, _SrcRect, _DstPoint) 18, 0, 3, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, (_DataAddr)&0xFF, (_DataAddr)>>8, _SrcRect, _DstPoint
Output an RIC CopyBits opcode.

#dene RICOpPixel(_CopyOptions, _Point, _Value) 10, 0, 4, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, _Point, (_Value)&0xFF, (_Value)>>8
Output an RIC Pixel opcode.

#dene RICOpLine(_CopyOptions, _Point1, _Point2) 12, 0, 5, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, _Point1, _Point2


Output an RIC Line opcode.

#dene RICOpRect(_CopyOptions, _Point, _Width, _Height) 12, 0, 6, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, _Point, (_Width)&0xFF, (_Width)>>8, (_Height)&0xFF, (_Height)>>8
Output an RIC Rect opcode.

#dene RICOpCircle(_CopyOptions, _Point, _Radius) 10, 0, 7, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, _Point, (_Radius)&0xFF, (_Radius)>>8
Output an RIC Circle opcode.

#dene RICOpNumBox(_CopyOptions, _Point, _Value) 10, 0, 8, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, _Point, (_Value)&0xFF, (_Value)>>8
Output an RIC NumBox opcode.

#dene RICOpSprite(_DataAddr, _Rows, _BytesPerRow, _SpriteData) Rows_BytesPerRow)+((_Rows_BytesPerRow)%2)+8)&0xFF, Rows_BytesPerRow)+((_Rows_BytesPerRow)%2)+8)>>8, 1, 0, DataAddr)&0xFF, (_DataAddr)>>8, (_Rows)&0xFF, (_Rows)>>8, BytesPerRow)&0xFF, (_BytesPerRow)>>8, _SpriteData
Output an RIC Sprite opcode.

((_((_(_(_-

#dene RICSpriteData(...) __VA_ARGS__


Output RIC sprite data.

#dene RICOpVarMap(_DataAddr, _MapCount, _MapFunction) ((_MapCount4)+6)&0xFF, ((_MapCount4)+6)>>8, 2, 0, (_DataAddr)&0xFF, (_DataAddr)>>8, (_MapCount)&0xFF, (_MapCount)>>8, _MapFunction
Output an RIC VarMap opcode.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1051

#dene RICMapElement(_Domain, _Range) Domain)>>8, (_Range)&0xFF, (_Range)>>8


Output an RIC map element.

(_Domain)&0xFF,

(_-

#dene RICMapFunction(_MapElement,...) _MapElement, __VA_ARGS__


Output an RIC VarMap function.

#dene RICArg(_arg) ((_arg)|0x1000)


Output an RIC parameterized argument.

#dene RICMapArg(_mapidx, mapidx)&0xF)<<8))

_arg)

((_arg)|0x1000|(((_-

Output an RIC parameterized and mapped argument.

#dene RICOpPolygon(_CopyOptions, _Count, _ThePoints) ((_Count4)+6)&0xFF, ((_Count4)+6)>>8, 10, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, (_Count)&0xFF, (_Count)>>8, _ThePoints
Output an RIC Polygon opcode.

#dene RICPolygonPoints(_pPoint1, _pPoint2,...) _pPoint1, _pPoint2, __VA_ARGS__


Output RIC polygon points.

#dene RICOpEllipse(_CopyOptions, _Point, _RadiusX, _RadiusY) 12, 0, 9, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, _Point, (_RadiusX)&0xFF, (_RadiusX)>>8, (_RadiusY)&0xFF, (_RadiusY)>>8
Output an RIC Ellipse opcode.

#dene CHAR_BIT 8 #dene SCHAR_MIN -128 #dene SCHAR_MAX 127 #dene UCHAR_MAX 255 #dene CHAR_MIN -128 #dene CHAR_MAX 127 #dene SHRT_MIN -32768 #dene SHRT_MAX 32767 #dene USHRT_MAX 65535 #dene INT_MIN -32768 #dene INT_MAX 32767 #dene UINT_MAX 65535 #dene LONG_MIN -2147483648 #dene LONG_MAX 2147483647 #dene ULONG_MAX 4294967295

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1052

8.1.1

#dene RAND_MAX 32768 #dene GL_POLYGON 1 #dene GL_LINE 2 #dene GL_POINT 3 #dene GL_CIRCLE 4 #dene GL_TRANSLATE_X 1 #dene GL_TRANSLATE_Y 2 #dene GL_TRANSLATE_Z 3 #dene GL_ROTATE_X 4 #dene GL_ROTATE_Y 5 #dene GL_ROTATE_Z 6 #dene GL_SCALE_X 7 #dene GL_SCALE_Y 8 #dene GL_SCALE_Z 9 #dene GL_CIRCLE_SIZE 1 #dene GL_CULL_MODE 2 #dene GL_CAMERA_DEPTH 3 #dene GL_ZOOM_FACTOR 4 #dene GL_CULL_BACK 2 #dene GL_CULL_FRONT 3 #dene GL_CULL_NONE 4 Detailed Description

Constants and macros common to both NBC and NXC. NBCCommon.h contains declarations for the NBC and NXC NXT API functions. License: The contents of this le are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this le except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specic language governing rights and limitations under the License. The Initial Developer of this code is John Hansen. Portions created by John Hansen are Copyright (C) 2009-2010 John Hansen. All Rights Reserved. ---------------------------------------------------------------------------Author: John Hansen (bricxcc_at_comcast.net)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1053

Date: 2011-03-13 Version: 63 8.1.2 8.1.2.1 Dene Documentation #dene ACCL_CMD_RESET_CAL 0x52 Reset to factory calibration 8.1.2.2 #dene ACCL_CMD_X_CAL 0x58 Acquire X-axis calibration point 8.1.2.3 #dene ACCL_CMD_X_CAL_END 0x78 Acquire X-axis calibration point and end calibration 8.1.2.4 #dene ACCL_CMD_Y_CAL 0x59 Acquire Y-axis calibration point 8.1.2.5 #dene ACCL_CMD_Y_CAL_END 0x79 Acquire Y-axis calibration point and end calibration 8.1.2.6 #dene ACCL_CMD_Z_CAL 0x5a Acquire Z-axis calibration point 8.1.2.7 #dene ACCL_CMD_Z_CAL_END 0x7a Acquire Z-axis calibration point and end calibration 8.1.2.8 #dene ACCL_REG_SENS_LVL 0x19 The current sensitivity

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1054

8.1.2.9

#dene ACCL_REG_X_ACCEL 0x45 The X-axis acceleration data

8.1.2.10

#dene ACCL_REG_X_OFFSET 0x4b The X-axis offset

8.1.2.11

#dene ACCL_REG_X_RANGE 0x4d The X-axis range

8.1.2.12

#dene ACCL_REG_X_TILT 0x42 The X-axis tilt data

8.1.2.13

#dene ACCL_REG_Y_ACCEL 0x47 The Y-axis acceleration data

8.1.2.14

#dene ACCL_REG_Y_OFFSET 0x4f The Y-axis offset

8.1.2.15

#dene ACCL_REG_Y_RANGE 0x51 The Y-axis range

8.1.2.16

#dene ACCL_REG_Y_TILT 0x43 The Y-axis tilt data

8.1.2.17

#dene ACCL_REG_Z_ACCEL 0x49 The Z-axis acceleration data

8.1.2.18

#dene ACCL_REG_Z_OFFSET 0x53 The Z-axis offset

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1055

8.1.2.19

#dene ACCL_REG_Z_RANGE 0x55 The Z-axis range

8.1.2.20

#dene ACCL_REG_Z_TILT 0x44 The Z-axis tilt data

8.1.2.21

#dene ACCL_SENSITIVITY_LEVEL_1 0x31 The ACCL-Nx sensitivity level 1

Examples: ex_SetACCLNxSensitivity.nxc.

8.1.2.22

#dene ACCL_SENSITIVITY_LEVEL_2 0x32 The ACCL-Nx sensitivity level 2

8.1.2.23

#dene ACCL_SENSITIVITY_LEVEL_3 0x33 The ACCL-Nx sensitivity level 3

8.1.2.24

#dene ACCL_SENSITIVITY_LEVEL_4 0x34 The ACCL-Nx sensitivity level 4

8.1.2.25

#dene ActualSpeedField 3

Actual speed eld. Contains the actual power level (-100 to 100). Read only. Return the percent of full power the rmware is applying to the output. This may vary from the PowerField value when auto-regulation code in the rmware responds to a load on the output. 8.1.2.26 #dene BITMAP_1 0 Bitmap 1

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1056

8.1.2.27

#dene BITMAP_2 1 Bitmap 2

8.1.2.28

#dene BITMAP_3 2 Bitmap 3

8.1.2.29

#dene BITMAP_4 3 Bitmap 4

8.1.2.30

#dene BITMAPS 4 The number of bitmap bits

8.1.2.31

#dene BlockTachoCountField 13

NXT-G block tachometer count eld. Contains the current NXT-G block tachometer count. Read only. Return the block-relative position counter value for the specied port. Refer to the UpdateFlagsField description for information about how to use block-relative position counts. Set the UF_UPDATE_RESET_BLOCK_COUNT ag in UpdateFlagsField to request that the rmware reset the BlockTachoCountField. The sign of BlockTachoCountField indicates the direction of rotation. Positive values indicate forward rotation and negative values indicate reverse rotation. Forward and reverse depend on the orientation of the motor. 8.1.2.32 #dene BREAKOUT_REQ 3 VM should break out of current thread 8.1.2.33 #dene BT_ARM_CMD_MODE 1 BtState constant bluetooth command mode 8.1.2.34 #dene BT_ARM_DATA_MODE 2 BtState constant bluetooth data mode

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1057

8.1.2.35

#dene BT_ARM_OFF 0 BtState constant bluetooth off

8.1.2.36

#dene BT_BRICK_PORT_OPEN 0x02 BtStateStatus port open bit

8.1.2.37

#dene BT_BRICK_VISIBILITY 0x01 BtStateStatus brick visibility bit

8.1.2.38

#dene BT_CMD_BYTE 1 Size of Bluetooth command

8.1.2.39

#dene BT_CMD_READY 0x02 A constant representing bluetooth direct command

8.1.2.40

#dene BT_CONNECTION_0_ENABLE 0x10 BtStateStatus connection 0 enable/disable bit

8.1.2.41

#dene BT_CONNECTION_1_ENABLE 0x20 BtStateStatus connection 1 enable/disable bit

8.1.2.42

#dene BT_CONNECTION_2_ENABLE 0x40 BtStateStatus connection 2 enable/disable bit

8.1.2.43

#dene BT_CONNECTION_3_ENABLE 0x80 BtStateStatus connection 3 enable/disable bit

8.1.2.44

#dene BT_DEFAULT_INQUIRY_MAX 0 Bluetooth default inquiry Max (0 == unlimited)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1058

8.1.2.45

#dene BT_DEFAULT_INQUIRY_TIMEOUT_LO 15 Bluetooth inquiry timeout (151.28 sec = 19.2 sec)

8.1.2.46

#dene BT_DEVICE_AWAY 0x80 Bluetooth device away

8.1.2.47

#dene BT_DEVICE_EMPTY 0x00 Bluetooth device table empty

8.1.2.48

#dene BT_DEVICE_KNOWN 0x02 Bluetooth device known

8.1.2.49

#dene BT_DEVICE_NAME 0x40 Bluetooth device name

8.1.2.50

#dene BT_DEVICE_UNKNOWN 0x01 Bluetooth device unknown

8.1.2.51

#dene BT_DISABLE 0x01 BtHwStatus bluetooth disable

8.1.2.52

#dene BT_ENABLE 0x00 BtHwStatus bluetooth enable

8.1.2.53

#dene BTN1 0 The exit button.

Examples: ex_ButtonCount.nxc, ButtonLongReleaseCount.nxc, ex_ButtonLongPressCount.nxc, ex_ButtonPressCount.nxc, ex_ex_-

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1059

ButtonReleaseCount.nxc, ex_ButtonShortReleaseCount.nxc, ex_ButtonState.nxc, ex_ReadButtonEx.nxc, ex_SetButtonLongPressCount.nxc, ex_SetButtonLongReleaseCount.nxc, ex_SetButtonPressCount.nxc, ex_SetButtonReleaseCount.nxc, ex_SetButtonShortReleaseCount.nxc, and ex_SetButtonState.nxc.

8.1.2.54

#dene BTN2 1 The right button.

8.1.2.55

#dene BTN3 2 The left button.

8.1.2.56

#dene BTN4 3 The enter button.

8.1.2.57

#dene BTNCENTER BTN4 The enter button.

Examples: ex_buttonpressed.nxc, and ex_HTGyroTest.nxc.

8.1.2.58

#dene BTNEXIT BTN1 The exit button.

Examples: ex_buttonpressed.nxc, ex_SetAbortFlag.nxc, and ex_SetLongAbort.nxc.

8.1.2.59

#dene BTNLEFT BTN3 The left button.

Examples: ex_buttonpressed.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1060

8.1.2.60

#dene BTNRIGHT BTN2 The right button.

Examples: ex_buttonpressed.nxc, and ex_sysreadbutton.nxc.

8.1.2.61

#dene BTNSTATE_LONG_PRESSED_EV 0x04 Button is in the long pressed state.

Examples: ex_SetAbortFlag.nxc, and ex_SetLongAbort.nxc.

8.1.2.62

#dene BTNSTATE_LONG_RELEASED_EV 0x08 Button is in the long released state.

8.1.2.63

#dene BTNSTATE_NONE 0x10 The default button state.

8.1.2.64

#dene BTNSTATE_PRESSED_EV 0x01 Button is in the pressed state.

Examples: ex_SetButtonState.nxc.

8.1.2.65

#dene BTNSTATE_PRESSED_STATE 0x80 A bitmask for the button pressed state

8.1.2.66

#dene BTNSTATE_SHORT_RELEASED_EV 0x02 Button is in the short released state.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1061

8.1.2.67

#dene ButtonModuleID 0x00040001 The button module ID

8.1.2.68

#dene ButtonModuleName "Button.mod" The button module name

8.1.2.69

#dene ButtonOffsetLongPressCnt(b) (((b)8)+1) Offset to the LongPressCnt eld. This eld stores the long press count.

8.1.2.70

#dene ButtonOffsetLongRelCnt(b) (((b)8)+3) Offset to the LongRelCnt eld. This eld stores the long release count.

8.1.2.71

#dene ButtonOffsetPressedCnt(b) (((b)8)+0) Offset to the PressedCnt eld. This eld stores the press count.

8.1.2.72

#dene ButtonOffsetRelCnt(b) (((b)8)+4) Offset to the RelCnt eld. This eld stores the release count.

8.1.2.73

#dene ButtonOffsetShortRelCnt(b) (((b)8)+2) Offset to the ShortRelCnt eld. This eld stores the short release count.

8.1.2.74

#dene ButtonOffsetState(b) ((b)+32) Offset to the State eld. This eld stores the current button state.

8.1.2.75

#dene CHAR_BIT 8 The number of bits in the char type

8.1.2.76

#dene CHAR_MAX 127 The maximum value of the char type

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1062

8.1.2.77

#dene CHAR_MIN -128 The minimum value of the char type

8.1.2.78

#dene CLUMP_DONE 1 VM has nished executing thread

8.1.2.79

#dene CLUMP_SUSPEND 2 VM should suspend thread

8.1.2.80

#dene ColorSensorRead 34 Read data from the NXT 2.0 color sensor

8.1.2.81

#dene COM_CHANNEL_FOUR_ACTIVE 0x08 Low speed channel 4 is active

8.1.2.82

#dene COM_CHANNEL_NONE_ACTIVE 0x00 None of the low speed channels are active

8.1.2.83

#dene COM_CHANNEL_ONE_ACTIVE 0x01 Low speed channel 1 is active

8.1.2.84

#dene COM_CHANNEL_THREE_ACTIVE 0x04 Low speed channel 3 is active

8.1.2.85

#dene COM_CHANNEL_TWO_ACTIVE 0x02 Low speed channel 2 is active

8.1.2.86

#dene CommandModuleID 0x00010001 The command module ID

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1063

Examples: ex_reladdressof.nxc, RemoteIOMapWriteBytes.nxc, sysiomapreadbyid.nxc. ex_RemoteIOMapRead.nxc, ex_RemoteIOMapWriteValue.nxc, ex_and ex_-

8.1.2.87

#dene CommandModuleName "Command.mod" The command module name

Examples: ex_sysiomapread.nxc.

8.1.2.88

#dene CommandOffsetActivateFlag 30 Offset to the activate ag

8.1.2.89

#dene CommandOffsetAwake 29 Offset to the VMs awake state

8.1.2.90

#dene CommandOffsetDeactivateFlag 31 Offset to the deactivate ag

8.1.2.91

#dene CommandOffsetFileName 32 Offset to the running programs lename

8.1.2.92

#dene CommandOffsetFormatString 0 Offset to the format string

8.1.2.93

#dene CommandOffsetMemoryPool 52 Offset to the VMs memory pool

Examples: ex_reladdressof.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1064

8.1.2.94

#dene CommandOffsetOffsetDS 24 Offset to the running programs data space (DS)

8.1.2.95

#dene CommandOffsetOffsetDVA 26 Offset to the running programs DOPE vector address (DVA)

8.1.2.96

#dene CommandOffsetPRCHandler 16 Offset to the RC Handler function pointer

8.1.2.97

#dene CommandOffsetProgStatus 28 Offset to the running programs status

Examples: ex_RemoteIOMapRead.nxc, ex_RemoteIOMapWriteBytes.nxc, RemoteIOMapWriteValue.nxc. and ex_-

8.1.2.98

#dene CommandOffsetSyncTick 32824 Offset to the VM sync tick

8.1.2.99

#dene CommandOffsetSyncTime 32820 Offset to the VM sync time

8.1.2.100

#dene CommandOffsetTick 20 Offset to the VMs current tick

Examples: ex_sysiomapread.nxc, and ex_sysiomapreadbyid.nxc.

8.1.2.101

#dene CommBTCheckStatus 28 Check the bluetooth status

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1065

8.1.2.102

#dene CommBTConnection 36 Connect or disconnect to a known bluetooth device

8.1.2.103

#dene CommBTOnOff 35 Turn the bluetooth radio on or off

8.1.2.104

#dene CommBTRead 30 Read from a bluetooth connection

8.1.2.105

#dene CommBTWrite 29 Write to a bluetooth connections

8.1.2.106

#dene CommExecuteFunction 81 Execute one of the Comm modules internal functions

8.1.2.107

#dene CommHSCheckStatus 39 Check the status of the hi-speed port

8.1.2.108

#dene CommHSControl 88 Control the hi-speed port

8.1.2.109

#dene CommHSRead 38 Read data from the hi-speed port

8.1.2.110

#dene CommHSWrite 37 Write data to the hi-speed port

8.1.2.111

#dene CommLSCheckStatus 23 Check the status of a lowspeed (aka I2C) device

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1066

8.1.2.112

#dene CommLSRead 22 Read from a lowspeed (aka I2C) device

8.1.2.113

#dene CommLSWrite 21 Write to a lowspeed (aka I2C) device

8.1.2.114

#dene CommLSWriteEx 89 Write to a lowspeed (aka I2C) device with optional restart on read

8.1.2.115

#dene CommModuleID 0x00050001 The Comm module ID

8.1.2.116

#dene CommModuleName "Comm.mod" The Comm module name

8.1.2.117

#dene CommOffsetBrickDataBdAddr 1144 Offset to Bluetooth address (7 bytes)

8.1.2.118

#dene CommOffsetBrickDataBluecoreVersion 1142 Offset to Bluecore version (2 bytes)

8.1.2.119

#dene CommOffsetBrickDataBtHwStatus 1152 Offset to BtHwStatus (1 byte)

8.1.2.120

#dene CommOffsetBrickDataBtStateStatus 1151 Offset to BtStateStatus (1 byte)

8.1.2.121

#dene CommOffsetBrickDataName 1126 Offset to brick name (16 bytes)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1067

8.1.2.122

#dene CommOffsetBrickDataTimeOutValue 1153 Offset to data timeout value (1 byte)

8.1.2.123

#dene CommOffsetBtConnectTableBdAddr(p) (((p)47)+974) Offset to Bluetooth connect table address (7 bytes)

8.1.2.124

#dene CommOffsetBtConnectTableClassOfDevice(p) (((p)47)+954) Offset to Bluetooth connect table device class (4 bytes)

8.1.2.125

#dene CommOffsetBtConnectTableHandleNr(p) (((p)47)+981) Offset to Bluetooth connect table handle (1 byte)

8.1.2.126

#dene CommOffsetBtConnectTableLinkQuality(p) (((p)47)+983) Offset to Bluetooth connect table link quality (1 byte)

8.1.2.127

#dene CommOffsetBtConnectTableName(p) (((p)47)+938) Offset to Bluetooth connect table name (16 bytes)

8.1.2.128

#dene CommOffsetBtConnectTablePinCode(p) (((p)47)+958) Offset to Bluetooth connect table pin code (16 bytes)

8.1.2.129

#dene CommOffsetBtConnectTableStreamStatus(p) (((p)47)+982) Offset to Bluetooth connect table stream status (1 byte)

8.1.2.130

#dene CommOffsetBtDataMode 1898 Offset to Bluetooth data mode (1 byte)

8.1.2.131

#dene CommOffsetBtDeviceCnt 1889 Offset to Bluetooth device count (1 byte)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1068

8.1.2.132

#dene CommOffsetBtDeviceNameCnt 1890 Offset to Bluetooth device name count (1 byte)

8.1.2.133

#dene CommOffsetBtDeviceTableBdAddr(p) (((p)31)+28) Offset to Bluetooth device table address (7 bytes)

8.1.2.134

#dene CommOffsetBtDeviceTableClassOfDevice(p) (((p)31)+24) Offset to Bluetooth device table device class (4 bytes)

8.1.2.135

#dene CommOffsetBtDeviceTableDeviceStatus(p) (((p)31)+35) Offset to Bluetooth device table status (1 byte)

8.1.2.136

#dene CommOffsetBtDeviceTableName(p) (((p)31)+8) Offset to BT device table name (16 bytes)

8.1.2.137

#dene CommOffsetBtInBufBuf 1157 Offset to Bluetooth input buffer data (128 bytes)

8.1.2.138

#dene CommOffsetBtInBufInPtr 1285 Offset to Bluetooth input buffer front pointer (1 byte)

8.1.2.139

#dene CommOffsetBtInBufOutPtr 1286 Offset to Bluetooth output buffer back pointer (1 byte)

8.1.2.140

#dene CommOffsetBtOutBufBuf 1289 Offset to Bluetooth output buffer offset data (128 bytes)

8.1.2.141

#dene CommOffsetBtOutBufInPtr 1417 Offset to Bluetooth output buffer front pointer (1 byte)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1069

8.1.2.142

#dene CommOffsetBtOutBufOutPtr 1418 Offset to Bluetooth output buffer back pointer (1 byte)

8.1.2.143

#dene CommOffsetHsDataMode 1899 Offset to High Speed data mode (1 byte)

8.1.2.144

#dene CommOffsetHsFlags 1891 Offset to High Speed ags (1 byte)

8.1.2.145

#dene CommOffsetHsInBufBuf 1421 Offset to High Speed input buffer data (128 bytes)

8.1.2.146

#dene CommOffsetHsInBufInPtr 1549 Offset to High Speed input buffer front pointer (1 byte)

8.1.2.147

#dene CommOffsetHsInBufOutPtr 1550 Offset to High Speed input buffer back pointer (1 byte)

8.1.2.148

#dene CommOffsetHsMode 1896 Offset to High Speed mode (2 bytes)

8.1.2.149

#dene CommOffsetHsOutBufBuf 1553 Offset to High Speed output buffer data (128 bytes)

8.1.2.150

#dene CommOffsetHsOutBufInPtr 1681 Offset to High Speed output buffer front pointer (1 byte)

8.1.2.151

#dene CommOffsetHsOutBufOutPtr 1682 Offset to High Speed output buffer back pointer (1 byte)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1070

8.1.2.152

#dene CommOffsetHsSpeed 1892 Offset to High Speed speed (1 byte)

8.1.2.153

#dene CommOffsetHsState 1893 Offset to High Speed state (1 byte)

8.1.2.154

#dene CommOffsetPFunc 0 Offset to the Comm module rst function pointer (4 bytes)

8.1.2.155

#dene CommOffsetPFuncTwo 4 Offset to the Comm module second function pointer (4 bytes)

8.1.2.156

#dene CommOffsetUsbInBufBuf 1685 Offset to Usb input buffer data (64 bytes)

8.1.2.157

#dene CommOffsetUsbInBufInPtr 1749 Offset to Usb input buffer front pointer (1 byte)

8.1.2.158

#dene CommOffsetUsbInBufOutPtr 1750 Offset to Usb input buffer back pointer (1 byte)

8.1.2.159

#dene CommOffsetUsbOutBufBuf 1753 Offset to Usb output buffer data (64 bytes)

8.1.2.160

#dene CommOffsetUsbOutBufInPtr 1817 Offset to Usb output buffer front pointer (1 byte)

8.1.2.161

#dene CommOffsetUsbOutBufOutPtr 1818 Offset to Usb output buffer back pointer (1 byte)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1071

8.1.2.162

#dene CommOffsetUsbPollBufBuf 1821 Offset to Usb Poll buffer data (64 bytes)

8.1.2.163

#dene CommOffsetUsbPollBufInPtr 1885 Offset to Usb Poll buffer front pointer (1 byte)

8.1.2.164

#dene CommOffsetUsbPollBufOutPtr 1886 Offset to Usb Poll buffer back pointer (1 byte)

8.1.2.165

#dene CommOffsetUsbState 1894 Offset to Usb State (1 byte)

8.1.2.166

#dene ComputeCalibValue 42 Compute a calibration value

8.1.2.167

#dene CONN_BT0 0x0 Bluetooth connection 0

8.1.2.168

#dene CONN_BT1 0x1 Bluetooth connection 1

Examples: ex_RemoteCloseFile.nxc, ex_RemoteConnectionIdle.nxc, ex_RemoteConnectionWrite.nxc, ex_RemoteDatalogRead.nxc, ex_RemoteDatalogSetTimes.nxc, ex_RemoteDeleteFile.nxc, ex_RemoteDeleteUserFlash.nxc, ex_RemoteFindFirstFile.nxc, ex_RemoteFindNextFile.nxc, ex_RemoteGetBatteryLevel.nxc, ex_RemoteGetBluetoothAddress.nxc, ex_RemoteGetConnectionCount.nxc, ex_RemoteGetConnectionName.nxc, ex_RemoteGetContactCount.nxc, ex_RemoteGetContactName.nxc, ex_RemoteGetCurrentProgramName.nxc, ex_RemoteGetDeviceInfo.nxc, ex_RemoteGetFirmwareVersion.nxc, ex_RemoteGetInputValues.nxc, ex_RemoteGetOutputState.nxc, ex_RemoteGetProperty.nxc, ex_RemoteIOMapRead.nxc, ex_RemoteIOMapWriteBytes.nxc, ex_RemoteIOMapWriteValue.nxc,
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1072

ex_RemoteLowspeedGetStatus.nxc, ex_RemoteLowspeedRead.nxc, ex_RemoteLowspeedWrite.nxc, ex_RemoteOpenAppendData.nxc, ex_RemoteOpenRead.nxc, ex_RemoteOpenWrite.nxc, ex_RemoteOpenWriteData.nxc, ex_RemoteOpenWriteLinear.nxc, ex_RemotePollCommand.nxc, ex_RemotePollCommandLength.nxc, ex_RemoteRead.nxc, ex_RemoteRenameFile.nxc, ex_RemoteResetTachoCount.nxc, ex_RemoteSetProperty.nxc, and ex_RemoteWrite.nxc.

8.1.2.169

#dene CONN_BT2 0x2 Bluetooth connection 2

8.1.2.170

#dene CONN_BT3 0x3 Bluetooth connection 3

8.1.2.171

#dene CONN_HS4 0x4 RS485 (hi-speed) connection (port 4, all devices)

8.1.2.172

#dene CONN_HS_1 0x5 RS485 (hi-speed) connection (port 4, device address 1)

8.1.2.173

#dene CONN_HS_2 0x6 RS485 (hi-speed) connection (port 4, device address 2)

8.1.2.174

#dene CONN_HS_3 0x7 RS485 (hi-speed) connection (port 4, device address 3)

8.1.2.175

#dene CONN_HS_4 0x8 RS485 (hi-speed) connection (port 4, device address 4)

8.1.2.176

#dene CONN_HS_5 0x9 RS485 (hi-speed) connection (port 4, device address 5)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1073

8.1.2.177

#dene CONN_HS_6 0xa RS485 (hi-speed) connection (port 4, device address 6)

8.1.2.178

#dene CONN_HS_7 0xb RS485 (hi-speed) connection (port 4, device address 7)

8.1.2.179

#dene CONN_HS_8 0xc RS485 (hi-speed) connection (port 4, device address 8)

8.1.2.180

#dene CONN_HS_ALL 0x4 RS485 (hi-speed) connection (port 4, all devices)

8.1.2.181

#dene CT_ADDR_RFID 0x04 RFID I2C address

8.1.2.182

#dene CT_REG_DATA 0x42 RFID data register

8.1.2.183

#dene CT_REG_MODE 0x41 RFID mode register

8.1.2.184

#dene CT_REG_STATUS 0x32 RFID status register

8.1.2.185

#dene DATA_MODE_GPS 0x01 Use GPS data mode

Examples: ex_DataMode.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1074

8.1.2.186

#dene DATA_MODE_MASK 0x07 A mask for the data mode bits.

8.1.2.187

#dene DATA_MODE_NXT 0x00 Use NXT data mode

Examples: ex_DataMode.nxc.

8.1.2.188

#dene DATA_MODE_RAW 0x02 Use RAW data mode

8.1.2.189

#dene DATA_MODE_UPDATE 0x08 Indicates that the data mode has been changed.

8.1.2.190

#dene DatalogGetTimes 45 Get datalog timing information

8.1.2.191

#dene DatalogWrite 44 Write to the datalog

8.1.2.192

#dene DEGREES_PER_RADIAN 180/PI Used for converting from radians to degrees

8.1.2.193

#dene DISPLAY_BUSY 0x80 R - Refresh in progress

8.1.2.194

#dene DISPLAY_CHAR 0x04 W - draw char (actual font) (CMD,TRUE,X1,Y1,Char,x)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1075

8.1.2.195

#dene DISPLAY_CONTRAST_DEFAULT 0x5A Default display contrast value

Examples: ex_contrast.nxc, and ex_setdisplaycontrast.nxc.

8.1.2.196

#dene DISPLAY_CONTRAST_MAX 0x7F Maximum display contrast value

Examples: ex_contrast.nxc.

8.1.2.197

#dene DISPLAY_ERASE_ALL 0x00 W - erase entire screen (CMD,x,x,x,x,x)

Examples: ex_sysdisplayexecutefunction.nxc.

8.1.2.198

#dene DISPLAY_ERASE_LINE 0x05 W - erase a single line (CMD,x,LINE,x,x,x)

8.1.2.199

#dene DISPLAY_FILL_REGION 0x06 W - ll screen region (CMD,TRUE/FALSE,X1,Y1,X2,Y2)

8.1.2.200

#dene DISPLAY_FRAME 0x07 W - draw a frame (on/off) (CMD,TRUE/FALSE,X1,Y1,X2,Y2)

8.1.2.201

#dene DISPLAY_HEIGHT 64 The height of the LCD screen in pixels

Examples: ex_LineOut.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1076

8.1.2.202

#dene DISPLAY_HORIZONTAL_LINE 0x02 W - draw horizontal line (CMD,TRUE/FALSE,X1,Y1,X2,x)

Examples: ex_dispfunc.nxc.

8.1.2.203

#dene DISPLAY_MENUICONS_X_DIFF 31

8.1.2.204

#dene DISPLAY_MENUICONS_X_OFFS 7

8.1.2.205

#dene DISPLAY_MENUICONS_Y 40

8.1.2.206

#dene DISPLAY_ON 0x01 W - Display on

8.1.2.207

#dene DISPLAY_PIXEL 0x01 W - set pixel (on/off) (CMD,TRUE/FALSE,X,Y,x,x)

8.1.2.208

#dene DISPLAY_POPUP 0x08 W - Use popup display memory

Examples: ex_dispmisc.nxc.

8.1.2.209

#dene DISPLAY_REFRESH 0x02 W - Enable refresh

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1077

8.1.2.210

#dene DISPLAY_REFRESH_DISABLED 0x40 R - Refresh disabled

8.1.2.211

#dene DISPLAY_VERTICAL_LINE 0x03 W - draw vertical line (CMD,TRUE/FALSE,X1,Y1,x,Y2)

8.1.2.212

#dene DISPLAY_WIDTH 100 The width of the LCD screen in pixels

Examples: ex_LineOut.nxc.

8.1.2.213

#dene DisplayExecuteFunction 80 Execute one of the Display modules internal functions

8.1.2.214

#dene DisplayModuleID 0x000A0001 The display module ID

8.1.2.215

#dene DisplayModuleName "Display.mod" The display module name

8.1.2.216

#dene DisplayOffsetContrast 1719 Adjust the display contrast with this eld

8.1.2.217

#dene DisplayOffsetDisplay 104 Display content copied to physical display every 17 mS

8.1.2.218

#dene DisplayOffsetEraseMask 4 Section erase mask (executed rst)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1078

8.1.2.219

#dene DisplayOffsetFlags 117 Update ags enumerated above

8.1.2.220

#dene DisplayOffsetNormal(l, w) (((l)100)+(w)+119) Raw display memory for normal screen

8.1.2.221

#dene DisplayOffsetPBitmaps(p) (((p)4)+68) Pointer to free bitmap les

8.1.2.222

#dene DisplayOffsetPFont 12 Pointer to font le

8.1.2.223

#dene DisplayOffsetPFunc 0 Simple draw entry

8.1.2.224

#dene DisplayOffsetPMenuIcons(p) (((p)4)+88) Pointer to menu icon images (NULL == none)

8.1.2.225

#dene DisplayOffsetPMenuText 84 Pointer to menu icon text (NULL == none)

8.1.2.226

#dene DisplayOffsetPopup(l, w) (((l)100)+(w)+919) Raw display memory for popup screen

8.1.2.227

#dene DisplayOffsetPScreens(p) (((p)4)+56) Pointer to screen bitmap le

8.1.2.228

#dene DisplayOffsetPStatusIcons 52 Pointer to status icon collection le

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1079

8.1.2.229

#dene DisplayOffsetPStatusText 48 Pointer to status text string

8.1.2.230

#dene DisplayOffsetPStepIcons 100 Pointer to step icon collection le

8.1.2.231

#dene DisplayOffsetPTextLines(p) (((p)4)+16) Pointer to text strings

8.1.2.232

#dene DisplayOffsetStatusIcons(p) ((p)+108) Index in status icon collection le (index = 0 -> none)

8.1.2.233

#dene DisplayOffsetStepIcons(p) ((p)+112) Index in step icon collection le (index = 0 -> none)

8.1.2.234

#dene DisplayOffsetTextLinesCenterFlags 118 Mask to center TextLines

8.1.2.235

#dene DisplayOffsetUpdateMask 8 Section update mask (executed next)

8.1.2.236

#dene DIST_CMD_CUSTOM 0x35 Set the DIST-Nx to a custom mode

8.1.2.237

#dene DIST_CMD_GP2D12 0x31 Set the DIST-Nx to GP2D12 mode

8.1.2.238

#dene DIST_CMD_GP2D120 0x32 Set the DIST-Nx to GP2D120 mode

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1080

8.1.2.239

#dene DIST_CMD_GP2YA02 0x34 Set the DIST-Nx to GP2YA02 mode

8.1.2.240

#dene DIST_CMD_GP2YA21 0x33 Set the DIST-Nx to GP2YA21 mode

8.1.2.241

#dene DIST_REG_DIST 0x42 The DIST-Nx distance register

8.1.2.242

#dene DIST_REG_DIST1 0x58 The DIST-Nx distance 1 register

8.1.2.243

#dene DIST_REG_DIST_MAX 0x54 The DIST-Nx maximum distance register

8.1.2.244

#dene DIST_REG_DIST_MIN 0x52 The DIST-Nx minimum distance register

8.1.2.245

#dene DIST_REG_MODULE_TYPE 0x50 The DIST-Nx module type register

8.1.2.246

#dene DIST_REG_NUM_POINTS 0x51 The DIST-Nx number of data points in Custom curve register

8.1.2.247

#dene DIST_REG_VOLT 0x44 The DIST-Nx voltage register

8.1.2.248

#dene DIST_REG_VOLT1 0x56 The DIST-Nx voltage 1 register

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1081

8.1.2.249

#dene DRAW_OPT_CLEAR (0x0004) Clear pixels while drawing (aka draw in white)

8.1.2.250

#dene DRAW_OPT_CLEAR_EXCEPT_STATUS_SCREEN (0x0002) Clear the screen except for the status line before drawing

8.1.2.251

#dene DRAW_OPT_CLEAR_PIXELS (0x0004) Clear pixels while drawing (aka draw in white)

8.1.2.252

#dene DRAW_OPT_CLEAR_SCREEN_MODES (0x0003) Bit mask for the clear screen modes

8.1.2.253

#dene DRAW_OPT_CLEAR_WHOLE_SCREEN (0x0001) Clear the entire screen before drawing

Examples: ex_dispgoutex.nxc.

8.1.2.254

#dene DRAW_OPT_FILL_SHAPE (0x0020) Fill the shape while drawing (rectangle, circle, ellipses, and polygon)

Examples: ex_CircleOut.nxc, ex_EllipseOut.nxc, ex_PolyOut.nxc, ex_SysDrawEllipse.nxc, and ex_sysdrawpolygon.nxc.

8.1.2.255

#dene DRAW_OPT_FONT_DIR_B2TL (0x0100) Font bottom to top left align

8.1.2.256

#dene DRAW_OPT_FONT_DIR_B2TR (0x0140) Font bottom to top right align

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1082

8.1.2.257

#dene DRAW_OPT_FONT_DIR_L2RB (0x0000) Font left to right bottom align

Examples: ex_dispftout.nxc.

8.1.2.258

#dene DRAW_OPT_FONT_DIR_L2RT (0x0040) Font left to right top align

Examples: ex_dispftout.nxc, and ex_sysdrawfont.nxc.

8.1.2.259

#dene DRAW_OPT_FONT_DIR_R2LB (0x0080) Font right to left bottom align

8.1.2.260

#dene DRAW_OPT_FONT_DIR_R2LT (0x00C0) Font right to left top align

8.1.2.261

#dene DRAW_OPT_FONT_DIR_T2BL (0x0180) Font top to bottom left align

Examples: ex_dispftout.nxc.

8.1.2.262

#dene DRAW_OPT_FONT_DIR_T2BR (0x01C0) Font top to bottom right align

8.1.2.263

#dene DRAW_OPT_FONT_DIRECTIONS (0x01C0) Bit mask for the font direction bits

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1083

8.1.2.264

#dene DRAW_OPT_FONT_WRAP (0x0200) Option to have text wrap in FontNumOut and FontTextOut calls

Examples: ex_dispftout.nxc.

8.1.2.265

#dene DRAW_OPT_INVERT (0x0004) Invert text or graphics

Examples: ex_dispftout.nxc.

8.1.2.266

#dene DRAW_OPT_LOGICAL_AND (0x0008) Draw pixels using a logical AND operation

Examples: ex_dispftout.nxc.

8.1.2.267

#dene DRAW_OPT_LOGICAL_COPY (0x0000) Draw pixels using a logical copy operation

8.1.2.268

#dene DRAW_OPT_LOGICAL_OPERATIONS (0x0018) Bit mask for the logical drawing operations

8.1.2.269

#dene DRAW_OPT_LOGICAL_OR (0x0010) Draw pixels using a logical OR operation

Examples: ex_dispftout.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1084

8.1.2.270

#dene DRAW_OPT_LOGICAL_XOR (0x0018) Draw pixels using a logical XOR operation

Examples: ex_CircleOut.nxc, ex_EllipseOut.nxc, ex_LineOut.nxc, ex_PolyOut.nxc, ex_SysDrawEllipse.nxc, and ex_sysdrawpolygon.nxc.

8.1.2.271

#dene DRAW_OPT_NORMAL (0x0000) Normal drawing

Examples: ex_CircleOut.nxc, ex_dispftout.nxc, ex_dispfunc.nxc, and ex_sysdrawfont.nxc.

8.1.2.272

#dene DRAW_OPT_POLYGON_POLYLINE (0x0400) When drawing polygons, do not close (i.e., draw a polyline instead)

8.1.2.273

#dene DrawCircle 16 Draw a circle on the LCD screen

8.1.2.274

#dene DrawEllipse 94 Draw an ellipse on the LCD screen

8.1.2.275

#dene DrawFont 95 Draw text using a custom RIC-based font to the LCD screen

8.1.2.276

#dene DrawGraphic 18 Draw a graphic image on the LCD screen

8.1.2.277

#dene DrawGraphicArray 92 Draw a graphic image from a byte array to the LCD screen

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1085

Examples: ex_dispgout.nxc.

8.1.2.278

#dene DrawLine 15 Draw a line on the LCD screen

8.1.2.279

#dene DrawPoint 14 Draw a single pixel on the LCD screen

8.1.2.280

#dene DrawPolygon 93 Draw a polygon on the LCD screen

8.1.2.281

#dene DrawRect 17 Draw a rectangle on the LCD screen

8.1.2.282

#dene DrawText 13 Draw text to one of 8 LCD lines

Examples: ex_syscall.nxc.

8.1.2.283

#dene EMETER_REG_AIN 0x0c The register address for amps in

8.1.2.284

#dene EMETER_REG_AOUT 0x10 The register address for amps out

8.1.2.285

#dene EMETER_REG_JOULES 0x12 The register address for joules

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1086

8.1.2.286

#dene EMETER_REG_VIN 0x0a The register address for voltage in

8.1.2.287

#dene EMETER_REG_VOUT 0x0e The register address for voltage out

8.1.2.288

#dene EMETER_REG_WIN 0x14 The register address for watts in

8.1.2.289

#dene EMETER_REG_WOUT 0x16 The register address for watts out

8.1.2.290

#dene EOF -1 A constant representing end of le

8.1.2.291

#dene ERR_ARG -1 0xFF Bad arguments

8.1.2.292

#dene ERR_BAD_POOL_SIZE -10 0xF6 VarsCmd.PoolSize > POOL_MAX_SIZE

8.1.2.293

#dene ERR_BAD_PTR -6 0xFA Someone passed us a bad pointer!

8.1.2.294

#dene ERR_CLUMP_COUNT -7 0xF9 (FileClumpCount == 0 || FileClumpCount >= NOT_A_CLUMP)

8.1.2.295

#dene ERR_COMM_BUFFER_FULL -34 0xDE No room in comm buffer

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1087

8.1.2.296

#dene ERR_COMM_BUS_ERR -35 0xDD Something went wrong on the communications bus

8.1.2.297

#dene ERR_COMM_CHAN_INVALID -33 0xDF Specied channel/connection is not valid

8.1.2.298

#dene ERR_COMM_CHAN_NOT_READY -32 0xE0 Specied channel/connection not congured or busy

8.1.2.299

#dene ERR_DEFAULT_OFFSETS -14

0xF2 (DefaultsOffset != FileOffsets.DynamicDefaults) || (DefaultsOffset + FileOffsets.DynamicDefaultsSize != FileOffsets.DSDefaultsSize) 8.1.2.300 #dene ERR_FILE -3 0xFD Malformed le contents 8.1.2.301 #dene ERR_INSANE_OFFSET -9 0xF7 CurrOffset != (DataSize - VarsCmd.CodespaceCount 2) 8.1.2.302 #dene ERR_INSTR -2 0xFE Illegal bytecode instruction 8.1.2.303 #dene ERR_INVALID_FIELD -17 0xEF Attempted to access invalid eld of a structure 8.1.2.304 #dene ERR_INVALID_PORT -16 0xF0 Bad input or output port specied 8.1.2.305 #dene ERR_INVALID_QUEUE -18 0xEE Illegal queue ID specied
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1088

8.1.2.306

#dene ERR_INVALID_SIZE -19 0xED Illegal size specied

8.1.2.307

#dene ERR_LOADER_ERR -11

0xF5 LOADER_ERR(LStatus) != SUCCESS || pData == NULL || DataSize == 0 8.1.2.308 #dene ERR_MEM -5 0xFB Insufcient memory available 8.1.2.309 #dene ERR_MEMMGR_FAIL -15

0xF1 (UBYTE )VarsCmd.MemMgr.pDopeVectorArray != VarsCmd.pDataspace + DV_ARRAY[0].Offset 8.1.2.310 #dene ERR_NO_ACTIVE_CLUMP -13 0xF3 VarsCmd.RunQ.Head == NOT_A_CLUMP 8.1.2.311 #dene ERR_NO_CODE -8 0xF8 VarsCmd.CodespaceCount == 0 8.1.2.312 #dene ERR_NO_PROG -20 0xEC No active program 8.1.2.313 #dene ERR_NON_FATAL -16 Fatal errors are greater than this value 8.1.2.314 #dene ERR_RC_BAD_PACKET -65 0xBF Clearly insane packet 8.1.2.315 #dene ERR_RC_FAILED -67 0xBD Request failed (i.e. specied le not found)
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1089

8.1.2.316

#dene ERR_RC_ILLEGAL_VAL -64 0xC0 Data contains out-of-range values

8.1.2.317

#dene ERR_RC_UNKNOWN_CMD -66 0xBE Unknown command opcode

8.1.2.318

#dene ERR_SPOTCHECK_FAIL -12 0xF4 ((UBYTE)(VarsCmd.pCodespace) < pData) (c_cmd.c 1893)

8.1.2.319

#dene ERR_VER -4 0xFC Version mismatch between rmware and compiler

8.1.2.320

#dene FALSE 0 A false value

8.1.2.321

#dene FileClose 5 Close the specied le

8.1.2.322

#dene FileDelete 8 Delete a le

8.1.2.323

#dene FileFindFirst 83 Start a search for a le using a lename pattern

8.1.2.324

#dene FileFindNext 84 Continue searching for a le

8.1.2.325

#dene FileOpenAppend 2 Open a le for appending to the end of the le

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1090

8.1.2.326

#dene FileOpenRead 0 Open a le for reading

8.1.2.327

#dene FileOpenReadLinear 87 Open a linear le for reading

8.1.2.328

#dene FileOpenWrite 1 Open a le for writing (creates a new le)

8.1.2.329

#dene FileOpenWriteLinear 85 Open a linear le for writing

8.1.2.330

#dene FileOpenWriteNonLinear 86 Open a non-linear le for writing

8.1.2.331

#dene FileRead 3 Read from the specied le

8.1.2.332

#dene FileRename 7 Rename a le

8.1.2.333

#dene FileResize 91 Resize a le (not yet implemented)

8.1.2.334

#dene FileResolveHandle 6 Get a le handle for the specied lename if it is already open

8.1.2.335

#dene FileSeek 90 Seek to a specic position in an open le

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1091

8.1.2.336

#dene FileTell 98 Return the current le position in an open le

8.1.2.337

#dene FileWrite 4 Write to the specied le

8.1.2.338

#dene FRAME_SELECT 0 Center icon select frame

8.1.2.339

#dene FREQUENCY_MAX 14080 Maximum frequency [Hz]

8.1.2.340

#dene FREQUENCY_MIN 220 Minimum frequency [Hz]

8.1.2.341

#dene GetStartTick 25 Get the current system tick count

8.1.2.342

#dene GL_CAMERA_DEPTH 3 Set the camera depth.

8.1.2.343

#dene GL_CIRCLE 4 Use circle mode.

Examples: glCircleDemo.nxc.

8.1.2.344

#dene GL_CIRCLE_SIZE 1 Set the circle size.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1092

8.1.2.345

#dene GL_CULL_BACK 2 Cull lines in back.

8.1.2.346

#dene GL_CULL_FRONT 3 Cull lines in front.

8.1.2.347

#dene GL_CULL_MODE 2 Set the cull mode.

Examples: glCircleDemo.nxc, and glTranslateDemo.nxc.

8.1.2.348

#dene GL_CULL_NONE 4 Do not cull any lines.

Examples: glCircleDemo.nxc, and glTranslateDemo.nxc.

8.1.2.349

#dene GL_LINE 2 Use line mode.

8.1.2.350

#dene GL_POINT 3 Use point mode.

8.1.2.351

#dene GL_POLYGON 1 Use polygon mode.

Examples: glBoxDemo.nxc, glCircleDemo.nxc, glRotateDemo.nxc, glScaleDemo.nxc, and glTranslateDemo.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1093

8.1.2.352

#dene GL_ROTATE_X 4 Rotate around the X axis.

Examples: glRotateDemo.nxc.

8.1.2.353

#dene GL_ROTATE_Y 5 Rotate around the Y axis.

Examples: glRotateDemo.nxc.

8.1.2.354

#dene GL_ROTATE_Z 6 Rotate around the Z axis.

8.1.2.355

#dene GL_SCALE_X 7 Scale along the X axis.

Examples: glScaleDemo.nxc.

8.1.2.356

#dene GL_SCALE_Y 8 Scale along the Y axis.

8.1.2.357

#dene GL_SCALE_Z 9 Scale along the Z axis.

8.1.2.358

#dene GL_TRANSLATE_X 1 Translate along the X axis.

Examples: glBoxDemo.nxc, and glTranslateDemo.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1094

8.1.2.359

#dene GL_TRANSLATE_Y 2 Translate along the Y axis.

Examples: glTranslateDemo.nxc.

8.1.2.360

#dene GL_TRANSLATE_Z 3 Translate along the Z axis.

Examples: glTranslateDemo.nxc.

8.1.2.361

#dene GL_ZOOM_FACTOR 4 Set the zoom factor.

8.1.2.362

#dene HS_ADDRESS_1 1 HsAddress device address 1

8.1.2.363

#dene HS_ADDRESS_2 2 HsAddress device address 2

8.1.2.364

#dene HS_ADDRESS_3 3 HsAddress device address 3

8.1.2.365

#dene HS_ADDRESS_4 4 HsAddress device address 4

8.1.2.366

#dene HS_ADDRESS_5 5 HsAddress device address 5

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1095

8.1.2.367

#dene HS_ADDRESS_6 6 HsAddress device address 6

8.1.2.368

#dene HS_ADDRESS_7 7 HsAddress device address 7

8.1.2.369

#dene HS_ADDRESS_8 8 HsAddress device address 8

8.1.2.370

#dene HS_ADDRESS_ALL 0 HsAddress all devices

8.1.2.371

#dene HS_BAUD_115200 12 HsSpeed 115200 Baud

8.1.2.372

#dene HS_BAUD_1200 0 HsSpeed 1200 Baud

8.1.2.373

#dene HS_BAUD_14400 6 HsSpeed 14400 Baud

8.1.2.374

#dene HS_BAUD_19200 7 HsSpeed 19200 Baud

8.1.2.375

#dene HS_BAUD_230400 13 HsSpeed 230400 Baud

8.1.2.376

#dene HS_BAUD_2400 1 HsSpeed 2400 Baud

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1096

8.1.2.377

#dene HS_BAUD_28800 8 HsSpeed 28800 Baud

8.1.2.378

#dene HS_BAUD_3600 2 HsSpeed 3600 Baud

8.1.2.379

#dene HS_BAUD_38400 9 HsSpeed 38400 Baud

8.1.2.380

#dene HS_BAUD_460800 14 HsSpeed 460800 Baud

8.1.2.381

#dene HS_BAUD_4800 3 HsSpeed 4800 Baud

8.1.2.382

#dene HS_BAUD_57600 10 HsSpeed 57600 Baud

8.1.2.383

#dene HS_BAUD_7200 4 HsSpeed 7200 Baud

8.1.2.384

#dene HS_BAUD_76800 11 HsSpeed 76800 Baud

8.1.2.385

#dene HS_BAUD_921600 15 HsSpeed 921600 Baud

8.1.2.386

#dene HS_BAUD_9600 5 HsSpeed 9600 Baud

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1097

8.1.2.387

#dene HS_BAUD_DEFAULT 15 HsSpeed default Baud (921600)

Examples: ex_RS485Receive.nxc, and ex_RS485Send.nxc.

8.1.2.388

#dene HS_CMD_READY 0x04 A constant representing high speed direct command

8.1.2.389

#dene HS_CTRL_EXIT 2 Ddisable the high speed port

8.1.2.390

#dene HS_CTRL_INIT 0 Enable the high speed port

Examples: ex_RS485Receive.nxc, ex_RS485Send.nxc, and ex_SysCommHSControl.nxc.

8.1.2.391

#dene HS_CTRL_UART 1 Setup the high speed port UART conguration

8.1.2.392

#dene HS_DISABLE 4 HsState disable

8.1.2.393

#dene HS_ENABLE 5 HsState enable

8.1.2.394

#dene HS_INIT_RECEIVER 2 HsState initialize receiver

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1098

8.1.2.395

#dene HS_INITIALISE 1 HsState initialize

8.1.2.396

#dene HS_MODE_10_STOP 0x0000 HsMode 1 stop bit

8.1.2.397

#dene HS_MODE_15_STOP 0x1000 HsMode 1.5 stop bits

8.1.2.398

#dene HS_MODE_20_STOP 0x2000 HsMode 2 stop bits

8.1.2.399

#dene HS_MODE_5_DATA 0x0000 HsMode 5 data bits

8.1.2.400

#dene HS_MODE_6_DATA 0x0040 HsMode 6 data bits

8.1.2.401

#dene HS_MODE_7_DATA 0x0080 HsMode 7 data bits

8.1.2.402

#dene HS_MODE_7E1 (HS_MODE_7_DATA|HS_MODE_E_PARITY|HS_MODE_10_STOP) HsMode 7 data bits, even parity, 1 stop bit

8.1.2.403

#dene HS_MODE_8_DATA 0x00C0 HsMode 8 data bits

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1099

8.1.2.404

#dene HS_MODE_8N1 (HS_MODE_8_DATA|HS_MODE_N_PARITY|HS_MODE_10_STOP) HsMode 8 data bits, no parity, 1 stop bit

Examples: ex_sethsmode.nxc.

8.1.2.405

#dene HS_MODE_DEFAULT HS_MODE_8N1 HsMode default mode (8 data bits, no parity, 1 stop bit)

Examples: ex_RS485Receive.nxc, and ex_RS485Send.nxc.

8.1.2.406

#dene HS_MODE_E_PARITY 0x0000 HsMode Even parity

8.1.2.407

#dene HS_MODE_M_PARITY 0x0600 HsMode Mark parity

8.1.2.408

#dene HS_MODE_N_PARITY 0x0800 HsMode No parity

8.1.2.409

#dene HS_MODE_O_PARITY 0x0200 HsMode Odd parity

8.1.2.410

#dene HS_MODE_S_PARITY 0x0400 HsMode Space parity

8.1.2.411

#dene HS_SEND_DATA 3 HsState send data

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1100

8.1.2.412

#dene HS_UPDATE 1 HsFlags high speed update required

8.1.2.413

#dene HT_ADDR_ACCEL 0x02 HiTechnic Accel I2C address

8.1.2.414

#dene HT_ADDR_ANGLE 0x02 HiTechnic Angle I2C address

8.1.2.415

#dene HT_ADDR_COLOR 0x02 HiTechnic Color I2C address

8.1.2.416

#dene HT_ADDR_COLOR2 0x02 HiTechnic Color2 I2C address

8.1.2.417

#dene HT_ADDR_COMPASS 0x02 HiTechnic Compass I2C address

8.1.2.418

#dene HT_ADDR_IRLINK 0x02 HiTechnic IRLink I2C address

8.1.2.419

#dene HT_ADDR_IRRECEIVER 0x02 HiTechnic IRReceiver I2C address

8.1.2.420

#dene HT_ADDR_IRSEEKER 0x02 HiTechnic IRSeeker I2C address

8.1.2.421

#dene HT_ADDR_IRSEEKER2 0x10 HiTechnic IRSeeker2 I2C address

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1101

8.1.2.422

#dene HT_CH1_A 0 Use IRReceiver channel 1 output A

Examples: ex_ReadSensorHTIRReceiverEx.nxc.

8.1.2.423

#dene HT_CH1_B 1 Use IRReceiver channel 1 output B

8.1.2.424

#dene HT_CH2_A 2 Use IRReceiver channel 2 output A

8.1.2.425

#dene HT_CH2_B 3 Use IRReceiver channel 2 output B

8.1.2.426

#dene HT_CH3_A 4 Use IRReceiver channel 3 output A

8.1.2.427

#dene HT_CH3_B 5 Use IRReceiver channel 3 output B

8.1.2.428

#dene HT_CH4_A 6 Use IRReceiver channel 4 output A

8.1.2.429

#dene HT_CH4_B 7 Use IRReceiver channel 4 output B

8.1.2.430

#dene HT_CMD_COLOR2_50HZ 0x35 Set the Color2 sensor to 50Hz mode

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1102

8.1.2.431

#dene HT_CMD_COLOR2_60HZ 0x36 Set the Color2 sensor to 60Hz mode

8.1.2.432

#dene HT_CMD_COLOR2_ACTIVE 0x00 Set the Color2 sensor to active mode

Examples: ex_I2CSendCommand.nxc, and ex_sethtcolor2mode.nxc.

8.1.2.433

#dene HT_CMD_COLOR2_BLCAL 0x42 Set the Color2 sensor to black level calibration mode

8.1.2.434

#dene HT_CMD_COLOR2_FAR 0x46 Set the Color2 sensor to far mode

8.1.2.435

#dene HT_CMD_COLOR2_LED_HI 0x48 Set the Color2 sensor to LED high mode

8.1.2.436

#dene HT_CMD_COLOR2_LED_LOW 0x4C Set the Color2 sensor to LED low mode

8.1.2.437

#dene HT_CMD_COLOR2_NEAR 0x4E Set the Color2 sensor to near mode

8.1.2.438

#dene HT_CMD_COLOR2_PASSIVE 0x01 Set the Color2 sensor to passive mode

8.1.2.439

#dene HT_CMD_COLOR2_RAW 0x03 Set the Color2 sensor to raw mode

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1103

8.1.2.440

#dene HT_CMD_COLOR2_WBCAL 0x43 Set the Color2 sensor to white level calibration mode

8.1.2.441

#dene HTANGLE_MODE_CALIBRATE 0x43 Resets 0 degree position to current shaft angle

8.1.2.442

#dene HTANGLE_MODE_NORMAL 0x00 Normal angle measurement mode

8.1.2.443

#dene HTANGLE_MODE_RESET 0x52 Resets the accumulated angle

Examples: ex_ResetSensorHTAngle.nxc.

8.1.2.444

#dene HTANGLE_REG_ACDIR 0x49 Angle 16 bit revolutions per minute, low byte register

8.1.2.445

#dene HTANGLE_REG_DC01 0x43 Angle current angle (1 degree adder) register

8.1.2.446

#dene HTANGLE_REG_DC02 0x44 Angle 32 bit accumulated angle, high byte register

8.1.2.447

#dene HTANGLE_REG_DC03 0x45 Angle 32 bit accumulated angle, mid byte register

8.1.2.448

#dene HTANGLE_REG_DC04 0x46 Angle 32 bit accumulated angle, mid byte register

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1104

8.1.2.449

#dene HTANGLE_REG_DC05 0x47 Angle 32 bit accumulated angle, low byte register

8.1.2.450

#dene HTANGLE_REG_DCAVG 0x48 Angle 16 bit revolutions per minute, high byte register

8.1.2.451

#dene HTANGLE_REG_DCDIR 0x42 Angle current angle (2 degree increments) register

8.1.2.452

#dene HTANGLE_REG_MODE 0x41 Angle mode register

8.1.2.453

#dene HTIR2_MODE_1200 0 Set IRSeeker2 to 1200 mode

Examples: ex_sethtirseeker2mode.nxc, and ex_setsensorboolean.nxc.

8.1.2.454

#dene HTIR2_MODE_600 1 Set IRSeeker2 to 600 mode

8.1.2.455

#dene HTIR2_REG_AC01 0x4A IRSeeker2 AC 01 register

8.1.2.456

#dene HTIR2_REG_AC02 0x4B IRSeeker2 AC 02 register

8.1.2.457

#dene HTIR2_REG_AC03 0x4C IRSeeker2 AC 03 register

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1105

8.1.2.458

#dene HTIR2_REG_AC04 0x4D IRSeeker2 AC 04 register

8.1.2.459

#dene HTIR2_REG_AC05 0x4E IRSeeker2 AC 05 register

8.1.2.460

#dene HTIR2_REG_ACDIR 0x49 IRSeeker2 AC direction register

8.1.2.461

#dene HTIR2_REG_DC01 0x43 IRSeeker2 DC 01 register

8.1.2.462

#dene HTIR2_REG_DC02 0x44 IRSeeker2 DC 02 register

8.1.2.463

#dene HTIR2_REG_DC03 0x45 IRSeeker2 DC 03 register

8.1.2.464

#dene HTIR2_REG_DC04 0x46 IRSeeker2 DC 04 register

8.1.2.465

#dene HTIR2_REG_DC05 0x47 IRSeeker2 DC 05 register

8.1.2.466

#dene HTIR2_REG_DCAVG 0x48 IRSeeker2 DC average register

Examples: ex_SensorHTIRSeeker2Addr.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1106

8.1.2.467

#dene HTIR2_REG_DCDIR 0x42 IRSeeker2 DC direction register

8.1.2.468

#dene HTIR2_REG_MODE 0x41 IRSeeker2 mode register

8.1.2.469

#dene I2C_ADDR_DEFAULT 0x02 Standard NXT I2C device address

Examples: ex_i2cdeviceid.nxc, ex_i2cdeviceinfo.nxc, ex_I2CSendCommand.nxc, ex_i2cvendorid.nxc, ex_i2cversion.nxc, ex_MSDeenergize.nxc, ex_MSEnergize.nxc, ex_MSIRTrain.nxc, ex_MSPFComboDirect.nxc, ex_MSPFComboPWM.nxc, ex_MSPFRawOutput.nxc, ex_MSPFRepeat.nxc, ex_MSPFSingleOutputCST.nxc, ex_MSPFSingleOutputPWM.nxc, ex_MSPFSinglePin.nxc, ex_MSPFTrain.nxc, ex_MSReadValue.nxc, ex_readi2cregister.nxc, and ex_writei2cregister.nxc.

8.1.2.470

#dene I2C_REG_CMD 0x41 Standard NXT I2C device command register

Examples: ex_MSReadValue.nxc, ex_readi2cregister.nxc, and ex_writei2cregister.nxc.

8.1.2.471

#dene I2C_REG_DEVICE_ID 0x10 Standard NXT I2C device ID register

Examples: ex_i2cdeviceinfo.nxc.

8.1.2.472

#dene I2C_REG_VENDOR_ID 0x08 Standard NXT I2C vendor ID register

Examples: ex_i2cdeviceinfo.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1107

8.1.2.473

#dene I2C_REG_VERSION 0x00 Standard NXT I2C version register

Examples: ex_i2cdeviceinfo.nxc.

8.1.2.474

#dene IN_1 0x00 Input port 1

8.1.2.475

#dene IN_2 0x01 Input port 2

8.1.2.476

#dene IN_3 0x02 Input port 3

8.1.2.477

#dene IN_4 0x03 Input port 4

8.1.2.478

#dene IN_MODE_ANGLESTEP 0xE0 RCX rotation sensor (16 ticks per revolution)

8.1.2.479

#dene IN_MODE_BOOLEAN 0x20 Boolean value (0 or 1)

8.1.2.480

#dene IN_MODE_CELSIUS 0xA0 RCX temperature sensor value in degrees celcius

8.1.2.481

#dene IN_MODE_FAHRENHEIT 0xC0 RCX temperature sensor value in degrees fahrenheit

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1108

8.1.2.482

#dene IN_MODE_MODEMASK 0xE0 Mask for the mode without any slope value

8.1.2.483

#dene IN_MODE_PCTFULLSCALE 0x80 Scaled value from 0 to 100

8.1.2.484

#dene IN_MODE_PERIODCOUNTER 0x60 Counts the number of boolean periods

8.1.2.485

#dene IN_MODE_RAW 0x00 Raw value from 0 to 1023

8.1.2.486

#dene IN_MODE_SLOPEMASK 0x1F Mask for slope parameter added to mode

8.1.2.487

#dene IN_MODE_TRANSITIONCNT 0x40 Counts the number of boolean transitions

8.1.2.488

#dene IN_TYPE_ANGLE 0x04 RCX rotation sensor

8.1.2.489

#dene IN_TYPE_COLORBLUE 0x10 NXT 2.0 color sensor with blue light

8.1.2.490

#dene IN_TYPE_COLOREXIT 0x12 NXT 2.0 color sensor internal state

8.1.2.491

#dene IN_TYPE_COLORFULL 0x0D NXT 2.0 color sensor in full color mode

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1109

8.1.2.492

#dene IN_TYPE_COLORGREEN 0x0F NXT 2.0 color sensor with green light

8.1.2.493

#dene IN_TYPE_COLORNONE 0x11 NXT 2.0 color sensor with no light

8.1.2.494

#dene IN_TYPE_COLORRED 0x0E NXT 2.0 color sensor with red light

8.1.2.495

#dene IN_TYPE_CUSTOM 0x09 NXT custom sensor

8.1.2.496

#dene IN_TYPE_HISPEED 0x0C NXT Hi-speed port (only S4)

8.1.2.497

#dene IN_TYPE_LIGHT_ACTIVE 0x05 NXT light sensor with light

8.1.2.498

#dene IN_TYPE_LIGHT_INACTIVE 0x06 NXT light sensor without light

8.1.2.499

#dene IN_TYPE_LOWSPEED 0x0A NXT I2C digital sensor

8.1.2.500

#dene IN_TYPE_LOWSPEED_9V 0x0B NXT I2C digital sensor with 9V power

8.1.2.501

#dene IN_TYPE_NO_SENSOR 0x00 No sensor congured

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1110

8.1.2.502

#dene IN_TYPE_REFLECTION 0x03 RCX light sensor

8.1.2.503

#dene IN_TYPE_SOUND_DB 0x07 NXT sound sensor with dB scaling

8.1.2.504

#dene IN_TYPE_SOUND_DBA 0x08 NXT sound sensor with dBA scaling

8.1.2.505

#dene IN_TYPE_SWITCH 0x01 NXT or RCX touch sensor

8.1.2.506

#dene IN_TYPE_TEMPERATURE 0x02 RCX temperature sensor

8.1.2.507

#dene INPUT_BLACKCOLOR 1 The color value is black

8.1.2.508

#dene INPUT_BLANK 3 Access the blank value from color sensor value arrays

8.1.2.509

#dene INPUT_BLUE 2 Access the blue value from color sensor value arrays

8.1.2.510

#dene INPUT_BLUECOLOR 2 The color value is blue

8.1.2.511

#dene INPUT_CAL_POINT_0 0 Calibration point 0

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1111

Examples: ex_ColorCalibration.nxc, and ex_ColorCalLimits.nxc.

8.1.2.512

#dene INPUT_CAL_POINT_1 1 Calibration point 1

8.1.2.513

#dene INPUT_CAL_POINT_2 2 Calibration point 2

8.1.2.514

#dene INPUT_CUSTOM9V 0x01 Custom sensor 9V

8.1.2.515

#dene INPUT_CUSTOMACTIVE 0x02 Custom sensor active

8.1.2.516

#dene INPUT_CUSTOMINACTIVE 0x00 Custom sensor inactive

8.1.2.517

#dene INPUT_DIGI0 0x01 Digital pin 0

8.1.2.518

#dene INPUT_DIGI1 0x02 Digital pin 1

8.1.2.519

#dene INPUT_GREEN 1 Access the green value from color sensor value arrays

8.1.2.520

#dene INPUT_GREENCOLOR 3 The color value is green

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1112

8.1.2.521

#dene INPUT_INVALID_DATA 0x01 Invalid data ag

8.1.2.522

#dene INPUT_NO_OF_COLORS 4 The number of entries in the color sensor value arrays

8.1.2.523

#dene INPUT_NO_OF_POINTS 3 The number of calibration points

8.1.2.524

#dene INPUT_RED 0 Access the red value from color sensor value arrays

Examples: ex_ColorADRaw.nxc, ex_ColorBoolean.nxc, ex_ColorCalibration.nxc, ex_ColorSensorRaw.nxc, and ex_ColorSensorValue.nxc.

8.1.2.525

#dene INPUT_REDCOLOR 5 The color value is red

8.1.2.526

#dene INPUT_RESETCAL 0x80 Unused calibration state constant

8.1.2.527

#dene INPUT_RUNNINGCAL 0x20 Unused calibration state constant

8.1.2.528

#dene INPUT_SENSORCAL 0x01 The state returned while the color sensor is calibrating

8.1.2.529

#dene INPUT_SENSOROFF 0x02 The state returned once calibration has completed

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1113

8.1.2.530

#dene INPUT_STARTCAL 0x40 Unused calibration state constant

8.1.2.531

#dene INPUT_WHITECOLOR 6 The color value is white

8.1.2.532

#dene INPUT_YELLOWCOLOR 4 The color value is yellow

8.1.2.533

#dene InputModeField 1 Input mode eld. Contains one of the sensor mode constants. Read/write.

8.1.2.534

#dene InputModuleID 0x00030001 The input module ID

8.1.2.535

#dene InputModuleName "Input.mod" The input module name.

8.1.2.536

#dene InputOffsetADRaw(p) (((p)20)+2) Read the AD raw sensor value (2 bytes) uword

8.1.2.537

#dene InputOffsetColorADRaw(p, nc) (80+((p)84)+52+((nc)2)) Read AD raw color sensor values

8.1.2.538

#dene InputOffsetColorBoolean(p, nc) (80+((p)84)+76+((nc)2)) Read color sensor boolean values

8.1.2.539

#dene InputOffsetColorCalibration(p, np, nc) (80+((p)84)+0+((np)16)+((nc)4)) Read/write color calibration point values

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1114

8.1.2.540

#dene InputOffsetColorCalibrationState(p) (80+((p)84)+80) Read color sensor calibration state

8.1.2.541

#dene InputOffsetColorCalLimits(p, np) (80+((p)84)+48+((np)2)) Read/write color calibration limits

8.1.2.542

#dene InputOffsetColorSensorRaw(p, nc) (80+((p)84)+60+((nc)2)) Read raw color sensor values

8.1.2.543

#dene InputOffsetColorSensorValue(p, nc) (80+((p)84)+68+((nc)2)) Read scaled color sensor values

8.1.2.544

#dene InputOffsetCustomActiveStatus(p) (((p)20)+15) Read/write the active or inactive state of the custom sensor

8.1.2.545

#dene InputOffsetCustomPctFullScale(p) (((p)20)+14) Read/write the Pct full scale of the custom sensor

8.1.2.546

#dene InputOffsetCustomZeroOffset(p) (((p)20)+0) Read/write the zero offset of a custom sensor (2 bytes) uword

8.1.2.547

#dene InputOffsetDigiPinsDir(p) (((p)20)+11) Read/write the direction of the Digital pins (1 is output, 0 is input)

8.1.2.548

#dene InputOffsetDigiPinsIn(p) (((p)20)+12) Read/write the status of the digital pins

8.1.2.549

#dene InputOffsetDigiPinsOut(p) (((p)20)+13) Read/write the output level of the digital pins

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1115

8.1.2.550

#dene InputOffsetInvalidData(p) (((p)20)+16) Indicates whether data is invalid (1) or valid (0)

8.1.2.551

#dene InputOffsetSensorBoolean(p) (((p)20)+10) Read the sensor boolean value

8.1.2.552

#dene InputOffsetSensorMode(p) (((p)20)+9) Read/write the sensor mode

8.1.2.553

#dene InputOffsetSensorRaw(p) (((p)20)+4) Read the raw sensor value (2 bytes) uword

8.1.2.554

#dene InputOffsetSensorType(p) (((p)20)+8) Read/write the sensor type

8.1.2.555

#dene InputOffsetSensorValue(p) (((p)20)+6) Read/write the scaled sensor value (2 bytes) sword

8.1.2.556

#dene INT_MAX 32767 The maximum value of the int type

8.1.2.557

#dene INT_MIN -32768 The minimum value of the int type

8.1.2.558

#dene INTF_BTOFF 13 Turn off the bluetooth radio

Examples: ex_syscommexecutefunction.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1116

8.1.2.559

#dene INTF_BTON 12 Turn on the bluetooth radio

8.1.2.560

#dene INTF_CONNECT 3 Connect to one of the known devices

8.1.2.561

#dene INTF_CONNECTBYNAME 18 Connect to a bluetooth device by name

8.1.2.562

#dene INTF_CONNECTREQ 17 Connection request from another device

8.1.2.563

#dene INTF_DISCONNECT 4 Disconnect from one of the connected devices

8.1.2.564

#dene INTF_DISCONNECTALL 5 Disconnect all devices

8.1.2.565

#dene INTF_EXTREAD 15 External read request

8.1.2.566

#dene INTF_FACTORYRESET 11 Reset bluetooth settings to factory values

8.1.2.567

#dene INTF_OPENSTREAM 9 Open a bluetooth stream

8.1.2.568

#dene INTF_PINREQ 16 Bluetooth PIN request

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1117

8.1.2.569

#dene INTF_REMOVEDEVICE 6 Remove a device from the known devices table

8.1.2.570

#dene INTF_SEARCH 1 Search for bluetooth devices

8.1.2.571

#dene INTF_SENDDATA 10 Send data over a bluetooth connection

8.1.2.572

#dene INTF_SENDFILE 0 Send a le via bluetooth to another device

8.1.2.573

#dene INTF_SETBTNAME 14 Set the bluetooth name

8.1.2.574

#dene INTF_SETCMDMODE 8 Set bluetooth into command mode

8.1.2.575

#dene INTF_STOPSEARCH 2 Stop searching for bluetooth devices

8.1.2.576

#dene INTF_VISIBILITY 7 Set the bluetooth visibility on or off

8.1.2.577

#dene InvalidDataField 5

Invalid data eld. Contains a boolean value indicating whether the sensor data is valid or not. Read/write. 8.1.2.578 #dene IOCTRL_BOOT 0xA55A Reboot the NXT into SAMBA mode
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1118

8.1.2.579

#dene IOCTRL_POWERDOWN 0x5A00 Power down the NXT

8.1.2.580

#dene IOCtrlModuleID 0x00060001 The IOCtrl module ID

8.1.2.581

#dene IOCtrlModuleName "IOCtrl.mod" The IOCtrl module name

8.1.2.582

#dene IOCtrlOffsetPowerOn 0 Offset to power on eld

8.1.2.583

#dene IOMapRead 32

Read data from one of the rmware modules IOMap structures using the modules name 8.1.2.584 #dene IOMapReadByID 78

Read data from one of the rmware modules IOMap structures using the modules ID 8.1.2.585 #dene IOMapWrite 33

Write data to one of the rmware modules IOMap structures using the modules name 8.1.2.586 #dene IOMapWriteByID 79

Write data to one of the rmware modules IOMap structures using the modules ID 8.1.2.587 #dene KeepAlive 31 Reset the NXT sleep timer

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1119

8.1.2.588

#dene LCD_LINE1 56 The 1st line of the LCD screen

Examples: ex_acos.nxc, ex_acosd.nxc, ex_addressof.nxc, ex_addressofex.nxc, ex_ArrayMax.nxc, ex_ArrayMean.nxc, ex_ArrayMin.nxc, ex_ArrayOp.nxc, ex_ArraySort.nxc, ex_ArrayStd.nxc, ex_ArraySum.nxc, ex_ArraySumSqr.nxc, ex_asin.nxc, ex_asind.nxc, ex_atan.nxc, ex_atand.nxc, ex_atof.nxc, ex_atoi.nxc, ex_atol.nxc, ex_buttonpressed.nxc, ex_clearline.nxc, ex_contrast.nxc, ex_copy.nxc, ex_ctype.nxc, ex_DataMode.nxc, ex_delete_data_le.nxc, ex_dispgaout.nxc, ex_dispgout.nxc, ex_displayfont.nxc, ex_dispmisc.nxc, ex_div.nxc, ex_le_system.nxc, ex_ndrstle.nxc, ex_ndnextle.nxc, ex_FlattenVar.nxc, ex_GetBrickDataAddress.nxc, ex_getchar.nxc, ex_getmemoryinfo.nxc, ex_HTGyroTest.nxc, ex_i2cdeviceid.nxc, ex_i2cdeviceinfo.nxc, ex_i2cvendorid.nxc, ex_i2cversion.nxc, ex_isnan.nxc, ex_labs.nxc, ex_ldiv.nxc, ex_leftstr.nxc, ex_memcmp.nxc, ex_midstr.nxc, ex_motoroutputoptions.nxc, ex_NumOut.nxc, ex_NXTLineLeader.nxc, ex_NXTPowerMeter.nxc, ex_NXTServo.nxc, ex_NXTSumoEyes.nxc, ex_Pos.nxc, ex_ReadSensorHTAngle.nxc, ex_ReadSensorHTTouchMultiplexer.nxc, ex_reladdressof.nxc, ex_rightstr.nxc, ex_RS485Receive.nxc, ex_RS485Send.nxc, ex_SensorHTGyro.nxc, ex_SetAbortFlag.nxc, ex_setdisplayfont.nxc, ex_SetLongAbort.nxc, ex_SizeOf.nxc, ex_string.nxc, ex_strtod.nxc, ex_strtol.nxc, ex_strtoul.nxc, ex_syscall.nxc, ex_SysColorSensorRead.nxc, ex_syscommbtconnection.nxc, ex_SysCommBTOnOff.nxc, ex_SysCommHSCheckStatus.nxc, ex_SysCommHSControl.nxc, ex_SysCommHSRead.nxc, ex_SysComputeCalibValue.nxc, ex_SysDatalogWrite.nxc, ex_sysdrawtext.nxc, ex_syslendrst.nxc, ex_syslendnext.nxc, ex_sysleread.nxc, ex_syslewrite.nxc, ex_sysmemorymanager.nxc, ex_sysmessageread.nxc, ex_SysReadLastResponse.nxc, ex_SysReadSemData.nxc, ex_SysUpdateCalibCacheInfo.nxc, ex_SysWriteSemData.nxc, and ex_UnattenVar.nxc.

8.1.2.589

#dene LCD_LINE2 48 The 2nd line of the LCD screen

Examples: ex_acos.nxc, ex_acosd.nxc, ex_addressof.nxc, ex_addressofex.nxc, ex_ArrayMax.nxc, ex_ArrayMean.nxc, ex_ArrayMin.nxc, ex_ArrayOp.nxc, ex_ArraySort.nxc, ex_ArrayStd.nxc, ex_ArraySum.nxc, ex_ArraySumSqr.nxc, ex_asin.nxc, ex_asind.nxc, ex_atan.nxc, ex_atand.nxc, ex_buttonpressed.nxc, ex_ctype.nxc, ex_DataMode.nxc, ex_displayfont.nxc, ex_dispmisc.nxc, ex_div.nxc, ex_le_system.nxc, ex_ndrstle.nxc, ex_ndnextle.nxc, ex_Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1120

FlattenVar.nxc, ex_getmemoryinfo.nxc, ex_HTGyroTest.nxc, ex_i2cdeviceid.nxc, ex_i2cdeviceinfo.nxc, ex_i2cvendorid.nxc, ex_i2cversion.nxc, ex_isnan.nxc, ex_labs.nxc, ex_ldiv.nxc, ex_memcmp.nxc, ex_NXTLineLeader.nxc, ex_NXTPowerMeter.nxc, ex_NXTServo.nxc, ex_ReadSensorHTAngle.nxc, ex_ReadSensorHTTouchMultiplexer.nxc, ex_reladdressof.nxc, ex_SetAbortFlag.nxc, ex_setdisplayfont.nxc, ex_SetLongAbort.nxc, ex_SizeOf.nxc, ex_string.nxc, ex_strtod.nxc, ex_strtol.nxc, ex_strtoul.nxc, ex_SubStr.nxc, ex_syscommbtconnection.nxc, ex_sysleread.nxc, ex_sysmemorymanager.nxc, ex_SysReadLastResponse.nxc, ex_UnattenVar.nxc, util_battery_1.nxc, util_battery_2.nxc, and util_rpm.nxc.

8.1.2.590

#dene LCD_LINE3 40 The 3rd line of the LCD screen

Examples: ex_acos.nxc, ex_acosd.nxc, ex_ArraySort.nxc, ex_asin.nxc, ex_asind.nxc, ex_atan.nxc, ex_atand.nxc, ex_buttonpressed.nxc, ex_ctype.nxc, ex_dispmisc.nxc, ex_ndrstle.nxc, ex_ndnextle.nxc, ex_FlattenVar.nxc, ex_i2cdeviceid.nxc, ex_i2cdeviceinfo.nxc, ex_i2cvendorid.nxc, ex_i2cversion.nxc, ex_memcmp.nxc, ex_NXTLineLeader.nxc, ex_NXTPowerMeter.nxc, ex_NXTServo.nxc, ex_ReadSensorHTAngle.nxc, ex_ReadSensorHTTouchMultiplexer.nxc, ex_reladdressof.nxc, ex_SetAbortFlag.nxc, ex_SetLongAbort.nxc, ex_SizeOf.nxc, ex_StrCatOld.nxc, ex_string.nxc, ex_strtod.nxc, ex_strtol.nxc, ex_strtoul.nxc, ex_syscommbtconnection.nxc, ex_TextOut.nxc, and ex_UnattenVar.nxc.

8.1.2.591

#dene LCD_LINE4 32 The 4th line of the LCD screen

Examples: ex_acos.nxc, ex_acosd.nxc, ex_addressof.nxc, ex_addressofex.nxc, ex_ArrayBuild.nxc, ex_ArraySort.nxc, ex_asin.nxc, ex_asind.nxc, ex_atan.nxc, ex_atand.nxc, ex_buttonpressed.nxc, ex_ctype.nxc, ex_DataMode.nxc, ex_displayfont.nxc, ex_dispmisc.nxc, ex_FlattenVar.nxc, ex_NXTPowerMeter.nxc, ex_ReadSensorHTTouchMultiplexer.nxc, ex_reladdressof.nxc, ex_SetAbortFlag.nxc, ex_setdisplayfont.nxc, ex_SetLongAbort.nxc, ex_SizeOf.nxc, ex_string.nxc, ex_StrReplace.nxc, ex_sysdataloggettimes.nxc, and ex_UnattenVar.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1121

8.1.2.592

#dene LCD_LINE5 24 The 5th line of the LCD screen

Examples: ex_ArrayBuild.nxc, ex_ArraySort.nxc, ex_atan.nxc, ex_atand.nxc, ex_ctype.nxc, ex_DataMode.nxc, ex_dispmisc.nxc, ex_NXTPowerMeter.nxc, ex_StrIndex.nxc, ex_string.nxc, and ex_sysdataloggettimes.nxc.

8.1.2.593

#dene LCD_LINE6 16 The 6th line of the LCD screen

Examples: ex_ArraySort.nxc, ex_ctype.nxc, ex_NXTPowerMeter.nxc, ex_string.nxc, ex_StrLenOld.nxc, and ex_syslistles.nxc.

8.1.2.594

#dene LCD_LINE7 8 The 7th line of the LCD screen

Examples: ex_ArraySort.nxc, ex_ctype.nxc, ex_NXTPowerMeter.nxc, and ex_string.nxc.

8.1.2.595

#dene LCD_LINE8 0 The 8th line of the LCD screen

Examples: ex_ArraySort.nxc, ex_ctype.nxc, ex_dispgout.nxc, ex_getmemoryinfo.nxc, ex_SetAbortFlag.nxc, ex_SetLongAbort.nxc, ex_string.nxc, and ex_sysmemorymanager.nxc.

8.1.2.596

#dene LDR_APPENDNOTPOSSIBLE 0x8D00 Only datales can be appended to.

8.1.2.597

#dene LDR_BTBUSY 0x9400 The bluetooth system is busy.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1122

8.1.2.598

#dene LDR_BTCONNECTFAIL 0x9500 Bluetooth connection attempt failed.

8.1.2.599

#dene LDR_BTTIMEOUT 0x9600 A timeout in the bluetooth system has occurred.

8.1.2.600

#dene LDR_CMD_BOOTCMD 0x97 Reboot the NXT into SAMBA mode

8.1.2.601

#dene LDR_CMD_BTFACTORYRESET 0xA4 Reset bluetooth conguration to factory defaults

8.1.2.602

#dene LDR_CMD_BTGETADR 0x9A Get the NXTs bluetooth brick address

8.1.2.603

#dene LDR_CMD_CLOSE 0x84 Close a le handle

8.1.2.604

#dene LDR_CMD_CLOSEMODHANDLE 0x92 Close a module handle

8.1.2.605

#dene LDR_CMD_CROPDATAFILE 0x8D Crop a data le to its used space

8.1.2.606

#dene LDR_CMD_DELETE 0x85 Delete a le

8.1.2.607

#dene LDR_CMD_DELETEUSERFLASH 0xA0 Delete all les from user ash memory

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1123

8.1.2.608

#dene LDR_CMD_DEVICEINFO 0x9B Read device information

8.1.2.609

#dene LDR_CMD_FINDFIRST 0x86 Find the rst le matching the specied pattern

8.1.2.610

#dene LDR_CMD_FINDFIRSTMODULE 0x90 Find the rst module matching the specied pattern

8.1.2.611

#dene LDR_CMD_FINDNEXT 0x87 Find the next le matching the specied pattern

8.1.2.612

#dene LDR_CMD_FINDNEXTMODULE 0x91 Find the next module matching the specied pattern

8.1.2.613

#dene LDR_CMD_IOMAPREAD 0x94 Read data from a module IOMAP

8.1.2.614

#dene LDR_CMD_IOMAPWRITE 0x95 Write data to a module IOMAP

8.1.2.615

#dene LDR_CMD_OPENAPPENDDATA 0x8C Open a data le for appending

8.1.2.616

#dene LDR_CMD_OPENREAD 0x80 Open a le for reading

8.1.2.617

#dene LDR_CMD_OPENREADLINEAR 0x8A Open a linear le for reading

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1124

8.1.2.618

#dene LDR_CMD_OPENWRITE 0x81 Open a le for writing

8.1.2.619

#dene LDR_CMD_OPENWRITEDATA 0x8B Open a data le for writing

8.1.2.620

#dene LDR_CMD_OPENWRITELINEAR 0x89 Open a linear le for writing

8.1.2.621

#dene LDR_CMD_POLLCMD 0xA2 Poll command

8.1.2.622

#dene LDR_CMD_POLLCMDLEN 0xA1 Read poll command length

8.1.2.623

#dene LDR_CMD_READ 0x82 Read from a le

8.1.2.624

#dene LDR_CMD_RENAMEFILE 0xA3 Rename a le

8.1.2.625

#dene LDR_CMD_RESIZEDATAFILE 0xD0 Resize a data le

8.1.2.626

#dene LDR_CMD_SEEKFROMCURRENT 0xD2 Seek from the current position

8.1.2.627

#dene LDR_CMD_SEEKFROMEND 0xD3 Seek from the end of the le

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1125

8.1.2.628

#dene LDR_CMD_SEEKFROMSTART 0xD1 Seek from the start of the le

8.1.2.629

#dene LDR_CMD_SETBRICKNAME 0x98 Set the NXTs brick name

8.1.2.630

#dene LDR_CMD_VERSIONS 0x88 Read rmware version information

8.1.2.631

#dene LDR_CMD_WRITE 0x83 Write to a le

8.1.2.632

#dene LDR_ENDOFFILE 0x8500 The end of the le has been reached.

Examples: ex_le_system.nxc.

8.1.2.633

#dene LDR_EOFEXPECTED 0x8400 EOF expected.

Examples: ex_le_system.nxc.

8.1.2.634

#dene LDR_FILEEXISTS 0x8F00 A le with the same name already exists.

Examples: ex_le_system.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1126

8.1.2.635

#dene LDR_FILEISBUSY 0x8B00 The le is already being used.

8.1.2.636

#dene LDR_FILEISFULL 0x8E00 The allocated le size has been lled.

Examples: ex_le_system.nxc.

8.1.2.637

#dene LDR_FILENOTFOUND 0x8700 No les matched the search criteria.

8.1.2.638

#dene LDR_FILETX_CLOSEERROR 0x9B00 Error transmitting le: attempt to close le failed.

8.1.2.639

#dene LDR_FILETX_DSTEXISTS 0x9800 Error transmitting le: destination le exists.

8.1.2.640

#dene LDR_FILETX_SRCMISSING 0x9900 Error transmitting le: source le is missing.

8.1.2.641

#dene LDR_FILETX_STREAMERROR 0x9A00 Error transmitting le: a stream error occurred.

8.1.2.642

#dene LDR_FILETX_TIMEOUT 0x9700 Error transmitting le: a timeout occurred.

8.1.2.643

#dene LDR_HANDLEALREADYCLOSED 0x8800 The le handle has already been closed.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1127

8.1.2.644

#dene LDR_ILLEGALFILENAME 0x9200

Filename length to long or attempted open a system le (.rxe, .rtm, or .sys) for writing as a datale. 8.1.2.645 #dene LDR_ILLEGALHANDLE 0x9300 Invalid le handle. 8.1.2.646 #dene LDR_INPROGRESS 0x0001 The function is executing but has not yet completed. 8.1.2.647 #dene LDR_INVALIDSEEK 0x9C00 Invalid le seek operation. 8.1.2.648 #dene LDR_MODULENOTFOUND 0x9000 No modules matched the specied search criteria. 8.1.2.649 #dene LDR_NOLINEARSPACE 0x8900 Not enough linear ash memory is available. 8.1.2.650 #dene LDR_NOMOREFILES 0x8300 The maximum number of les has been reached. 8.1.2.651 #dene LDR_NOMOREHANDLES 0x8100 All available le handles are in use. 8.1.2.652 #dene LDR_NOSPACE 0x8200 Not enough free ash memory for the specied le size. 8.1.2.653 #dene LDR_NOTLINEARFILE 0x8600 The specied le is not linear.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1128

8.1.2.654

#dene LDR_NOWRITEBUFFERS 0x8C00 No more write buffers are available.

8.1.2.655

#dene LDR_OUTOFBOUNDARY 0x9100 Specied IOMap offset is outside the bounds of the IOMap.

8.1.2.656

#dene LDR_REQPIN 0x0002 A PIN exchange request is in progress.

8.1.2.657

#dene LDR_SUCCESS 0x0000 The function completed successfully.

Examples: ex_le_system.nxc, ex_ndrstle.nxc, ex_ndnextle.nxc, ex_syscommbtcheckstatus.nxc, ex_syscommbtconnection.nxc, ex_syslerename.nxc, and ex_sysleresolvehandle.nxc.

8.1.2.658

#dene LDR_UNDEFINEDERROR 0x8A00 An undened error has occurred.

8.1.2.659

#dene LEGO_ADDR_EMETER 0x04 The LEGO e-meter sensors I2C address

8.1.2.660

#dene LEGO_ADDR_TEMP 0x98 The LEGO temperature sensors I2C address

8.1.2.661

#dene LEGO_ADDR_US 0x02 The LEGO ultrasonic sensors I2C address

8.1.2.662

#dene ListFiles 47 List les that match the specied lename pattern

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1129

8.1.2.663

#dene LoaderExecuteFunction 82 Execute one of the Loader modules internal functions

8.1.2.664

#dene LoaderModuleID 0x00090001 The Loader module ID

8.1.2.665

#dene LoaderModuleName "Loader.mod" The Loader module name

8.1.2.666

#dene LoaderOffsetFreeUserFlash 4 Offset to the amount of free user ash

8.1.2.667

#dene LoaderOffsetPFunc 0 Offset to the Loader module function pointer

8.1.2.668

#dene LONG_MAX 2147483647 The maximum value of the long type

8.1.2.669

#dene LONG_MIN -2147483648 The minimum value of the long type

8.1.2.670

#dene LOWSPEED_CH_NOT_READY 1 Lowspeed port is not ready

8.1.2.671

#dene LOWSPEED_COMMUNICATING 3 Channel is actively communicating

8.1.2.672

#dene LOWSPEED_DATA_RECEIVED 3 Lowspeed port is in data received mode

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1130

8.1.2.673

#dene LOWSPEED_DONE 5 Channel is done communicating

8.1.2.674

#dene LOWSPEED_ERROR 4 Channel is in an error state

8.1.2.675

#dene LOWSPEED_IDLE 0 Channel is idle

Examples: ex_syscommlscheckstatus.nxc.

8.1.2.676

#dene LOWSPEED_INIT 1 Channel is being initialized

8.1.2.677

#dene LOWSPEED_LOAD_BUFFER 2 Channel buffer is loading

8.1.2.678

#dene LOWSPEED_NO_ERROR 0 Lowspeed port has no error

8.1.2.679

#dene LOWSPEED_RECEIVING 2 Lowspeed port is in receiving mode

8.1.2.680

#dene LOWSPEED_RX_ERROR 3 Lowspeed port encountered an error while receiving data

8.1.2.681

#dene LOWSPEED_TRANSMITTING 1 Lowspeed port is in transmitting mode

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1131

8.1.2.682

#dene LOWSPEED_TX_ERROR 2 Lowspeed port encountered an error while transmitting data

8.1.2.683

#dene LowSpeedModuleID 0x000B0001 The low speed module ID

8.1.2.684

#dene LowSpeedModuleName "Low Speed.mod" The low speed module name

8.1.2.685

#dene LowSpeedOffsetChannelState(p) ((p)+156) R - Lowspeed channgel state (1 byte)

8.1.2.686

#dene LowSpeedOffsetErrorType(p) ((p)+160) R - Lowspeed port error type (1 byte)

8.1.2.687

#dene LowSpeedOffsetInBufBuf(p) (((p)19)+0) RW - Input buffer data buffer eld offset (16 bytes)

8.1.2.688

#dene LowSpeedOffsetInBufBytesToRx(p) (((p)19)+18) RW - Input buffer bytes to receive eld offset (1 byte)

8.1.2.689

#dene LowSpeedOffsetInBufInPtr(p) (((p)19)+16) RW - Input buffer in pointer eld offset (1 byte)

8.1.2.690

#dene LowSpeedOffsetInBufOutPtr(p) (((p)19)+17) RW - Input buffer out pointer eld offset (1 byte)

8.1.2.691

#dene LowSpeedOffsetMode(p) ((p)+152) R - Lowspeed port mode (1 byte)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1132

8.1.2.692

#dene LowSpeedOffsetNoRestartOnRead 166 RW - Lowspeed option for no restart on read (all channels) (NBC/NXC)

8.1.2.693

#dene LowSpeedOffsetOutBufBuf(p) (((p)19)+76) RW - Output buffer data buffer eld offset (16 bytes)

8.1.2.694

#dene LowSpeedOffsetOutBufBytesToRx(p) (((p)19)+94) RW - Output buffer bytes to receive eld offset (1 byte)

8.1.2.695

#dene LowSpeedOffsetOutBufInPtr(p) (((p)19)+92) RW - Output buffer in pointer eld offset (1 byte)

8.1.2.696

#dene LowSpeedOffsetOutBufOutPtr(p) (((p)19)+93) RW - Output buffer out pointer eld offset (1 byte)

8.1.2.697

#dene LowSpeedOffsetSpeed 165 R - Lowspeed speed (unused)

8.1.2.698

#dene LowSpeedOffsetState 164 R - Lowspeed state (all channels)

8.1.2.699

#dene LR_COULD_NOT_SAVE 0x51 Bluetooth list result could not save

8.1.2.700

#dene LR_ENTRY_REMOVED 0x53 Bluetooth list result entry removed

8.1.2.701

#dene LR_STORE_IS_FULL 0x52 Bluetooth list result store is full

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1133

8.1.2.702

#dene LR_SUCCESS 0x50 Bluetooth list result success

8.1.2.703

#dene LR_UNKNOWN_ADDR 0x54 Bluetooth list result unknown address

8.1.2.704

#dene LSREAD_NO_RESTART_1 0x01 No restart on read for channel 1

8.1.2.705

#dene LSREAD_NO_RESTART_2 0x02 No restart on read for channel 2

8.1.2.706

#dene LSREAD_NO_RESTART_3 0x04 No restart on read for channel 3

8.1.2.707

#dene LSREAD_NO_RESTART_4 0x08 No restart on read for channel 4

8.1.2.708

#dene LSREAD_NO_RESTART_MASK 0x10 No restart mask

8.1.2.709

#dene LSREAD_RESTART_ALL 0x00 Restart on read for all channels (default)

8.1.2.710

#dene LSREAD_RESTART_NONE 0x0F No restart on read for all channels

8.1.2.711

#dene MAILBOX1 0 Mailbox number 1

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1134

Examples: ex_ReceiveMessage.nxc, ex_ReceiveRemoteBool.nxc, ex_ReceiveRemoteMessageEx.nxc, ex_ReceiveRemoteNumber.nxc, ex_SendMessage.nxc, ex_SendRemoteBool.nxc, ex_SendRemoteNumber.nxc, ex_SendRemoteString.nxc, ex_SendResponseBool.nxc, ex_SendResponseNumber.nxc, ex_SendResponseString.nxc, ex_sysmessageread.nxc, and ex_sysmessagewrite.nxc.

8.1.2.712

#dene MAILBOX10 9 Mailbox number 10

8.1.2.713

#dene MAILBOX2 1 Mailbox number 2

8.1.2.714

#dene MAILBOX3 2 Mailbox number 3

8.1.2.715

#dene MAILBOX4 3 Mailbox number 4

8.1.2.716

#dene MAILBOX5 4 Mailbox number 5

8.1.2.717

#dene MAILBOX6 5 Mailbox number 6

8.1.2.718

#dene MAILBOX7 6 Mailbox number 7

8.1.2.719

#dene MAILBOX8 7 Mailbox number 8

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1135

8.1.2.720

#dene MAILBOX9 8 Mailbox number 9

8.1.2.721

#dene MAX_BT_MSG_SIZE 60000 Max Bluetooth Message Size

8.1.2.722

#dene MaxAccelerationField 17

MaxAcceleration eld. Contains the current max acceleration value. Read/write. Set the maximum acceleration to be used during position regulation. 8.1.2.723 #dene MaxSpeedField 16

MaxSpeed eld. Contains the current max speed value. Read/write. Set the maximum speed to be used during position regulation. 8.1.2.724 #dene MemoryManager 96

Read memory manager information, optionally compacting the dataspace rst 8.1.2.725 #dene MENUICON_CENTER 1 Center icon 8.1.2.726 #dene MENUICON_LEFT 0 Left icon 8.1.2.727 #dene MENUICON_RIGHT 2 Right icon 8.1.2.728 #dene MENUICONS 3 The number of menu icons

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1136

8.1.2.729

#dene MENUTEXT 2 Center icon text

8.1.2.730

#dene MessageRead 27 Read a message from a mailbox

8.1.2.731

#dene MessageWrite 26 Write a message to a mailbox

8.1.2.732

#dene MIN_1 60000 1 minute

Examples: ex_SysSetSleepTimeout.nxc.

8.1.2.733

#dene MS_1 1 1 millisecond

Examples: ex_RS485Send.nxc.

8.1.2.734

#dene MS_10 10 10 milliseconds

Examples: ex_PosReg.nxc, ex_RS485Receive.nxc, and ex_RS485Send.nxc.

8.1.2.735

#dene MS_100 100 100 milliseconds

Examples: ex_PolyOut.nxc, and ex_sysdrawpolygon.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1137

8.1.2.736

#dene MS_150 150 150 milliseconds

8.1.2.737

#dene MS_2 2 2 milliseconds

8.1.2.738

#dene MS_20 20 20 milliseconds

Examples: ex_dispgaout.nxc, ex_sin_cos.nxc, ex_sind_cosd.nxc, glBoxDemo.nxc, and glScaleDemo.nxc.

8.1.2.739

#dene MS_200 200 200 milliseconds

Examples: ex_dispgoutex.nxc, and ex_playtones.nxc.

8.1.2.740

#dene MS_250 250 250 milliseconds

8.1.2.741

#dene MS_3 3 3 milliseconds

8.1.2.742

#dene MS_30 30 30 milliseconds

8.1.2.743

#dene MS_300 300 300 milliseconds

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1138

8.1.2.744

#dene MS_350 350 350 milliseconds

8.1.2.745

#dene MS_4 4 4 milliseconds

8.1.2.746

#dene MS_40 40 40 milliseconds

8.1.2.747

#dene MS_400 400 400 milliseconds

8.1.2.748

#dene MS_450 450 450 milliseconds

8.1.2.749

#dene MS_5 5 5 milliseconds

Examples: ex_getchar.nxc.

8.1.2.750

#dene MS_50 50 50 milliseconds

Examples: ex_CircleOut.nxc, and ex_playtones.nxc.

8.1.2.751

#dene MS_500 500 500 milliseconds

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1139

Examples: alternating_tasks.nxc, ex_dispgout.nxc, ex_NXTSumoEyes.nxc, ex_playsound.nxc, ex_ReadSensorHTAngle.nxc, ex_yield.nxc, and util_rpm.nxc.

8.1.2.752

#dene MS_6 6 6 milliseconds

8.1.2.753

#dene MS_60 60 60 milliseconds

8.1.2.754

#dene MS_600 600 600 milliseconds

8.1.2.755

#dene MS_7 7 7 milliseconds

8.1.2.756

#dene MS_70 70 70 milliseconds

8.1.2.757

#dene MS_700 700 700 milliseconds

8.1.2.758

#dene MS_8 8 8 milliseconds

8.1.2.759

#dene MS_80 80 80 milliseconds

8.1.2.760

#dene MS_800 800 800 milliseconds

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1140

8.1.2.761

#dene MS_9 9 9 milliseconds

8.1.2.762

#dene MS_90 90 90 milliseconds

8.1.2.763

#dene MS_900 900 900 milliseconds

8.1.2.764

#dene MS_ADDR_ACCLNX 0x02 MindSensors ACCL-Nx I2C address

Examples: ex_ACCLNxCalibrateX.nxc, ex_ACCLNxCalibrateXEnd.nxc, ex_ACCLNxCalibrateY.nxc, ex_ACCLNxCalibrateYEnd.nxc, ex_ACCLNxCalibrateZ.nxc, ex_ACCLNxCalibrateZEnd.nxc, ex_ACCLNxResetCalibration.nxc, ex_ACCLNxSensitivity.nxc, ex_ACCLNxXOffset.nxc, ex_ACCLNxXRange.nxc, ex_ACCLNxYOffset.nxc, ex_ACCLNxYRange.nxc, ex_ACCLNxZOffset.nxc, ex_ACCLNxZRange.nxc, ex_ReadSensorMSAccel.nxc, ex_ReadSensorMSTilt.nxc, and ex_SetACCLNxSensitivity.nxc.

8.1.2.765

#dene MS_ADDR_CMPSNX 0x02 MindSensors CMPS-Nx I2C address

Examples: ex_SensorMSCompass.nxc.

8.1.2.766

#dene MS_ADDR_DISTNX 0x02 MindSensors DIST-Nx I2C address

Examples: ex_DISTNxDistance.nxc, ex_DISTNxGP2D12.nxc, ex_DISTNxGP2D120.nxc, ex_DISTNxGP2YA02.nxc, ex_DISTNxGP2YA21.nxc, ex_Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1141

DISTNxMaxDistance.nxc, ex_DISTNxMinDistance.nxc, ex_DISTNxModuleType.nxc, ex_DISTNxNumPoints.nxc, ex_DISTNxVoltage.nxc, ex_MSADPAOff.nxc, and ex_MSADPAOn.nxc.

8.1.2.767

#dene MS_ADDR_IVSENS 0x12 MindSensors IVSens (NXTPowerMeter) I2C address

Examples: ex_NXTPowerMeter.nxc.

8.1.2.768

#dene MS_ADDR_LINELDR 0x02 MindSensors LineLdr I2C address

Examples: ex_NXTLineLeader.nxc.

8.1.2.769

#dene MS_ADDR_MTRMUX 0xB4 MindSensors MTRMux I2C address

8.1.2.770

#dene MS_ADDR_NRLINK 0x02 MindSensors NRLink I2C address

Examples: ex_MSRCXSetNRLinkPort.nxc, ex_NRLink2400.nxc, ex_NRLink4800.nxc, ex_NRLinkFlush.nxc, ex_NRLinkIRLong.nxc, ex_NRLinkIRShort.nxc, ex_NRLinkSetPF.nxc, ex_NRLinkSetRCX.nxc, ex_NRLinkSetTrain.nxc, ex_NRLinkStatus.nxc, ex_NRLinkTxRaw.nxc, ex_ReadNRLinkBytes.nxc, ex_RunNRLinkMacro.nxc, and ex_writenrlinkbytes.nxc.

8.1.2.771

#dene MS_ADDR_NXTCAM 0x02 MindSensors NXTCam I2C address

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1142

8.1.2.772

#dene MS_ADDR_NXTHID 0x04 MindSensors NXTHID I2C address

Examples: ex_NXTHID.nxc.

8.1.2.773

#dene MS_ADDR_NXTMMX 0x06 MindSensors NXTMMX I2C address

8.1.2.774

#dene MS_ADDR_NXTSERVO 0xB0 MindSensors NXTServo I2C address

Examples: ex_NXTHID.nxc, and ex_NXTServo.nxc.

8.1.2.775

#dene MS_ADDR_NXTSERVO_EM 0x40 MindSensors NXTServo in edit macro mode I2C address

8.1.2.776

#dene MS_ADDR_PFMATE 0x48 MindSensors PFMate I2C address

Examples: ex_PFMate.nxc.

8.1.2.777

#dene MS_ADDR_PSPNX 0x02 MindSensors PSP-Nx I2C address

Examples: ex_PSPNxAnalog.nxc, ex_PSPNxDigital.nxc, ReadSensorMSPlayStation.nxc. and ex_-

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1143

8.1.2.778

#dene MS_ADDR_RTCLOCK 0xD0 MindSensors RTClock I2C address

8.1.2.779

#dene MS_ADDR_RXMUX 0x7E MindSensors RXMux I2C address

8.1.2.780

#dene MS_CMD_ADPA_OFF 0x4F Turn MindSensors ADPA mode off

8.1.2.781

#dene MS_CMD_ADPA_ON 0x4E Turn MindSensors ADPA mode on

8.1.2.782

#dene MS_CMD_DEENERGIZED 0x44 De-energize the MindSensors device

8.1.2.783

#dene MS_CMD_ENERGIZED 0x45 Energize the MindSensors device

8.1.2.784

#dene NA 0xFFFF The specied argument does not apply (aka unwired)

Examples: ex_ArrayMax.nxc, ex_ArrayMean.nxc, ex_ArrayMin.nxc, ex_ArrayOp.nxc, ex_ArraySort.nxc, ex_ArrayStd.nxc, ex_ArraySum.nxc, and ex_ArraySumSqr.nxc.

8.1.2.785

#dene NO_ERR 0 Successful execution of the specied command

Examples: ex_SysColorSensorRead.nxc, ex_syscommbtconnection.nxc, ex_SysCommBTOnOff.nxc, ex_SysCommHSRead.nxc, ex_SysCommHSWrite.nxc,


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1144

ex_syscommlswriteex.nxc, ex_SysComputeCalibValue.nxc, ex_SysDatalogWrite.nxc, ex_sysleopenappend.nxc, ex_sysleopenread.nxc, ex_sysleopenreadlinear.nxc, ex_sysleopenwrite.nxc, ex_sysleopenwritelinear.nxc, ex_sysleopenwritenonlinear.nxc, ex_sysleread.nxc, ex_sysleresize.nxc, ex_sysleseek.nxc, ex_syslewrite.nxc, ex_sysiomapread.nxc, ex_sysiomapreadbyid.nxc, ex_syslistles.nxc, ex_sysmessageread.nxc, and ex_SysReadLastResponse.nxc.

8.1.2.786

#dene NO_OF_BTNS 4 The number of NXT buttons.

8.1.2.787

#dene NormalizedValueField 3

Normalized value eld. Contains the current normalized analog sensor value. Read only. 8.1.2.788 #dene NRLINK_CMD_2400 0x44 Set NRLink to 2400 baud 8.1.2.789 #dene NRLINK_CMD_4800 0x48 Set NRLink to 4800 baud 8.1.2.790 #dene NRLINK_CMD_FLUSH 0x46 Flush the NRLink 8.1.2.791 #dene NRLINK_CMD_IR_LONG 0x4C Set the NRLink to long range IR 8.1.2.792 #dene NRLINK_CMD_IR_SHORT 0x53 Set the NRLink to short range IR 8.1.2.793 #dene NRLINK_CMD_RUN_MACRO 0x52 Run an NRLink macro
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1145

8.1.2.794

#dene NRLINK_CMD_SET_PF 0x50 Set the NRLink to Power Function mode

8.1.2.795

#dene NRLINK_CMD_SET_RCX 0x58 Set the NRLink to RCX mode

8.1.2.796

#dene NRLINK_CMD_SET_TRAIN 0x54 Set the NRLink to IR Train mode

8.1.2.797

#dene NRLINK_CMD_TX_RAW 0x55 Set the NRLink to transmit raw bytes

8.1.2.798

#dene NRLINK_REG_BYTES 0x40 The NRLink bytes register

8.1.2.799

#dene NRLINK_REG_DATA 0x42 The NRLink data register

8.1.2.800

#dene NRLINK_REG_EEPROM 0x50 The NRLink eeprom register

8.1.2.801

#dene NULL 0 A constant representing NULL

8.1.2.802

#dene NXTHID_CMD_ASCII 0x41

Use ASCII data mode. In ASCII mode no non-printable characters can be sent. 8.1.2.803 #dene NXTHID_CMD_DIRECT 0x44 Use direct data mode In direct mode any character can be sent.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1146

8.1.2.804

#dene NXTHID_CMD_TRANSMIT 0x54 Transmit data to the host computer.

8.1.2.805

#dene NXTHID_MOD_LEFT_ALT 0x04 NXTHID left alt modier.

8.1.2.806

#dene NXTHID_MOD_LEFT_CTRL 0x01 NXTHID left control modier.

Examples: ex_NXTHID.nxc.

8.1.2.807

#dene NXTHID_MOD_LEFT_GUI 0x08 NXTHID left gui modier.

8.1.2.808

#dene NXTHID_MOD_LEFT_SHIFT 0x02 NXTHID left shift modier.

8.1.2.809

#dene NXTHID_MOD_NONE 0x00 NXTHID no modier.

Examples: ex_NXTHID.nxc.

8.1.2.810

#dene NXTHID_MOD_RIGHT_ALT 0x40 NXTHID right alt modier.

8.1.2.811

#dene NXTHID_MOD_RIGHT_CTRL 0x10 NXTHID right control modier.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1147

8.1.2.812

#dene NXTHID_MOD_RIGHT_GUI 0x80 NXTHID right gui modier.

8.1.2.813

#dene NXTHID_MOD_RIGHT_SHIFT 0x20 NXTHID right shift modier.

8.1.2.814

#dene NXTHID_REG_CMD 0x41

NXTHID command register. See MindSensors NXTHID commands group. 8.1.2.815 #dene NXTHID_REG_DATA 0x43 NXTHID data register. 8.1.2.816 #dene NXTHID_REG_MODIFIER 0x42

NXTHID modier register. See MindSensors NXTHID modier keys group. 8.1.2.817 #dene NXTLL_CMD_BLACK 0x42 Black calibration. 8.1.2.818 #dene NXTLL_CMD_EUROPEAN 0x45 European power frequency. (50hz) 8.1.2.819 #dene NXTLL_CMD_INVERT 0x49 Invert color. 8.1.2.820 #dene NXTLL_CMD_POWERDOWN 0x44 Power down the device. 8.1.2.821 #dene NXTLL_CMD_POWERUP 0x50 Power up the device.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1148

8.1.2.822

#dene NXTLL_CMD_RESET 0x52 Reset inversion.

8.1.2.823

#dene NXTLL_CMD_SNAPSHOT 0x53 Setpoint based on snapshot (automatically sets invert if needed).

8.1.2.824

#dene NXTLL_CMD_UNIVERSAL 0x55

Universal power frequency. The sensor auto adjusts for any frequency. This is the default mode. 8.1.2.825 #dene NXTLL_CMD_USA 0x41 USA power frequency. (60hz) 8.1.2.826 #dene NXTLL_CMD_WHITE 0x57 White balance calibration. 8.1.2.827 #dene NXTLL_REG_AVERAGE 0x43 NXTLineLeader average result register. 8.1.2.828 #dene NXTLL_REG_BLACKDATA 0x6C NXTLineLeader black calibration data registers. 8 bytes. 8.1.2.829 #dene NXTLL_REG_BLACKLIMITS 0x59 NXTLineLeader black limit registers. 8 bytes. 8.1.2.830 #dene NXTLL_REG_CALIBRATED 0x49 NXTLineLeader calibrated sensor reading registers. 8 bytes.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1149

8.1.2.831

#dene NXTLL_REG_CMD 0x41

NXTLineLeader command register. See the MindSensors NXTLineLeader commands group. 8.1.2.832 #dene NXTLL_REG_KD_FACTOR 0x63 NXTLineLeader Kd factor register. Default = 32. 8.1.2.833 #dene NXTLL_REG_KD_VALUE 0x48 NXTLineLeader Kd value register. Default = 8. 8.1.2.834 #dene NXTLL_REG_KI_FACTOR 0x62 NXTLineLeader Ki factor register. Default = 32. 8.1.2.835 #dene NXTLL_REG_KI_VALUE 0x47 NXTLineLeader Ki value register. Default = 0. 8.1.2.836 #dene NXTLL_REG_KP_FACTOR 0x61 NXTLineLeader Kp factor register. Default = 32. 8.1.2.837 #dene NXTLL_REG_KP_VALUE 0x46 NXTLineLeader Kp value register. Default = 25. 8.1.2.838 #dene NXTLL_REG_RAWVOLTAGE 0x74 NXTLineLeader uncalibrated sensor voltage registers. 16 bytes. 8.1.2.839 #dene NXTLL_REG_RESULT 0x44 NXTLineLeader result register (sensor bit values). 8.1.2.840 #dene NXTLL_REG_SETPOINT 0x45 NXTLineLeader user settable average (setpoint) register. Default = 45.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1150

8.1.2.841

#dene NXTLL_REG_STEERING 0x42 NXTLineLeader steering register.

8.1.2.842

#dene NXTLL_REG_WHITEDATA 0x64 NXTLineLeader white calibration data registers. 8 bytes.

8.1.2.843

#dene NXTLL_REG_WHITELIMITS 0x51 NXTLineLeader white limit registers. 8 bytes.

8.1.2.844

#dene NXTPM_CMD_RESET 0x52 Reset counters.

8.1.2.845

#dene NXTPM_REG_CAPACITY 0x46 NXTPowerMeter capacity used since last reset register. (2 bytes)

8.1.2.846

#dene NXTPM_REG_CMD 0x41

NXTPowerMeter command register. See the MindSensors NXTPowerMeter commands group. 8.1.2.847 #dene NXTPM_REG_CURRENT 0x42 NXTPowerMeter present current in mA register. (2 bytes) 8.1.2.848 #dene NXTPM_REG_ERRORCOUNT 0x5F NXTPowerMeter error count register. (2 bytes) 8.1.2.849 #dene NXTPM_REG_GAIN 0x5E NXTPowerMeter gain register. (1 byte) 8.1.2.850 #dene NXTPM_REG_MAXCURRENT 0x4E NXTPowerMeter max current register. (2 bytes)
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1151

8.1.2.851

#dene NXTPM_REG_MAXVOLTAGE 0x52 NXTPowerMeter max voltage register. (2 bytes)

8.1.2.852

#dene NXTPM_REG_MINCURRENT 0x50 NXTPowerMeter min current register. (2 bytes)

8.1.2.853

#dene NXTPM_REG_MINVOLTAGE 0x54 NXTPowerMeter min voltage register. (2 bytes)

8.1.2.854

#dene NXTPM_REG_POWER 0x48 NXTPowerMeter present power register. (2 bytes)

8.1.2.855

#dene NXTPM_REG_TIME 0x56 NXTPowerMeter time register. (4 bytes)

8.1.2.856

#dene NXTPM_REG_TOTALPOWER 0x4A NXTPowerMeter total power consumed since last reset register. (4 bytes)

8.1.2.857

#dene NXTPM_REG_USERGAIN 0x5A NXTPowerMeter user gain register. Not yet implemented. (4 bytes)

8.1.2.858

#dene NXTPM_REG_VOLTAGE 0x44 NXTPowerMeter present voltage in mV register. (2 bytes)

8.1.2.859

#dene NXTSE_ZONE_FRONT 1 Obstacle zone front.

Examples: ex_NXTSumoEyes.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1152

8.1.2.860

#dene NXTSE_ZONE_LEFT 2 Obstacle zone left.

Examples: ex_NXTSumoEyes.nxc.

8.1.2.861

#dene NXTSE_ZONE_NONE 0 Obstacle zone none.

8.1.2.862

#dene NXTSE_ZONE_RIGHT 3 Obstacle zone right.

Examples: ex_NXTSumoEyes.nxc.

8.1.2.863

#dene NXTSERVO_CMD_EDIT1 0x45 Edit Macro (part 1 of 2 character command sequence)

8.1.2.864

#dene NXTSERVO_CMD_EDIT2 0x4D Edit Macro (part 2 of 2 character command sequence)

8.1.2.865

#dene NXTSERVO_CMD_GOTO 0x47

Goto EEPROM position x. This command re-initializes the macro environment. 8.1.2.866 #dene NXTSERVO_CMD_HALT 0x48 Halt Macro. This command re-initializes the macro environment. 8.1.2.867 #dene NXTSERVO_CMD_INIT 0x49

Store the initial speed and position properties of the servo motor n. Current speed and position values of the nth servo is read from the servo speed register and servo position register and written to permanent memory.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1153

8.1.2.868

#dene NXTSERVO_CMD_PAUSE 0x50

Pause Macro. This command will pause the macro, and save the environment for subsequent resumption. 8.1.2.869 #dene NXTSERVO_CMD_RESET 0x53

Reset servo properties to factory default. Initial Position of servos to 1500, and speed to 0. 8.1.2.870 #dene NXTSERVO_CMD_RESUME 0x52

Resume macro Execution. This command resumes macro where it was paused last, using the same environment. 8.1.2.871 #dene NXTSERVO_EM_CMD_QUIT 0x51 Exit edit macro mode 8.1.2.872 #dene NXTSERVO_EM_REG_CMD 0x00 NXTServo in macro edit mode command register. 8.1.2.873 #dene NXTSERVO_EM_REG_EEPROM_END 0xFF NXTServo in macro edit mode EEPROM end register. 8.1.2.874 #dene NXTSERVO_EM_REG_EEPROM_START 0x21 NXTServo in macro edit mode EEPROM start register. 8.1.2.875 #dene NXTSERVO_POS_CENTER 1500 Center position for 1500us servos. Examples: ex_NXTServo.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1154

8.1.2.876

#dene NXTSERVO_POS_MAX 2500 Maximum position for 1500us servos.

8.1.2.877

#dene NXTSERVO_POS_MIN 500 Minimum position for 1500us servos.

8.1.2.878

#dene NXTSERVO_QPOS_CENTER 150 Center quick position for 1500us servos.

8.1.2.879

#dene NXTSERVO_QPOS_MAX 250 Maximum quick position for 1500us servos.

8.1.2.880

#dene NXTSERVO_QPOS_MIN 50 Minimum quick position for 1500us servos.

Examples: ex_NXTServo.nxc.

8.1.2.881

#dene NXTSERVO_REG_CMD 0x41

NXTServo command register. See MindSensors NXTServo commands group. (write only) 8.1.2.882 #dene NXTSERVO_REG_S1_POS 0x42 NXTServo servo 1 position register. 8.1.2.883 #dene NXTSERVO_REG_S1_QPOS 0x5A NXTServo servo 1 quick position register. (write only) 8.1.2.884 #dene NXTSERVO_REG_S1_SPEED 0x52 NXTServo servo 1 speed register.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1155

8.1.2.885

#dene NXTSERVO_REG_S2_POS 0x44 NXTServo servo 2 position register.

8.1.2.886

#dene NXTSERVO_REG_S2_QPOS 0x5B NXTServo servo 2 quick position register. (write only)

8.1.2.887

#dene NXTSERVO_REG_S2_SPEED 0x53 NXTServo servo 2 speed register.

8.1.2.888

#dene NXTSERVO_REG_S3_POS 0x46 NXTServo servo 3 position register.

8.1.2.889

#dene NXTSERVO_REG_S3_QPOS 0x5C NXTServo servo 3 quick position register. (write only)

8.1.2.890

#dene NXTSERVO_REG_S3_SPEED 0x54 NXTServo servo 3 speed register.

8.1.2.891

#dene NXTSERVO_REG_S4_POS 0x48 NXTServo servo 4 position register.

8.1.2.892

#dene NXTSERVO_REG_S4_QPOS 0x5D NXTServo servo 4 quick position register. (write only)

8.1.2.893

#dene NXTSERVO_REG_S4_SPEED 0x55 NXTServo servo 4 speed register.

8.1.2.894

#dene NXTSERVO_REG_S5_POS 0x4A NXTServo servo 5 position register.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1156

8.1.2.895

#dene NXTSERVO_REG_S5_QPOS 0x5E NXTServo servo 5 quick position register. (write only)

8.1.2.896

#dene NXTSERVO_REG_S5_SPEED 0x56 NXTServo servo 5 speed register.

8.1.2.897

#dene NXTSERVO_REG_S6_POS 0x4C NXTServo servo 6 position register.

8.1.2.898

#dene NXTSERVO_REG_S6_QPOS 0x5F NXTServo servo 6 quick position register. (write only)

8.1.2.899

#dene NXTSERVO_REG_S6_SPEED 0x57 NXTServo servo 6 speed register.

8.1.2.900

#dene NXTSERVO_REG_S7_POS 0x4E NXTServo servo 7 position register.

8.1.2.901

#dene NXTSERVO_REG_S7_QPOS 0x60 NXTServo servo 7 quick position register. (write only)

8.1.2.902

#dene NXTSERVO_REG_S7_SPEED 0x58 NXTServo servo 7 speed register.

8.1.2.903

#dene NXTSERVO_REG_S8_POS 0x50 NXTServo servo 8 position register.

8.1.2.904

#dene NXTSERVO_REG_S8_QPOS 0x61 NXTServo servo 8 quick position register. (write only)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1157

8.1.2.905

#dene NXTSERVO_REG_S8_SPEED 0x59 NXTServo servo 8 speed register.

8.1.2.906

#dene NXTSERVO_REG_VOLTAGE 0x41 Battery voltage register. (read only)

8.1.2.907

#dene NXTSERVO_SERVO_1 0 NXTServo server number 1.

Examples: ex_NXTServo.nxc.

8.1.2.908

#dene NXTSERVO_SERVO_2 1 NXTServo server number 2.

8.1.2.909

#dene NXTSERVO_SERVO_3 2 NXTServo server number 3.

8.1.2.910

#dene NXTSERVO_SERVO_4 3 NXTServo server number 4.

8.1.2.911

#dene NXTSERVO_SERVO_5 4 NXTServo server number 5.

8.1.2.912

#dene NXTSERVO_SERVO_6 5 NXTServo server number 6.

8.1.2.913

#dene NXTSERVO_SERVO_7 6 NXTServo server number 7.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1158

8.1.2.914

#dene NXTSERVO_SERVO_8 7 NXTServo server number 8.

8.1.2.915

#dene OPARR_MAX 0x05 Calculate the maximum value of the elements in the numeric input array

Examples: ex_ArrayOp.nxc.

8.1.2.916

#dene OPARR_MEAN 0x01 Calculate the mean value for the elements in the numeric input array

8.1.2.917

#dene OPARR_MIN 0x04 Calculate the minimum value of the elements in the numeric input array

8.1.2.918

#dene OPARR_SORT 0x06 Sort the elements in the numeric input array

8.1.2.919

#dene OPARR_STD 0x03 Calculate the standard deviation of the elements in the numeric input array

8.1.2.920

#dene OPARR_SUM 0x00 Calculate the sum of the elements in the numeric input array

8.1.2.921

#dene OPARR_SUMSQR 0x02 Calculate the sum of the squares of the elements in the numeric input array

8.1.2.922

#dene OUT_A 0x00 Output port A

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1159

Examples: ex_coast.nxc, ex_coastex.nxc, ex_oat.nxc, ex_getoutput.nxc, ex_motoractualspeed.nxc, ex_motorblocktachocount.nxc, ex_motormode.nxc, ex_motoroutputoptions.nxc, ex_motoroverload.nxc, ex_motorpower.nxc, ex_motorregdvalue.nxc, ex_motorregivalue.nxc, ex_motorregpvalue.nxc, ex_motorregulation.nxc, ex_motorrotationcount.nxc, ex_motorrunstate.nxc, ex_motortachocount.nxc, ex_motortacholimit.nxc, ex_motorturnratio.nxc, ex_off.nxc, ex_offex.nxc, ex_onfwd.nxc, ex_onfwdex.nxc, ex_onfwdreg.nxc, ex_onfwdregex.nxc, ex_onfwdregexpid.nxc, ex_onfwdregpid.nxc, ex_onrev.nxc, ex_onrevex.nxc, ex_onrevreg.nxc, ex_onrevregex.nxc, ex_onrevregexpid.nxc, ex_onrevregpid.nxc, ex_PosReg.nxc, ex_RemoteResetMotorPosition.nxc, ex_RemoteResetTachoCount.nxc, ex_RemoteSetOutputState.nxc, ex_rotatemotor.nxc, ex_rotatemotorpid.nxc, and ex_yield.nxc.

8.1.2.923

#dene OUT_AB 0x03 Output ports A and B

Examples: ex_onfwdsync.nxc, ex_onfwdsyncex.nxc, ex_onfwdsyncexpid.nxc, ex_onfwdsyncpid.nxc, ex_onrevsync.nxc, ex_onrevsyncex.nxc, ex_onrevsyncexpid.nxc, ex_onrevsyncpid.nxc, ex_resetalltachocounts.nxc, ex_resetblocktachocount.nxc, ex_resetrotationcount.nxc, ex_resettachocount.nxc, ex_rotatemotorex.nxc, ex_rotatemotorexpid.nxc, and ex_setoutput.nxc.

8.1.2.924

#dene OUT_ABC 0x06 Output ports A, B, and C

8.1.2.925

#dene OUT_AC 0x04 Output ports A and C

8.1.2.926

#dene OUT_B 0x01 Output port B

8.1.2.927

#dene OUT_BC 0x05 Output ports B and C

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1160

8.1.2.928

#dene OUT_C 0x02 Output port C

8.1.2.929

#dene OUT_MODE_BRAKE 0x02 Uses electronic braking to outputs

8.1.2.930

#dene OUT_MODE_COAST 0x00 No power and no braking so motors rotate freely.

8.1.2.931

#dene OUT_MODE_MOTORON 0x01 Enables PWM power to the outputs given the power setting

Examples: ex_RemoteSetOutputState.nxc.

8.1.2.932

#dene OUT_MODE_REGMETHOD 0xF0 Mask for unimplemented regulation mode

8.1.2.933

#dene OUT_MODE_REGULATED 0x04 Enables active power regulation using the regulation mode value

8.1.2.934

#dene OUT_OPTION_HOLDATLIMIT 0x10

Option to have the rmware hold the motor when it reaches the tachometer limit 8.1.2.935 #dene OUT_OPTION_RAMPDOWNTOLIMIT 0x20

Option to have the rmware rampdown the motor power as it approaches the tachometer limit

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1161

8.1.2.936

#dene OUT_REGMODE_IDLE 0 No motor regulation.

Examples: ex_RemoteSetOutputState.nxc.

8.1.2.937

#dene OUT_REGMODE_POS 4 Regulate a motors position.

8.1.2.938

#dene OUT_REGMODE_SPEED 1 Regulate a motors speed (aka power).

Examples: ex_onfwdreg.nxc, ex_onfwdregex.nxc, ex_onfwdregexpid.nxc, ex_onfwdregpid.nxc, ex_onrevreg.nxc, ex_onrevregex.nxc, ex_onrevregexpid.nxc, and ex_onrevregpid.nxc.

8.1.2.939

#dene OUT_REGMODE_SYNC 2 Synchronize the rotation of two motors.

8.1.2.940

#dene OUT_REGOPTION_NO_SATURATION 0x01 Do not limit intermediary regulation results

Examples: ex_PosReg.nxc.

8.1.2.941

#dene OUT_RUNSTATE_HOLD 0x60 Set motor run state to hold at the current position.

8.1.2.942

#dene OUT_RUNSTATE_IDLE 0x00 Disable all power to motors.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1162

8.1.2.943

#dene OUT_RUNSTATE_RAMPDOWN 0x40

Enable ramping down from a current power to a new (lower) power over a specied TachoLimitField goal. 8.1.2.944 #dene OUT_RUNSTATE_RAMPUP 0x10

Enable ramping up from a current power to a new (higher) power over a specied TachoLimitField goal. 8.1.2.945 #dene OUT_RUNSTATE_RUNNING 0x20 Enable power to motors at the specied power level. Examples: ex_RemoteSetOutputState.nxc.

8.1.2.946

#dene OutputModeField 1

Mode eld. Contains a combination of the output mode constants. Read/write. The OUT_MODE_MOTORON bit must be set in order for power to be applied to the motors. Add OUT_MODE_BRAKE to enable electronic braking. Braking means that the output voltage is not allowed to oat between active PWM pulses. It improves the accuracy of motor output but uses more battery power. To use motor regulation include OUT_MODE_REGULATED in the OutputModeField value. Use UF_UPDATE_MODE with UpdateFlagsField to commit changes to this eld. 8.1.2.947 #dene OutputModuleID 0x00020001 The output module ID 8.1.2.948 #dene OutputModuleName "Output.mod" The output module name 8.1.2.949 #dene OutputOffsetActualSpeed(p) (((p)32)+21) R - Holds the current motor speed (1 byte) sbyte

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1163

8.1.2.950

#dene OutputOffsetBlockTachoCount(p) (((p)32)+4)

R - Holds current number of counts for the current output block (4 bytes) slong 8.1.2.951 #dene OutputOffsetFlags(p) (((p)32)+18) RW - Holds ags for which data should be updated (1 byte) ubyte 8.1.2.952 #dene OutputOffsetMaxAccel(p) (((p)32)+31)

RW - holds the maximum acceleration for position regulation (1 byte) sbyte (NBC/NXC) 8.1.2.953 #dene OutputOffsetMaxSpeed(p) (((p)32)+30)

RW - holds the maximum speed for position regulation (1 byte) sbyte (NBC/NXC) 8.1.2.954 #dene OutputOffsetMode(p) (((p)32)+19) RW - Holds motor mode: Run, Break, regulated, ... (1 byte) ubyte 8.1.2.955 #dene OutputOffsetMotorRPM(p) (((p)32)+16) Not updated, will be removed later !! (2 bytes) sword 8.1.2.956 #dene OutputOffsetOptions(p) (((p)32)+29)

RW - holds extra motor options related to the tachometer limit (1 byte) ubyte (NBC/NXC) 8.1.2.957 #dene OutputOffsetOverloaded(p) (((p)32)+27)

R - True if the motor has been overloaded within speed control regulation (1 byte) ubyte 8.1.2.958 #dene OutputOffsetRegDParameter(p) (((p)32)+24) RW - Holds the D-constant used in the regulation (1 byte) ubyte

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1164

8.1.2.959

#dene OutputOffsetRegIParameter(p) (((p)32)+23) RW - Holds the I-constant used in the regulation (1 byte) ubyte

8.1.2.960

#dene OutputOffsetRegMode(p) (((p)32)+26) RW - Tells which regulation mode should be used (1 byte) ubyte

8.1.2.961

#dene OutputOffsetRegPParameter(p) (((p)32)+22) RW - Holds the P-constant used in the regulation (1 byte) ubyte

8.1.2.962

#dene OutputOffsetRegulationOptions 97 use for position regulation options (1 byte) ubyte (NBC/NXC)

8.1.2.963

#dene OutputOffsetRegulationTime 96 use for frequency of checking regulation mode (1 byte) ubyte (NBC/NXC)

8.1.2.964

#dene OutputOffsetRotationCount(p) (((p)32)+8)

R - Holds current number of counts for the rotation counter to the output (4 bytes) slong 8.1.2.965 #dene OutputOffsetRunState(p) (((p)32)+25) RW - Holds the current motor run state in the output module (1 byte) ubyte 8.1.2.966 #dene OutputOffsetSpeed(p) (((p)32)+20) RW - Holds the wanted speed (1 byte) sbyte 8.1.2.967 #dene OutputOffsetSyncTurnParameter(p) (((p)32)+28) RW - Holds the turning parameter need within MoveBlock (1 byte) sbyte

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1165

8.1.2.968

#dene OutputOffsetTachoCount(p) (((p)32)+0)

R - Holds current number of counts, since last reset, updated every 1 mS (4 bytes) slong 8.1.2.969 #dene OutputOffsetTachoLimit(p) (((p)32)+12) RW - Holds number of counts to travel, 0 => Run forever (4 bytes) ulong 8.1.2.970 #dene OutputOptionsField 15

Options eld. Contains a combination of the output options constants. Read/write. Set options for how the output module will act when a tachometer limit is reached. Option constants can be combined with bitwise OR. Use OUT_OPTION_HOLDATLIMIT to have the output module hold the motor when it reaches the tachometer limit. Use OUT_OPTION_RAMPDOWNTOLIMIT to have the output module ramp down the motor power as it approaches the tachometer limit. 8.1.2.971 #dene OverloadField 9

Overload eld. Contains a boolean value which is TRUE if the motor is overloaded. Read only. This eld will have a value of 1 (true) if the rmware speed regulation cannot overcome a physical load on the motor. In other words, the motor is turning more slowly than expected. If the motor speed can be maintained in spite of loading then this eld value is zero (false). In order to use this eld the motor must have a non-idle RunStateField, an OutputModeField which includes OUT_MODE_MOTORON and OUT_MODE_REGULATED, and its RegModeField must be set to OUT_REGMODE_SPEED. 8.1.2.972 #dene PF_CHANNEL_1 0 Power function channel 1 Examples: ex_HTPFComboDirect.nxc, ex_HTPFComboPWM.nxc, ex_HTPFSingleOutputCST.nxc, ex_HTPFSingleOutputPWM.nxc, ex_HTPFSinglePin.nxc, ex_HTPFTrain.nxc, ex_MSPFComboDirect.nxc, ex_MSPFComboPWM.nxc, ex_MSPFSingleOutputCST.nxc, ex_MSPFSingleOutputPWM.nxc, ex_MSPFSinglePin.nxc, and ex_MSPFTrain.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1166

8.1.2.973

#dene PF_CHANNEL_2 1 Power function channel 2

8.1.2.974

#dene PF_CHANNEL_3 2 Power function channel 3

8.1.2.975

#dene PF_CHANNEL_4 3 Power function channel 4

8.1.2.976

#dene PF_CMD_BRAKE 3 Power function command brake

8.1.2.977

#dene PF_CMD_FLOAT 0 Power function command oat (same as stop)

8.1.2.978

#dene PF_CMD_FWD 1 Power function command forward

Examples: ex_HTPFComboDirect.nxc, ex_MSPFComboDirect.nxc, and ex_PFMate.nxc.

8.1.2.979

#dene PF_CMD_REV 2 Power function command reverse

Examples: ex_PFMate.nxc.

8.1.2.980

#dene PF_CMD_STOP 0 Power function command stop

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1167

Examples: ex_HTPFComboDirect.nxc, and ex_MSPFComboDirect.nxc.

8.1.2.981

#dene PF_CST_CLEAR1_CLEAR2 0 Power function CST clear 1 and clear 2

8.1.2.982

#dene PF_CST_CLEAR1_SET2 2 Power function CST clear 1 and set 2

8.1.2.983

#dene PF_CST_DECREMENT_PWM 5 Power function CST decrement PWM

8.1.2.984

#dene PF_CST_FULL_FWD 6 Power function CST full forward

8.1.2.985

#dene PF_CST_FULL_REV 7 Power function CST full reverse

8.1.2.986

#dene PF_CST_INCREMENT_PWM 4 Power function CST increment PWM

8.1.2.987

#dene PF_CST_SET1_CLEAR2 1 Power function CST set 1 and clear 2

8.1.2.988

#dene PF_CST_SET1_SET2 3 Power function CST set 1 and set 2

Examples: ex_HTPFSingleOutputCST.nxc, and ex_MSPFSingleOutputCST.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1168

8.1.2.989

#dene PF_CST_TOGGLE_DIR 8 Power function CST toggle direction

8.1.2.990

#dene PF_FUNC_CLEAR 1 Power function single pin - clear

8.1.2.991

#dene PF_FUNC_NOCHANGE 0 Power function single pin - no change

8.1.2.992

#dene PF_FUNC_SET 2 Power function single pin - set

Examples: ex_HTPFSinglePin.nxc, and ex_MSPFSinglePin.nxc.

8.1.2.993

#dene PF_FUNC_TOGGLE 3 Power function single pin - toggle

8.1.2.994

#dene PF_MODE_COMBO_DIRECT 1 Power function mode combo direct

8.1.2.995

#dene PF_MODE_COMBO_PWM 4 Power function mode combo pulse width modulation (PWM)

8.1.2.996

#dene PF_MODE_SINGLE_OUTPUT_CST 6 Power function mode single output clear, set, toggle (CST)

8.1.2.997

#dene PF_MODE_SINGLE_OUTPUT_PWM 4 Power function mode single output pulse width modulation (PWM)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1169

8.1.2.998

#dene PF_MODE_SINGLE_PIN_CONT 2 Power function mode single pin continuous

8.1.2.999

#dene PF_MODE_SINGLE_PIN_TIME 3 Power function mode single pin timed

8.1.2.1000

#dene PF_MODE_TRAIN 0 Power function mode IR Train

8.1.2.1001

#dene PF_OUT_A 0 Power function output A

Examples: ex_HTPFSingleOutputCST.nxc, ex_HTPFSingleOutputPWM.nxc, ex_HTPFSinglePin.nxc, ex_MSPFSingleOutputCST.nxc, ex_MSPFSingleOutputPWM.nxc, and ex_MSPFSinglePin.nxc.

8.1.2.1002

#dene PF_OUT_B 1 Power function output B

8.1.2.1003

#dene PF_PIN_C1 0 Power function pin C1

Examples: ex_HTPFSinglePin.nxc, and ex_MSPFSinglePin.nxc.

8.1.2.1004

#dene PF_PIN_C2 1 Power function pin C2

8.1.2.1005

#dene PF_PWM_BRAKE 8 Power function PWM brake

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1170

8.1.2.1006

#dene PF_PWM_FLOAT 0 Power function PWM oat

8.1.2.1007

#dene PF_PWM_FWD1 1 Power function PWM foward level 1

8.1.2.1008

#dene PF_PWM_FWD2 2 Power function PWM foward level 2

8.1.2.1009

#dene PF_PWM_FWD3 3 Power function PWM foward level 3

8.1.2.1010

#dene PF_PWM_FWD4 4 Power function PWM foward level 4

8.1.2.1011

#dene PF_PWM_FWD5 5 Power function PWM foward level 5

Examples: ex_HTPFComboPWM.nxc, ex_HTPFSingleOutputPWM.nxc, MSPFComboPWM.nxc, and ex_MSPFSingleOutputPWM.nxc. ex_-

8.1.2.1012

#dene PF_PWM_FWD6 6 Power function PWM foward level 6

8.1.2.1013

#dene PF_PWM_FWD7 7 Power function PWM foward level 7

8.1.2.1014

#dene PF_PWM_REV1 15 Power function PWM reverse level 1

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1171

8.1.2.1015

#dene PF_PWM_REV2 14 Power function PWM reverse level 2

8.1.2.1016

#dene PF_PWM_REV3 13 Power function PWM reverse level 3

8.1.2.1017

#dene PF_PWM_REV4 12 Power function PWM reverse level 4

Examples: ex_HTPFComboPWM.nxc, and ex_MSPFComboPWM.nxc.

8.1.2.1018

#dene PF_PWM_REV5 11 Power function PWM reverse level 5

8.1.2.1019

#dene PF_PWM_REV6 10 Power function PWM reverse level 6

8.1.2.1020

#dene PF_PWM_REV7 9 Power function PWM reverse level 7

8.1.2.1021

#dene PFMATE_CHANNEL_1 1 Power function channel 1

Examples: ex_PFMate.nxc.

8.1.2.1022

#dene PFMATE_CHANNEL_2 2 Power function channel 2

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1172

8.1.2.1023

#dene PFMATE_CHANNEL_3 3 Power function channel 3

8.1.2.1024

#dene PFMATE_CHANNEL_4 4 Power function channel 4

8.1.2.1025

#dene PFMATE_CMD_GO 0x47 Send IR signal to IR receiver

8.1.2.1026

#dene PFMATE_CMD_RAW 0x52 Send raw IR signal to IR receiver

8.1.2.1027

#dene PFMATE_MOTORS_A 0x01 Control only motor A

8.1.2.1028

#dene PFMATE_MOTORS_B 0x02 Control only motor B

8.1.2.1029

#dene PFMATE_MOTORS_BOTH 0x00 Control both motors

Examples: ex_PFMate.nxc.

8.1.2.1030

#dene PFMATE_REG_A_CMD 0x44

PF command for motor A? (PF_CMD_FLOAT, PF_CMD_FWD, PF_CMD_REV, PF_CMD_BRAKE) 8.1.2.1031 #dene PFMATE_REG_A_SPEED 0x45 PF speed for motor A? (0-7)
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1173

8.1.2.1032

#dene PFMATE_REG_B_CMD 0x46

PF command for motor B? (PF_CMD_FLOAT, PF_CMD_FWD, PF_CMD_REV, PF_CMD_BRAKE) 8.1.2.1033 #dene PFMATE_REG_B_SPEED 0x47 PF speed for motor B? (0-7) 8.1.2.1034 #dene PFMATE_REG_CHANNEL 0x42 PF channel? 1, 2, 3, or 4 8.1.2.1035 #dene PFMATE_REG_CMD 0x41 PFMate command 8.1.2.1036 #dene PFMATE_REG_MOTORS 0x43 PF motors? (0 = both, 1 = A, 2 = B) 8.1.2.1037 #dene PI 3.141593 A constant for PI Examples: ex_dispfnout.nxc, and ex_string.nxc.

8.1.2.1038

#dene PID_0 0 PID zero

8.1.2.1039

#dene PID_1 32 PID one

8.1.2.1040

#dene PID_2 64 PID two

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1174

8.1.2.1041

#dene PID_3 96 PID three

8.1.2.1042

#dene PID_4 128 PID four

8.1.2.1043

#dene PID_5 160 PID ve

8.1.2.1044

#dene PID_6 192 PID six

8.1.2.1045

#dene PID_7 224 PID seven

8.1.2.1046

#dene POOL_MAX_SIZE 32768 Maximum size of memory pool, in bytes

8.1.2.1047

#dene PowerField 2

Power eld. Contains the desired power level (-100 to 100). Read/write. Specify the power level of the output. The absolute value of PowerField is a percentage of the full power of the motor. The sign of PowerField controls the rotation direction. Positive values tell the rmware to turn the motor forward, while negative values turn the motor backward. Use UF_UPDATE_SPEED with UpdateFlagsField to commit changes to this eld. 8.1.2.1048 #dene PROG_ABORT 4 Program has been aborted

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1175

8.1.2.1049

#dene PROG_ERROR 3 A program error has occurred

8.1.2.1050

#dene PROG_IDLE 0 Program state is idle

8.1.2.1051

#dene PROG_OK 1 Program state is okay

8.1.2.1052

#dene PROG_RESET 5 Program has been reset

8.1.2.1053

#dene PROG_RUNNING 2 Program is running

8.1.2.1054

#dene PSP_BTNSET1_DOWN 0x02 The PSP-Nx button set 1 down arrow

8.1.2.1055

#dene PSP_BTNSET1_L3 0x40 The PSP-Nx button set 1 L3

8.1.2.1056

#dene PSP_BTNSET1_LEFT 0x01 The PSP-Nx button set 1 left arrow

8.1.2.1057

#dene PSP_BTNSET1_R3 0x20 The PSP-Nx button set 1 R3

8.1.2.1058

#dene PSP_BTNSET1_RIGHT 0x04 The PSP-Nx button set 1 right arrow

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1176

8.1.2.1059

#dene PSP_BTNSET1_UP 0x08 The PSP-Nx button set 1 up arrow

8.1.2.1060

#dene PSP_BTNSET2_CIRCLE 0x04 The PSP-Nx button set 2 circle

8.1.2.1061

#dene PSP_BTNSET2_CROSS 0x02 The PSP-Nx button set 2 cross

8.1.2.1062

#dene PSP_BTNSET2_L1 0x20 The PSP-Nx button set 2 L1

8.1.2.1063

#dene PSP_BTNSET2_L2 0x80 The PSP-Nx button set 2 L2

8.1.2.1064

#dene PSP_BTNSET2_R1 0x10 The PSP-Nx button set 2 R1

8.1.2.1065

#dene PSP_BTNSET2_R2 0x40 The PSP-Nx button set 2 R2

8.1.2.1066

#dene PSP_BTNSET2_SQUARE 0x01 The PSP-Nx button set 2 square

8.1.2.1067

#dene PSP_BTNSET2_TRIANGLE 0x08 The PSP-Nx button set 2 triangle

8.1.2.1068

#dene PSP_CMD_ANALOG 0x73 Set the PSP-Nx to analog mode

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1177

8.1.2.1069

#dene PSP_CMD_DIGITAL 0x41 Set the PSP-Nx to digital mode

8.1.2.1070

#dene PSP_REG_BTNSET1 0x42 The PSP-Nx button set 1 register

8.1.2.1071

#dene PSP_REG_BTNSET2 0x43 The PSP-Nx button set 2 register

8.1.2.1072

#dene PSP_REG_XLEFT 0x44 The PSP-Nx X left register

8.1.2.1073

#dene PSP_REG_XRIGHT 0x46 The PSP-Nx X right register

8.1.2.1074

#dene PSP_REG_YLEFT 0x45 The PSP-Nx Y left register

8.1.2.1075

#dene PSP_REG_YRIGHT 0x47 The PSP-Nx Y right register

8.1.2.1076

#dene RADIANS_PER_DEGREE PI/180 Used for converting from degrees to radians

Examples: ex_sin_cos.nxc.

8.1.2.1077

#dene RAND_MAX 32768 The maximum unsigned int random number returned by rand

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1178

8.1.2.1078

#dene RandomNumber 24 Generate a random number

8.1.2.1079

#dene RawValueField 2 Raw value eld. Contains the current raw analog sensor value. Read only.

8.1.2.1080

#dene RC_PROP_BTONOFF 0x0 Set/get whether bluetooth is on or off

8.1.2.1081

#dene RC_PROP_DEBUGGING 0xF Set/get enhanced rmware debugging information

8.1.2.1082

#dene RC_PROP_SLEEP_TIMEOUT 0x2 Set/get the NXT sleep timeout value (times 60000)

8.1.2.1083

#dene RC_PROP_SOUND_LEVEL 0x1 Set/get the NXT sound level

Examples: ex_RemoteGetProperty.nxc, and ex_RemoteSetProperty.nxc.

8.1.2.1084

#dene RCX_AbsVarOp 0x74 Absolute value function

8.1.2.1085

#dene RCX_AndVarOp 0x84 AND function

8.1.2.1086

#dene RCX_AutoOffOp 0xb1 Set auto off timer

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1179

8.1.2.1087

#dene RCX_BatteryLevelOp 0x30 Read the battery level

8.1.2.1088

#dene RCX_BatteryLevelSrc 34 The RCX battery level source

8.1.2.1089

#dene RCX_BootModeOp 0x65 Set into book mode

8.1.2.1090

#dene RCX_CalibrateEventOp 0x04 Calibrate event

8.1.2.1091

#dene RCX_ClearAllEventsOp 0x06 Clear all events

8.1.2.1092

#dene RCX_ClearCounterOp 0xb7 Clear a counter

8.1.2.1093

#dene RCX_ClearMsgOp 0x90 Clear message

8.1.2.1094

#dene RCX_ClearSensorOp 0xd1 Clear a sensor

8.1.2.1095

#dene RCX_ClearSoundOp 0x80 Clear sound

8.1.2.1096

#dene RCX_ClearTimerOp 0xa1 Clear a timer

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1180

8.1.2.1097

#dene RCX_ClickCounterSrc 27 The RCX event click counter source

8.1.2.1098

#dene RCX_ConstantSrc 2 The RCX constant value source

Examples: ex_HTRCXEvent.nxc, ex_HTRCXSetEvent.nxc, ex_HTRCXSetMaxPower.nxc, ex_HTRCXSetPower.nxc, ex_HTScoutSendVLL.nxc, ex_HTScoutSetEventFeedback.nxc, ex_HTScoutSetSensorClickTime.nxc, ex_HTScoutSetSensorHysteresis.nxc, ex_MSRCXAndVar.nxc, ex_MSRCXDivVar.nxc, ex_MSRCXEvent.nxc, ex_MSRCXOrVar.nxc, ex_MSRCXSetEvent.nxc, ex_MSRCXSetMaxPower.nxc, ex_MSRCXSetPower.nxc, ex_MSScoutSendVLL.nxc, ex_MSScoutSetCounterLimit.nxc, ex_MSScoutSetEventFeedback.nxc, ex_MSScoutSetSensorClickTime.nxc, ex_MSScoutSetSensorHysteresis.nxc, and ex_MSScoutSetTimerLimit.nxc.

8.1.2.1099

#dene RCX_CounterSrc 21 The RCX counter source

8.1.2.1100

#dene RCX_DatalogOp 0x62 Datalog the specied source/value

8.1.2.1101

#dene RCX_DatalogRawDirectSrc 42 The RCX direct datalog raw source

8.1.2.1102

#dene RCX_DatalogRawIndirectSrc 41 The RCX indirect datalog raw source

8.1.2.1103

#dene RCX_DatalogSrcDirectSrc 38 The RCX direct datalog source source

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1181

8.1.2.1104

#dene RCX_DatalogSrcIndirectSrc 37 The RCX indirect datalog source source

8.1.2.1105

#dene RCX_DatalogValueDirectSrc 40 The RCX direct datalog value source

8.1.2.1106

#dene RCX_DatalogValueIndirectSrc 39 The RCX indirect datalog value source

8.1.2.1107

#dene RCX_DecCounterOp 0xa7 Decrement a counter

8.1.2.1108

#dene RCX_DeleteSubOp 0xc1 Delete a subroutine

8.1.2.1109

#dene RCX_DeleteSubsOp 0x70 Delete subroutines

8.1.2.1110

#dene RCX_DeleteTaskOp 0x61 Delete a task

8.1.2.1111

#dene RCX_DeleteTasksOp 0x40 Delete tasks

8.1.2.1112

#dene RCX_DirectEventOp 0x03 Fire an event

8.1.2.1113

#dene RCX_DisplayOp 0x33 Set LCD display value

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1182

8.1.2.1114

#dene RCX_DivVarOp 0x44 Divide function

8.1.2.1115

#dene RCX_DurationSrc 31 The RCX event duration source

8.1.2.1116

#dene RCX_EventStateSrc 25 The RCX event static source

8.1.2.1117

#dene RCX_FirmwareVersionSrc 35 The RCX rmware version source

8.1.2.1118

#dene RCX_GlobalMotorStatusSrc 17 The RCX global motor status source

8.1.2.1119

#dene RCX_GOutputDirOp 0x77 Set global motor direction

8.1.2.1120

#dene RCX_GOutputModeOp 0x67 Set global motor mode

8.1.2.1121

#dene RCX_GOutputPowerOp 0xa3 Set global motor power levels

8.1.2.1122

#dene RCX_HysteresisSrc 30 The RCX event hysteresis source

8.1.2.1123

#dene RCX_IncCounterOp 0x97 Increment a counter

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1183

8.1.2.1124

#dene RCX_IndirectVarSrc 36 The RCX indirect variable source

8.1.2.1125

#dene RCX_InputBooleanSrc 13 The RCX input boolean source

8.1.2.1126

#dene RCX_InputModeOp 0x42 Set the input mode

8.1.2.1127

#dene RCX_InputModeSrc 11 The RCX input mode source

8.1.2.1128

#dene RCX_InputRawSrc 12 The RCX input raw source

8.1.2.1129

#dene RCX_InputTypeOp 0x32 Set the input type

8.1.2.1130

#dene RCX_InputTypeSrc 10 The RCX input type source

8.1.2.1131

#dene RCX_InputValueSrc 9 The RCX input value source

Examples: ex_HTRCXAddToDatalog.nxc, MSRCXSumVar.nxc. ex_MSRCXAddToDatalog.nxc, and ex_-

8.1.2.1132

#dene RCX_IRModeOp 0x31 Set the IR transmit mode

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1184

8.1.2.1133

#dene RCX_LightOp 0x87 Light opcode

8.1.2.1134

#dene RCX_LowerThresholdSrc 29 The RCX event lower threshold source

8.1.2.1135

#dene RCX_LSBlinkTimeOp 0xe3 Set the light sensor blink time

8.1.2.1136

#dene RCX_LSCalibrateOp 0xc0 Calibrate the light sensor

8.1.2.1137

#dene RCX_LSHysteresisOp 0xd3 Set the light sensor hysteresis

8.1.2.1138

#dene RCX_LSLowerThreshOp 0xc3 Set the light sensor lower threshold

8.1.2.1139

#dene RCX_LSUpperThreshOp 0xb3 Set the light sensor upper threshold

8.1.2.1140

#dene RCX_MessageOp 0xf7 Set message

8.1.2.1141

#dene RCX_MessageSrc 15 The RCX message source

8.1.2.1142

#dene RCX_MulVarOp 0x54 Multiply function

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1185

8.1.2.1143

#dene RCX_MuteSoundOp 0xd0 Mute sound

8.1.2.1144

#dene RCX_OnOffFloatOp 0x21 Control motor state - on, off, oat

8.1.2.1145

#dene RCX_OrVarOp 0x94 OR function

8.1.2.1146

#dene RCX_OUT_A 0x01 RCX Output A

Examples: ex_HTRCXDisableOutput.nxc, ex_HTRCXEnableOutput.nxc, ex_HTRCXFloat.nxc, ex_HTRCXFwd.nxc, ex_HTRCXInvertOutput.nxc, ex_HTRCXObvertOutput.nxc, ex_HTRCXOff.nxc, ex_HTRCXOn.nxc, ex_HTRCXOnFor.nxc, ex_HTRCXOnFwd.nxc, ex_HTRCXOnRev.nxc, ex_HTRCXRev.nxc, ex_HTRCXSetDirection.nxc, ex_HTRCXSetGlobalDirection.nxc, ex_HTRCXSetGlobalOutput.nxc, ex_HTRCXSetMaxPower.nxc, ex_HTRCXSetOutput.nxc, ex_HTRCXSetPower.nxc, ex_HTRCXToggle.nxc, ex_MSRCXDisableOutput.nxc, ex_MSRCXEnableOutput.nxc, ex_MSRCXFloat.nxc, ex_MSRCXFwd.nxc, ex_MSRCXInvertOutput.nxc, ex_MSRCXObvertOutput.nxc, ex_MSRCXOff.nxc, ex_MSRCXOn.nxc, ex_MSRCXOnFor.nxc, ex_MSRCXOnFwd.nxc, ex_MSRCXOnRev.nxc, ex_MSRCXRev.nxc, ex_MSRCXSetDirection.nxc, ex_MSRCXSetGlobalDirection.nxc, ex_MSRCXSetGlobalOutput.nxc, ex_MSRCXSetMaxPower.nxc, ex_MSRCXSetOutput.nxc, ex_MSRCXSetPower.nxc, and ex_MSRCXToggle.nxc.

8.1.2.1147

#dene RCX_OUT_AB 0x03 RCX Outputs A and B

8.1.2.1148

#dene RCX_OUT_ABC 0x07 RCX Outputs A, B, and C

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1186

8.1.2.1149

#dene RCX_OUT_AC 0x05 RCX Outputs A and C

8.1.2.1150

#dene RCX_OUT_B 0x02 RCX Output B

8.1.2.1151

#dene RCX_OUT_BC 0x06 RCX Outputs B and C

8.1.2.1152

#dene RCX_OUT_C 0x04 RCX Output C

8.1.2.1153

#dene RCX_OUT_FLOAT 0 Set RCX output to oat

8.1.2.1154

#dene RCX_OUT_FULL 7 Set RCX output power level to full

Examples: ex_HTRCXSetPower.nxc, and ex_MSRCXSetPower.nxc.

8.1.2.1155

#dene RCX_OUT_FWD 0x80 Set RCX output direction to forward

Examples: ex_HTRCXSetDirection.nxc, ex_HTRCXSetGlobalDirection.nxc, MSRCXSetDirection.nxc, and ex_MSRCXSetGlobalDirection.nxc. ex_-

8.1.2.1156

#dene RCX_OUT_HALF 3 Set RCX output power level to half

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1187

8.1.2.1157

#dene RCX_OUT_LOW 0 Set RCX output power level to low

8.1.2.1158

#dene RCX_OUT_OFF 0x40 Set RCX output to off

8.1.2.1159

#dene RCX_OUT_ON 0x80 Set RCX output to on

Examples: ex_HTRCXSetGlobalOutput.nxc, ex_HTRCXSetOutput.nxc, MSRCXSetGlobalOutput.nxc, and ex_MSRCXSetOutput.nxc. ex_-

8.1.2.1160

#dene RCX_OUT_REV 0 Set RCX output direction to reverse

8.1.2.1161

#dene RCX_OUT_TOGGLE 0x40 Set RCX output direction to toggle

8.1.2.1162

#dene RCX_OutputDirOp 0xe1 Set the motor direction

8.1.2.1163

#dene RCX_OutputPowerOp 0x13 Set the motor power level

8.1.2.1164

#dene RCX_OutputStatusSrc 3 The RCX output status source

8.1.2.1165

#dene RCX_PBTurnOffOp 0x60 Turn off the brick

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1188

8.1.2.1166

#dene RCX_PingOp 0x10 Ping the brick

8.1.2.1167

#dene RCX_PlaySoundOp 0x51 Play a sound

8.1.2.1168

#dene RCX_PlayToneOp 0x23 Play a tone

8.1.2.1169

#dene RCX_PlayToneVarOp 0x02 Play a tone using a variable

8.1.2.1170

#dene RCX_PollMemoryOp 0x63 Poll a memory location

8.1.2.1171

#dene RCX_PollOp 0x12 Poll a source/value combination

8.1.2.1172

#dene RCX_ProgramSlotSrc 8 The RCX program slot source

8.1.2.1173

#dene RCX_RandomSrc 4 The RCX random number source

Examples: ex_MSRCXSet.nxc, and ex_MSRCXSubVar.nxc.

8.1.2.1174

#dene RCX_RemoteKeysReleased 0x0000 All remote keys have been released

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1189

8.1.2.1175

#dene RCX_RemoteOp 0xd2 Execute simulated remote control buttons

8.1.2.1176

#dene RCX_RemoteOutABackward 0x4000 Set output A backward

8.1.2.1177

#dene RCX_RemoteOutAForward 0x0800 Set output A forward

8.1.2.1178

#dene RCX_RemoteOutBBackward 0x8000 Set output B backward

8.1.2.1179

#dene RCX_RemoteOutBForward 0x1000 Set output B forward

8.1.2.1180

#dene RCX_RemoteOutCBackward 0x0001 Set output C backward

8.1.2.1181

#dene RCX_RemoteOutCForward 0x2000 Set output C forward

8.1.2.1182

#dene RCX_RemotePBMessage1 0x0100 Send PB message 1

8.1.2.1183

#dene RCX_RemotePBMessage2 0x0200 Send PB message 2

8.1.2.1184

#dene RCX_RemotePBMessage3 0x0400 Send PB message 3

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1190

8.1.2.1185

#dene RCX_RemotePlayASound 0x0080 Play a sound

Examples: ex_HTRCXRemote.nxc, and ex_MSRCXRemote.nxc.

8.1.2.1186

#dene RCX_RemoteSelProgram1 0x0002 Select program 1

8.1.2.1187

#dene RCX_RemoteSelProgram2 0x0004 Select program 2

8.1.2.1188

#dene RCX_RemoteSelProgram3 0x0008 Select program 3

8.1.2.1189

#dene RCX_RemoteSelProgram4 0x0010 Select program 4

8.1.2.1190

#dene RCX_RemoteSelProgram5 0x0020 Select program 5

8.1.2.1191

#dene RCX_RemoteStopOutOff 0x0040 Stop and turn off outputs

8.1.2.1192

#dene RCX_ScoutCounterLimitSrc 22 The Scout counter limit source

8.1.2.1193

#dene RCX_ScoutEventFBSrc 24 The Scout event feedback source

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1191

8.1.2.1194

#dene RCX_ScoutLightParamsSrc 19 The Scout light parameters source

8.1.2.1195

#dene RCX_ScoutOp 0x47 Scout opcode

8.1.2.1196

#dene RCX_ScoutRulesOp 0xd5 Set Scout rules

8.1.2.1197

#dene RCX_ScoutRulesSrc 18 The Scout rules source

8.1.2.1198

#dene RCX_ScoutTimerLimitSrc 20 The Scout timer limit source

8.1.2.1199

#dene RCX_SelectProgramOp 0x91 Select a program slot

8.1.2.1200

#dene RCX_SendUARTDataOp 0xc2 Send data via IR using UART settings

8.1.2.1201

#dene RCX_SetCounterOp 0xd4 Set counter value

8.1.2.1202

#dene RCX_SetDatalogOp 0x52 Set the datalog size

8.1.2.1203

#dene RCX_SetEventOp 0x93 Set an event

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1192

8.1.2.1204

#dene RCX_SetFeedbackOp 0x83 Set Scout feedback

8.1.2.1205

#dene RCX_SetPriorityOp 0xd7 Set task priority

8.1.2.1206

#dene RCX_SetSourceValueOp 0x05 Set a source/value

8.1.2.1207

#dene RCX_SetTimerLimitOp 0xc4 Set timer limit

8.1.2.1208

#dene RCX_SetVarOp 0x14 Set function

8.1.2.1209

#dene RCX_SetWatchOp 0x22 Set the watch source/value

8.1.2.1210

#dene RCX_SgnVarOp 0x64 Sign function

8.1.2.1211

#dene RCX_SoundOp 0x57 Sound opcode

8.1.2.1212

#dene RCX_StartTaskOp 0x71 Start a task

8.1.2.1213

#dene RCX_StopAllTasksOp 0x50 Stop all tasks

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1193

8.1.2.1214

#dene RCX_StopTaskOp 0x81 Stop a task

8.1.2.1215

#dene RCX_SubVarOp 0x34 Subtract function

8.1.2.1216

#dene RCX_SumVarOp 0x24 Sum function

8.1.2.1217

#dene RCX_TaskEventsSrc 23 The RCX task events source

8.1.2.1218

#dene RCX_TenMSTimerSrc 26 The RCX 10ms timer source

8.1.2.1219

#dene RCX_TimerSrc 1 The RCX timer source

8.1.2.1220

#dene RCX_UARTSetupSrc 33 The RCX UART setup source

8.1.2.1221

#dene RCX_UnlockFirmOp 0xa5 Unlock the rmware

8.1.2.1222

#dene RCX_UnlockOp 0x15 Unlock the brick

8.1.2.1223

#dene RCX_UnmuteSoundOp 0xe0 Unmute sound

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1194

8.1.2.1224

#dene RCX_UploadDatalogOp 0xa4 Upload datalog contents

8.1.2.1225

#dene RCX_UpperThresholdSrc 28 The RCX event upper threshold source

8.1.2.1226

#dene RCX_VariableSrc 0 The RCX variable source

Examples: ex_HTRCXPoll.nxc, ex_HTRCXSelectDisplay.nxc, ex_HTScoutSetSensorLowerLimit.nxc, ex_HTScoutSetSensorUpperLimit.nxc, ex_MSRCXAbsVar.nxc, ex_MSRCXMulVar.nxc, ex_MSRCXPoll.nxc, ex_MSRCXSelectDisplay.nxc, ex_MSRCXSet.nxc, ex_MSRCXSetUserDisplay.nxc, ex_MSRCXSetVar.nxc, ex_MSRCXSgnVar.nxc, ex_MSScoutSetSensorLowerLimit.nxc, and ex_MSScoutSetSensorUpperLimit.nxc.

8.1.2.1227

#dene RCX_ViewSourceValOp 0xe5 View a source/value

8.1.2.1228

#dene RCX_VLLOp 0xe2 Send visual light link (VLL) data

8.1.2.1229

#dene RCX_WatchSrc 14 The RCX watch source

8.1.2.1230

#dene ReadButton 20 Read the current button state

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1195

8.1.2.1231

#dene ReadLastResponse 97

Read the last response packet received by the NXT. Optionally clear the value after reading it. 8.1.2.1232 #dene ReadSemData 40 Read motor semaphore data 8.1.2.1233 #dene RegDValueField 12

Derivative eld. Contains the derivative constant for the PID motor controller. Read/write. This eld species the derivative term used in the internal proportionalintegral-derivative (PID) control algorithm. Set UF_UPDATE_PID_VALUES to commit changes to RegPValue, RegIValue, and RegDValue simultaneously. 8.1.2.1234 #dene RegIValueField 11

Integral eld. Contains the integral constant for the PID motor controller. Read/write. This eld species the integral term used in the internal proportional-integral-derivative (PID) control algorithm. Set UF_UPDATE_PID_VALUES to commit changes to RegPValue, RegIValue, and RegDValue simultaneously. 8.1.2.1235 #dene RegModeField 8

Regulation mode eld. Contains one of the regulation mode constants. Read/write. This eld species the regulation mode to use with the specied port(s). It is ignored if the OUT_MODE_REGULATED bit is not set in the OutputModeField eld. Unlike OutputModeField, RegModeField is not a biteld. Only one regulation mode value can be set at a time. Speed regulation means that the rmware tries to maintain a certain speed based on the PowerField setting. The rmware adjusts the PWM duty cycle if the motor is affected by a physical load. This adjustment is reected by the value of the ActualSpeedField property. When using speed regulation, do not set PowerField to its maximum value since the rmware cannot adjust to higher power levels in that situation. Synchronization means the rmware tries to keep two motors in sync regardless of physical loads. Use this mode to maintain a straight path for a mobile robot automatically. Also use this mode with the TurnRatioField property to provide proportional turning. Set OUT_REGMODE_SYNC on at least two motor ports in order

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1196

for synchronization to function. Setting OUT_REGMODE_SYNC on all three motor ports will result in only the rst two (OUT_A and OUT_B) being synchronized. 8.1.2.1236 #dene RegPValueField 10

Proportional eld. Contains the proportional constant for the PID motor controller. Read/write. This eld species the proportional term used in the internal proportionalintegral-derivative (PID) control algorithm. Set UF_UPDATE_PID_VALUES to commit changes to RegPValue, RegIValue, and RegDValue simultaneously. 8.1.2.1237 #dene RESET_ALL 0x68 Reset all three tachometer counters 8.1.2.1238 #dene RESET_BLOCK_COUNT 0x20 Reset the NXT-G block tachometer counter 8.1.2.1239 #dene RESET_BLOCKANDTACHO 0x28 Reset both the internal counter and the NXT-G block counter 8.1.2.1240 #dene RESET_COUNT 0x08 Reset the internal tachometer counter 8.1.2.1241 #dene RESET_NONE 0x00 No counters will be reset Examples: ex_coastex.nxc, ex_offex.nxc, ex_onfwdex.nxc, ex_onfwdregex.nxc, ex_onfwdregexpid.nxc, ex_onfwdsyncex.nxc, ex_onfwdsyncexpid.nxc, ex_onrevex.nxc, ex_onrevregex.nxc, ex_onrevregexpid.nxc, ex_onrevsyncex.nxc, and ex_onrevsyncexpid.nxc.

8.1.2.1242

#dene RESET_ROTATION_COUNT 0x40 Reset the rotation counter

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1197

8.1.2.1243

#dene RFID_MODE_CONTINUOUS 2 Congure the RFID device for continuous reading

Examples: ex_RFIDMode.nxc.

8.1.2.1244

#dene RFID_MODE_SINGLE 1 Congure the RFID device for a single reading

8.1.2.1245

#dene RFID_MODE_STOP 0 Stop the RFID device

8.1.2.1246

#dene RICArg(_arg) ((_arg)|0x1000)

Output an RIC parameterized argument. Parameters: _arg The argument that you want to parameterize. Examples: ex_dispgaoutex.nxc.

8.1.2.1247

#dene RICImgPoint(_X, _Y) (_X)&0xFF, (_X)>>8, (_Y)&0xFF, (_Y)>>8

Output an RIC ImgPoint structure. Parameters: _X The X coordinate. _Y The Y coordinate. Examples: ex_dispgaout.nxc, ex_dispgaoutex.nxc, and ex_sysdrawgraphicarray.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1198

8.1.2.1248

#dene RICImgRect(_Pt, _W, _H) _Pt, (_W)&0xFF, (_W)>>8, (_H)&0xFF, (_H)>>8

Output an RIC ImgRect structure. Parameters: _Pt An ImgPoint. See RICImgPoint. _W The rectangle width. _H The rectangle height. Examples: ex_dispgaout.nxc, ex_dispgaoutex.nxc, and ex_sysdrawgraphicarray.nxc.

8.1.2.1249

#dene RICMapArg(_mapidx, _arg) ((_arg)|0x1000|(((_mapidx)&0xF)<<8))

Output an RIC parameterized and mapped argument. Parameters: _mapidx The varmap data address. _arg The parameterized argument you want to pass through a varmap.

8.1.2.1250

#dene RICMapElement(_Domain, _Range) (_Domain)&0xFF, (_Domain)>>8, (_Range)&0xFF, (_Range)>>8

Output an RIC map element. Parameters: _Domain The map element domain. _Range The map element range.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1199

8.1.2.1251

#dene RICMapFunction(_MapElement, ...) _MapElement, __VA_ARGS__

Output an RIC VarMap function. Parameters: _MapElement An entry in the varmap function. At least 2 elements are required. See RICMapElement.

8.1.2.1252

#dene RICOpCircle(_CopyOptions, _Point, _Radius) 10, 0, 7, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, _Point, (_Radius)&0xFF, (_Radius)>>8

Output an RIC Circle opcode. Parameters: _CopyOptions Circle copy options. See Drawing option constants. _Point The circles center point. See RICImgPoint. _Radius The circles radius.

8.1.2.1253

#dene RICOpCopyBits(_CopyOptions, _DataAddr, _SrcRect, _DstPoint) 18, 0, 3, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, (_DataAddr)&0xFF, (_DataAddr)>>8, _SrcRect, _DstPoint

Output an RIC CopyBits opcode. Parameters: _CopyOptions CopyBits copy options. See Drawing option constants. _DataAddr The address of the sprite from which to copy data. _SrcRect The rectangular portion of the sprite to copy. See RICImgRect. _DstPoint The LCD coordinate to which to copy the data. See RICImgPoint. Examples: ex_dispgaout.nxc, ex_dispgaoutex.nxc, and ex_sysdrawgraphicarray.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1200

8.1.2.1254

#dene RICOpDescription(_Options, _Width, _Height) 8, 0, 0, 0, (_Options)&0xFF, (_Options)>>8, (_Width)&0xFF, (_Width)>>8, (_Height)&0xFF, (_Height)>>8

Output an RIC Description opcode. Parameters: _Options RIC options. _Width The total RIC width. _Height The total RIC height. Examples: ex_dispgaoutex.nxc.

8.1.2.1255

#dene RICOpEllipse(_CopyOptions, _Point, _RadiusX, _RadiusY) 12, 0, 9, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, _Point, (_RadiusX)&0xFF, (_RadiusX)>>8, (_RadiusY)&0xFF, (_RadiusY)>>8

Output an RIC Ellipse opcode. Parameters: _CopyOptions Ellipse copy options. See Drawing option constants. _Point The center of the ellipse. See RICImgPoint. _RadiusX The x-axis radius of the ellipse. _RadiusY The y-axis radius of the ellipse.

8.1.2.1256

#dene RICOpLine(_CopyOptions, _Point1, _Point2) 12, 0, 5, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, _Point1, _Point2

Output an RIC Line opcode. Parameters: _CopyOptions Line copy options. See Drawing option constants. _Point1 The starting point of the line. See RICImgPoint. _Point2 The ending point of the line. See RICImgPoint.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1201

8.1.2.1257

#dene RICOpNumBox(_CopyOptions, _Point, _Value) 10, 0, 8, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, _Point, (_Value)&0xFF, (_Value)>>8

Output an RIC NumBox opcode. Parameters: _CopyOptions NumBox copy options. See Drawing option constants. _Point The numbox bottom left corner. See RICImgPoint. _Value The number to draw.

8.1.2.1258

#dene RICOpPixel(_CopyOptions, _Point, _Value) 10, 0, 4, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, _Point, (_Value)&0xFF, (_Value)>>8

Output an RIC Pixel opcode. Parameters: _CopyOptions Pixel copy options. See Drawing option constants. _Point The pixel coordinate. See RICImgPoint. _Value The pixel value (unused).

8.1.2.1259

#dene RICOpPolygon(_CopyOptions, _Count, _ThePoints) ((_Count4)+6)&0xFF, ((_Count4)+6)>>8, 10, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, (_Count)&0xFF, (_Count)>>8, _ThePoints

Output an RIC Polygon opcode. Parameters: _CopyOptions Polygon copy options. See Drawing option constants. _Count The number of points in the polygon. _ThePoints The list of polygon points. See RICPolygonPoints.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1202

8.1.2.1260

#dene RICOpRect(_CopyOptions, _Point, _Width, _Height) 12, 0, 6, 0, (_CopyOptions)&0xFF, (_CopyOptions)>>8, _Point, (_Width)&0xFF, (_Width)>>8, (_Height)&0xFF, (_Height)>>8

Output an RIC Rect opcode. Parameters: _CopyOptions Rect copy options. See Drawing option constants. _Point The rectangles top left corner. See RICImgPoint. _Width The rectangles width. _Height The rectangles height.

8.1.2.1261

#dene RICOpSprite(_DataAddr, _Rows, _BytesPerRow, _SpriteData) ((_Rows_BytesPerRow)+((_Rows_BytesPerRow)%2)+8)&0xFF, ((_Rows_BytesPerRow)+((_Rows_BytesPerRow)%2)+8)>>8, 1, 0, (_DataAddr)&0xFF, (_DataAddr)>>8, (_Rows)&0xFF, (_Rows)>>8, (_BytesPerRow)&0xFF, (_BytesPerRow)>>8, _SpriteData

Output an RIC Sprite opcode. Parameters: _DataAddr The address of the sprite. _Rows The number of rows of data. _BytesPerRow The number of bytes per row. _SpriteData The actual sprite data. See RICSpriteData. Examples: ex_dispgaout.nxc, ex_dispgaoutex.nxc, and ex_sysdrawgraphicarray.nxc.

8.1.2.1262

#dene RICOpVarMap(_DataAddr, _MapCount, _MapFunction) ((_MapCount4)+6)&0xFF, ((_MapCount4)+6)>>8, 2, 0, (_DataAddr)&0xFF, (_DataAddr)>>8, (_MapCount)&0xFF, (_MapCount)>>8, _MapFunction

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1203

Output an RIC VarMap opcode. Parameters: _DataAddr The address of the varmap. _MapCount The number of points in the function. _MapFunction The denition of the varmap function. See RICMapFunction.

8.1.2.1263

#dene RICPolygonPoints(_pPoint1, _pPoint2, ...) _pPoint1, _pPoint2, __VA_ARGS__

Output RIC polygon points. Parameters: _pPoint1 The rst polygon point. See RICImgPoint. _pPoint2 The second polygon point (at least 3 points are required). See RICImgPoint.

8.1.2.1264

#dene RICSpriteData( ...) __VA_ARGS__

Output RIC sprite data. Examples: ex_dispgaout.nxc, ex_dispgaoutex.nxc, and ex_sysdrawgraphicarray.nxc.

8.1.2.1265

#dene ROTATE_QUEUE 5 VM should rotate queue

8.1.2.1266

#dene RotationCountField 14

Rotation counter eld. Contains the current rotation count. Read only. Return the program-relative position counter value for the specied port. Refer to the UpdateFlagsField description for information about how to use program-relative position counts. Set the UF_UPDATE_RESET_ROTATION_COUNT ag in UpdateFlagsField
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1204

to request that the rmware reset the RotationCountField. The sign of RotationCountField indicates the direction of rotation. Positive values indicate forward rotation and negative values indicate reverse rotation. Forward and reverse depend on the orientation of the motor. 8.1.2.1267 #dene RunStateField 6

Run state eld. Contains one of the run state constants. Read/write. Use this eld to specify the running state of an output. Set the RunStateField to OUT_RUNSTATE_RUNNING to enable power to any output. Use OUT_RUNSTATE_RAMPUP to enable automatic ramping to a new PowerField level greater than the current PowerField level. Use OUT_RUNSTATE_RAMPDOWN to enable automatic ramping to a new PowerField level less than the current PowerField level. Both the rampup and rampdown bits must be used in conjunction with appropriate TachoLimitField and PowerField values. In this case the rmware smoothly increases or decreases the actual power to the new PowerField level over the total number of degrees of rotation specied in TachoLimitField. 8.1.2.1268 #dene SAMPLERATE_DEFAULT 8000 Default sample rate [sps] 8.1.2.1269 #dene SAMPLERATE_MAX 16000 Max sample rate [sps] 8.1.2.1270 #dene SAMPLERATE_MIN 2000 Min sample rate [sps] 8.1.2.1271 #dene ScaledValueField 4

Scaled value eld. Contains the current scaled analog sensor value. Read/write. 8.1.2.1272 #dene SCHAR_MAX 127 The maximum value of the signed char type

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1205

8.1.2.1273

#dene SCHAR_MIN -128 The minimum value of the signed char type

8.1.2.1274

#dene SCOUT_FXR_ALARM 2 Alarm special effects

8.1.2.1275

#dene SCOUT_FXR_BUG 1 Bug special effects

Examples: ex_MSScoutSetScoutRules.nxc.

8.1.2.1276

#dene SCOUT_FXR_NONE 0 No special effects

8.1.2.1277

#dene SCOUT_FXR_RANDOM 3 Random special effects

8.1.2.1278

#dene SCOUT_FXR_SCIENCE 4 Science special effects

8.1.2.1279

#dene SCOUT_LIGHT_OFF 0 Turn off the scout light

8.1.2.1280

#dene SCOUT_LIGHT_ON 0x80 Turn on the scout light

Examples: ex_HTScoutSetLight.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1206

8.1.2.1281

#dene SCOUT_LR_AVOID 3 Light rule avoid

8.1.2.1282

#dene SCOUT_LR_IGNORE 0 Light rule ignore

Examples: ex_MSScoutSetScoutRules.nxc.

8.1.2.1283

#dene SCOUT_LR_OFF_WHEN 5 Light rule off when

8.1.2.1284

#dene SCOUT_LR_SEEK_DARK 2 Light rule seek dark

8.1.2.1285

#dene SCOUT_LR_SEEK_LIGHT 1 Light rule seek light

8.1.2.1286

#dene SCOUT_LR_WAIT_FOR 4 Light rule wait for

8.1.2.1287

#dene SCOUT_MODE_POWER 1 Enter power mode

Examples: ex_HTScoutSetScoutMode.nxc, and ex_MSScoutSetScoutMode.nxc.

8.1.2.1288

#dene SCOUT_MODE_STANDALONE 0 Enter stand alone mode

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1207

8.1.2.1289

#dene SCOUT_MR_CIRCLE_LEFT 4 Motion rule circle left

8.1.2.1290

#dene SCOUT_MR_CIRCLE_RIGHT 3 Motion rule circle right

8.1.2.1291

#dene SCOUT_MR_FORWARD 1 Motion rule forward

Examples: ex_MSScoutSetScoutRules.nxc.

8.1.2.1292

#dene SCOUT_MR_LOOP_A 5 Motion rule loop A

8.1.2.1293

#dene SCOUT_MR_LOOP_AB 7 Motion rule loop A then B

8.1.2.1294

#dene SCOUT_MR_LOOP_B 6 Motion rule loop B

8.1.2.1295

#dene SCOUT_MR_NO_MOTION 0 Motion rule none

8.1.2.1296

#dene SCOUT_MR_ZIGZAG 2 Motion rule zigzag

8.1.2.1297

#dene SCOUT_SNDSET_ALARM 3 Set sound set to alarm

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1208

8.1.2.1298

#dene SCOUT_SNDSET_BASIC 1 Set sound set to basic

8.1.2.1299

#dene SCOUT_SNDSET_BUG 2 Set sound set to bug

8.1.2.1300

#dene SCOUT_SNDSET_NONE 0 Set sound set to none

8.1.2.1301

#dene SCOUT_SNDSET_RANDOM 4 Set sound set to random

8.1.2.1302

#dene SCOUT_SNDSET_SCIENCE 5 Set sound set to science

8.1.2.1303

#dene SCOUT_SOUND_1_BLINK 17 Play the Scout 1 blink sound

8.1.2.1304

#dene SCOUT_SOUND_2_BLINK 18 Play the Scout 2 blink sound

8.1.2.1305

#dene SCOUT_SOUND_COUNTER1 19 Play the Scout counter 1 sound

8.1.2.1306

#dene SCOUT_SOUND_COUNTER2 20 Play the Scout counter 2 sound

8.1.2.1307

#dene SCOUT_SOUND_ENTER_BRIGHT 14 Play the Scout enter bright sound

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1209

8.1.2.1308

#dene SCOUT_SOUND_ENTER_DARK 16 Play the Scout enter dark sound

8.1.2.1309

#dene SCOUT_SOUND_ENTER_NORMAL 15 Play the Scout enter normal sound

8.1.2.1310

#dene SCOUT_SOUND_ENTERSA 7 Play the Scout enter standalone sound

8.1.2.1311

#dene SCOUT_SOUND_KEYERROR 8 Play the Scout key error sound

8.1.2.1312

#dene SCOUT_SOUND_MAIL_RECEIVED 24 Play the Scout mail received sound

8.1.2.1313

#dene SCOUT_SOUND_NONE 9 Play the Scout none sound

8.1.2.1314

#dene SCOUT_SOUND_REMOTE 6 Play the Scout remote sound

8.1.2.1315

#dene SCOUT_SOUND_SPECIAL1 25 Play the Scout special 1 sound

8.1.2.1316

#dene SCOUT_SOUND_SPECIAL2 26 Play the Scout special 2 sound

8.1.2.1317

#dene SCOUT_SOUND_SPECIAL3 27 Play the Scout special 3 sound

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1210

8.1.2.1318

#dene SCOUT_SOUND_TIMER1 21 Play the Scout timer 1 sound

8.1.2.1319

#dene SCOUT_SOUND_TIMER2 22 Play the Scout timer 2 sound

8.1.2.1320

#dene SCOUT_SOUND_TIMER3 23 Play the Scout timer 3 sound

8.1.2.1321

#dene SCOUT_SOUND_TOUCH1_PRES 10 Play the Scout touch 1 pressed sound

8.1.2.1322

#dene SCOUT_SOUND_TOUCH1_REL 11 Play the Scout touch 1 released sound

8.1.2.1323

#dene SCOUT_SOUND_TOUCH2_PRES 12 Play the Scout touch 2 pressed sound

8.1.2.1324

#dene SCOUT_SOUND_TOUCH2_REL 13 Play the Scout touch 2 released sound

8.1.2.1325

#dene SCOUT_TGS_LONG 2 Transmit level long

8.1.2.1326

#dene SCOUT_TGS_MEDIUM 1 Transmit level medium

8.1.2.1327

#dene SCOUT_TGS_SHORT 0 Transmit level short

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1211

Examples: ex_MSScoutSetScoutRules.nxc.

8.1.2.1328

#dene SCOUT_TR_AVOID 2 Touch rule avoid

8.1.2.1329

#dene SCOUT_TR_IGNORE 0 Touch rule ignore

8.1.2.1330

#dene SCOUT_TR_OFF_WHEN 4 Touch rule off when

8.1.2.1331

#dene SCOUT_TR_REVERSE 1 Touch rule reverse

Examples: ex_MSScoutSetScoutRules.nxc.

8.1.2.1332

#dene SCOUT_TR_WAIT_FOR 3 Touch rule wait for

8.1.2.1333

#dene SCREEN_BACKGROUND 0 Entire screen

8.1.2.1334

#dene SCREEN_LARGE 1 Entire screen except status line

8.1.2.1335

#dene SCREEN_MODE_CLEAR 0x01 Clear the screen

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1212

See also: SetScreenMode()

8.1.2.1336

#dene SCREEN_MODE_RESTORE 0x00 Restore the screen

See also: SetScreenMode()

8.1.2.1337

#dene SCREEN_SMALL 2 Screen between menu icons and status line

8.1.2.1338

#dene SCREENS 3 The number of screen bits

8.1.2.1339

#dene SEC_1 1000 1 second

Examples: alternating_tasks.nxc, ex_dispmisc.nxc, ex_le_system.nxc, ex_getmemoryinfo.nxc, ex_NXTLineLeader.nxc, ex_NXTServo.nxc, ex_playsound.nxc, ex_playtones.nxc, ex_PolyOut.nxc, ex_SysCommHSRead.nxc, ex_sysdrawpolygon.nxc, ex_sysmemorymanager.nxc, ex_wait.nxc, and ex_yield.nxc.

8.1.2.1340

#dene SEC_10 10000 10 seconds

Examples: ex_addressof.nxc, ex_addressofex.nxc, ex_ClearScreen.nxc, ex_displayfont.nxc, ex_i2cdeviceinfo.nxc, ex_NXTPowerMeter.nxc, ex_reladdressof.nxc, ex_setdisplayfont.nxc, ex_string.nxc, ex_syscommbtconnection.nxc, and ex_SysCommHSControl.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1213

8.1.2.1341

#dene SEC_15 15000 15 seconds

Examples: ex_dispfunc.nxc, and ex_memcmp.nxc.

8.1.2.1342

#dene SEC_2 2000 2 seconds

Examples: ex_CircleOut.nxc, ex_dispmisc.nxc, ex_le_system.nxc, ex_LineOut.nxc, ex_PolyOut.nxc, and ex_sysdrawpolygon.nxc.

8.1.2.1343

#dene SEC_20 20000 20 seconds

8.1.2.1344

#dene SEC_3 3000 3 seconds

Examples: ex_ArrayMax.nxc, ex_ArrayMean.nxc, ex_ArrayMin.nxc, ex_ArrayOp.nxc, ex_ArraySort.nxc, ex_ArrayStd.nxc, ex_ArraySum.nxc, ex_ArraySumSqr.nxc, ex_div.nxc, and ex_ldiv.nxc.

8.1.2.1345

#dene SEC_30 30000 30 seconds

8.1.2.1346

#dene SEC_4 4000 4 seconds

Examples: ex_copy.nxc, ex_dispftout.nxc, ex_dispmisc.nxc, ex_leftstr.nxc, ex_midstr.nxc, ex_rightstr.nxc, ex_sysdrawfont.nxc, ex_syslistles.nxc, util_battery_1.nxc, and util_battery_2.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1214

8.1.2.1347

#dene SEC_5 5000 5 seconds

Examples: ex_atof.nxc, ex_atoi.nxc, ex_atol.nxc, ex_clearline.nxc, ex_ctype.nxc, ex_DataMode.nxc, ex_delete_data_le.nxc, ex_dispftout.nxc, ex_dispgout.nxc, ex_FlattenVar.nxc, ex_getmemoryinfo.nxc, ex_isnan.nxc, ex_labs.nxc, ex_NXTHID.nxc, ex_NXTLineLeader.nxc, ex_NXTPowerMeter.nxc, ex_NXTServo.nxc, ex_PFMate.nxc, ex_StrCatOld.nxc, ex_StrIndex.nxc, ex_string.nxc, ex_StrLenOld.nxc, ex_StrReplace.nxc, ex_SubStr.nxc, ex_sysdataloggettimes.nxc, ex_sysdrawgraphicarray.nxc, ex_sysmemorymanager.nxc, ex_UnattenVar.nxc, and ex_wait.nxc.

8.1.2.1348

#dene SEC_6 6000 6 seconds

Examples: ex_strtod.nxc, ex_strtol.nxc, and ex_strtoul.nxc.

8.1.2.1349

#dene SEC_7 7000 7 seconds

8.1.2.1350

#dene SEC_8 8000 8 seconds

Examples: ex_le_system.nxc.

8.1.2.1351

#dene SEC_9 9000 9 seconds

Examples: ex_SensorHTGyro.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1215

8.1.2.1352

#dene SetScreenMode 19 Set the screen mode

8.1.2.1353

#dene SetSleepTimeoutVal 46 Set the NXT sleep timeout value

8.1.2.1354

#dene SHRT_MAX 32767 The maximum value of the short type

8.1.2.1355

#dene SHRT_MIN -32768 The minimum value of the short type

8.1.2.1356

#dene SIZE_OF_BDADDR 7 Size of Bluetooth Address

8.1.2.1357

#dene SIZE_OF_BRICK_NAME 8 Size of NXT Brick name

8.1.2.1358

#dene SIZE_OF_BT_CONNECT_TABLE 4

Size of Bluetooth connection table -- Index 0 is always incoming connection 8.1.2.1359 #dene SIZE_OF_BT_DEVICE_TABLE 30 Size of Bluetooth device table 8.1.2.1360 #dene SIZE_OF_BT_NAME 16 Size of Bluetooth name 8.1.2.1361 #dene SIZE_OF_BT_PINCODE 16 Size of Bluetooth PIN

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1216

8.1.2.1362

#dene SIZE_OF_BTBUF 128 Size of Bluetooth buffer

8.1.2.1363

#dene SIZE_OF_CLASS_OF_DEVICE 4 Size of class of device

8.1.2.1364

#dene SIZE_OF_HSBUF 128 Size of High Speed Port 4 buffer

8.1.2.1365

#dene SIZE_OF_USBBUF 64 Size of USB Buffer in bytes

8.1.2.1366

#dene SIZE_OF_USBDATA 62 Size of USB Buffer available for data

8.1.2.1367

#dene SOUND_CLICK 0 Play the standard key click sound

8.1.2.1368

#dene SOUND_DOUBLE_BEEP 1 Play the standard double beep sound

8.1.2.1369

#dene SOUND_DOWN 2 Play the standard sweep down sound

Examples: ex_playsound.nxc.

8.1.2.1370

#dene SOUND_FAST_UP 5 Play the standard fast up sound

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1217

Examples: ex_playsound.nxc.

8.1.2.1371

#dene SOUND_FLAGS_IDLE 0x00 R - Sound is idle

8.1.2.1372

#dene SOUND_FLAGS_RUNNING 0x02 R - Currently processing a tone or le

8.1.2.1373

#dene SOUND_FLAGS_UPDATE 0x01 W - Make changes take effect

Examples: ex_SetSoundFlags.nxc.

8.1.2.1374

#dene SOUND_LOW_BEEP 4 Play the standard low beep sound

Examples: ex_playsound.nxc.

8.1.2.1375

#dene SOUND_MODE_LOOP 0x01 W - Play le until writing SOUND_STATE_STOP into SoundState

8.1.2.1376

#dene SOUND_MODE_ONCE 0x00 W - Only play le once

Examples: ex_SetSoundMode.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1218

8.1.2.1377

#dene SOUND_MODE_TONE 0x02 W - Play tone specied in Frequency for Duration ms

8.1.2.1378

#dene SOUND_STATE_FILE 0x02 R - Processing a le of sound/melody data

8.1.2.1379

#dene SOUND_STATE_IDLE 0x00 R - Idle, ready for start sound (SOUND_UPDATE)

Examples: ex_syssoundgetstate.nxc.

8.1.2.1380

#dene SOUND_STATE_STOP 0x04 W - Stop sound immediately and close hardware

Examples: ex_SetSoundModuleState.nxc, and ex_syssoundsetstate.nxc.

8.1.2.1381

#dene SOUND_STATE_TONE 0x03 R - Processing a play tone request

8.1.2.1382

#dene SOUND_UP 3 Play the standard sweep up sound

Examples: ex_playsound.nxc.

8.1.2.1383

#dene SoundGetState 11 Get the current sound module state

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1219

8.1.2.1384

#dene SoundModuleID 0x00080001 The sound module ID

Examples: ex_sysiomapwritebyid.nxc.

8.1.2.1385

#dene SoundModuleName "Sound.mod" The sound module name

Examples: ex_sysiomapwrite.nxc.

8.1.2.1386

#dene SoundOffsetDuration 2 RW - Tone duration [mS] (2 bytes)

8.1.2.1387

#dene SoundOffsetFlags 26 RW - Play ag - described above (1 byte) SoundFlags constants

8.1.2.1388

#dene SoundOffsetFreq 0 RW - Tone frequency [Hz] (2 bytes)

8.1.2.1389

#dene SoundOffsetMode 28 RW - Play mode - described above (1 byte) SoundMode constants

8.1.2.1390

#dene SoundOffsetSampleRate 4 RW - Sound le sample rate [2000..16000] (2 bytes)

Examples: ex_sysiomapwrite.nxc, and ex_sysiomapwritebyid.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1220

8.1.2.1391

#dene SoundOffsetSoundFilename 6 RW - Sound/melody lename (20 bytes)

8.1.2.1392

#dene SoundOffsetState 27 RW - Play state - described above (1 byte) SoundState constants

8.1.2.1393

#dene SoundOffsetVolume 29 RW - Sound/melody volume [0..4] 0 = off (1 byte)

8.1.2.1394

#dene SoundPlayFile 9 Play a sound or melody le

8.1.2.1395

#dene SoundPlayTone 10 Play a simple tone with the specied frequency and duration

8.1.2.1396

#dene SoundSetState 12 Set the sound module state

8.1.2.1397

#dene SPECIALS 5 The number of special bit values

8.1.2.1398

#dene STAT_COMM_PENDING 32 Pending setup operation in progress

8.1.2.1399

#dene STAT_MSG_EMPTY_MAILBOX 64 Specied mailbox contains no new messages

8.1.2.1400

#dene STATUSICON_BATTERY 3 Battery status icon collection

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1221

8.1.2.1401

#dene STATUSICON_BLUETOOTH 0 BlueTooth status icon collection

8.1.2.1402

#dene STATUSICON_USB 1 USB status icon collection

8.1.2.1403

#dene STATUSICON_VM 2 VM status icon collection

8.1.2.1404

#dene STATUSICONS 4 The number of status icons

8.1.2.1405

#dene STATUSTEXT 1 Status text (BT name)

8.1.2.1406

#dene STEPICON_1 0 Left most step icon

8.1.2.1407

#dene STEPICON_2 1

8.1.2.1408

#dene STEPICON_3 2

8.1.2.1409

#dene STEPICON_4 3

8.1.2.1410

#dene STEPICON_5 4 Right most step icon

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1222

8.1.2.1411

#dene STEPICONS 5

8.1.2.1412

#dene STEPLINE 3 Step collection lines

8.1.2.1413

#dene STOP_REQ 4 VM should stop executing program

8.1.2.1414

#dene TachoCountField 4

Internal tachometer count eld. Contains the current internal tachometer count. Read only. Return the internal position counter value for the specied output. The internal count is reset automatically when a new goal is set using the TachoLimitField and the UF_UPDATE_TACHO_LIMIT ag. Set the UF_UPDATE_RESET_COUNT ag in UpdateFlagsField to reset TachoCountField and cancel any TachoLimitField. The sign of TachoCountField indicates the motor rotation direction. 8.1.2.1415 #dene TachoLimitField 5

Tachometer limit eld. Contains the current tachometer limit. Read/write. Specify the number of degrees the motor should rotate. Use UF_UPDATE_TACHO_LIMIT with the UpdateFlagsField eld to commit changes to the TachoLimitField. The value of this eld is a relative distance from the current motor position at the moment when the UF_UPDATE_TACHO_LIMIT ag is processed. 8.1.2.1416 #dene TEMP_FQ_1 0x00 Set fault queue to 1 fault before alert 8.1.2.1417 #dene TEMP_FQ_2 0x08 Set fault queue to 2 faults before alert

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1223

8.1.2.1418

#dene TEMP_FQ_4 0x10 Set fault queue to 4 faults before alert

8.1.2.1419

#dene TEMP_FQ_6 0x18 Set fault queue to 6 faults before alert

8.1.2.1420

#dene TEMP_OS_ONESHOT 0x80

Set the sensor into oneshot mode. When the device is in shutdown mode this will start a single temperature conversion. The device returns to shutdown mode when it completes. 8.1.2.1421 #dene TEMP_POL_HIGH 0x04 Set polarity of ALERT pin to be active HIGH 8.1.2.1422 #dene TEMP_POL_LOW 0x00 Set polarity of ALERT pin to be active LOW 8.1.2.1423 #dene TEMP_REG_CONFIG 0x01 The register for reading/writing sensor conguration values 8.1.2.1424 #dene TEMP_REG_TEMP 0x00 The register where temperature values can be read 8.1.2.1425 #dene TEMP_REG_THIGH 0x03 The register for reading/writing a user-dened high temperature limit 8.1.2.1426 #dene TEMP_REG_TLOW 0x02 The register for reading/writing a user-dened low temperature limit

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1224

8.1.2.1427

#dene TEMP_RES_10BIT 0x20 Set the temperature conversion resolution to 10 bit

8.1.2.1428

#dene TEMP_RES_11BIT 0x40 Set the temperature conversion resolution to 11 bit

8.1.2.1429

#dene TEMP_RES_12BIT 0x60 Set the temperature conversion resolution to 12 bit

Examples: ex_CongureTemperatureSensor.nxc.

8.1.2.1430

#dene TEMP_RES_9BIT 0x00 Set the temperature conversion resolution to 9 bit

8.1.2.1431

#dene TEMP_SD_CONTINUOUS 0x00 Set the sensor mode to continuous

8.1.2.1432

#dene TEMP_SD_SHUTDOWN 0x01

Set the sensor mode to shutdown. The device will shut down after the current conversion is completed. 8.1.2.1433 #dene TEMP_TM_COMPARATOR 0x00 Set the thermostat mode to comparator 8.1.2.1434 #dene TEMP_TM_INTERRUPT 0x02 Set the thermostat mode to interrupt

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1225

8.1.2.1435

#dene TEXTLINE_1 0 Text line 1

Examples: ex_GetDisplayNormal.nxc, ex_GetDisplayPopup.nxc, ex_SetDisplayNormal.nxc, and ex_SetDisplayPopup.nxc.

8.1.2.1436

#dene TEXTLINE_2 1 Text line 2

8.1.2.1437

#dene TEXTLINE_3 2 Text line 3

8.1.2.1438

#dene TEXTLINE_4 3 Text line 4

8.1.2.1439

#dene TEXTLINE_5 4 Text line 5

8.1.2.1440

#dene TEXTLINE_6 5 Text line 6

8.1.2.1441

#dene TEXTLINE_7 6 Text line 7

8.1.2.1442

#dene TEXTLINE_8 7 Text line 8

8.1.2.1443

#dene TEXTLINES 8 The number of text lines on the LCD

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1226

8.1.2.1444

#dene TIMES_UP 6 VM time is up

8.1.2.1445

#dene TONE_A3 220 Third octave A

8.1.2.1446

#dene TONE_A4 440 Fourth octave A

Examples: ex_yield.nxc.

8.1.2.1447

#dene TONE_A5 880 Fifth octave A

8.1.2.1448

#dene TONE_A6 1760 Sixth octave A

8.1.2.1449

#dene TONE_A7 3520 Seventh octave A

8.1.2.1450

#dene TONE_AS3 233 Third octave A sharp

8.1.2.1451

#dene TONE_AS4 466 Fourth octave A sharp

8.1.2.1452

#dene TONE_AS5 932 Fifth octave A sharp

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1227

8.1.2.1453

#dene TONE_AS6 1865 Sixth octave A sharp

8.1.2.1454

#dene TONE_AS7 3729 Seventh octave A sharp

8.1.2.1455

#dene TONE_B3 247 Third octave B

8.1.2.1456

#dene TONE_B4 494 Fourth octave B

8.1.2.1457

#dene TONE_B5 988 Fifth octave B

8.1.2.1458

#dene TONE_B6 1976 Sixth octave B

8.1.2.1459

#dene TONE_B7 3951 Seventh octave B

8.1.2.1460

#dene TONE_C4 262 Fourth octave C

Examples: alternating_tasks.nxc, and ex_playtones.nxc.

8.1.2.1461

#dene TONE_C5 523 Fifth octave C

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1228

Examples: ex_le_system.nxc, and ex_playtones.nxc.

8.1.2.1462

#dene TONE_C6 1047 Sixth octave C

Examples: alternating_tasks.nxc, and ex_playtones.nxc.

8.1.2.1463

#dene TONE_C7 2093 Seventh octave C

8.1.2.1464

#dene TONE_CS4 277 Fourth octave C sharp

8.1.2.1465

#dene TONE_CS5 554 Fifth octave C sharp

8.1.2.1466

#dene TONE_CS6 1109 Sixth octave C sharp

8.1.2.1467

#dene TONE_CS7 2217 Seventh octave C sharp

8.1.2.1468

#dene TONE_D4 294 Fourth octave D

8.1.2.1469

#dene TONE_D5 587 Fifth octave D

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1229

8.1.2.1470

#dene TONE_D6 1175 Sixth octave D

8.1.2.1471

#dene TONE_D7 2349 Seventh octave D

8.1.2.1472

#dene TONE_DS4 311 Fourth octave D sharp

8.1.2.1473

#dene TONE_DS5 622 Fifth octave D sharp

8.1.2.1474

#dene TONE_DS6 1245 Sixth octave D sharp

8.1.2.1475

#dene TONE_DS7 2489 Seventh octave D sharp

8.1.2.1476

#dene TONE_E4 330 Fourth octave E

Examples: ex_playtones.nxc.

8.1.2.1477

#dene TONE_E5 659 Fifth octave E

Examples: ex_playtones.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1230

8.1.2.1478

#dene TONE_E6 1319 Sixth octave E

8.1.2.1479

#dene TONE_E7 2637 Seventh octave E

8.1.2.1480

#dene TONE_F4 349 Fourth octave F

8.1.2.1481

#dene TONE_F5 698 Fifth octave F

8.1.2.1482

#dene TONE_F6 1397 Sixth octave F

8.1.2.1483

#dene TONE_F7 2794 Seventh octave F

8.1.2.1484

#dene TONE_FS4 370 Fourth octave F sharp

8.1.2.1485

#dene TONE_FS5 740 Fifth octave F sharp

8.1.2.1486

#dene TONE_FS6 1480 Sixth octave F sharp

8.1.2.1487

#dene TONE_FS7 2960 Seventh octave F sharp

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1231

8.1.2.1488

#dene TONE_G4 392 Fourth octave G

Examples: ex_playtones.nxc.

8.1.2.1489

#dene TONE_G5 784 Fifth octave G

Examples: ex_playtones.nxc.

8.1.2.1490

#dene TONE_G6 1568 Sixth octave G

8.1.2.1491

#dene TONE_G7 3136 Seventh octave G

8.1.2.1492

#dene TONE_GS4 415 Fourth octave G sharp

8.1.2.1493

#dene TONE_GS5 831 Fifth octave G sharp

8.1.2.1494

#dene TONE_GS6 1661 Sixth octave G sharp

8.1.2.1495

#dene TONE_GS7 3322 Seventh octave G sharp

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1232

8.1.2.1496

#dene TOPLINE 4 Top status underline

8.1.2.1497

#dene TRAIN_CHANNEL_1 0 IR Train channel 1

Examples: ex_HTIRTrain.nxc, and ex_MSIRTrain.nxc.

8.1.2.1498

#dene TRAIN_CHANNEL_2 1 IR Train channel 2

8.1.2.1499

#dene TRAIN_CHANNEL_3 2 IR Train channel 3

8.1.2.1500

#dene TRAIN_CHANNEL_ALL 3 IR Train channel all

8.1.2.1501

#dene TRAIN_FUNC_DECR_SPEED 2 PF/IR Train function decrement speed

8.1.2.1502

#dene TRAIN_FUNC_INCR_SPEED 1 PF/IR Train function increment speed

Examples: ex_HTIRTrain.nxc, MSPFTrain.nxc. ex_HTPFTrain.nxc, ex_MSIRTrain.nxc, and ex_-

8.1.2.1503

#dene TRAIN_FUNC_STOP 0 PF/IR Train function stop

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1233

8.1.2.1504

#dene TRAIN_FUNC_TOGGLE_LIGHT 4 PF/IR Train function toggle light

8.1.2.1505

#dene TRUE 1 A true value

Examples: ex_syscommbtconnection.nxc.

8.1.2.1506

#dene TurnRatioField 7

Turn ratio eld. Contains the current turn ratio. Only applicable when synchronizing multiple motors. Read/write. Use this eld to specify a proportional turning ratio. This eld must be used in conjunction with other eld values: OutputModeField must include OUT_MODE_MOTORON and OUT_MODE_REGULATED, RegModeField must be set to OUT_REGMODE_SYNC, RunStateField must not be OUT_RUNSTATE_IDLE, and PowerField must be non-zero. There are only three valid combinations of left and right motors for use with TurnRatioField: OUT_AB, OUT_BC, and OUT_AC. In each of these three options the rst motor listed is considered to be the left motor and the second motor is the right motor, regardless of the physical conguration of the robot. Negative turn ratio values shift power toward the left motor while positive values shift power toward the right motor. An absolute value of 50 usually results in one motor stopping. An absolute value of 100 usually results in two motors turning in opposite directions at equal power. 8.1.2.1507 #dene TypeField 0 Type eld. Contains one of the sensor type constants. Read/write. 8.1.2.1508 #dene UCHAR_MAX 255 The maximum value of the unsigned char type 8.1.2.1509 #dene UF_PENDING_UPDATES 0x80 Are there any pending motor updates?

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1234

8.1.2.1510

#dene UF_UPDATE_MODE 0x01 Commits changes to the OutputModeField output property

8.1.2.1511

#dene UF_UPDATE_PID_VALUES 0x10 Commits changes to the PID motor regulation properties

8.1.2.1512

#dene UF_UPDATE_RESET_BLOCK_COUNT 0x20 Resets the NXT-G block-relative rotation counter

8.1.2.1513

#dene UF_UPDATE_RESET_COUNT 0x08

Resets all rotation counters, cancels the current goal, and resets the rotation error-correction system 8.1.2.1514 #dene UF_UPDATE_RESET_ROTATION_COUNT 0x40 Resets the program-relative (user) rotation counter 8.1.2.1515 #dene UF_UPDATE_SPEED 0x02 Commits changes to the PowerField output property 8.1.2.1516 #dene UF_UPDATE_TACHO_LIMIT 0x04 Commits changes to the TachoLimitField output property 8.1.2.1517 #dene UI_BT_CONNECT_REQUEST 0x40 RW - BT get connect accept in progress 8.1.2.1518 #dene UI_BT_ERROR_ATTENTION 0x08 W - BT error attention 8.1.2.1519 #dene UI_BT_PIN_REQUEST 0x80 RW - BT get pin code
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1235

8.1.2.1520

#dene UI_BT_STATE_CONNECTED 0x02 RW - BT connected to something

8.1.2.1521

#dene UI_BT_STATE_OFF 0x04 RW - BT power off

Examples: ex_SetBluetoothState.nxc.

8.1.2.1522

#dene UI_BT_STATE_VISIBLE 0x01 RW - BT visible

8.1.2.1523

#dene UI_BUTTON_ENTER 2 W - Insert enter button

Examples: ex_SetUIButton.nxc.

8.1.2.1524

#dene UI_BUTTON_EXIT 4 W - Insert exit button

8.1.2.1525

#dene UI_BUTTON_LEFT 1 W - Insert left arrow button

8.1.2.1526

#dene UI_BUTTON_NONE 0 R - Button inserted are executed

8.1.2.1527

#dene UI_BUTTON_RIGHT 3 W - Insert right arrow button

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1236

8.1.2.1528

#dene UI_FLAGS_BUSY 0x40 R - UI busy running or datalogging (popup disabled)

8.1.2.1529

#dene UI_FLAGS_DISABLE_EXIT 0x04 RW - Disable exit button

8.1.2.1530

#dene UI_FLAGS_DISABLE_LEFT_RIGHT_ENTER 0x02 RW - Disable left, right and enter button

8.1.2.1531

#dene UI_FLAGS_ENABLE_STATUS_UPDATE 0x80 W - Enable status line to be updated

8.1.2.1532

#dene UI_FLAGS_EXECUTE_LMS_FILE 0x20 W - Execute LMS le in "LMSlename" (Try It)

8.1.2.1533

#dene UI_FLAGS_REDRAW_STATUS 0x08 W - Redraw entire status line

Examples: ex_SetCommandFlags.nxc.

8.1.2.1534

#dene UI_FLAGS_RESET_SLEEP_TIMER 0x10 W - Reset sleep timeout timer

8.1.2.1535

#dene UI_FLAGS_UPDATE 0x01 W - Make changes take effect

8.1.2.1536

#dene UI_STATE_BT_ERROR 16 R - BT error

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1237

8.1.2.1537

#dene UI_STATE_CONNECT_REQUEST 12 RW - Request for connection accept

8.1.2.1538

#dene UI_STATE_DRAW_MENU 6 RW - Execute function and draw menu icons

8.1.2.1539

#dene UI_STATE_ENTER_PRESSED 10 RW - Load selected function and next menu id

8.1.2.1540

#dene UI_STATE_EXECUTE_FILE 13 RW - Execute le in "LMSlename"

8.1.2.1541

#dene UI_STATE_EXECUTING_FILE 14 R - Executing le in "LMSlename"

8.1.2.1542

#dene UI_STATE_EXIT_PRESSED 11 RW - Load selected function and next menu id

8.1.2.1543

#dene UI_STATE_INIT_DISPLAY 0 RW - Init display and load font, menu etc.

8.1.2.1544

#dene UI_STATE_INIT_INTRO 2 R - Display intro

8.1.2.1545

#dene UI_STATE_INIT_LOW_BATTERY 1 R - Low battery voltage at power on

8.1.2.1546

#dene UI_STATE_INIT_MENU 4 RW - Init menu system

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1238

8.1.2.1547

#dene UI_STATE_INIT_WAIT 3 RW - Wait for initialization end

8.1.2.1548

#dene UI_STATE_LEFT_PRESSED 8 RW - Load selected function and next menu id

8.1.2.1549

#dene UI_STATE_LOW_BATTERY 15 R - Low battery at runtime

Examples: ex_SetUIState.nxc.

8.1.2.1550

#dene UI_STATE_NEXT_MENU 5 RW - Next menu icons ready for drawing

8.1.2.1551

#dene UI_STATE_RIGHT_PRESSED 9 RW - Load selected function and next menu id

8.1.2.1552

#dene UI_STATE_TEST_BUTTONS 7 RW - Wait for buttons to be pressed

8.1.2.1553

#dene UI_VM_IDLE 0

VM_IDLE: Just sitting around. Request to run program will lead to ONE of the VM_RUN states. 8.1.2.1554 #dene UI_VM_RESET1 4

VM_RESET1: Initialize state variables and some I/O devices -- executed when programs end 8.1.2.1555 #dene UI_VM_RESET2 5 VM_RESET2: Final clean up and return to IDLE
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1239

8.1.2.1556

#dene UI_VM_RUN_FREE 1

VM_RUN_FREE: Attempt to run as many instructions as possible within our timeslice 8.1.2.1557 #dene UI_VM_RUN_PAUSE 3

VM_RUN_PAUSE: Program still "active", but someone has asked us to pause 8.1.2.1558 #dene UI_VM_RUN_SINGLE 2 VM_RUN_SINGLE: Run exactly one instruction per timeslice 8.1.2.1559 #dene UIModuleID 0x000C0001 The Ui module ID 8.1.2.1560 #dene UIModuleName "Ui.mod" The Ui module name 8.1.2.1561 #dene UINT_MAX 65535 The maximum value of the unsigned int type 8.1.2.1562 #dene UIOffsetAbortFlag 40 RW - Long Abort (true == use long press to abort) (1 byte) 8.1.2.1563 #dene UIOffsetBatteryState 30 W - Battery state (0..4 capacity) (1 byte) 8.1.2.1564 #dene UIOffsetBatteryVoltage 4 R - Battery voltage in millivolts (2 bytes) 8.1.2.1565 #dene UIOffsetBluetoothState 31

W - Bluetooth state (0=on, 1=visible, 2=conn, 3=conn.visible, 4=off, 5=dfu) (1 byte)


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1240

8.1.2.1566

#dene UIOffsetButton 28 RW - Insert button (buttons enumerated above) (1 byte)

8.1.2.1567

#dene UIOffsetError 37 W - Error code (1 byte)

8.1.2.1568

#dene UIOffsetFlags 26 RW - Update command ags (ags enumerated above) (1 byte)

8.1.2.1569

#dene UIOffsetForceOff 39 W - Force off (> 0 = off) (1 byte)

8.1.2.1570

#dene UIOffsetLMSlename 6 W - LMS lename to execute (Try It) (20 bytes)

8.1.2.1571

#dene UIOffsetOBPPointer 38 W - Actual OBP step (0 - 4) (1 byte)

8.1.2.1572

#dene UIOffsetPMenu 0 W - Pointer to menu le (4 bytes)

8.1.2.1573

#dene UIOffsetRechargeable 35 R - Rechargeable battery (0 = no, 1 = yes) (1 byte)

8.1.2.1574

#dene UIOffsetRunState 29 W - VM Run state (0 = stopped, 1 = running) (1 byte)

8.1.2.1575

#dene UIOffsetSleepTimeout 33 RW - Sleep timeout time (min) (1 byte)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1241

8.1.2.1576

#dene UIOffsetSleepTimer 34 RW - Sleep timer (min) (1 byte)

8.1.2.1577

#dene UIOffsetState 27 RW - UI state (states enumerated above) (1 byte)

8.1.2.1578

#dene UIOffsetUsbState 32 W - Usb state (0=disconnected, 1=connected, 2=working) (1 byte)

8.1.2.1579

#dene UIOffsetVolume 36 RW - Volume used in UI (0 - 4) (1 byte)

8.1.2.1580

#dene ULONG_MAX 4294967295 The maximum value of the unsigned long type

8.1.2.1581

#dene UpdateCalibCacheInfo 43 Update sensor calibration cache information

8.1.2.1582

#dene UpdateFlagsField 0

Update ags eld. Contains a combination of the update ag constants. Read/write. Use UF_UPDATE_MODE, UF_UPDATE_SPEED, UF_UPDATE_TACHO_LIMIT, and UF_UPDATE_PID_VALUES along with other elds to commit changes to the state of outputs. Set the appropriate ags after setting one or more of the output elds in order for the changes to actually go into affect. 8.1.2.1583 #dene US_CMD_CONTINUOUS 0x02

Command to put the ultrasonic sensor into continuous polling mode (default) 8.1.2.1584 #dene US_CMD_EVENTCAPTURE 0x03 Command to put the ultrasonic sensor into event capture mode
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.1

NBCCommon.h File Reference

1242

8.1.2.1585

#dene US_CMD_OFF 0x00 Command to turn off the ultrasonic sensor

Examples: ex_writei2cregister.nxc.

8.1.2.1586

#dene US_CMD_SINGLESHOT 0x01 Command to put the ultrasonic sensor into single shot mode

8.1.2.1587

#dene US_CMD_WARMRESET 0x04 Command to warm reset the ultrasonic sensor

8.1.2.1588

#dene US_REG_ACTUAL_ZERO 0x50 The register address used to store the actual zero value

8.1.2.1589

#dene US_REG_CM_INTERVAL 0x40 The register address used to store the CM interval

8.1.2.1590

#dene US_REG_FACTORY_ACTUAL_ZERO 0x11

The register address containing the factory setting for the actual zero value 8.1.2.1591 #dene US_REG_FACTORY_SCALE_DIVISOR 0x13

The register address containing the factory setting for the scale divisor value 8.1.2.1592 #dene US_REG_FACTORY_SCALE_FACTOR 0x12

The register address containing the factory setting for the scale factor value 8.1.2.1593 #dene US_REG_MEASUREMENT_UNITS 0x14 The register address containing the measurement units (degrees C or F)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.2

NXCAPIDocs.h File Reference

1243

8.1.2.1594

#dene US_REG_SCALE_DIVISOR 0x52 The register address used to store the scale divisor value

8.1.2.1595

#dene US_REG_SCALE_FACTOR 0x51 The register address used to store the scale factor value

8.1.2.1596

#dene USB_CMD_READY 0x01 A constant representing usb direct command

8.1.2.1597

#dene USB_PROTOCOL_OVERHEAD 2 Size of USB Overhead in bytes -- Command type byte + Command

8.1.2.1598

#dene USHRT_MAX 65535 The maximum value of the unsigned short type

8.1.2.1599

#dene WriteSemData 41 Write motor semaphore data

8.2

NXCAPIDocs.h File Reference

Additional documentation for the NXC API. #include "NXCDefs.h" 8.2.1 Detailed Description

Additional documentation for the NXC API. NXCAPIDocs.h contains additional documentation for the NXC API License: The contents of this le are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this le except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specic language governing rights and limitations under the License.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1244

The Initial Developer of this code is John Hansen. Portions created by John Hansen are Copyright (C) 2009-2010 John Hansen. All Rights Reserved. ---------------------------------------------------------------------------Author: John Hansen (bricxcc_at_comcast.net) Date: 2011-03-13 Version: 14

8.3

NXCDefs.h File Reference

Constants, macros, and API functions for NXC. #include "NBCCommon.h" Data Structures struct ColorSensorReadType
Parameters for the ColorSensorRead system call.

struct InputValuesType
Parameters for the RemoteGetInputValues function.

struct OutputStateType
Parameters for the RemoteGetOutputState function.

struct LocationType
A point on the NXT LCD screen.

struct SizeType
Width and height dimensions for the DrawRect system call.

struct DrawTextType
Parameters for the DrawText system call.

struct DrawPointType
Parameters for the DrawPoint system call.

struct DrawLineType
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1245

Parameters for the DrawLine system call.

struct DrawCircleType
Parameters for the DrawCircle system call.

struct DrawRectType
Parameters for the DrawRect system call.

struct DrawGraphicType
Parameters for the DrawGraphic system call.

struct SetScreenModeType
Parameters for the SetScreenMode system call.

struct DisplayExecuteFunctionType
Parameters for the DisplayExecuteFunction system call.

struct DrawGraphicArrayType
Parameters for the DrawGraphicArray system call.

struct DrawPolygonType
Parameters for the DrawPolygon system call.

struct DrawEllipseType
Parameters for the DrawEllipse system call.

struct DrawFontType
Parameters for the DrawFont system call.

struct Tone
Type used with the PlayTones API function.

struct SoundPlayFileType
Parameters for the SoundPlayFile system call.

struct SoundPlayToneType
Parameters for the SoundPlayTone system call.

struct SoundGetStateType
Parameters for the SoundGetState system call.

struct SoundSetStateType

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1246

Parameters for the SoundSetState system call.

struct CommLSWriteType
Parameters for the CommLSWrite system call.

struct CommLSReadType
Parameters for the CommLSRead system call.

struct CommLSCheckStatusType
Parameters for the CommLSCheckStatus system call.

struct CommLSWriteExType
Parameters for the CommLSWriteEx system call.

struct GetStartTickType
Parameters for the GetStartTick system call.

struct KeepAliveType
Parameters for the KeepAlive system call.

struct IOMapReadType
Parameters for the IOMapRead system call.

struct IOMapWriteType
Parameters for the IOMapWrite system call.

struct IOMapReadByIDType
Parameters for the IOMapReadByID system call.

struct IOMapWriteByIDType
Parameters for the IOMapWriteByID system call.

struct DatalogWriteType
Parameters for the DatalogWrite system call.

struct DatalogGetTimesType
Parameters for the DatalogGetTimes system call.

struct ReadSemDataType
Parameters for the ReadSemData system call.

struct WriteSemDataType

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1247

Parameters for the WriteSemData system call.

struct UpdateCalibCacheInfoType
Parameters for the UpdateCalibCacheInfo system call.

struct ComputeCalibValueType
Parameters for the ComputeCalibValue system call.

struct MemoryManagerType
Parameters for the MemoryManager system call.

struct ReadLastResponseType
Parameters for the ReadLastResponse system call.

struct MessageWriteType
Parameters for the MessageWrite system call.

struct MessageReadType
Parameters for the MessageRead system call.

struct CommBTCheckStatusType
Parameters for the CommBTCheckStatus system call.

struct CommBTWriteType
Parameters for the CommBTWrite system call.

struct CommExecuteFunctionType
Parameters for the CommExecuteFunction system call.

struct CommHSControlType
Parameters for the CommHSControl system call.

struct CommHSCheckStatusType
Parameters for the CommHSCheckStatus system call.

struct CommHSReadWriteType
Parameters for the CommHSReadWrite system call.

struct CommBTOnOffType
Parameters for the CommBTOnOff system call.

struct CommBTConnectionType

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1248

Parameters for the CommBTConnection system call.

struct ReadButtonType
Parameters for the ReadButton system call.

struct SetSleepTimeoutType
Parameters for the SetSleepTimeout system call.

struct FileOpenType
Parameters for the FileOpen system call.

struct FileReadWriteType
Parameters for the FileReadWrite system call.

struct FileCloseType
Parameters for the FileClose system call.

struct FileResolveHandleType
Parameters for the FileResolveHandle system call.

struct FileRenameType
Parameters for the FileRename system call.

struct FileDeleteType
Parameters for the FileDelete system call.

struct LoaderExecuteFunctionType
Parameters for the LoaderExecuteFunction system call.

struct FileFindType
Parameters for the FileFind system call.

struct FileSeekType
Parameters for the FileSeek system call.

struct FileResizeType
Parameters for the FileResize system call.

struct FileTellType
Parameters for the FileTell system call.

struct ListFilesType

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1249

Parameters for the ListFiles system call.

struct RandomNumberType
Parameters for the RandomNumber system call.

struct div_t
Output type of the div function.

struct ldiv_t
Output type of the ldiv function.

Denes #dene u8 unsigned char #dene s8 char #dene u16 unsigned int #dene s16 int #dene u32 unsigned long #dene s32 long #dene S1 0 #dene S2 1 #dene S3 2 #dene S4 3 #dene SENSOR_TYPE_NONE IN_TYPE_NO_SENSOR #dene SENSOR_TYPE_TOUCH IN_TYPE_SWITCH #dene SENSOR_TYPE_TEMPERATURE IN_TYPE_TEMPERATURE #dene SENSOR_TYPE_LIGHT IN_TYPE_REFLECTION #dene SENSOR_TYPE_ROTATION IN_TYPE_ANGLE #dene SENSOR_TYPE_LIGHT_ACTIVE IN_TYPE_LIGHT_ACTIVE #dene SENSOR_TYPE_LIGHT_INACTIVE IN_TYPE_LIGHT_INACTIVE #dene SENSOR_TYPE_SOUND_DB IN_TYPE_SOUND_DB #dene SENSOR_TYPE_SOUND_DBA IN_TYPE_SOUND_DBA #dene SENSOR_TYPE_CUSTOM IN_TYPE_CUSTOM #dene SENSOR_TYPE_LOWSPEED IN_TYPE_LOWSPEED #dene SENSOR_TYPE_LOWSPEED_9V IN_TYPE_LOWSPEED_9V #dene SENSOR_TYPE_HIGHSPEED IN_TYPE_HISPEED #dene SENSOR_TYPE_COLORFULL IN_TYPE_COLORFULL #dene SENSOR_TYPE_COLORRED IN_TYPE_COLORRED #dene SENSOR_TYPE_COLORGREEN IN_TYPE_COLORGREEN #dene SENSOR_TYPE_COLORBLUE IN_TYPE_COLORBLUE #dene SENSOR_TYPE_COLORNONE IN_TYPE_COLORNONE

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1250

#dene SENSOR_MODE_RAW IN_MODE_RAW #dene SENSOR_MODE_BOOL IN_MODE_BOOLEAN #dene SENSOR_MODE_EDGE IN_MODE_TRANSITIONCNT #dene SENSOR_MODE_PULSE IN_MODE_PERIODCOUNTER #dene SENSOR_MODE_PERCENT IN_MODE_PCTFULLSCALE #dene SENSOR_MODE_CELSIUS IN_MODE_CELSIUS #dene SENSOR_MODE_FAHRENHEIT IN_MODE_FAHRENHEIT #dene SENSOR_MODE_ROTATION IN_MODE_ANGLESTEP #dene _SENSOR_CFG(_type, _mode) (((_type)<<8)+(_mode)) #dene SENSOR_TOUCH _SENSOR_CFG(SENSOR_TYPE_TOUCH, SENSOR_MODE_BOOL) #dene SENSOR_LIGHT _SENSOR_CFG(SENSOR_TYPE_LIGHT, SENSOR_MODE_PERCENT) #dene SENSOR_ROTATION _SENSOR_CFG(SENSOR_TYPE_ROTATION, SENSOR_MODE_ROTATION) #dene SENSOR_CELSIUS _SENSOR_CFG(SENSOR_TYPE_TEMPERATURE, SENSOR_MODE_CELSIUS) #dene SENSOR_FAHRENHEIT _SENSOR_CFG(SENSOR_TYPE_TEMPERATURE, SENSOR_MODE_FAHRENHEIT) #dene SENSOR_PULSE _SENSOR_CFG(SENSOR_TYPE_TOUCH, SENSOR_MODE_PULSE) #dene SENSOR_EDGE _SENSOR_CFG(SENSOR_TYPE_TOUCH, SENSOR_MODE_EDGE) #dene SENSOR_NXTLIGHT _SENSOR_CFG(SENSOR_TYPE_LIGHT_ACTIVE, SENSOR_MODE_PERCENT) #dene SENSOR_SOUND _SENSOR_CFG(SENSOR_TYPE_SOUND_DB, SENSOR_MODE_PERCENT) #dene SENSOR_LOWSPEED_9V _SENSOR_CFG(SENSOR_TYPE_LOWSPEED_9V, SENSOR_MODE_RAW) #dene SENSOR_LOWSPEED _SENSOR_CFG(SENSOR_TYPE_LOWSPEED, SENSOR_MODE_RAW) #dene SENSOR_COLORFULL _SENSOR_CFG(SENSOR_TYPE_COLORFULL, SENSOR_MODE_RAW) #dene SENSOR_COLORRED _SENSOR_CFG(SENSOR_TYPE_COLORRED, SENSOR_MODE_PERCENT) #dene SENSOR_COLORGREEN _SENSOR_CFG(SENSOR_TYPE_COLORGREEN, SENSOR_MODE_PERCENT) #dene SENSOR_COLORBLUE _SENSOR_CFG(SENSOR_TYPE_COLORBLUE, SENSOR_MODE_PERCENT) #dene SENSOR_COLORNONE _SENSOR_CFG(SENSOR_TYPE_COLORNONE, SENSOR_MODE_PERCENT) #dene SENSOR_1 Sensor(S1) #dene SENSOR_2 Sensor(S2) #dene SENSOR_3 Sensor(S3)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1251

#dene SENSOR_4 Sensor(S4) #dene Sqrt(_X) asm { sqrt __FLTRETVAL__, _X }


Compute square root.

#dene Sin(_X) asm { sin __FLTRETVAL__, _X }


Compute sine.

#dene Cos(_X) asm { cos __FLTRETVAL__, _X }


Compute cosine.

#dene Asin(_X) asm { asin __FLTRETVAL__, _X }


Compute arc sine.

#dene Acos(_X) asm { acos __FLTRETVAL__, _X }


Compute arc cosine.

#dene Atan(_X) asm { atan __FLTRETVAL__, _X }


Compute arc tangent.

#dene Ceil(_X) asm { ceil __FLTRETVAL__, _X }


Round up value.

#dene Exp(_X) asm { exp __FLTRETVAL__, _X }


Compute exponential function .

#dene Floor(_X) asm { oor __FLTRETVAL__, _X }


Round down value.

#dene Tan(_X) asm { tan __FLTRETVAL__, _X }


Compute tangent.

#dene Tanh(_X) asm { tanh __FLTRETVAL__, _X }


Compute hyperbolic tangent.

#dene Cosh(_X) asm { cosh __FLTRETVAL__, _X }


Compute hyperbolic cosine.

#dene Sinh(_X) asm { sinh __FLTRETVAL__, _X }


Compute hyperbolic sine.

#dene Log(_X) asm { log __FLTRETVAL__, _X }


Compute natural logarithm.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1252

#dene Log10(_X) asm { log10 __FLTRETVAL__, _X }


Compute common logarithm.

#dene Atan2(_Y, _X) asm { atan2 __FLTRETVAL__, _Y, _X }


Compute arc tangent with 2 parameters.

#dene Pow(_Base, _Exponent) asm { pow __FLTRETVAL__, _Base, _Exponent }


Raise to power.

#dene Trunc(_X) asm { trunc __RETVAL__, _X }


Compute integral part.

#dene Frac(_X) asm { frac __FLTRETVAL__, _X }


Compute fractional part.

#dene MulDiv32(_A, _B, _C) asm { muldiv __RETVAL__, _A, _B, _C }


Multiply and divide.

#dene SinD(_X) asm { sind __FLTRETVAL__, _X }


Compute sine (degrees).

#dene CosD(_X) asm { cosd __FLTRETVAL__, _X }


Compute cosine (degrees).

#dene AsinD(_X) asm { asind __FLTRETVAL__, _X }


Compute arch sine (degrees).

#dene AcosD(_X) asm { acosd __FLTRETVAL__, _X }


Compute arc cosine (degrees).

#dene AtanD(_X) asm { atand __FLTRETVAL__, _X }


Compute arc tangent (degrees).

#dene TanD(_X) asm { tand __FLTRETVAL__, _X }


Compute tangent (degrees).

#dene TanhD(_X) asm { tanhd __FLTRETVAL__, _X }


Compute hyperbolic tangent (degrees).

#dene CoshD(_X) asm { coshd __FLTRETVAL__, _X }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1253

Compute hyperbolic cosine (degrees).

#dene SinhD(_X) asm { sinhd __FLTRETVAL__, _X }


Compute hyperbolic sine (degrees).

#dene Atan2D(_Y, _X) asm { atan2d __FLTRETVAL__, _Y, _X }


Compute arc tangent with two parameters (degrees).

#dene getc(_handle) fgetc(_handle)


Get character from le.

#dene putc(_ch, _handle) fputc(_ch, _handle)


Write character to le.

#dene SEEK_SET 0 #dene SEEK_CUR 1 #dene SEEK_END 2 #dene RICSetValue(_data, _idx, _newval) _data[(_idx)] = (_newval)&0xFF; _data[(_idx)+1] = (_newval)>>8
Set the value of an element in an RIC data array.

Functions void SetSensorType (const byte &port, byte type)


Set sensor type.

void SetSensorMode (const byte &port, byte mode)


Set sensor mode.

void ClearSensor (const byte &port)


Clear a sensor value.

void ResetSensor (const byte &port)


Reset the sensor port.

void SetSensor (const byte &port, const unsigned int cong)


Set sensor conguration.

void SetSensorTouch (const byte &port)


Congure a touch sensor.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1254

void SetSensorLight (const byte &port, bool bActive=true)


Congure a light sensor.

void SetSensorSound (const byte &port, bool bdBScaling=true)


Congure a sound sensor.

void SetSensorLowspeed (const byte &port, bool bIsPowered=true)


Congure an I2C sensor.

void SetSensorUltrasonic (const byte &port)


Congure an ultrasonic sensor.

void SetSensorEMeter (const byte &port)


Congure an EMeter sensor.

void SetSensorTemperature (const byte &port)


Congure a temperature sensor.

void SetSensorColorFull (const byte &port)


Congure an NXT 2.0 full color sensor.

void SetSensorColorRed (const byte &port)


Congure an NXT 2.0 red light sensor.

void SetSensorColorGreen (const byte &port)


Congure an NXT 2.0 green light sensor.

void SetSensorColorBlue (const byte &port)


Congure an NXT 2.0 blue light sensor.

void SetSensorColorNone (const byte &port)


Congure an NXT 2.0 no light sensor.

variant GetInput (const byte &port, const byte eld)


Get an input eld value.

void SetInput (const byte &port, const int eld, variant value)
Set an input eld value.

unsigned int Sensor (const byte &port)


Read sensor scaled value.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1255

bool SensorBoolean (const byte port)


Read sensor boolean value.

byte SensorDigiPinsDirection (const byte port)


Read sensor digital pins direction.

byte SensorDigiPinsOutputLevel (const byte port)


Read sensor digital pins output level.

byte SensorDigiPinsStatus (const byte port)


Read sensor digital pins status.

bool SensorInvalid (const byte &port)


Read sensor invalid data ag.

byte SensorMode (const byte &port)


Read sensor mode.

unsigned int SensorNormalized (const byte &port)


Read sensor normalized value.

unsigned int SensorRaw (const byte &port)


Read sensor raw value.

unsigned int SensorScaled (const byte &port)


Read sensor scaled value.

byte SensorType (const byte &port)


Read sensor type.

unsigned int SensorValue (const byte &port)


Read sensor scaled value.

bool SensorValueBool (const byte port)


Read sensor boolean value.

unsigned int SensorValueRaw (const byte &port)


Read sensor raw value.

byte CustomSensorActiveStatus (byte port)


Get the custom sensor active status.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1256

byte CustomSensorPercentFullScale (byte port)


Get the custom sensor percent full scale.

unsigned int CustomSensorZeroOffset (byte port)


Get the custom sensor zero offset.

void SetCustomSensorActiveStatus (byte port, byte activeStatus)


Set active status.

void SetCustomSensorPercentFullScale (byte port, byte pctFullScale)


Set percent full scale.

void SetCustomSensorZeroOffset (byte port, int zeroOffset)


Set custom zero offset.

void SetSensorBoolean (byte port, bool value)


Set sensor boolean value.

void SetSensorDigiPinsDirection (byte port, byte direction)


Set digital pins direction.

void SetSensorDigiPinsOutputLevel (byte port, byte outputLevel)


Set digital pins output level.

void SetSensorDigiPinsStatus (byte port, byte status)


Set digital pins status.

void SysColorSensorRead (ColorSensorReadType &args)


Read LEGO color sensor.

int ReadSensorColorEx (const byte &port, int &colorval, unsigned int &raw[ ], unsigned int &norm[ ], int &scaled[ ])
Read LEGO color sensor extra.

int ReadSensorColorRaw (const byte &port, unsigned int &rawVals[ ])


Read LEGO color sensor raw values.

unsigned int ColorADRaw (byte port, byte color)


Read a LEGO color sensor AD raw value.

bool ColorBoolean (byte port, byte color)


Read a LEGO color sensor boolean value.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1257

long ColorCalibration (byte port, byte point, byte color)


Read a LEGO color sensor calibration point value.

byte ColorCalibrationState (byte port)


Read LEGO color sensor calibration state.

unsigned int ColorCalLimits (byte port, byte point)


Read a LEGO color sensor calibration limit value.

unsigned int ColorSensorRaw (byte port, byte color)


Read a LEGO color sensor raw value.

unsigned int ColorSensorValue (byte port, byte color)


Read a LEGO color sensor scaled value.

void SetMotorPwnFreq (byte n)


Set motor regulation frequency.

void SetMotorRegulationTime (byte n)


Set regulation time.

void SetMotorRegulationOptions (byte n)


Set regulation options.

void OnFwdSyncPID (byte outputs, char pwr, char turnpct, byte p, byte i, byte d)
Run motors forward synchronised with PID factors.

void OnFwdSyncExPID (byte outputs, char pwr, char turnpct, const byte reset, byte p, byte i, byte d)
Run motors forward synchronised and reset counters with PID factors.

void OnRevSyncPID (byte outputs, char pwr, char turnpct, byte p, byte i, byte d)
Run motors backward synchronised with PID factors.

void OnRevSyncExPID (byte outputs, char pwr, char turnpct, const byte reset, byte p, byte i, byte d)
Run motors backward synchronised and reset counters with PID factors.

void OnFwdRegPID (byte outputs, char pwr, byte regmode, byte p, byte i, byte d)
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1258

Run motors forward regulated with PID factors.

void OnFwdRegExPID (byte outputs, char pwr, byte regmode, const byte reset, byte p, byte i, byte d)
Run motors forward regulated and reset counters with PID factors.

void OnRevRegPID (byte outputs, char pwr, byte regmode, byte p, byte i, byte d)
Run motors reverse regulated with PID factors.

void OnRevRegExPID (byte outputs, char pwr, byte regmode, const byte reset, byte p, byte i, byte d)
Run motors backward regulated and reset counters with PID factors.

void Off (byte outputs)


Turn motors off.

void OffEx (byte outputs, const byte reset)


Turn motors off and reset counters.

void Coast (byte outputs)


Coast motors.

void CoastEx (byte outputs, const byte reset)


Coast motors and reset counters.

void Float (byte outputs)


Float motors.

void OnFwd (byte outputs, char pwr)


Run motors forward.

void OnFwdEx (byte outputs, char pwr, const byte reset)


Run motors forward and reset counters.

void OnRev (byte outputs, char pwr)


Run motors backward.

void OnRevEx (byte outputs, char pwr, const byte reset)


Run motors backward and reset counters.

void OnFwdReg (byte outputs, char pwr, byte regmode)


Run motors forward regulated.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1259

void OnFwdRegEx (byte outputs, char pwr, byte regmode, const byte reset)
Run motors forward regulated and reset counters.

void OnRevReg (byte outputs, char pwr, byte regmode)


Run motors forward regulated.

void OnRevRegEx (byte outputs, char pwr, byte regmode, const byte reset)
Run motors backward regulated and reset counters.

void OnFwdSync (byte outputs, char pwr, char turnpct)


Run motors forward synchronised.

void OnFwdSyncEx (byte outputs, char pwr, char turnpct, const byte reset)
Run motors forward synchronised and reset counters.

void OnRevSync (byte outputs, char pwr, char turnpct)


Run motors backward synchronised.

void OnRevSyncEx (byte outputs, char pwr, char turnpct, const byte reset)
Run motors backward synchronised and reset counters.

void RotateMotor (byte outputs, char pwr, long angle)


Rotate motor.

void RotateMotorPID (byte outputs, char pwr, long angle, byte p, byte i, byte d)
Rotate motor with PID factors.

void RotateMotorEx (byte outputs, char pwr, long angle, char turnpct, bool sync, bool stop)
Rotate motor.

void RotateMotorExPID (byte outputs, char pwr, long angle, char turnpct, bool sync, bool stop, byte p, byte i, byte d)
Rotate motor.

void ResetTachoCount (byte outputs)


Reset tachometer counter.

void ResetBlockTachoCount (byte outputs)


Reset block-relative counter.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1260

void ResetRotationCount (byte outputs)


Reset program-relative counter.

void ResetAllTachoCounts (byte outputs)


Reset all tachometer counters.

void SetOutput (byte outputs, byte eld1, variant val1,..., byte eldN, variant valN)
Set output elds.

variant GetOutput (byte output, const byte eld)


Get output eld value.

byte MotorMode (byte output)


Get motor mode.

char MotorPower (byte output)


Get motor power level.

char MotorActualSpeed (byte output)


Get motor actual speed.

long MotorTachoCount (byte output)


Get motor tachometer counter.

long MotorTachoLimit (byte output)


Get motor tachometer limit.

byte MotorRunState (byte output)


Get motor run state.

char MotorTurnRatio (byte output)


Get motor turn ratio.

byte MotorRegulation (byte output)


Get motor regulation mode.

bool MotorOverload (byte output)


Get motor overload status.

byte MotorRegPValue (byte output)


Get motor P value.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1261

byte MotorRegIValue (byte output)


Get motor I value.

byte MotorRegDValue (byte output)


Get motor D value.

long MotorBlockTachoCount (byte output)


Get motor block-relative counter.

long MotorRotationCount (byte output)


Get motor program-relative counter.

byte MotorOutputOptions (byte output)


Get motor options.

byte MotorMaxSpeed (byte output)


Get motor max speed.

byte MotorMaxAcceleration (byte output)


Get motor max acceleration.

byte MotorPwnFreq ()
Get motor regulation frequency.

byte MotorRegulationTime ()
Get motor regulation time.

byte MotorRegulationOptions ()
Get motor regulation options.

void ResetScreen ()
Reset LCD screen.

char CircleOut (int x, int y, byte radius, unsigned long options=DRAW_OPT_NORMAL)


Draw a circle.

char LineOut (int x1, int y1, int x2, int y2, unsigned long options=DRAW_OPT_NORMAL)
Draw a line.

char PointOut (int x, int y, unsigned long options=DRAW_OPT_NORMAL)


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1262

Draw a point.

char RectOut (int x, int y, int width, int height, unsigned long options=DRAW_OPT_NORMAL)
Draw a rectangle.

char TextOut (int x, int y, string str, unsigned long options=DRAW_OPT_NORMAL)


Draw text.

char NumOut (int x, int y, variant value, unsigned long options=DRAW_OPT_NORMAL)


Draw a number.

char EllipseOut (int x, int y, byte radiusX, byte radiusY, unsigned long options=DRAW_OPT_NORMAL)
Draw an ellipse.

char PolyOut (LocationType points[ ], unsigned long options=DRAW_OPT_NORMAL)


Draw a polygon.

char FontTextOut (int x, int y, string lename, string str, unsigned long options=DRAW_OPT_NORMAL)
Draw text with font.

char FontNumOut (int x, int y, string lename, variant value, unsigned long options=DRAW_OPT_NORMAL)
Draw a number with font.

char GraphicOut (int x, int y, string lename, unsigned long options=DRAW_OPT_NORMAL)


Draw a graphic image.

char GraphicArrayOut (int x, int y, byte data[ ], unsigned long options=DRAW_OPT_NORMAL)


Draw a graphic image from byte array.

char GraphicOutEx (int x, int y, string lename, byte vars[ ], unsigned long options=DRAW_OPT_NORMAL)
Draw a graphic image with parameters.

char GraphicArrayOutEx (int x, int y, byte data[ ], byte vars[ ], unsigned long options=DRAW_OPT_NORMAL)
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1263

Draw a graphic image from byte array with parameters.

void GetDisplayNormal (const byte x, const byte line, unsigned int cnt, byte &data[ ])
Read pixel data from the normal display buffer.

void SetDisplayNormal (const byte x, const byte line, unsigned int cnt, byte data[ ])
Write pixel data to the normal display buffer.

void GetDisplayPopup (const byte x, const byte line, unsigned int cnt, byte &data[ ])
Read pixel data from the popup display buffer.

void SetDisplayPopup (const byte x, const byte line, unsigned int cnt, byte data[ ])
Write pixel data to the popup display buffer.

unsigned long DisplayEraseMask ()


Read the display erase mask value.

unsigned long DisplayUpdateMask ()


Read the display update mask value.

unsigned long DisplayFont ()


Read the display font memory address.

unsigned long DisplayDisplay ()


Read the display memory address.

byte DisplayFlags ()
Read the display ags.

byte DisplayTextLinesCenterFlags ()
Read the display text lines center ags.

void SysDrawText (DrawTextType &args)


Draw text.

void SysDrawPoint (DrawPointType &args)


Draw a point.

void SysDrawLine (DrawLineType &args)


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1264

Draw a line.

void SysDrawCircle (DrawCircleType &args)


Draw a circle.

void SysDrawRect (DrawRectType &args)


Draw a rectangle.

void SysDrawGraphic (DrawGraphicType &args)


Draw a graphic (RIC le).

void SysSetScreenMode (SetScreenModeType &args)


Set the screen mode.

void SysDisplayExecuteFunction (DisplayExecuteFunctionType &args)


Execute any Display module command.

byte DisplayContrast ()
Read the display contrast setting.

void SysDrawGraphicArray (DrawGraphicArrayType &args)


Draw a graphic image from a byte array.

void SysDrawPolygon (DrawPolygonType &args)


Draw a polygon.

void SysDrawEllipse (DrawEllipseType &args)


Draw an ellipse.

void SysDrawFont (DrawFontType &args)


Draw text using a custom font.

void ClearScreen ()
Clear LCD screen.

void ClearLine (byte line)


Clear a line on the LCD screen.

void SetDisplayFont (unsigned long fontaddr)


Set the display font memory address.

void SetDisplayDisplay (unsigned long dispaddr)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1265

Set the display memory address.

void SetDisplayEraseMask (unsigned long eraseMask)


Set the display erase mask.

void SetDisplayFlags (byte ags)


Set the display ags.

void SetDisplayTextLinesCenterFlags (byte ctrFlags)


Set the display text lines center ags.

void SetDisplayUpdateMask (unsigned long updateMask)


Set the display update mask.

void SetDisplayContrast (byte contrast)


Set the display contrast.

char PlayFile (string lename)


Play a le.

char PlayFileEx (string lename, byte volume, bool loop)


Play a le with extra options.

char PlayTone (unsigned int frequency, unsigned int duration)


Play a tone.

char PlayToneEx (unsigned int frequency, unsigned int duration, byte volume, bool loop)
Play a tone with extra options.

byte SoundState ()
Get sound module state.

byte SoundFlags ()
Get sound module ags.

byte StopSound ()
Stop sound.

unsigned int SoundFrequency ()


Get sound frequency.

unsigned int SoundDuration ()


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1266

Get sound duration.

unsigned int SoundSampleRate ()


Get sample rate.

byte SoundMode ()
Get sound mode.

byte SoundVolume ()
Get volume.

void SetSoundDuration (unsigned int duration)


Set sound duration.

void SetSoundFlags (byte ags)


Set sound module ags.

void SetSoundFrequency (unsigned int frequency)


Set sound frequency.

void SetSoundMode (byte mode)


Set sound mode.

void SetSoundModuleState (byte state)


Set sound module state.

void SetSoundSampleRate (unsigned int sampleRate)


Set sample rate.

void SetSoundVolume (byte volume)


Set sound volume.

void SysSoundPlayFile (SoundPlayFileType &args)


Play sound le.

void SysSoundPlayTone (SoundPlayToneType &args)


Play tone.

void SysSoundGetState (SoundGetStateType &args)


Get sound state.

void SysSoundSetState (SoundSetStateType &args)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1267

Set sound state.

void PlaySound (const int &aCode)


Play a system sound.

void PlayTones (Tone tones[ ])


Play multiple tones.

byte SensorUS (const byte port)


Read ultrasonic sensor value.

char ReadSensorUSEx (const byte port, byte &values[ ])


Read multiple ultrasonic sensor values.

char ReadSensorEMeter (const byte &port, oat &vIn, oat &aIn, oat &vOut, oat &aOut, int &joules, oat &wIn, oat &wOut)
Read the LEGO EMeter values.

char CongureTemperatureSensor (const byte &port, const byte &cong)


Congure LEGO Temperature sensor options.

oat SensorTemperature (const byte &port)


Read the LEGO Temperature sensor value.

long LowspeedStatus (const byte port, byte &bytesready)


Get lowspeed status.

long LowspeedCheckStatus (const byte port)


Check lowspeed status.

byte LowspeedBytesReady (const byte port)


Get lowspeed bytes ready.

long LowspeedWrite (const byte port, byte retlen, byte buffer[ ])


Write lowspeed data.

long LowspeedRead (const byte port, byte buen, byte &buffer[ ])


Read lowspeed data.

long I2CStatus (const byte port, byte &bytesready)


Get I2C status.

long I2CCheckStatus (const byte port)


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1268

Check I2C status.

byte I2CBytesReady (const byte port)


Get I2C bytes ready.

long I2CWrite (const byte port, byte retlen, byte buffer[ ])


Write I2C data.

long I2CRead (const byte port, byte buen, byte &buffer[ ])


Read I2C data.

long I2CBytes (const byte port, byte inbuf[ ], byte &count, byte &outbuf[ ])
Perform an I2C write/read transaction.

char ReadI2CRegister (byte port, byte i2caddr, byte reg, byte &out)
Read I2C register.

char WriteI2CRegister (byte port, byte i2caddr, byte reg, byte val)
Write I2C register.

string I2CDeviceInfo (byte port, byte i2caddr, byte info)


Read I2C device information.

string I2CVersion (byte port, byte i2caddr)


Read I2C device version.

string I2CVendorId (byte port, byte i2caddr)


Read I2C device vendor.

string I2CDeviceId (byte port, byte i2caddr)


Read I2C device identier.

long I2CSendCommand (byte port, byte i2caddr, byte cmd)


Send an I2C command.

void GetLSInputBuffer (const byte port, const byte offset, byte cnt, byte &data[ ])
Get I2C input buffer data.

void GetLSOutputBuffer (const byte port, const byte offset, byte cnt, byte &data[ ])
Get I2C output buffer data.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1269

byte LSInputBufferInPtr (const byte port)


Get I2C input buffer in-pointer.

byte LSInputBufferOutPtr (const byte port)


Get I2C input buffer out-pointer.

byte LSInputBufferBytesToRx (const byte port)


Get I2C input buffer bytes to rx.

byte LSOutputBufferInPtr (const byte port)


Get I2C output buffer in-pointer.

byte LSOutputBufferOutPtr (const byte port)


Get I2C output buffer out-pointer.

byte LSOutputBufferBytesToRx (const byte port)


Get I2C output buffer bytes to rx.

byte LSMode (const byte port)


Get I2C mode.

byte LSChannelState (const byte port)


Get I2C channel state.

byte LSErrorType (const byte port)


Get I2C error type.

byte LSState ()
Get I2C state.

byte LSSpeed ()
Get I2C speed.

byte LSNoRestartOnRead ()
Get I2C no restart on read setting.

void SysCommLSWrite (CommLSWriteType &args)


Write to a Lowspeed sensor.

void SysCommLSRead (CommLSReadType &args)


Read from a Lowspeed sensor.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1270

void SysCommLSCheckStatus (CommLSCheckStatusType &args)


Check Lowspeed sensor status.

void SysCommLSWriteEx (CommLSWriteExType &args)


Write to a Lowspeed sensor (extra).

unsigned long CurrentTick ()


Read the current system tick.

unsigned long FirstTick ()


Get the rst tick.

long ResetSleepTimer ()
Reset the sleep timer.

void SysCall (byte funcID, variant &args)


Call any system function.

void SysGetStartTick (GetStartTickType &args)


Get start tick.

void SysKeepAlive (KeepAliveType &args)


Keep alive.

void SysIOMapRead (IOMapReadType &args)


Read from IOMap by name.

void SysIOMapWrite (IOMapWriteType &args)


Write to IOMap by name.

void SysIOMapReadByID (IOMapReadByIDType &args)


Read from IOMap by identier.

void SysIOMapWriteByID (IOMapWriteByIDType &args)


Write to IOMap by identier.

void SysDatalogWrite (DatalogWriteType &args)


Write to the datalog.

void SysDatalogGetTimes (DatalogGetTimesType &args)


Get datalog times.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1271

void SysReadSemData (ReadSemDataType &args)


Read semaphore data.

void SysWriteSemData (WriteSemDataType &args)


Write semaphore data.

void SysUpdateCalibCacheInfo (UpdateCalibCacheInfoType &args)


Update calibration cache information.

void SysComputeCalibValue (ComputeCalibValueType &args)


Compute calibration values.

char GetMemoryInfo (bool Compact, unsigned int &PoolSize, unsigned int &DataspaceSize)
Read memory information.

void SysMemoryManager (MemoryManagerType &args)


Read memory information.

char GetLastResponseInfo (bool Clear, byte &Length, byte &Command, byte &Buffer[ ])
Read last response information.

void SysReadLastResponse (ReadLastResponseType &args)


Read last response information.

void Wait (unsigned long ms)


Wait some milliseconds.

void Yield ()
Yield to another task.

void StopAllTasks ()
Stop all tasks.

void Stop (bool bvalue)


Stop the running program.

void ExitTo (task newTask)


Exit to another task.

void Precedes (task task1, task task2,..., task taskN)


Declare tasks that this task precedes.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1272

void Follows (task task1, task task2,..., task taskN)


Declare tasks that this task follows.

void Acquire (mutex m)


Acquire a mutex.

void Release (mutex m)


Acquire a mutex.

void StartTask (task t)


Start a task.

void StopTask (task t)


Stop a task.

void ArrayBuild (variant &aout[ ], variant src1, variant src2,..., variant srcN)
Build an array.

unsigned int ArrayLen (variant data[ ])


Get array length.

void ArrayInit (variant &aout[ ], variant value, unsigned int count)


Initialize an array.

void ArraySubset (variant &aout[ ], variant asrc[ ], unsigned int idx, unsigned int len)
Copy an array subset.

variant ArraySum (const variant &src[ ], unsigned int idx, unsigned int len)
Calculate the sum of the elements in a numeric array.

variant ArrayMean (const variant &src[ ], unsigned int idx, unsigned int len)
Calculate the mean of the elements in a numeric array.

variant ArraySumSqr (const variant &src[ ], unsigned int idx, unsigned int len)
Calculate the sum of the squares of the elements in a numeric array.

variant ArrayStd (const variant &src[ ], unsigned int idx, unsigned int len)
Calculate the standard deviation of the elements in a numeric array.

variant ArrayMin (const variant &src[ ], unsigned int idx, unsigned int len)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1273

Calculate the minimum of the elements in a numeric array.

variant ArrayMax (const variant &src[ ], unsigned int idx, unsigned int len)
Calculate the maximum of the elements in a numeric array.

void ArraySort (variant &dest[ ], const variant &src[ ], unsigned int idx, unsigned int len)
Sort the elements in a numeric array.

void ArrayOp (const byte op, variant &dest, const variant &src[ ], unsigned int idx, unsigned int len)
Operate on numeric arrays.

void SetIOMapBytes (string moduleName, unsigned int offset, unsigned int count, byte data[ ])
Set IOMap bytes by name.

void SetIOMapValue (string moduleName, unsigned int offset, variant value)


Set IOMap value by name.

void GetIOMapBytes (string moduleName, unsigned int offset, unsigned int count, byte &data[ ])
Get IOMap bytes by name.

void GetIOMapValue (string moduleName, unsigned int offset, variant &value)


Get IOMap value by name.

void GetLowSpeedModuleBytes (unsigned int offset, unsigned int count, byte &data[ ])
Get Lowspeed module IOMap bytes.

void GetDisplayModuleBytes (unsigned int offset, unsigned int count, byte &data[ ])
Get Display module IOMap bytes.

void GetCommModuleBytes (unsigned int offset, unsigned int count, byte &data[ ])
Get Comm module IOMap bytes.

void GetCommandModuleBytes (unsigned int offset, unsigned int count, byte &data[ ])
Get Command module IOMap bytes.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1274

void SetCommandModuleBytes (unsigned int offset, unsigned int count, byte data[ ])
Set Command module IOMap bytes.

void SetLowSpeedModuleBytes (unsigned int offset, unsigned int count, byte data[ ])
Set Lowspeed module IOMap bytes.

void SetDisplayModuleBytes (unsigned int offset, unsigned int count, byte data[ ])
Set Display module IOMap bytes.

void SetCommModuleBytes (unsigned int offset, unsigned int count, byte data[ ])
Set Comm module IOMap bytes.

void SetIOMapBytesByID (unsigned long moduleId, unsigned int offset, unsigned int count, byte data[ ])
Set IOMap bytes by ID.

void SetIOMapValueByID (unsigned long moduleId, unsigned int offset, variant value)
Set IOMap value by ID.

void GetIOMapBytesByID (unsigned long moduleId, unsigned int offset, unsigned int count, byte &data[ ])
Get IOMap bytes by ID.

void GetIOMapValueByID (unsigned long moduleId, unsigned int offset, variant &value)
Get IOMap value by ID.

void SetCommandModuleValue (unsigned int offset, variant value)


Set Command module IOMap value.

void SetIOCtrlModuleValue (unsigned int offset, variant value)


Set IOCtrl module IOMap value.

void SetLoaderModuleValue (unsigned int offset, variant value)


Set Loader module IOMap value.

void SetUIModuleValue (unsigned int offset, variant value)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1275

Set Ui module IOMap value.

void SetSoundModuleValue (unsigned int offset, variant value)


Set Sound module IOMap value.

void SetButtonModuleValue (unsigned int offset, variant value)


Set Button module IOMap value.

void SetInputModuleValue (unsigned int offset, variant value)


Set Input module IOMap value.

void SetOutputModuleValue (unsigned int offset, variant value)


Set Output module IOMap value.

void SetLowSpeedModuleValue (unsigned int offset, variant value)


Set Lowspeed module IOMap value.

void SetDisplayModuleValue (unsigned int offset, variant value)


Set Display module IOMap value.

void SetCommModuleValue (unsigned int offset, variant value)


Set Comm module IOMap value.

void GetCommandModuleValue (unsigned int offset, variant &value)


Get Command module IOMap value.

void GetLoaderModuleValue (unsigned int offset, variant &value)


Get Loader module IOMap value.

void GetSoundModuleValue (unsigned int offset, variant &value)


Get Sound module IOMap value.

void GetButtonModuleValue (unsigned int offset, variant &value)


Get Button module IOMap value.

void GetUIModuleValue (unsigned int offset, variant &value)


Get Ui module IOMap value.

void GetInputModuleValue (unsigned int offset, variant &value)


Get Input module IOMap value.

void GetOutputModuleValue (unsigned int offset, variant &value)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1276

Get Output module IOMap value.

void GetLowSpeedModuleValue (unsigned int offset, variant &value)


Get LowSpeed module IOMap value.

void GetDisplayModuleValue (unsigned int offset, variant &value)


Get Display module IOMap value.

void GetCommModuleValue (unsigned int offset, variant &value)


Get Comm module IOMap value.

void PowerDown ()
Power down the NXT.

void SleepNow ()
Put the brick to sleep immediately.

void RebootInFirmwareMode ()
Reboot the NXT in rmware download mode.

char SendMessage (byte queue, string msg)


Send a message to a queue/mailbox.

char ReceiveMessage (byte queue, bool clear, string &msg)


Read a message from a queue/mailbox.

char BluetoothStatus (byte conn)


Check bluetooth status.

char BluetoothWrite (byte conn, byte buffer[ ])


Write to a bluetooth connection.

char RemoteConnectionWrite (byte conn, byte buffer[ ])


Write to a remote connection.

bool RemoteConnectionIdle (byte conn)


Check if remote connection is idle.

char SendRemoteBool (byte conn, byte queue, bool bval)


Send a boolean value to a remote mailbox.

char SendRemoteNumber (byte conn, byte queue, long val)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1277

Send a numeric value to a remote mailbox.

char SendRemoteString (byte conn, byte queue, string str)


Send a string value to a remote mailbox.

char SendResponseBool (byte queue, bool bval)


Write a boolean value to a local response mailbox.

char SendResponseNumber (byte queue, long val)


Write a numeric value to a local response mailbox.

char SendResponseString (byte queue, string str)


Write a string value to a local response mailbox.

char ReceiveRemoteBool (byte queue, bool clear, bool &bval)


Read a boolean value from a queue/mailbox.

char ReceiveRemoteMessageEx (byte queue, bool clear, string &str, long &val, bool &bval)
Read a value from a queue/mailbox.

char ReceiveRemoteNumber (byte queue, bool clear, long &val)


Read a numeric value from a queue/mailbox.

char ReceiveRemoteString (byte queue, bool clear, string &str)


Read a string value from a queue/mailbox.

char RemoteKeepAlive (byte conn)


Send a KeepAlive message.

char RemoteMessageRead (byte conn, byte queue)


Send a MessageRead message.

char RemoteMessageWrite (byte conn, byte queue, string msg)


Send a MessageWrite message.

char RemotePlaySoundFile (byte conn, string lename, bool bloop)


Send a PlaySoundFile message.

char RemotePlayTone (byte conn, unsigned int frequency, unsigned int duration)
Send a PlayTone message.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1278

char RemoteResetMotorPosition (byte conn, byte port, bool brelative)


Send a ResetMotorPosition message.

char RemoteResetScaledValue (byte conn, byte port)


Send a ResetScaledValue message.

char RemoteSetInputMode (byte conn, byte port, byte type, byte mode)
Send a SetInputMode message.

char RemoteSetOutputState (byte conn, byte port, char speed, byte mode, byte regmode, char turnpct, byte runstate, unsigned long tacholimit)
Send a SetOutputMode message.

char RemoteStartProgram (byte conn, string lename)


Send a StartProgram message.

char RemoteStopProgram (byte conn)


Send a StopProgram message.

char RemoteStopSound (byte conn)


Send a StopSound message.

char RemoteGetOutputState (byte conn, OutputStateType &params)


Send a GetOutputState message.

char RemoteGetInputValues (byte conn, InputValuesType &params)


Send a GetInputValues message.

char RemoteGetBatteryLevel (byte conn, int &value)


Send a GetBatteryLevel message.

char RemoteLowspeedGetStatus (byte conn, byte &value)


Send a LowspeedGetStatus message.

char RemoteLowspeedRead (byte conn, byte port, byte &bread, byte &data[ ])
Send a LowspeedRead message.

char RemoteGetCurrentProgramName (byte conn, string &name)


Send a GetCurrentProgramName message.

char RemoteDatalogRead (byte conn, bool remove, byte &cnt, byte &log[ ])
Send a DatalogRead message.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1279

char RemoteGetContactCount (byte conn, byte &cnt)


Send a GetContactCount message.

char RemoteGetContactName (byte conn, byte idx, string &name)


Send a GetContactName message.

char RemoteGetConnectionCount (byte conn, byte &cnt)


Send a GetConnectionCount message.

char RemoteGetConnectionName (byte conn, byte idx, string &name)


Send a GetConnectionName message.

char RemoteGetProperty (byte conn, byte property, variant &value)


Send a GetProperty message.

char RemoteResetTachoCount (byte conn, byte port)


Send a ResetTachoCount message.

char RemoteDatalogSetTimes (byte conn, long synctime)


Send a DatalogSetTimes message.

char RemoteSetProperty (byte conn, byte prop, variant value)


Send a SetProperty message.

char RemoteLowspeedWrite (byte conn, byte port, byte txlen, byte rxlen, byte data[ ])
Send a LowspeedWrite message.

char RemoteOpenRead (byte conn, string lename, byte &handle, long &size)
Send an OpenRead message.

char RemoteOpenAppendData (byte conn, string lename, byte &handle, long &size)
Send an OpenAppendData message.

char RemoteDeleteFile (byte conn, string lename)


Send a DeleteFile message.

char RemoteFindFirstFile (byte conn, string mask, byte &handle, string &name, long &size)
Send a FindFirstFile message.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1280

char RemoteGetFirmwareVersion (byte conn, byte &pmin, byte &pmaj, byte &fmin, byte &fmaj)
Send a GetFirmwareVersion message.

char RemoteGetBluetoothAddress (byte conn, byte &btaddr[ ])


Send a GetBluetoothAddress message.

char RemoteGetDeviceInfo (byte conn, string &name, byte &btaddr[ ], byte &btsignal[ ], long &freemem)
Send a GetDeviceInfo message.

char RemoteDeleteUserFlash (byte conn)


Send a DeleteUserFlash message.

char RemoteOpenWrite (byte conn, string lename, long size, byte &handle)
Send an OpenWrite message.

char RemoteOpenWriteLinear (byte conn, string lename, long size, byte &handle)
Send an OpenWriteLinear message.

char RemoteOpenWriteData (byte conn, string lename, long size, byte &handle)
Send an OpenWriteData message.

char RemoteCloseFile (byte conn, byte handle)


Send a CloseFile message.

char RemoteFindNextFile (byte conn, byte &handle, string &name, long &size)
Send a FindNextFile message.

char RemotePollCommandLength (byte conn, byte bufnum, byte &length)


Send a PollCommandLength message.

char RemoteWrite (byte conn, byte &handle, int &numbytes, byte data[ ])
Send a Write message.

char RemoteRead (byte conn, byte &handle, int &numbytes, byte &data[ ])
Send a Read message.

char RemoteIOMapRead (byte conn, long id, int offset, int &numbytes, byte &data[ ])
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1281

Send an IOMapRead message.

char RemotePollCommand (byte conn, byte bufnum, byte &len, byte &data[ ])
Send a PollCommand message.

char RemoteRenameFile (byte conn, string oldname, string newname)


Send a RenameFile message.

char RemoteBluetoothFactoryReset (byte conn)


Send a BluetoothFactoryReset message.

char RemoteIOMapWriteValue (byte conn, long id, int offset, variant value)
Send an IOMapWrite value message.

char RemoteIOMapWriteBytes (byte conn, long id, int offset, byte data[ ])
Send an IOMapWrite bytes message.

char RemoteSetBrickName (byte conn, string name)


Send a SetBrickName message.

void UseRS485 (void)


Use the RS485 port.

char RS485Control (byte cmd, byte baud, unsigned int mode)


Control the RS485 port.

bool RS485DataAvailable (void)


Check for RS485 available data.

char RS485Initialize (void)


Initialize RS485 port.

char RS485Disable (void)


Disable RS485.

char RS485Enable (void)


Enable RS485.

char RS485Read (byte &buffer[ ])


Read RS485 data.

bool RS485SendingData (void)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1282

Is RS485 sending data.

void RS485Status (bool &sendingData, bool &dataAvail)


Check RS485 status.

char RS485Uart (byte baud, unsigned int mode)


Congure RS485 UART.

char RS485Write (byte buffer[ ])


Write RS485 data.

char SendRS485Bool (bool bval)


Write RS485 boolean.

char SendRS485Number (long val)


Write RS485 numeric.

char SendRS485String (string str)


Write RS485 string.

void GetBTInputBuffer (const byte offset, byte cnt, byte &data[ ])


Get bluetooth input buffer data.

void GetBTOutputBuffer (const byte offset, byte cnt, byte &data[ ])


Get bluetooth output buffer data.

void GetHSInputBuffer (const byte offset, byte cnt, byte &data[ ])


Get hi-speed port input buffer data.

void GetHSOutputBuffer (const byte offset, byte cnt, byte &data[ ])


Get hi-speed port output buffer data.

void GetUSBInputBuffer (const byte offset, byte cnt, byte &data[ ])


Get usb input buffer data.

void GetUSBOutputBuffer (const byte offset, byte cnt, byte &data[ ])


Get usb output buffer data.

void GetUSBPollBuffer (const byte offset, byte cnt, byte &data[ ])


Get usb poll buffer data.

string BTDeviceName (const byte devidx)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1283

Get bluetooth device name.

string BTConnectionName (const byte conn)


Get bluetooth device name.

string BTConnectionPinCode (const byte conn)


Get bluetooth device pin code.

string BrickDataName (void)


Get NXT name.

void GetBTDeviceAddress (const byte devidx, byte &data[ ])


Get bluetooth device address.

void GetBTConnectionAddress (const byte conn, byte &data[ ])


Get bluetooth device address.

void GetBrickDataAddress (byte &data[ ])


Get NXT address.

long BTDeviceClass (const byte devidx)


Get bluetooth device class.

byte BTDeviceStatus (const byte devidx)


Get bluetooth device status.

long BTConnectionClass (const byte conn)


Get bluetooth device class.

byte BTConnectionHandleNum (const byte conn)


Get bluetooth device handle number.

byte BTConnectionStreamStatus (const byte conn)


Get bluetooth device stream status.

byte BTConnectionLinkQuality (const byte conn)


Get bluetooth device link quality.

int BrickDataBluecoreVersion (void)


Get NXT bluecore version.

byte BrickDataBtStateStatus (void)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1284

Get NXT bluetooth state status.

byte BrickDataBtHardwareStatus (void)


Get NXT bluetooth hardware status.

byte BrickDataTimeoutValue (void)


Get NXT bluetooth timeout value.

byte BTInputBufferInPtr (void)


Get bluetooth input buffer in-pointer.

byte BTInputBufferOutPtr (void)


Get bluetooth input buffer out-pointer.

byte BTOutputBufferInPtr (void)


Get bluetooth output buffer in-pointer.

byte BTOutputBufferOutPtr (void)


Get bluetooth output buffer out-pointer.

byte HSInputBufferInPtr (void)


Get hi-speed port input buffer in-pointer.

byte HSInputBufferOutPtr (void)


Get hi-speed port input buffer out-pointer.

byte HSOutputBufferInPtr (void)


Get hi-speed port output buffer in-pointer.

byte HSOutputBufferOutPtr (void)


Get hi-speed port output buffer out-pointer.

byte USBInputBufferInPtr (void)


Get usb port input buffer in-pointer.

byte USBInputBufferOutPtr (void)


Get usb port input buffer out-pointer.

byte USBOutputBufferInPtr (void)


Get usb port output buffer in-pointer.

byte USBOutputBufferOutPtr (void)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1285

Get usb port output buffer out-pointer.

byte USBPollBufferInPtr (void)


Get usb port poll buffer in-pointer.

byte USBPollBufferOutPtr (void)


Get usb port poll buffer out-pointer.

byte BTDeviceCount (void)


Get bluetooth device count.

byte BTDeviceNameCount (void)


Get bluetooth device name count.

byte HSFlags (void)


Get hi-speed port ags.

byte HSSpeed (void)


Get hi-speed port speed.

byte HSState (void)


Get hi-speed port state.

int HSMode (void)


Get hi-speed port mode.

int BTDataMode (void)


Get Bluetooth data mode.

int HSDataMode (void)


Get hi-speed port datamode.

byte USBState (void)


Get USB state.

void SetBTInputBuffer (const byte offset, byte cnt, byte data[ ])


Set bluetooth input buffer data.

void SetBTInputBufferInPtr (byte n)


Set bluetooth input buffer in-pointer.

void SetBTInputBufferOutPtr (byte n)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1286

Set bluetooth input buffer out-pointer.

void SetBTOutputBuffer (const byte offset, byte cnt, byte data[ ])


Set bluetooth output buffer data.

void SetBTOutputBufferInPtr (byte n)


Set bluetooth output buffer in-pointer.

void SetBTOutputBufferOutPtr (byte n)


Set bluetooth output buffer out-pointer.

void SetHSInputBuffer (const byte offset, byte cnt, byte data[ ])


Set hi-speed port input buffer data.

void SetHSInputBufferInPtr (byte n)


Set hi-speed port input buffer in-pointer.

void SetHSInputBufferOutPtr (byte n)


Set hi-speed port input buffer out-pointer.

void SetHSOutputBuffer (const byte offset, byte cnt, byte data[ ])


Set hi-speed port output buffer data.

void SetHSOutputBufferInPtr (byte n)


Set hi-speed port output buffer in-pointer.

void SetHSOutputBufferOutPtr (byte n)


Set hi-speed port output buffer out-pointer.

void SetUSBInputBuffer (const byte offset, byte cnt, byte data[ ])


Set USB input buffer data.

void SetUSBInputBufferInPtr (byte n)


Set USB input buffer in-pointer.

void SetUSBInputBufferOutPtr (byte n)


Set USB input buffer out-pointer.

void SetUSBOutputBuffer (const byte offset, byte cnt, byte data[ ])


Set USB output buffer data.

void SetUSBOutputBufferInPtr (byte n)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1287

Set USB output buffer in-pointer.

void SetUSBOutputBufferOutPtr (byte n)


Set USB output buffer out-pointer.

void SetUSBPollBuffer (const byte offset, byte cnt, byte data[ ])


Set USB poll buffer data.

void SetUSBPollBufferInPtr (byte n)


Set USB poll buffer in-pointer.

void SetUSBPollBufferOutPtr (byte n)


Set USB poll buffer out-pointer.

void SetHSFlags (byte hsFlags)


Set hi-speed port ags.

void SetHSSpeed (byte hsSpeed)


Set hi-speed port speed.

void SetHSState (byte hsState)


Set hi-speed port state.

void SetHSMode (unsigned int hsMode)


Set hi-speed port mode.

void SetBTDataMode (const byte dataMode)


Set Bluetooth data mode.

void SetHSDataMode (const byte dataMode)


Set hi-speed port data mode.

void SetUSBState (byte usbState)


Set USB state.

void SysMessageWrite (MessageWriteType &args)


Write message.

void SysMessageRead (MessageReadType &args)


Read message.

void SysCommBTWrite (CommBTWriteType &args)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1288

Write data to a Bluetooth connection.

void SysCommBTCheckStatus (CommBTCheckStatusType &args)


Check Bluetooth connection status.

void SysCommExecuteFunction (CommExecuteFunctionType &args)


Execute any Comm module command.

void SysCommHSControl (CommHSControlType &args)


Control the hi-speed port.

void SysCommHSCheckStatus (CommHSCheckStatusType &args)


Check the hi-speed port status.

void SysCommHSRead (CommHSReadWriteType &args)


Read from the hi-speed port.

void SysCommHSWrite (CommHSReadWriteType &args)


Write to the hi-speed port.

void SysCommBTOnOff (CommBTOnOffType &args)


Turn on or off the bluetooth subsystem.

void SysCommBTConnection (CommBTConnectionType &args)


Connect or disconnect a bluetooth device.

bool ButtonPressed (const byte btn, bool resetCount)


Check for button press.

byte ButtonCount (const byte btn, bool resetCount)


Get button press count.

char ReadButtonEx (const byte btn, bool reset, bool &pressed, unsigned int &count)
Read button information.

byte ButtonPressCount (const byte btn)


Get button press count.

byte ButtonLongPressCount (const byte btn)


Get button long press count.

byte ButtonShortReleaseCount (const byte btn)


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1289

Get button short release count.

byte ButtonLongReleaseCount (const byte btn)


Get button long release count.

byte ButtonReleaseCount (const byte btn)


Get button release count.

byte ButtonState (const byte btn)


Get button state.

void SetButtonLongPressCount (const byte btn, const byte n)


Set button long press count.

void SetButtonLongReleaseCount (const byte btn, const byte n)


Set button long release count.

void SetButtonPressCount (const byte btn, const byte n)


Set button press count.

void SetButtonReleaseCount (const byte btn, const byte n)


Set button release count.

void SetButtonShortReleaseCount (const byte btn, const byte n)


Set button short release count.

void SetButtonState (const byte btn, const byte state)


Set button state.

void SysReadButton (ReadButtonType &args)


Read button.

byte CommandFlags (void)


Get command ags.

byte UIState (void)


Get UI module state.

byte UIButton (void)


Read UI button.

byte VMRunState (void)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1290

Read VM run state.

byte BatteryState (void)


Get battery state.

byte BluetoothState (void)


Get bluetooth state.

byte UsbState (void)


Get UI module USB state.

byte SleepTimeout (void)


Read sleep timeout.

byte SleepTime (void)


Read sleep time.

byte SleepTimer (void)


Read sleep timer.

bool RechargeableBattery (void)


Read battery type.

byte Volume (void)


Read volume.

byte OnBrickProgramPointer (void)


Read the on brick program pointer value.

byte AbortFlag (void)


Read abort ag.

byte LongAbort (void)


Read long abort setting.

unsigned int BatteryLevel (void)


Get battery Level.

void SetCommandFlags (const byte cmdFlags)


Set command ags.

void SetUIButton (byte btn)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1291

Set UI button.

void SetUIState (byte state)


Set UI state.

void SetVMRunState (const byte vmRunState)


Set VM run state.

void SetBatteryState (byte state)


Set battery state.

void SetBluetoothState (byte state)


Set bluetooth state.

void SetSleepTimeout (const byte n)


Set sleep timeout.

void SetSleepTime (const byte n)


Set sleep time.

void SetSleepTimer (const byte n)


Set the sleep timer.

void SetVolume (byte volume)


Set volume.

void SetOnBrickProgramPointer (byte obpStep)


Set on-brick program pointer.

void ForceOff (byte num)


Turn off NXT.

void SetAbortFlag (byte abortFlag)


Set abort ag.

void SetLongAbort (bool longAbort)


Set long abort.

void SysSetSleepTimeout (SetSleepTimeoutType &args)


Set system sleep timeout.

unsigned int FreeMemory (void)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1292

Get free ash memory.

unsigned int CreateFile (string fname, unsigned int fsize, byte &handle)
Create a le.

unsigned int OpenFileAppend (string fname, unsigned int &fsize, byte &handle)
Open a le for appending.

unsigned int OpenFileRead (string fname, unsigned int &fsize, byte &handle)
Open a le for reading.

unsigned int CloseFile (byte handle)


Close a le.

unsigned int ResolveHandle (string lename, byte &handle, bool &writeable)


Resolve a handle.

unsigned int RenameFile (string oldname, string newname)


Rename a le.

unsigned int DeleteFile (string fname)


Delete a le.

unsigned int ResizeFile (string fname, const unsigned int newsize)


Resize a le.

unsigned int CreateFileLinear (string fname, unsigned int fsize, byte &handle)
Create a linear le.

unsigned int CreateFileNonLinear (string fname, unsigned int fsize, byte &handle)
Create a non-linear le.

unsigned int OpenFileReadLinear (string fname, unsigned int &fsize, byte &handle)
Open a linear le for reading.

unsigned int FindFirstFile (string &fname, byte &handle)


Start searching for les.

unsigned int FindNextFile (string &fname, byte &handle)


Continue searching for les.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1293

unsigned int SizeOf (variant &value)


Calculate the size of a variable.

unsigned int Read (byte handle, variant &value)


Read a value from a le.

unsigned int ReadLn (byte handle, variant &value)


Read a value from a le plus line ending.

unsigned int ReadBytes (byte handle, unsigned int &length, byte &buf[ ])
Read bytes from a le.

unsigned int ReadLnString (byte handle, string &output)


Read a string from a le plus line ending.

unsigned int Write (byte handle, const variant &value)


Write value to le.

unsigned int WriteBytes (byte handle, const byte &buf[ ], unsigned int &cnt)
Write bytes to le.

unsigned int WriteBytesEx (byte handle, unsigned int &len, const byte &buf[ ])
Write bytes to a le with limit.

unsigned int WriteLn (byte handle, const variant &value)


Write a value and new line to a le.

unsigned int WriteLnString (byte handle, const string &str, unsigned int &cnt)
Write string and new line to a le.

unsigned int WriteString (byte handle, const string &str, unsigned int &cnt)
Write string to a le.

void SysFileOpenRead (FileOpenType &args)


Open le for reading.

void SysFileOpenWrite (FileOpenType &args)


Open and create le for writing.

void SysFileOpenAppend (FileOpenType &args)


Open le for writing at end of le.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1294

void SysFileRead (FileReadWriteType &args)


Read from le.

void SysFileWrite (FileReadWriteType &args)


File write.

void SysFileClose (FileCloseType &args)


Close le handle.

void SysFileResolveHandle (FileResolveHandleType &args)


File resolve handle.

void SysFileRename (FileRenameType &args)


Rename le.

void SysFileDelete (FileDeleteType &args)


Delete le.

void SysLoaderExecuteFunction (LoaderExecuteFunctionType &args)


Execute any Loader module command.

void SysFileFindFirst (FileFindType &args)


Start nding les.

void SysFileFindNext (FileFindType &args)


Continue nding les.

void SysFileOpenWriteLinear (FileOpenType &args)


Open and create linear le for writing.

void SysFileOpenWriteNonLinear (FileOpenType &args)


Open and create non-linear le for writing.

void SysFileOpenReadLinear (FileOpenType &args)


Open linear le for reading.

void SysFileSeek (FileSeekType &args)


Seek to le position.

void SysFileResize (FileResizeType &args)


Resize a le.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1295

void SysFileTell (FileTellType &args)


Return the le position.

void SysListFiles (ListFilesType &args)


List les.

int SensorHTGyro (const byte &port, int offset=0)


Read HiTechnic Gyro sensor.

int SensorHTMagnet (const byte &port, int offset=0)


Read HiTechnic Magnet sensor.

int SensorHTEOPD (const byte &port)


Read HiTechnic EOPD sensor.

void SetSensorHTEOPD (const byte &port, bool bStandard)


Set sensor as HiTechnic EOPD.

void SetSensorHTGyro (const byte &port)


Set sensor as HiTechnic Gyro.

void SetSensorHTMagnet (const byte &port)


Set sensor as HiTechnic Magnet.

int SensorHTColorNum (const byte &port)


Read HiTechnic color sensor color number.

int SensorHTCompass (const byte &port)


Read HiTechnic compass.

int SensorHTIRSeekerDir (const byte &port)


Read HiTechnic IRSeeker direction.

int SensorHTIRSeeker2Addr (const byte &port, const byte reg)


Read HiTechnic IRSeeker2 register.

int SensorHTIRSeeker2DCDir (const byte &port)


Read HiTechnic IRSeeker2 DC direction.

int SensorHTIRSeeker2ACDir (const byte &port)


Read HiTechnic IRSeeker2 AC direction.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1296

char SetHTColor2Mode (const byte &port, byte mode)


Set HiTechnic Color2 mode.

char SetHTIRSeeker2Mode (const byte &port, const byte mode)


Set HiTechnic IRSeeker2 mode.

bool ReadSensorHTAccel (const byte port, int &x, int &y, int &z)
Read HiTechnic acceleration values.

bool ReadSensorHTColor (const byte port, byte &ColorNum, byte &Red, byte &Green, byte &Blue)
Read HiTechnic Color values.

bool ReadSensorHTIRSeeker (const byte port, byte &dir, byte &s1, byte &s3, byte &s5, byte &s7, byte &s9)
Read HiTechnic IRSeeker values.

bool ReadSensorHTNormalizedColor (const byte port, byte &ColorIdx, byte &Red, byte &Green, byte &Blue)
Read HiTechnic Color normalized values.

bool ReadSensorHTRawColor (const byte port, unsigned int &Red, unsigned int &Green, unsigned int &Blue)
Read HiTechnic Color raw values.

bool ReadSensorHTColor2Active (byte port, byte &ColorNum, byte &Red, byte &Green, byte &Blue, byte &White)
Read HiTechnic Color2 active values.

bool ReadSensorHTNormalizedColor2Active (const byte port, byte &ColorIdx, byte &Red, byte &Green, byte &Blue)
Read HiTechnic Color2 normalized active values.

bool ReadSensorHTRawColor2 (const byte port, unsigned int &Red, unsigned int &Green, unsigned int &Blue, unsigned int &White)
Read HiTechnic Color2 raw values.

bool ReadSensorHTIRReceiver (const byte port, char &pfdata[ ])


Read HiTechnic IRReceiver Power Function bytes.

bool ReadSensorHTIRReceiverEx (const byte port, const byte offset, char &pfchar)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1297

Read HiTechnic IRReceiver Power Function value.

bool ReadSensorHTIRSeeker2AC (const byte port, byte &dir, byte &s1, byte &s3, byte &s5, byte &s7, byte &s9)
Read HiTechnic IRSeeker2 AC values.

bool ReadSensorHTIRSeeker2DC (const byte port, byte &dir, byte &s1, byte &s3, byte &s5, byte &s7, byte &s9, byte &avg)
Read HiTechnic IRSeeker2 DC values.

char ResetSensorHTAngle (const byte port, const byte mode)


Reset HiTechnic Angle sensor.

bool ReadSensorHTAngle (const byte port, int &Angle, long &AccAngle, int &RPM)
Read HiTechnic Angle sensor values.

void ReadSensorHTTouchMultiplexer (const byte port, byte &t1, byte &t2, byte &t3, byte &t4)
Read HiTechnic touch multiplexer.

char HTIRTrain (const byte port, const byte channel, const byte func)
HTIRTrain function.

char HTPFComboDirect (const byte port, const byte channel, const byte outa, const byte outb)
HTPFComboDirect function.

char HTPFComboPWM (const byte port, const byte channel, const byte outa, const byte outb)
HTPFComboPWM function.

char HTPFRawOutput (const byte port, const byte nibble0, const byte nibble1, const byte nibble2)
HTPFRawOutput function.

char HTPFRepeat (const byte port, const byte count, const unsigned int delay)
HTPFRepeat function.

char HTPFSingleOutputCST (const byte port, const byte channel, const byte out, const byte func)
HTPFSingleOutputCST function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1298

char HTPFSingleOutputPWM (const byte port, const byte channel, const byte out, const byte func)
HTPFSingleOutputPWM function.

char HTPFSinglePin (const byte port, const byte channel, const byte out, const byte pin, const byte func, bool cont)
HTPFSinglePin function.

char HTPFTrain (const byte port, const byte channel, const byte func)
HTPFTrain function.

void HTRCXSetIRLinkPort (const byte port)


HTRCXSetIRLinkPort function.

int HTRCXBatteryLevel (void)


HTRCXBatteryLevel function.

int HTRCXPoll (const byte src, const byte value)


HTRCXPoll function Send the Poll command to an RCX to read a signed 2-byte value at the specied source and value combination.

int HTRCXPollMemory (const unsigned int address)


HTRCXPollMemory function.

void HTRCXAddToDatalog (const byte src, const unsigned int value)


HTRCXAddToDatalog function.

void HTRCXClearAllEvents (void)


HTRCXClearAllEvents function.

void HTRCXClearCounter (const byte counter)


HTRCXClearCounter function.

void HTRCXClearMsg (void)


HTRCXClearMsg function.

void HTRCXClearSensor (const byte port)


HTRCXClearSensor function.

void HTRCXClearSound (void)


HTRCXClearSound function.

void HTRCXClearTimer (const byte timer)


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1299

HTRCXClearTimer function.

void HTRCXCreateDatalog (const unsigned int size)


HTRCXCreateDatalog function.

void HTRCXDecCounter (const byte counter)


HTRCXDecCounter function.

void HTRCXDeleteSub (const byte s)


HTRCXDeleteSub function.

void HTRCXDeleteSubs (void)


HTRCXDeleteSubs function.

void HTRCXDeleteTask (const byte t)


HTRCXDeleteTask function.

void HTRCXDeleteTasks (void)


HTRCXDeleteTasks function.

void HTRCXDisableOutput (const byte outputs)


HTRCXDisableOutput function.

void HTRCXEnableOutput (const byte outputs)


HTRCXEnableOutput function.

void HTRCXEvent (const byte src, const unsigned int value)


HTRCXEvent function.

void HTRCXFloat (const byte outputs)


HTRCXFloat function.

void HTRCXFwd (const byte outputs)


HTRCXFwd function.

void HTRCXIncCounter (const byte counter)


HTRCXIncCounter function.

void HTRCXInvertOutput (const byte outputs)


HTRCXInvertOutput function.

void HTRCXMuteSound (void)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1300

HTRCXMuteSound function.

void HTRCXObvertOutput (const byte outputs)


HTRCXObvertOutput function.

void HTRCXOff (const byte outputs)


HTRCXOff function.

void HTRCXOn (const byte outputs)


HTRCXOn function.

void HTRCXOnFor (const byte outputs, const unsigned int ms)


HTRCXOnFor function.

void HTRCXOnFwd (const byte outputs)


HTRCXOnFwd function.

void HTRCXOnRev (const byte outputs)


HTRCXOnRev function.

void HTRCXPBTurnOff (void)


HTRCXPBTurnOff function.

void HTRCXPing (void)


HTRCXPing function.

void HTRCXPlaySound (const byte snd)


HTRCXPlaySound function.

void HTRCXPlayTone (const unsigned int freq, const byte duration)


HTRCXPlayTone function.

void HTRCXPlayToneVar (const byte varnum, const byte duration)


HTRCXPlayToneVar function.

void HTRCXRemote (unsigned int cmd)


HTRCXRemote function.

void HTRCXRev (const byte outputs)


HTRCXRev function.

void HTRCXSelectDisplay (const byte src, const unsigned int value)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1301

HTRCXSelectDisplay function.

void HTRCXSelectProgram (const byte prog)


HTRCXSelectProgram function.

void HTRCXSendSerial (const byte rst, const byte count)


HTRCXSendSerial function.

void HTRCXSetDirection (const byte outputs, const byte dir)


HTRCXSetDirection function.

void HTRCXSetEvent (const byte evt, const byte src, const byte type)
HTRCXSetEvent function.

void HTRCXSetGlobalDirection (const byte outputs, const byte dir)


HTRCXSetGlobalDirection function.

void HTRCXSetGlobalOutput (const byte outputs, const byte mode)


HTRCXSetGlobalOutput function.

void HTRCXSetMaxPower (const byte outputs, const byte pwrsrc, const byte pwrval)
HTRCXSetMaxPower function.

void HTRCXSetMessage (const byte msg)


HTRCXSetMessage function.

void HTRCXSetOutput (const byte outputs, const byte mode)


HTRCXSetOutput function.

void HTRCXSetPower (const byte outputs, const byte pwrsrc, const byte pwrval)
HTRCXSetPower function.

void HTRCXSetPriority (const byte p)


HTRCXSetPriority function.

void HTRCXSetSensorMode (const byte port, const byte mode)


HTRCXSetSensorMode function.

void HTRCXSetSensorType (const byte port, const byte type)


HTRCXSetSensorType function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1302

void HTRCXSetSleepTime (const byte t)


HTRCXSetSleepTime function.

void HTRCXSetTxPower (const byte pwr)


HTRCXSetTxPower function.

void HTRCXSetWatch (const byte hours, const byte minutes)


HTRCXSetWatch function.

void HTRCXStartTask (const byte t)


HTRCXStartTask function.

void HTRCXStopAllTasks (void)


HTRCXStopAllTasks function.

void HTRCXStopTask (const byte t)


HTRCXStopTask function.

void HTRCXToggle (const byte outputs)


HTRCXToggle function.

void HTRCXUnmuteSound (void)


HTRCXUnmuteSound function.

void HTScoutCalibrateSensor (void)


HTScoutCalibrateSensor function.

void HTScoutMuteSound (void)


HTScoutMuteSound function.

void HTScoutSelectSounds (const byte grp)


HTScoutSelectSounds function.

void HTScoutSendVLL (const byte src, const unsigned int value)


HTScoutSendVLL function.

void HTScoutSetEventFeedback (const byte src, const unsigned int value)


HTScoutSetEventFeedback function.

void HTScoutSetLight (const byte x)


HTScoutSetLight function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1303

void HTScoutSetScoutMode (const byte mode)


HTScoutSetScoutMode function.

void HTScoutSetSensorClickTime (const byte src, const unsigned int value)


HTScoutSetSensorClickTime function.

void HTScoutSetSensorHysteresis (const byte src, const unsigned int value)


HTScoutSetSensorHysteresis function.

void HTScoutSetSensorLowerLimit (const byte src, const unsigned int value)


HTScoutSetSensorLowerLimit function.

void HTScoutSetSensorUpperLimit (const byte src, const unsigned int value)


HTScoutSetSensorUpperLimit function.

void HTScoutUnmuteSound (void)


HTScoutUnmuteSound function.

void SetSensorMSPressure (const byte &port)


Congure a mindsensors pressure sensor.

void SetSensorMSDROD (const byte &port, bool bActive)


Congure a mindsensors DROD sensor.

void SetSensorNXTSumoEyes (const byte &port, bool bLong)


Congure a mindsensors SumoEyes sensor.

int SensorMSPressure (const byte &port)


Read mindsensors pressure sensor.

char SensorNXTSumoEyes (const byte &port)


Read mindsensors NXTSumoEyes obstacle zone.

int SensorMSCompass (const byte &port, const byte i2caddr)


Read mindsensors compass value.

int SensorMSDROD (const byte &port)


Read mindsensors DROD value.

int SensorNXTSumoEyesRaw (const byte &port)


Read mindsensors NXTSumoEyes raw value.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1304

int SensorMSPressureRaw (const byte &port)


Read mindsensors raw pressure value.

bool ReadSensorMSAccel (const byte port, const byte i2caddr, int &x, int &y, int &z)
Read mindsensors acceleration values.

bool ReadSensorMSPlayStation (const byte port, const byte i2caddr, byte &btnset1, byte &btnset2, byte &xleft, byte &yleft, byte &xright, byte &yright)
Read mindsensors playstation controller values.

bool ReadSensorMSRTClock (const byte port, byte &sec, byte &min, byte &hrs, byte &dow, byte &date, byte &month, byte &year)
Read mindsensors RTClock values.

bool ReadSensorMSTilt (const byte &port, const byte &i2caddr, byte &x, byte &y, byte &z)
Read mindsensors tilt values.

bool PFMateSend (const byte &port, const byte &i2caddr, const byte &channel, const byte &motors, const byte &cmdA, const byte &spdA, const byte &cmdB, const byte &spdB)
Send PFMate command.

bool PFMateSendRaw (const byte &port, const byte &i2caddr, const byte &channel, const byte &b1, const byte &b2)
Send raw PFMate command.

int MSReadValue (const byte port, const byte i2caddr, const byte reg, const byte numbytes)
Read a mindsensors device value.

char MSEnergize (const byte port, const byte i2caddr)


Turn on power to device.

char MSDeenergize (const byte port, const byte i2caddr)


Turn off power to device.

char MSADPAOn (const byte port, const byte i2caddr)


Turn on mindsensors ADPA mode.

char MSADPAOff (const byte port, const byte i2caddr)


Turn off mindsensors ADPA mode.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1305

char DISTNxGP2D12 (const byte port, const byte i2caddr)


Congure DISTNx as GP2D12.

char DISTNxGP2D120 (const byte port, const byte i2caddr)


Congure DISTNx as GP2D120.

char DISTNxGP2YA02 (const byte port, const byte i2caddr)


Congure DISTNx as GP2YA02.

char DISTNxGP2YA21 (const byte port, const byte i2caddr)


Congure DISTNx as GP2YA21.

int DISTNxDistance (const byte port, const byte i2caddr)


Read DISTNx distance value.

int DISTNxMaxDistance (const byte port, const byte i2caddr)


Read DISTNx maximum distance value.

int DISTNxMinDistance (const byte port, const byte i2caddr)


Read DISTNx minimum distance value.

byte DISTNxModuleType (const byte port, const byte i2caddr)


Read DISTNx module type value.

byte DISTNxNumPoints (const byte port, const byte i2caddr)


Read DISTNx num points value.

int DISTNxVoltage (const byte port, const byte i2caddr)


Read DISTNx voltage value.

char ACCLNxCalibrateX (const byte port, const byte i2caddr)


Calibrate ACCL-Nx X-axis.

char ACCLNxCalibrateXEnd (const byte port, const byte i2caddr)


Stop calibrating ACCL-Nx X-axis.

char ACCLNxCalibrateY (const byte port, const byte i2caddr)


Calibrate ACCL-Nx Y-axis.

char ACCLNxCalibrateYEnd (const byte port, const byte i2caddr)


Stop calibrating ACCL-Nx Y-axis.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1306

char ACCLNxCalibrateZ (const byte port, const byte i2caddr)


Calibrate ACCL-Nx Z-axis.

char ACCLNxCalibrateZEnd (const byte port, const byte i2caddr)


Stop calibrating ACCL-Nx Z-axis.

char ACCLNxResetCalibration (const byte port, const byte i2caddr)


Reset ACCL-Nx calibration.

char SetACCLNxSensitivity (const byte port, const byte i2caddr, byte slevel)
Set ACCL-Nx sensitivity.

byte ACCLNxSensitivity (const byte port, const byte i2caddr)


Read ACCL-Nx sensitivity value.

int ACCLNxXOffset (const byte port, const byte i2caddr)


Read ACCL-Nx X offset value.

int ACCLNxXRange (const byte port, const byte i2caddr)


Read ACCL-Nx X range value.

int ACCLNxYOffset (const byte port, const byte i2caddr)


Read ACCL-Nx Y offset value.

int ACCLNxYRange (const byte port, const byte i2caddr)


Read ACCL-Nx Y range value.

int ACCLNxZOffset (const byte port, const byte i2caddr)


Read ACCL-Nx Z offset value.

int ACCLNxZRange (const byte port, const byte i2caddr)


Read ACCL-Nx Z range value.

char PSPNxDigital (const byte &port, const byte &i2caddr)


Congure PSPNx in digital mode.

char PSPNxAnalog (const byte &port, const byte &i2caddr)


Congure PSPNx in analog mode.

unsigned int NXTServoPosition (const byte &port, const byte &i2caddr, const byte servo)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1307

Read NXTServo servo position value.

byte NXTServoSpeed (const byte &port, const byte &i2caddr, const byte servo)
Read NXTServo servo speed value.

byte NXTServoBatteryVoltage (const byte &port, const byte &i2caddr)


Read NXTServo battery voltage value.

char SetNXTServoSpeed (const byte &port, const byte &i2caddr, const byte servo, const byte &speed)
Set NXTServo servo motor speed.

char SetNXTServoQuickPosition (const byte &port, const byte &i2caddr, const byte servo, const byte &qpos)
Set NXTServo servo motor quick position.

char SetNXTServoPosition (const byte &port, const byte &i2caddr, const byte servo, const byte &pos)
Set NXTServo servo motor position.

char NXTServoReset (const byte &port, const byte &i2caddr)


Reset NXTServo properties.

char NXTServoHaltMacro (const byte &port, const byte &i2caddr)


Halt NXTServo macro.

char NXTServoResumeMacro (const byte &port, const byte &i2caddr)


Resume NXTServo macro.

char NXTServoPauseMacro (const byte &port, const byte &i2caddr)


Pause NXTServo macro.

char NXTServoInit (const byte &port, const byte &i2caddr, const byte servo)
Initialize NXTServo servo properties.

char NXTServoGotoMacroAddress (const byte &port, const byte &i2caddr, const byte &macro)
Goto NXTServo macro address.

char NXTServoEditMacro (const byte &port, const byte &i2caddr)


Edit NXTServo macro.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1308

char NXTServoQuitEdit (const byte &port)


Quit NXTServo macro edit mode.

char NXTHIDAsciiMode (const byte &port, const byte &i2caddr)


Set NXTHID into ASCII data mode.

char NXTHIDDirectMode (const byte &port, const byte &i2caddr)


Set NXTHID into direct data mode.

char NXTHIDTransmit (const byte &port, const byte &i2caddr)


Transmit NXTHID character.

char NXTHIDLoadCharacter (const byte &port, const byte &i2caddr, const byte &modier, const byte &character)
Load NXTHID character.

char NXTPowerMeterResetCounters (const byte &port, const byte &i2caddr)


Reset NXTPowerMeter counters.

int NXTPowerMeterPresentCurrent (const byte &port, const byte &i2caddr)


Read NXTPowerMeter present current.

int NXTPowerMeterPresentVoltage (const byte &port, const byte &i2caddr)


Read NXTPowerMeter present voltage.

int NXTPowerMeterCapacityUsed (const byte &port, const byte &i2caddr)


Read NXTPowerMeter capacity used.

int NXTPowerMeterPresentPower (const byte &port, const byte &i2caddr)


Read NXTPowerMeter present power.

long NXTPowerMeterTotalPowerConsumed (const byte &port, const byte &i2caddr)


Read NXTPowerMeter total power consumed.

int NXTPowerMeterMaxCurrent (const byte &port, const byte &i2caddr)


Read NXTPowerMeter maximum current.

int NXTPowerMeterMinCurrent (const byte &port, const byte &i2caddr)


Read NXTPowerMeter minimum current.

int NXTPowerMeterMaxVoltage (const byte &port, const byte &i2caddr)


Read NXTPowerMeter maximum voltage.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1309

int NXTPowerMeterMinVoltage (const byte &port, const byte &i2caddr)


Read NXTPowerMeter minimum voltage.

long NXTPowerMeterElapsedTime (const byte &port, const byte &i2caddr)


Read NXTPowerMeter elapsed time.

int NXTPowerMeterErrorCount (const byte &port, const byte &i2caddr)


Read NXTPowerMeter error count.

char NXTLineLeaderPowerDown (const byte &port, const byte &i2caddr)


Powerdown NXTLineLeader device.

char NXTLineLeaderPowerUp (const byte &port, const byte &i2caddr)


Powerup NXTLineLeader device.

char NXTLineLeaderInvert (const byte &port, const byte &i2caddr)


Invert NXTLineLeader colors.

char NXTLineLeaderReset (const byte &port, const byte &i2caddr)


Reset NXTLineLeader color inversion.

char NXTLineLeaderSnapshot (const byte &port, const byte &i2caddr)


Take NXTLineLeader line snapshot.

char NXTLineLeaderCalibrateWhite (const byte &port, const byte &i2caddr)


Calibrate NXTLineLeader white color.

char NXTLineLeaderCalibrateBlack (const byte &port, const byte &i2caddr)


Calibrate NXTLineLeader black color.

char NXTLineLeaderSteering (const byte &port, const byte &i2caddr)


Read NXTLineLeader steering.

char NXTLineLeaderAverage (const byte &port, const byte &i2caddr)


Read NXTLineLeader average.

byte NXTLineLeaderResult (const byte &port, const byte &i2caddr)


Read NXTLineLeader result.

char SetNXTLineLeaderSetpoint (const byte &port, const byte &i2caddr, const byte &value)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1310

Write NXTLineLeader setpoint.

char SetNXTLineLeaderKpValue (const byte &port, const byte &i2caddr, const byte &value)
Write NXTLineLeader Kp value.

char SetNXTLineLeaderKiValue (const byte &port, const byte &i2caddr, const byte &value)
Write NXTLineLeader Ki value.

char SetNXTLineLeaderKdValue (const byte &port, const byte &i2caddr, const byte &value)
Write NXTLineLeader Kd value.

char SetNXTLineLeaderKpFactor (const byte &port, const byte &i2caddr, const byte &value)
Write NXTLineLeader Kp factor.

char SetNXTLineLeaderKiFactor (const byte &port, const byte &i2caddr, const byte &value)
Write NXTLineLeader Ki factor.

char SetNXTLineLeaderKdFactor (const byte &port, const byte &i2caddr, const byte &value)
Write NXTLineLeader Kd factor.

char NRLink2400 (const byte port, const byte i2caddr)


Congure NRLink in 2400 baud mode.

char NRLink4800 (const byte port, const byte i2caddr)


Congure NRLink in 4800 baud mode.

char NRLinkFlush (const byte port, const byte i2caddr)


Flush NRLink buffers.

char NRLinkIRLong (const byte port, const byte i2caddr)


Congure NRLink in IR long mode.

char NRLinkIRShort (const byte port, const byte i2caddr)


Congure NRLink in IR short mode.

char NRLinkSetPF (const byte port, const byte i2caddr)


Congure NRLink in power function mode.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1311

char NRLinkSetRCX (const byte port, const byte i2caddr)


Congure NRLink in RCX mode.

char NRLinkSetTrain (const byte port, const byte i2caddr)


Congure NRLink in IR train mode.

char NRLinkTxRaw (const byte port, const byte i2caddr)


Congure NRLink in raw IR transmit mode.

byte NRLinkStatus (const byte port, const byte i2caddr)


Read NRLink status.

char RunNRLinkMacro (const byte port, const byte i2caddr, const byte macro)
Run NRLink macro.

char WriteNRLinkBytes (const byte port, const byte i2caddr, const byte data[ ])
Write data to NRLink.

bool ReadNRLinkBytes (const byte port, const byte i2caddr, byte &data[ ])
Read data from NRLink.

char MSIRTrain (const byte port, const byte i2caddr, const byte channel, const byte func)
MSIRTrain function.

char MSPFComboDirect (const byte port, const byte i2caddr, const byte channel, const byte outa, const byte outb)
MSPFComboDirect function.

char MSPFComboPWM (const byte port, const byte i2caddr, const byte channel, const byte outa, const byte outb)
MSPFComboPWM function.

char MSPFRawOutput (const byte port, const byte i2caddr, const byte nibble0, const byte nibble1, const byte nibble2)
MSPFRawOutput function.

char MSPFRepeat (const byte port, const byte i2caddr, const byte count, const unsigned int delay)
MSPFRepeat function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1312

char MSPFSingleOutputCST (const byte port, const byte i2caddr, const byte channel, const byte out, const byte func)
MSPFSingleOutputCST function.

char MSPFSingleOutputPWM (const byte port, const byte i2caddr, const byte channel, const byte out, const byte func)
MSPFSingleOutputPWM function.

char MSPFSinglePin (const byte port, const byte i2caddr, const byte channel, const byte out, const byte pin, const byte func, bool cont)
MSPFSinglePin function.

char MSPFTrain (const byte port, const byte i2caddr, const byte channel, const byte func)
MSPFTrain function.

void MSRCXSetNRLinkPort (const byte port, const byte i2caddr)


MSRCXSetIRLinkPort function.

int MSRCXBatteryLevel (void)


MSRCXBatteryLevel function.

int MSRCXPoll (const byte src, const byte value)


MSRCXPoll function.

int MSRCXPollMemory (const unsigned int address)


MSRCXPollMemory function.

void MSRCXAbsVar (const byte varnum, const byte byte src, const unsigned int value)
MSRCXAbsVar function.

void MSRCXAddToDatalog (const byte src, const unsigned int value)


MSRCXAddToDatalog function.

void MSRCXAndVar (const byte varnum, const byte src, const unsigned int value)
MSRCXAndVar function.

void MSRCXBoot (void)


MSRCXBoot function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1313

void MSRCXCalibrateEvent (const byte evt, const byte low, const byte hi, const byte hyst)
MSRCXCalibrateEvent function.

void MSRCXClearAllEvents (void)


MSRCXClearAllEvents function.

void MSRCXClearCounter (const byte counter)


MSRCXClearCounter function.

void MSRCXClearMsg (void)


MSRCXClearMsg function.

void MSRCXClearSensor (const byte port)


MSRCXClearSensor function.

void MSRCXClearSound (void)


MSRCXClearSound function.

void MSRCXClearTimer (const byte timer)


MSRCXClearTimer function.

void MSRCXCreateDatalog (const unsigned int size)


MSRCXCreateDatalog function.

void MSRCXDecCounter (const byte counter)


MSRCXDecCounter function.

void MSRCXDeleteSub (const byte s)


MSRCXDeleteSub function.

void MSRCXDeleteSubs (void)


MSRCXDeleteSubs function.

void MSRCXDeleteTask (const byte t)


MSRCXDeleteTask function.

void MSRCXDeleteTasks (void)


MSRCXDeleteTasks function.

void MSRCXDisableOutput (const byte outputs)


MSRCXDisableOutput function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1314

void MSRCXDivVar (const byte varnum, const byte src, const unsigned int value)
MSRCXDivVar function.

void MSRCXEnableOutput (const byte outputs)


MSRCXEnableOutput function.

void MSRCXEvent (const byte src, const unsigned int value)


MSRCXEvent function.

void MSRCXFloat (const byte outputs)


MSRCXFloat function.

void MSRCXFwd (const byte outputs)


MSRCXFwd function.

void MSRCXIncCounter (const byte counter)


MSRCXIncCounter function.

void MSRCXInvertOutput (const byte outputs)


MSRCXInvertOutput function.

void MSRCXMulVar (const byte varnum, const byte src, unsigned int value)
MSRCXMulVar function.

void MSRCXMuteSound (void)


MSRCXMuteSound function.

void MSRCXObvertOutput (const byte outputs)


MSRCXObvertOutput function.

void MSRCXOff (const byte outputs)


MSRCXOff function.

void MSRCXOn (const byte outputs)


MSRCXOn function.

void MSRCXOnFor (const byte outputs, const unsigned int ms)


MSRCXOnFor function.

void MSRCXOnFwd (const byte outputs)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1315

MSRCXOnFwd function.

void MSRCXOnRev (const byte outputs)


MSRCXOnRev function.

void MSRCXOrVar (const byte varnum, const byte src, const unsigned int value)
MSRCXOrVar function.

void MSRCXPBTurnOff (void)


MSRCXPBTurnOff function.

void MSRCXPing (void)


MSRCXPing function.

void MSRCXPlaySound (const byte snd)


MSRCXPlaySound function.

void MSRCXPlayTone (const unsigned int freq, const byte duration)


MSRCXPlayTone function.

void MSRCXPlayToneVar (const byte varnum, const byte duration)


MSRCXPlayToneVar function.

void MSRCXRemote (unsigned int cmd)


MSRCXRemote function.

void MSRCXReset (void)


MSRCXReset function.

void MSRCXRev (const byte outputs)


MSRCXRev function.

void MSRCXSelectDisplay (const byte src, const unsigned int value)


MSRCXSelectDisplay function.

void MSRCXSelectProgram (const byte prog)


MSRCXSelectProgram function.

void MSRCXSendSerial (const byte rst, const byte count)


MSRCXSendSerial function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1316

void MSRCXSet (const byte dstsrc, const byte dstval, const byte src, unsigned int value)
MSRCXSet function.

void MSRCXSetDirection (const byte outputs, const byte dir)


MSRCXSetDirection function.

void MSRCXSetEvent (const byte evt, const byte src, const byte type)
MSRCXSetEvent function.

void MSRCXSetGlobalDirection (const byte outputs, const byte dir)


MSRCXSetGlobalDirection function.

void MSRCXSetGlobalOutput (const byte outputs, const byte mode)


MSRCXSetGlobalOutput function.

void MSRCXSetMaxPower (const byte outputs, const byte pwrsrc, const byte pwrval)
MSRCXSetMaxPower function.

void MSRCXSetMessage (const byte msg)


MSRCXSetMessage function.

void MSRCXSetOutput (const byte outputs, const byte mode)


MSRCXSetOutput function.

void MSRCXSetPower (const byte outputs, const byte pwrsrc, const byte pwrval)
MSRCXSetPower function.

void MSRCXSetPriority (const byte p)


MSRCXSetPriority function.

void MSRCXSetSensorMode (const byte port, const byte mode)


MSRCXSetSensorMode function.

void MSRCXSetSensorType (const byte port, const byte type)


MSRCXSetSensorType function.

void MSRCXSetSleepTime (const byte t)


MSRCXSetSleepTime function.

void MSRCXSetTxPower (const byte pwr)


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1317

MSRCXSetTxPower function.

void MSRCXSetUserDisplay (const byte src, const unsigned int value, const byte precision)
MSRCXSetUserDisplay function.

void MSRCXSetVar (const byte varnum, const byte src, const unsigned int value)
MSRCXSetVar function.

void MSRCXSetWatch (const byte hours, const byte minutes)


MSRCXSetWatch function.

void MSRCXSgnVar (const byte varnum, const byte src, const unsigned int value)
MSRCXSgnVar function.

void MSRCXStartTask (const byte t)


MSRCXStartTask function.

void MSRCXStopAllTasks (void)


MSRCXStopAllTasks function.

void MSRCXStopTask (const byte t)


MSRCXStopTask function.

void MSRCXSubVar (const byte varnum, const byte src, const unsigned int value)
MSRCXSubVar function.

void MSRCXSumVar (const byte varnum, const byte src, const unsigned int value)
MSRCXSumVar function.

void MSRCXToggle (const byte outputs)


MSRCXToggle function.

void MSRCXUnlock (void)


MSRCXUnlock function.

void MSRCXUnmuteSound (void)


MSRCXUnmuteSound function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1318

void MSScoutCalibrateSensor (void)


MSScoutCalibrateSensor function.

void MSScoutMuteSound (void)


MSScoutMuteSound function.

void MSScoutSelectSounds (const byte grp)


MSScoutSelectSounds function.

void MSScoutSendVLL (const byte src, const unsigned int value)


MSScoutSendVLL function.

void MSScoutSetCounterLimit (const byte ctr, const byte src, const unsigned int value)
MSScoutSetCounterLimit function.

void MSScoutSetEventFeedback (const byte src, const unsigned int value)


MSScoutSetEventFeedback function.

void MSScoutSetLight (const byte x)


MSScoutSetLight function.

void MSScoutSetScoutMode (const byte mode)


MSScoutSetScoutMode function.

void MSScoutSetScoutRules (const byte m, const byte t, const byte l, const byte tm, const byte fx)
MSScoutSetScoutRules function.

void MSScoutSetSensorClickTime (const byte src, const unsigned int value)


MSScoutSetSensorClickTime function.

void MSScoutSetSensorHysteresis (const byte src, const unsigned int value)


MSScoutSetSensorHysteresis function.

void MSScoutSetSensorLowerLimit (const byte src, const unsigned int value)


MSScoutSetSensorLowerLimit function.

void MSScoutSetSensorUpperLimit (const byte src, const unsigned int value)


MSScoutSetSensorUpperLimit function.

void MSScoutSetTimerLimit (const byte tmr, const byte src, const unsigned int value)
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1319

MSScoutSetTimerLimit function.

void MSScoutUnmuteSound (void)


MSScoutUnmuteSound function.

bool RFIDInit (const byte &port)


RFIDInit function.

bool RFIDMode (const byte &port, const byte &mode)


RFIDMode function.

byte RFIDStatus (const byte &port)


RFIDStatus function.

bool RFIDRead (const byte &port, byte &output[ ])


RFIDRead function.

bool RFIDStop (const byte &port)


RFIDStop function.

bool RFIDReadSingle (const byte &port, byte &output[ ])


RFIDReadSingle function.

bool RFIDReadContinuous (const byte &port, byte &output[ ])


RFIDReadContinuous function.

oat sqrt (oat x)


Compute square root.

oat cos (oat x)


Compute cosine.

oat sin (oat x)


Compute sine.

oat tan (oat x)


Compute tangent.

oat acos (oat x)


Compute arc cosine.

oat asin (oat x)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1320

Compute arc sine.

oat atan (oat x)


Compute arc tangent.

oat atan2 (oat y, oat x)


Compute arc tangent with 2 parameters.

oat cosh (oat x)


Compute hyperbolic cosine.

oat sinh (oat x)


Compute hyperbolic sine.

oat tanh (oat x)


Compute hyperbolic tangent.

oat exp (oat x)


Compute exponential function.

oat log (oat x)


Compute natural logarithm.

oat log10 (oat x)


Compute common logarithm.

long trunc (oat x)


Compute integral part.

oat frac (oat x)


Compute fractional part.

oat pow (oat base, oat exponent)


Raise to power.

oat ceil (oat x)


Round up value.

oat oor (oat x)


Round down value.

long muldiv32 (long a, long b, long c)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1321

Multiply and divide.

oat cosd (oat x)


Compute cosine (degrees).

oat sind (oat x)


Compute sine (degrees).

oat tand (oat x)


Compute tangent (degrees).

oat acosd (oat x)


Compute arc cosine (degrees).

oat asind (oat x)


Compute arc sine (degrees).

oat atand (oat x)


Compute arc tangent (degrees).

oat atan2d (oat y, oat x)


Compute arc tangent with 2 parameters (degrees).

oat coshd (oat x)


Compute hyperbolic cosine (degrees).

oat sinhd (oat x)


Compute hyperbolic sine (degrees).

oat tanhd (oat x)


Compute hyperbolic tangent (degrees).

byte bcd2dec (byte bcd)


Convert from BCD to decimal Return the decimal equivalent of the binary coded decimal value provided.

bool isNAN (oat value)


Is the value NaN.

char sign (variant num)


Sign value.

int fclose (byte handle)


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1322

Close le.

int remove (string lename)


Remove le.

int rename (string old, string new)


Rename le.

char fgetc (byte handle)


Get character from le.

string fgets (string &str, int num, byte handle)


Get string from le.

int feof (byte handle)


Check End-of-le indicator.

void set_fopen_size (unsigned long fsize)


Set the default fopen le size.

byte fopen (string lename, const string mode)


Open le.

int fush (byte handle)


Flush le.

unsigned long ftell (byte handle)


Get current position in le.

char fputc (char ch, byte handle)


Write character to le.

int fputs (string str, byte handle)


Write string to le.

void printf (string format, variant value)


Print formatted data to stdout.

void fprintf (byte handle, string format, variant value)


Write formatted data to le.

void sprintf (string &str, string format, variant value)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1323

Write formatted data to string.

int fseek (byte handle, long offset, int origin)


Reposition le position indicator.

void rewind (byte handle)


Set position indicator to the beginning.

int getchar ()
Get character from stdin.

void abort ()
Abort current process.

variant abs (variant num)


Absolute value.

unsigned int rand ()


Generate random number.

int Random (unsigned int n=0)


Generate random number.

void SysRandomNumber (RandomNumberType &args)


Draw a random number.

int atoi (const string &str)


Convert string to integer.

long atol (const string &str)


Convert string to long integer.

long labs (long n)


Absolute value.

oat atof (const string &str)


Convert string to oat.

oat strtod (const string &str, string &endptr)


Convert string to oat.

long strtol (const string &str, string &endptr, int base=10)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1324

Convert string to long integer.

long strtoul (const string &str, string &endptr, int base=10)


Convert string to unsigned long integer.

div_t div (int numer, int denom)


Integral division.

ldiv_t ldiv (long numer, long denom)


Integral division.

variant StrToNum (string str)


Convert string to number.

unsigned int StrLen (string str)


Get string length.

byte StrIndex (string str, unsigned int idx)


Extract a character from a string.

string NumToStr (variant num)


Convert number to string.

string StrCat (string str1, string str2, string strN)


Concatenate strings.

string SubStr (string str, unsigned int idx, unsigned int len)
Extract a portion of a string.

string Flatten (variant num)


Flatten a number to a string.

string StrReplace (string str, unsigned int idx, string strnew)


Replace a portion of a string.

string FormatNum (string fmt, variant num)


Format a number.

string FlattenVar (variant x)


Flatten any data to a string.

int UnattenVar (string str, variant &x)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1325

Unatten a string into a data type.

int Pos (string Substr, string S)


Find substring position.

string ByteArrayToStr (byte data[ ])


Convert a byte array to a string.

void ByteArrayToStrEx (byte data[ ], string &str)


Convert a byte array to a string.

void StrToByteArray (string str, byte &data[ ])


Convert a string to a byte array.

string Copy (string str, unsigned int idx, unsigned int len)
Copy a portion of a string.

string MidStr (string str, unsigned int idx, unsigned int len)
Copy a portion from the middle of a string.

string RightStr (string str, unsigned int size)


Copy a portion from the end of a string.

string LeftStr (string str, unsigned int size)


Copy a portion from the start of a string.

int strlen (const string &str)


Get string length.

string strcat (string &dest, const string &src)


Concatenate strings.

string strncat (string &dest, const string &src, unsigned int num)
Append characters from string.

string strcpy (string &dest, const string &src)


Copy string.

string strncpy (string &dest, const string &src, unsigned int num)
Copy characters from string.

int strcmp (const string &str1, const string &str2)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1326

Compare two strings.

int strncmp (const string &str1, const string &str2, unsigned int num)
Compare characters of two strings.

void memcpy (variant dest, variant src, byte num)


Copy memory.

void memmove (variant dest, variant src, byte num)


Move memory.

char memcmp (variant ptr1, variant ptr2, byte num)


Compare two blocks of memory.

unsigned long addressOf (variant data)


Get the absolute address of a variable.

unsigned long reladdressOf (variant data)


Get the relative address of a variable.

unsigned long addressOfEx (variant data, bool relative)


Get the absolute or relative address of a variable.

int isupper (int c)


Check if character is uppercase letter.

int islower (int c)


Check if character is lowercase letter.

int isalpha (int c)


Check if character is alphabetic.

int isdigit (int c)


Check if character is decimal digit.

int isalnum (int c)


Check if character is alphanumeric.

int isspace (int c)


Check if character is a white-space.

int iscntrl (int c)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1327

Check if character is a control character.

int isprint (int c)


Check if character is printable.

int isgraph (int c)


Check if character has graphical representation.

int ispunct (int c)


Check if character is a punctuation.

int isxdigit (int c)


Check if character is hexadecimal digit.

int toupper (int c)


Convert lowercase letter to uppercase.

int tolower (int c)


Convert uppercase letter to lowercase.

void glInit ()
Initialize graphics library.

void glSet (int glType, int glValue)


Set graphics library options.

int glBeginObject ()
Begin dening an object.

void glEndObject ()
Stop dening an object.

void glObjectAction (int glObjectId, int glAction, int glValue)


Perform an object action.

void glAddVertex (int glX, int glY, int glZ)


Add a vertex to an object.

void glBegin (int glBeginMode)


Begin a new polygon for the current object.

void glEnd ()

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1328

Finish a polygon for the current object.

void glBeginRender ()
Begin a new render.

void glCallObject (int glObjectId)


Call a graphic object.

void glFinishRender ()
Finish the current render.

void glSetAngleX (int glValue)


Set the X axis angle.

void glAddToAngleX (int glValue)


Add to the X axis angle.

void glSetAngleY (int glValue)


Set the Y axis angle.

void glAddToAngleY (int glValue)


Add to the Y axis angle.

void glSetAngleZ (int glValue)


Set the Z axis angle.

void glAddToAngleZ (int glValue)


Add to the Z axis angle.

int glSin32768 (int glAngle)


Table-based sine scaled by 32768.

int glCos32768 (int glAngle)


Table-based cosine scaled by 32768.

int glBox (int glMode, int glSizeX, int glSizeY, int glSizeZ)
Create a 3D box.

int glCube (int glMode, int glSize)


Create a 3D cube.

int glPyramid (int glMode, int glSizeX, int glSizeY, int glSizeZ)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1329

Create a 3D pyramid.

void PosRegEnable (byte output, byte p=PID_3, byte i=PID_1, byte d=PID_1)
Enable absolute position regulation with PID factors.

void PosRegSetAngle (byte output, long angle)


Change the current value for set angle.

void PosRegAddAngle (byte output, long angle_add)


Add to the current value for set angle.

void PosRegSetMax (byte output, byte max_speed, byte max_acceleration)


Set maximum limits.

Variables unsigned long __fopen_default_size = 1024 8.3.1 Detailed Description

Constants, macros, and API functions for NXC. NXCDefs.h contains declarations for the NXC NXT API resources License: The contents of this le are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this le except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specic language governing rights and limitations under the License. The Initial Developer of this code is John Hansen. Portions created by John Hansen are Copyright (C) 2009-2010 John Hansen. All Rights Reserved. ---------------------------------------------------------------------------Author: John Hansen (bricxcc_at_comcast.net) Date: 2011-03-13

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1330

Version: 92 8.3.2 8.3.2.1 Dene Documentation #dene _SENSOR_CFG(_type, _mode) (((_type)<<8)+(_mode)) Macro for dening SetSensor combined type and mode constants 8.3.2.2 #dene Acos(_X) asm { acos __FLTRETVAL__, _X }

Compute arc cosine. Computes the arc cosine of _X. Only constants or variables allowed (no expressions). Deprecated Use acos() instead. Parameters: _X Floating point value. Returns: Arc cosine of _X.

8.3.2.3

#dene AcosD(_X) asm { acosd __FLTRETVAL__, _X }

Compute arc cosine (degrees). Computes the arc cosine of _X. Only constants or variables allowed (no expressions). Deprecated Use acosd() instead. Parameters: _X Floating point value. Returns: Arc cosine of _X.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1331

8.3.2.4

#dene Asin(_X) asm { asin __FLTRETVAL__, _X }

Compute arc sine. Computes the arc sine of _X. Only constants or variables allowed (no expressions). Deprecated Use asin() instead. Parameters: _X Floating point value. Returns: Arc sine of _X.

8.3.2.5

#dene AsinD(_X) asm { asind __FLTRETVAL__, _X }

Compute arch sine (degrees). Computes the arc sine of _X. Only constants or variables allowed (no expressions). Deprecated Use asind() instead. Parameters: _X Floating point value. Returns: Arc sine of _X.

8.3.2.6

#dene Atan(_X) asm { atan __FLTRETVAL__, _X }

Compute arc tangent. Computes the arc tangent of _X. Only constants or variables allowed (no expressions). Deprecated Use atan() instead.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1332

Parameters: _X Floating point value. Returns: Arc tangent of _X.

8.3.2.7

#dene Atan2(_Y, _X) asm { atan2 __FLTRETVAL__, _Y, _X }

Compute arc tangent with 2 parameters. Computes the principal value of the arc tangent of _Y/_X, expressed in radians. To compute the value, the function uses the sign of both arguments to determine the quadrant. Only constants or variables allowed (no expressions). Deprecated Use atan2() instead. Parameters: _Y Floating point value representing a y coordinate. _X Floating point value representing an x coordinate. Returns: Arc tangent of _Y/_X, in the interval [-pi,+pi] radians.

8.3.2.8

#dene Atan2D(_Y, _X) asm { atan2d __FLTRETVAL__, _Y, _X }

Compute arc tangent with two parameters (degrees). Computes the arc tangent of _Y/_X. Only constants or variables allowed (no expressions). Deprecated Use atan2d() instead. Parameters: _Y Floating point value. _X Floating point value. Returns: Arc tangent of _Y/_X, in the interval [-180,+180] degrees.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1333

8.3.2.9

#dene AtanD(_X) asm { atand __FLTRETVAL__, _X }

Compute arc tangent (degrees). Computes the arc tangent of _X. Only constants or variables allowed (no expressions). Deprecated Use atand() instead. Parameters: _X Floating point value. Returns: Arc tangent of _X.

8.3.2.10

#dene Ceil(_X) asm { ceil __FLTRETVAL__, _X }

Round up value. Computes the smallest integral value that is not less than _X. Only constants or variables allowed (no expressions). Deprecated Use ceil() instead. Parameters: _X Floating point value. Returns: The smallest integral value not less than _X.

8.3.2.11

#dene Cos(_X) asm { cos __FLTRETVAL__, _X }

Compute cosine. Computes the cosine of _X. Only constants or variables allowed (no expressions). Deprecated Use cos() instead.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1334

Parameters: _X Floating point value. Returns: Cosine of _X.

8.3.2.12

#dene CosD(_X) asm { cosd __FLTRETVAL__, _X }

Compute cosine (degrees). Computes the cosine of _X. Only constants or variables allowed (no expressions). Deprecated Use cosd() instead. Parameters: _X Floating point value. Returns: Cosine of _X.

8.3.2.13

#dene Cosh(_X) asm { cosh __FLTRETVAL__, _X }

Compute hyperbolic cosine. Computes the hyperbolic cosine of _X. Only constants or variables allowed (no expressions). Deprecated Use cosh() instead. Parameters: _X Floating point value. Returns: Hyperbolic cosine of _X.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1335

8.3.2.14

#dene CoshD(_X) asm { coshd __FLTRETVAL__, _X }

Compute hyperbolic cosine (degrees). Computes the hyperbolic cosine of _X. Only constants or variables allowed (no expressions). Deprecated Use coshd() instead. Parameters: _X Floating point value. Returns: Hyperbolic cosine of _X.

8.3.2.15

#dene Exp(_X) asm { exp __FLTRETVAL__, _X }

Compute exponential function . Computes the base-e exponential function of _X, which is the e number raised to the power _X. Only constants or variables allowed (no expressions). Deprecated Use exp() instead. Parameters: _X Floating point value. Returns: Exponential value of _X.

8.3.2.16

#dene Floor(_X) asm { oor __FLTRETVAL__, _X }

Round down value. Computes the largest integral value that is not greater than _X. Only constants or variables allowed (no expressions).

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1336

Deprecated Use oor() instead. Parameters: _X Floating point value. Returns: The largest integral value not greater than _X.

8.3.2.17

#dene Frac(_X) asm { frac __FLTRETVAL__, _X }

Compute fractional part. Computes the fractional part of _X. Only constants or variables allowed (no expressions). Deprecated Use frac() instead. Parameters: _X Floating point value. Returns: Fractional part of _X.

8.3.2.18

#dene getc(_handle) fgetc(_handle)

Get character from le. Returns the character currently pointed to by the internal le position indicator of the le specied by the handle. The internal le position indicator is then advanced by one character to point to the next character. The functions fgetc and getc are equivalent. Parameters: _handle The handle of the le from which the character is read. Returns: The character read from the le.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1337

Examples: ex_getc.nxc.

8.3.2.19

#dene Log(_X) asm { log __FLTRETVAL__, _X }

Compute natural logarithm. Computes the natural logarithm of _X. The natural logarithm is the base-e logarithm, the inverse of the natural exponential function (exp). For base-10 logarithms, a specic function Log10() exists. Only constants or variables allowed (no expressions). Deprecated Use log() instead. Parameters: _X Floating point value. Returns: Natural logarithm of _X.

8.3.2.20

#dene Log10(_X) asm { log10 __FLTRETVAL__, _X }

Compute common logarithm. Computes the common logarithm of _X. The common logarithm is the base-10 logarithm. For base-e logarithms, a specic function Log() exists. Only constants or variables allowed (no expressions). Deprecated Use log10() instead. Parameters: _X Floating point value. Returns: Common logarithm of _X.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1338

8.3.2.21

#dene MulDiv32(_A, _B, _C) asm { muldiv __RETVAL__, _A, _B, _C }

Multiply and divide. Multiplies two 32-bit values and then divides the 64-bit result by a third 32-bit value. Only constants or variables allowed (no expressions). Deprecated Use muldiv32() instead. Parameters: _A 32-bit long value. _B 32-bit long value. _C 32-bit long value. Returns: The result of multiplying _A times _B and dividing by _C.

8.3.2.22

#dene Pow(_Base, _Exponent) asm { pow __FLTRETVAL__, _Base, _Exponent }

Raise to power. Computes _Base raised to the power _Exponent. Only constants or variables allowed (no expressions). Deprecated Use pow() instead. Parameters: _Base Floating point value. _Exponent Floating point value. Returns: The result of raising _Base to the power _Exponent.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1339

8.3.2.23

#dene putc(_ch, _handle) fputc(_ch, _handle)

Write character to le. Writes a character to the le and advances the position indicator. The character is written at the current position of the le as indicated by the internal position indicator, which is then advanced one character. If there are no errors, the same character that has been written is returned. If an error occurs, EOF is returned. Parameters: _ch The character to be written. _handle The handle of the le where the character is to be written. Returns: The character written to the le. Examples: ex_putc.nxc.

8.3.2.24

#dene RICSetValue(_data, _idx, _newval) _data[(_idx)] = (_newval)&0xFF; _data[(_idx)+1] = (_newval)>>8

Set the value of an element in an RIC data array. Parameters: _data The RIC data array _idx The array index to update _newval The new value to write into the RIC data array

8.3.2.25

#dene S1 0 Input port 1

Examples: ex_ACCLNxCalibrateX.nxc, ex_ACCLNxCalibrateXEnd.nxc, ex_ACCLNxCalibrateY.nxc, ex_ACCLNxCalibrateYEnd.nxc, ex_ACCLNxCalibrateZ.nxc, ex_ACCLNxCalibrateZEnd.nxc, ex_ACCLNxResetCalibration.nxc, ex_ACCLNxSensitivity.nxc, ex_ACCLNxXOffset.nxc, ex_ACCLNxXRange.nxc, ex_ACCLNxYOffset.nxc,
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1340

ex_ACCLNxYRange.nxc, ex_ACCLNxZOffset.nxc, ex_ACCLNxZRange.nxc, ex_ClearSensor.nxc, ex_ColorADRaw.nxc, ex_ColorBoolean.nxc, ex_ColorCalibration.nxc, ex_ColorCalibrationState.nxc, ex_ColorCalLimits.nxc, ex_ColorSensorRaw.nxc, ex_ColorSensorValue.nxc, ex_CongureTemperatureSensor.nxc, ex_CustomSensorActiveStatus.nxc, ex_CustomSensorPercentFullScale.nxc, ex_CustomSensorZeroOffset.nxc, ex_DISTNxDistance.nxc, ex_DISTNxGP2D12.nxc, ex_DISTNxGP2D120.nxc, ex_DISTNxGP2YA02.nxc, ex_DISTNxGP2YA21.nxc, ex_DISTNxMaxDistance.nxc, ex_DISTNxMinDistance.nxc, ex_DISTNxModuleType.nxc, ex_DISTNxNumPoints.nxc, ex_DISTNxVoltage.nxc, ex_GetInput.nxc, ex_GetLSInputBuffer.nxc, ex_GetLSOutputBuffer.nxc, ex_HTIRTrain.nxc, ex_HTPFComboDirect.nxc, ex_HTPFComboPWM.nxc, ex_HTPFRawOutput.nxc, ex_HTPFRepeat.nxc, ex_HTPFSingleOutputCST.nxc, ex_HTPFSingleOutputPWM.nxc, ex_HTPFSinglePin.nxc, ex_HTPFTrain.nxc, ex_HTRCXAddToDatalog.nxc, ex_HTRCXClearSensor.nxc, ex_HTRCXSetIRLinkPort.nxc, ex_HTRCXSetSensorMode.nxc, ex_HTRCXSetSensorType.nxc, ex_I2CBytesReady.nxc, ex_I2CCheckStatus.nxc, ex_i2cdeviceid.nxc, ex_i2cdeviceinfo.nxc, ex_I2CRead.nxc, ex_I2CSendCommand.nxc, ex_I2CStatus.nxc, ex_i2cvendorid.nxc, ex_i2cversion.nxc, ex_I2CWrite.nxc, ex_LowspeedBytesReady.nxc, ex_LowspeedCheckStatus.nxc, ex_LowspeedRead.nxc, ex_LowspeedStatus.nxc, ex_LowspeedWrite.nxc, ex_LSChannelState.nxc, ex_LSErrorType.nxc, ex_LSInputBufferBytesToRx.nxc, ex_LSInputBufferInPtr.nxc, ex_LSInputBufferOutPtr.nxc, ex_LSMode.nxc, ex_LSOutputBufferBytesToRx.nxc, ex_LSOutputBufferInPtr.nxc, ex_LSOutputBufferOutPtr.nxc, ex_MSADPAOff.nxc, ex_MSADPAOn.nxc, ex_MSDeenergize.nxc, ex_MSEnergize.nxc, ex_MSIRTrain.nxc, ex_MSPFComboDirect.nxc, ex_MSPFComboPWM.nxc, ex_MSPFRawOutput.nxc, ex_MSPFRepeat.nxc, ex_MSPFSingleOutputCST.nxc, ex_MSPFSingleOutputPWM.nxc, ex_MSPFSinglePin.nxc, ex_MSPFTrain.nxc, ex_MSRCXAddToDatalog.nxc, ex_MSRCXClearSensor.nxc, ex_MSRCXSetNRLinkPort.nxc, ex_MSRCXSetSensorMode.nxc, ex_MSRCXSetSensorType.nxc, ex_MSRCXSumVar.nxc, ex_MSReadValue.nxc, ex_NRLink2400.nxc, ex_NRLink4800.nxc, ex_NRLinkFlush.nxc, ex_NRLinkIRLong.nxc, ex_NRLinkIRShort.nxc, ex_NRLinkSetPF.nxc, ex_NRLinkSetRCX.nxc, ex_NRLinkSetTrain.nxc, ex_NRLinkStatus.nxc, ex_NRLinkTxRaw.nxc, ex_NXTHID.nxc, ex_NXTLineLeader.nxc, ex_NXTPowerMeter.nxc, ex_NXTServo.nxc, ex_NXTSumoEyes.nxc, ex_PFMate.nxc, ex_PSPNxAnalog.nxc, ex_PSPNxDigital.nxc, ex_readi2cregister.nxc, ex_ReadNRLinkBytes.nxc, ex_ReadSensorColorEx.nxc, ex_ReadSensorColorRaw.nxc, ex_ReadSensorEMeter.nxc, ex_ReadSensorHTAccel.nxc, ex_ReadSensorHTColor.nxc, ex_ReadSensorHTColor2Active.nxc, ex_ReadSensorHTIRReceiver.nxc, ex_ReadSensorHTIRReceiverEx.nxc, ex_ReadSensorHTIRSeeker2AC.nxc, ex_ReadSensorHTIRSeeker2DC.nxc, ex_ReadSensorHTNormalizedColor.nxc, ex_ReadSensorHTNormalizedColor2Active.nxc, ex_ReadSensorHTRawColor.nxc,
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1341

ex_ReadSensorHTRawColor2.nxc, ex_ReadSensorHTTouchMultiplexer.nxc, ex_ReadSensorMSAccel.nxc, ex_ReadSensorMSPlayStation.nxc, ex_ReadSensorMSRTClock.nxc, ex_ReadSensorMSTilt.nxc, ex_ReadSensorUSEx.nxc, ex_RemoteLowspeedRead.nxc, ex_RemoteLowspeedWrite.nxc, ex_RemoteResetScaledValue.nxc, ex_RemoteSetInputMode.nxc, ex_RFIDInit.nxc, ex_RFIDMode.nxc, ex_RFIDRead.nxc, ex_RFIDReadContinuous.nxc, ex_RFIDReadSingle.nxc, ex_RFIDStatus.nxc, ex_RFIDStop.nxc, ex_RunNRLinkMacro.nxc, ex_Sensor.nxc, ex_SensorBoolean.nxc, ex_SensorDigiPinsDirection.nxc, ex_SensorDigiPinsOutputLevel.nxc, ex_SensorDigiPinsStatus.nxc, ex_SensorHTColorNum.nxc, ex_SensorHTCompass.nxc, ex_SensorHTEOPD.nxc, ex_SensorHTGyro.nxc, ex_SensorHTIRSeeker2ACDir.nxc, ex_SensorHTIRSeeker2Addr.nxc, ex_SensorHTIRSeeker2DCDir.nxc, ex_SensorHTIRSeekerDir.nxc, ex_SensorHTMagnet.nxc, ex_SensorInvalid.nxc, ex_SensorMode.nxc, ex_SensorMSCompass.nxc, ex_SensorMSDROD.nxc, ex_SensorMSPressure.nxc, ex_SensorMSPressureRaw.nxc, ex_SensorNormalized.nxc, ex_SensorRaw.nxc, ex_SensorScaled.nxc, ex_SensorTemperature.nxc, ex_SensorType.nxc, ex_SensorValue.nxc, ex_SensorValueBool.nxc, ex_SensorValueRaw.nxc, ex_SetACCLNxSensitivity.nxc, ex_SetCustomSensorActiveStatus.nxc, ex_SetCustomSensorPercentFullScale.nxc, ex_SetCustomSensorZeroOffset.nxc, ex_sethtcolor2mode.nxc, ex_sethtirseeker2mode.nxc, ex_SetInput.nxc, ex_SetSensor.nxc, ex_setsensorboolean.nxc, ex_setsensorcolorblue.nxc, ex_setsensorcolorfull.nxc, ex_setsensorcolorgreen.nxc, ex_setsensorcolornone.nxc, ex_setsensorcolorred.nxc, ex_SetSensorDigiPinsDirection.nxc, ex_SetSensorDigiPinsOutputLevel.nxc, ex_SetSensorDigiPinsStatus.nxc, ex_SetSensorEMeter.nxc, ex_setsensorhteopd.nxc, ex_SetSensorHTGyro.nxc, ex_SetSensorHTMagnet.nxc, ex_SetSensorLight.nxc, ex_SetSensorLowspeed.nxc, ex_SetSensorMode.nxc, ex_setsensormsdrod.nxc, ex_setsensormspressure.nxc, ex_SetSensorSound.nxc, ex_SetSensorTemperature.nxc, ex_SetSensorTouch.nxc, ex_SetSensorType.nxc, ex_SetSensorUltrasonic.nxc, ex_SysColorSensorRead.nxc, ex_syscommlscheckstatus.nxc, ex_syscommlsread.nxc, ex_syscommlswrite.nxc, ex_syscommlswriteex.nxc, ex_SysComputeCalibValue.nxc, ex_writei2cregister.nxc, and ex_writenrlinkbytes.nxc.

8.3.2.26

#dene s16 int Signed 16 bit type

8.3.2.27

#dene S2 1 Input port 2

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1342

8.3.2.28

#dene S3 2 Input port 3

8.3.2.29

#dene s32 long Signed 32 bit type

8.3.2.30

#dene S4 3 Input port 4

Examples: ex_I2CBytes.nxc, ex_ReadSensorHTAngle.nxc, ex_ResetSensorHTAngle.nxc, and ex_SensorUS.nxc.

8.3.2.31

#dene s8 char Signed 8 bit type

8.3.2.32

#dene SEEK_CUR 1 Seek from the current le position

Examples: ex_fseek.nxc.

8.3.2.33

#dene SEEK_END 2 Seek from the end of the le

8.3.2.34

#dene SEEK_SET 0 Seek from the beginning of the le

Examples: ex_sysleseek.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1343

8.3.2.35

#dene SENSOR_1 Sensor(S1) Read the value of the analog sensor on port S1

8.3.2.36

#dene SENSOR_2 Sensor(S2) Read the value of the analog sensor on port S2

8.3.2.37

#dene SENSOR_3 Sensor(S3) Read the value of the analog sensor on port S3

8.3.2.38

#dene SENSOR_4 Sensor(S4) Read the value of the analog sensor on port S4

8.3.2.39

#dene SENSOR_CELSIUS _SENSOR_CFG(SENSOR_TYPE_TEMPERATURE, SENSOR_MODE_CELSIUS) RCX temperature sensor in celcius mode

8.3.2.40

#dene SENSOR_COLORBLUE _SENSOR_CFG(SENSOR_TYPE_COLORBLUE, SENSOR_MODE_PERCENT) NXT 2.0 color sensor (blue) in percent mode

8.3.2.41

#dene SENSOR_COLORFULL _SENSOR_CFG(SENSOR_TYPE_COLORFULL, SENSOR_MODE_RAW) NXT 2.0 color sensor (full) in raw mode

8.3.2.42

#dene SENSOR_COLORGREEN _SENSOR_CFG(SENSOR_TYPE_COLORGREEN, SENSOR_MODE_PERCENT) NXT 2.0 color sensor (green) in percent mode

8.3.2.43

#dene SENSOR_COLORNONE _SENSOR_CFG(SENSOR_TYPE_COLORNONE, SENSOR_MODE_PERCENT) NXT 2.0 color sensor (none) in percent mode

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1344

8.3.2.44

#dene SENSOR_COLORRED _SENSOR_CFG(SENSOR_TYPE_COLORRED, SENSOR_MODE_PERCENT) NXT 2.0 color sensor (red) in percent mode

8.3.2.45

#dene SENSOR_EDGE _SENSOR_CFG(SENSOR_TYPE_TOUCH, SENSOR_MODE_EDGE) Touch sensor in edge mode

8.3.2.46

#dene SENSOR_FAHRENHEIT _SENSOR_CFG(SENSOR_TYPE_TEMPERATURE, SENSOR_MODE_FAHRENHEIT) RCX temperature sensor in fahrenheit mode

8.3.2.47

#dene SENSOR_LIGHT _SENSOR_CFG(SENSOR_TYPE_LIGHT, SENSOR_MODE_PERCENT) RCX Light sensor in percent mode

8.3.2.48

#dene SENSOR_LOWSPEED _SENSOR_CFG(SENSOR_TYPE_LOWSPEED, SENSOR_MODE_RAW) NXT I2C sensor without 9V power in raw mode

8.3.2.49

#dene SENSOR_LOWSPEED_9V _SENSOR_CFG(SENSOR_TYPE_LOWSPEED_9V, SENSOR_MODE_RAW) NXT I2C sensor with 9V power in raw mode

8.3.2.50

#dene SENSOR_MODE_BOOL IN_MODE_BOOLEAN Boolean value (0 or 1)

Examples: ex_HTRCXSetSensorMode.nxc, and ex_MSRCXSetSensorMode.nxc.

8.3.2.51

#dene SENSOR_MODE_CELSIUS IN_MODE_CELSIUS RCX temperature sensor value in degrees celcius

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1345

8.3.2.52

#dene SENSOR_MODE_EDGE IN_MODE_TRANSITIONCNT Counts the number of boolean transitions

8.3.2.53

#dene SENSOR_MODE_FAHRENHEIT IN_MODE_FAHRENHEIT RCX temperature sensor value in degrees fahrenheit

8.3.2.54

#dene SENSOR_MODE_PERCENT IN_MODE_PCTFULLSCALE Scaled value from 0 to 100

8.3.2.55

#dene SENSOR_MODE_PULSE IN_MODE_PERIODCOUNTER Counts the number of boolean periods

8.3.2.56

#dene SENSOR_MODE_RAW IN_MODE_RAW Raw value from 0 to 1023

Examples: ex_RemoteSetInputMode.nxc, and ex_SetSensorMode.nxc.

8.3.2.57

#dene SENSOR_MODE_ROTATION IN_MODE_ANGLESTEP RCX rotation sensor (16 ticks per revolution)

8.3.2.58

#dene SENSOR_NXTLIGHT _SENSOR_CFG(SENSOR_TYPE_LIGHT_ACTIVE, SENSOR_MODE_PERCENT) NXT light sensor in active mode

8.3.2.59

#dene SENSOR_PULSE _SENSOR_CFG(SENSOR_TYPE_TOUCH, SENSOR_MODE_PULSE) Touch sensor in pulse mode

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1346

8.3.2.60

#dene SENSOR_ROTATION _SENSOR_CFG(SENSOR_TYPE_ROTATION, SENSOR_MODE_ROTATION) RCX rotation sensor in rotation mode

8.3.2.61

#dene SENSOR_SOUND _SENSOR_CFG(SENSOR_TYPE_SOUND_DB, SENSOR_MODE_PERCENT) NXT sound sensor (dB) in percent mode

8.3.2.62

#dene SENSOR_TOUCH _SENSOR_CFG(SENSOR_TYPE_TOUCH, SENSOR_MODE_BOOL) Touch sensor in boolean mode

Examples: ex_SetSensor.nxc.

8.3.2.63

#dene SENSOR_TYPE_COLORBLUE IN_TYPE_COLORBLUE NXT 2.0 color sensor with blue light

8.3.2.64

#dene SENSOR_TYPE_COLORFULL IN_TYPE_COLORFULL NXT 2.0 color sensor in full color mode

8.3.2.65

#dene SENSOR_TYPE_COLORGREEN IN_TYPE_COLORGREEN NXT 2.0 color sensor with green light

8.3.2.66

#dene SENSOR_TYPE_COLORNONE IN_TYPE_COLORNONE NXT 2.0 color sensor with no light

8.3.2.67

#dene SENSOR_TYPE_COLORRED IN_TYPE_COLORRED NXT 2.0 color sensor with red light

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1347

8.3.2.68

#dene SENSOR_TYPE_CUSTOM IN_TYPE_CUSTOM NXT custom sensor

8.3.2.69

#dene SENSOR_TYPE_HIGHSPEED IN_TYPE_HISPEED NXT Hi-speed port (only S4)

8.3.2.70

#dene SENSOR_TYPE_LIGHT IN_TYPE_REFLECTION RCX light sensor

8.3.2.71

#dene SENSOR_TYPE_LIGHT_ACTIVE IN_TYPE_LIGHT_ACTIVE NXT light sensor with light

8.3.2.72

#dene SENSOR_TYPE_LIGHT_INACTIVE IN_TYPE_LIGHT_INACTIVE NXT light sensor without light

8.3.2.73

#dene SENSOR_TYPE_LOWSPEED IN_TYPE_LOWSPEED NXT I2C digital sensor

Examples: ex_RemoteSetInputMode.nxc.

8.3.2.74

#dene SENSOR_TYPE_LOWSPEED_9V IN_TYPE_LOWSPEED_9V NXT I2C digital sensor with 9V power

8.3.2.75

#dene SENSOR_TYPE_NONE IN_TYPE_NO_SENSOR No sensor congured

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1348

8.3.2.76

#dene SENSOR_TYPE_ROTATION IN_TYPE_ANGLE RCX rotation sensor

8.3.2.77

#dene SENSOR_TYPE_SOUND_DB IN_TYPE_SOUND_DB NXT sound sensor with dB scaling

Examples: ex_SetInput.nxc.

8.3.2.78

#dene SENSOR_TYPE_SOUND_DBA IN_TYPE_SOUND_DBA NXT sound sensor with dBA scaling

8.3.2.79

#dene SENSOR_TYPE_TEMPERATURE IN_TYPE_TEMPERATURE RCX temperature sensor

8.3.2.80

#dene SENSOR_TYPE_TOUCH IN_TYPE_SWITCH NXT or RCX touch sensor

Examples: ex_HTRCXSetSensorType.nxc, SetSensorType.nxc. ex_MSRCXSetSensorType.nxc, and ex_-

8.3.2.81

#dene Sin(_X) asm { sin __FLTRETVAL__, _X }

Compute sine. Computes the sine of _X. Only constants or variables allowed (no expressions). Deprecated Use sin() instead. Parameters: _X Floating point value.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1349

Returns: Sine of _X.

8.3.2.82

#dene SinD(_X) asm { sind __FLTRETVAL__, _X }

Compute sine (degrees). Computes the sine of _X. Only constants or variables allowed (no expressions). Deprecated Use sind() instead. Parameters: _X Floating point value. Returns: Sine of _X.

8.3.2.83

#dene Sinh(_X) asm { sinh __FLTRETVAL__, _X }

Compute hyperbolic sine. Computes the hyperbolic sine of _X. Only constants or variables allowed (no expressions). Deprecated Use sinh() instead. Parameters: _X Floating point value. Returns: Hyperbolic sine of _X.

8.3.2.84

#dene SinhD(_X) asm { sinhd __FLTRETVAL__, _X }

Compute hyperbolic sine (degrees). Computes the hyperbolic sine of _X. Only constants or variables allowed (no expressions).
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1350

Deprecated Use sinhd() instead. Parameters: _X Floating point value. Returns: Hyperbolic sine of _X.

8.3.2.85

#dene Sqrt(_X) asm { sqrt __FLTRETVAL__, _X }

Compute square root. Computes the square root of _X. Only constants or variables allowed (no expressions). Deprecated Use sqrt() instead. Parameters: _X Floating point value. Returns: Square root of _X.

8.3.2.86

#dene Tan(_X) asm { tan __FLTRETVAL__, _X }

Compute tangent. Computes the tangent of _X. Only constants or variables allowed (no expressions). Deprecated Use tan() instead. Parameters: _X Floating point value. Returns: Tangent of _X.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1351

8.3.2.87

#dene TanD(_X) asm { tand __FLTRETVAL__, _X }

Compute tangent (degrees). Computes the sine of _X. Only constants or variables allowed (no expressions). Deprecated Use tand() instead. Parameters: _X Floating point value. Returns: Tangent of _X.

8.3.2.88

#dene Tanh(_X) asm { tanh __FLTRETVAL__, _X }

Compute hyperbolic tangent. Computes the hyperbolic tangent of _X. Only constants or variables allowed (no expressions). Deprecated Use tanh() instead. Parameters: _X Floating point value. Returns: Hyperbolic tangent of _X.

8.3.2.89

#dene TanhD(_X) asm { tanhd __FLTRETVAL__, _X }

Compute hyperbolic tangent (degrees). Computes the hyperbolic tangent of _X. Only constants or variables allowed (no expressions). Deprecated Use tanhd() instead.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1352

Parameters: _X Floating point value. Returns: Hyperbolic tangent of _X.

8.3.2.90

#dene Trunc(_X) asm { trunc __RETVAL__, _X }

Compute integral part. Computes the integral part of _X. Only constants or variables allowed (no expressions). Deprecated Use trunc() instead. Parameters: _X Floating point value. Returns: Integral part of _X.

8.3.2.91

#dene u16 unsigned int Unsigned 16 bit type

8.3.2.92

#dene u32 unsigned long Unsigned 32 bit type

8.3.2.93

#dene u8 unsigned char Unsigned 8 bit type

8.3.3 8.3.3.1

Function Documentation void abort () [inline]

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1353

Abort current process. Aborts the process with an abnormal program termination. The function never returns to its caller. Examples: ex_abort.nxc.

8.3.3.2

byte AbortFlag (void) [inline]

Read abort ag. Return the enhanced NBC/NXC rmwares abort ag. Returns: The current abort ag value. See ButtonState constants. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_AbortFlag.nxc.

8.3.3.3

variant abs (variant num) [inline]

Absolute value. Return the absolute value of the value argument. Any scalar type can be passed into this function. Parameters: num The numeric value. Returns: The absolute value of num. The return type matches the input type. Examples: ex_abs.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1354

8.3.3.4

char ACCLNxCalibrateX (const byte port, const byte i2caddr) [inline]

Calibrate ACCL-Nx X-axis. Calibrate the mindsensors ACCL-Nx sensor X-axis. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_ACCLNxCalibrateX.nxc.

8.3.3.5

char ACCLNxCalibrateXEnd (const byte port, const byte i2caddr) [inline]

Stop calibrating ACCL-Nx X-axis. Stop calibrating the mindsensors ACCL-Nx sensor X-axis. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_ACCLNxCalibrateXEnd.nxc.

8.3.3.6

char ACCLNxCalibrateY (const byte port, const byte i2caddr) [inline]

Calibrate ACCL-Nx Y-axis. Calibrate the mindsensors ACCL-Nx sensor Y-axis. The port must be congured as a Lowspeed port before using this function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1355

Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_ACCLNxCalibrateY.nxc.

8.3.3.7

char ACCLNxCalibrateYEnd (const byte port, const byte i2caddr) [inline]

Stop calibrating ACCL-Nx Y-axis. Stop calibrating the mindsensors ACCL-Nx sensor Y-axis. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_ACCLNxCalibrateYEnd.nxc.

8.3.3.8

char ACCLNxCalibrateZ (const byte port, const byte i2caddr) [inline]

Calibrate ACCL-Nx Z-axis. Calibrate the mindsensors ACCL-Nx sensor Z-axis. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1356

Returns: The function call result. Examples: ex_ACCLNxCalibrateZ.nxc.

8.3.3.9

char ACCLNxCalibrateZEnd (const byte port, const byte i2caddr) [inline]

Stop calibrating ACCL-Nx Z-axis. Stop calibrating the mindsensors ACCL-Nx sensor Z-axis. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_ACCLNxCalibrateZEnd.nxc.

8.3.3.10

char ACCLNxResetCalibration (const byte port, const byte i2caddr) [inline]

Reset ACCL-Nx calibration. Reset the mindsensors ACCL-Nx sensor calibration to factory settings. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_ACCLNxResetCalibration.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1357

8.3.3.11

byte ACCLNxSensitivity (const byte port, const byte i2caddr) [inline]

Read ACCL-Nx sensitivity value. Read the mindsensors ACCL-Nx sensitivity value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The sensitivity value. Examples: ex_ACCLNxSensitivity.nxc.

8.3.3.12

int ACCLNxXOffset (const byte port, const byte i2caddr) [inline]

Read ACCL-Nx X offset value. Read the mindsensors ACCL-Nx sensors X offset value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The X offset value. Examples: ex_ACCLNxXOffset.nxc.

8.3.3.13

int ACCLNxXRange (const byte port, const byte i2caddr) [inline]

Read ACCL-Nx X range value. Read the mindsensors ACCL-Nx sensors X range value. The port must be congured as a Lowspeed port before using this function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1358

Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The X range value. Examples: ex_ACCLNxXRange.nxc.

8.3.3.14

int ACCLNxYOffset (const byte port, const byte i2caddr) [inline]

Read ACCL-Nx Y offset value. Read the mindsensors ACCL-Nx sensors Y offset value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The Y offset value. Examples: ex_ACCLNxYOffset.nxc.

8.3.3.15

int ACCLNxYRange (const byte port, const byte i2caddr) [inline]

Read ACCL-Nx Y range value. Read the mindsensors ACCL-Nx sensors Y range value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The Y range value.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1359

Examples: ex_ACCLNxYRange.nxc.

8.3.3.16

int ACCLNxZOffset (const byte port, const byte i2caddr) [inline]

Read ACCL-Nx Z offset value. Read the mindsensors ACCL-Nx sensors Z offset value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The Z offset value. Examples: ex_ACCLNxZOffset.nxc.

8.3.3.17

int ACCLNxZRange (const byte port, const byte i2caddr) [inline]

Read ACCL-Nx Z range value. Read the mindsensors ACCL-Nx sensors Z range value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The Z range value. Examples: ex_ACCLNxZRange.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1360

8.3.3.18

oat acos (oat x) [inline]

Compute arc cosine. Computes the principal value of the arc cosine of x, expressed in radians. In trigonometrics, arc cosine is the inverse operation of cosine. Parameters: x Floating point value in the interval [-1,+1]. Returns: Arc cosine of x, in the interval [0,pi] radians. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_acos.nxc.

8.3.3.19

oat acosd (oat x) [inline]

Compute arc cosine (degrees). Computes the principal value of the arc cosine of x, expressed in degrees. In trigonometrics, arc cosine is the inverse operation of cosine. Parameters: x Floating point value in the interval [-1,+1]. Returns: Arc cosine of x, in the interval [0,180] degrees. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_acosd.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1361

8.3.3.20

void Acquire (mutex m) [inline]

Acquire a mutex. Acquire the specied mutex variable. If another task already has acquired the mutex then the current task will be suspended until the mutex is released by the other task. This function is used to ensure that the current task has exclusive access to a shared resource, such as the display or a motor. After the current task has nished using the shared resource the program should call Release to allow other tasks to acquire the mutex. Parameters: m The mutex to acquire. Examples: ex_Acquire.nxc, and ex_Release.nxc.

8.3.3.21

unsigned long addressOf (variant data) [inline]

Get the absolute address of a variable. Get the absolute address of a variable and return it to the calling routine as an unsigned long value. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: data A variable whose address you wish to get. Returns: The absolute address of the variable. Examples: ex_addressof.nxc.

8.3.3.22

unsigned long addressOfEx (variant data, bool relative) [inline]

Get the absolute or relative address of a variable. Get the absolute or relative address of a variable and return it to the calling routine as an unsigned long value. The relative address is an offset from the Command modules MemoryPool address.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1362

Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: data A variable whose address you wish to get. relative A boolean ag indicating whether you want to get the relative or absolute address. Returns: The absolute or relative address of the variable. Examples: ex_addressofex.nxc.

8.3.3.23

void ArrayBuild (variant & aout[ ], variant src1, variant src2, ..., variant srcN) [inline]

Build an array. Build a new array from the specied source(s). The sources can be of any type so long as the number of dimensions is equal to or one less than the number of dimensions in the output array and the type is compatible with the type of the output array. If a source is an array with the same number of dimensions as the output array then all of its elements are added to the output array. Parameters: aout The output array to build. src1 The rst source to build into the output array. src2 The second source to build into the output array. srcN The rst source to build into the output array. Examples: ex_ArrayBuild.nxc, ex_getmemoryinfo.nxc, ex_SysCommHSWrite.nxc, ex_SysDatalogWrite.nxc, and ex_sysmemorymanager.nxc.

8.3.3.24

void ArrayInit (variant & aout[ ], variant value, unsigned int count) [inline]

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1363

Initialize an array. Initialize the array to contain count elements with each element equal to the value provided. To initialize a multi-dimensional array, the value should be an array of N-1 dimensions, where N is the number of dimensions in the array being initialized. Parameters: aout The output array to initialize. value The value to initialize each element to. count The number of elements to create in the output array. Examples: ex_ArrayInit.nxc, ex_getmemoryinfo.nxc, ex_sysdrawgraphic.nxc, and ex_sysmemorymanager.nxc.

8.3.3.25

unsigned int ArrayLen (variant data[ ]) [inline]

Get array length. Return the length of the specied array. Any type of array of up to four dimensions can be passed into this function. Parameters: data The array whose length you need to read. Returns: The length of the specied array. Examples: ex_ArrayLen.nxc, ex_atan2.nxc, ex_atan2d.nxc, ex_syslistles.nxc, ex_tan.nxc, and ex_tand.nxc.

8.3.3.26

variant ArrayMax (const variant & src[ ], unsigned int idx, unsigned int len) [inline]

Calculate the maximum of the elements in a numeric array. This function calculates the maximum of all or a subset of the elements in the numeric src array. Warning: This function requires the enhanced NBC/NXC rmware.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1364

Parameters: src The source numeric array. idx The index of the start of the array subset to process. Pass NA to start with the rst element. len The number of elements to include in the calculation. Pass NA to include the rest of the elements in the src array (from idx to the end of the array). Returns: The maximum of len elements from the src numeric array (starting from idx). Examples: ex_ArrayMax.nxc, and ex_ArraySort.nxc.

8.3.3.27

variant ArrayMean (const variant & src[ ], unsigned int idx, unsigned int len) [inline]

Calculate the mean of the elements in a numeric array. This function calculates the mean of all or a subset of the elements in the numeric src array. Warning: This function requires the enhanced NBC/NXC rmware. Parameters: src The source numeric array. idx The index of the start of the array subset to process. Pass NA to start with the rst element. len The number of elements to include in the calculation. Pass NA to include the rest of the elements in the src array (from idx to the end of the array). Returns: The mean value of len elements from the src numeric array (starting from idx). Examples: ex_ArrayMean.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1365

8.3.3.28

variant ArrayMin (const variant & src[ ], unsigned int idx, unsigned int len) [inline]

Calculate the minimum of the elements in a numeric array. This function calculates the minimum of all or a subset of the elements in the numeric src array. Warning: This function requires the enhanced NBC/NXC rmware. Parameters: src The source numeric array. idx The index of the start of the array subset to process. Pass NA to start with the rst element. len The number of elements to include in the calculation. Pass NA to include the rest of the elements in the src array (from idx to the end of the array). Returns: The minimum of len elements from the src numeric array (starting from idx). Examples: ex_ArrayMin.nxc, and ex_ArraySort.nxc.

8.3.3.29

void ArrayOp (const byte op, variant & dest, const variant & src[ ], unsigned int idx, unsigned int len) [inline]

Operate on numeric arrays. This function lets you perform various operations on numeric arrays. Warning: This function requires the enhanced NBC/NXC rmware. Parameters: op The array operation. See Array operation constants. dest The destination variant type (scalar or array, depending on the operation). src The source numeric array.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1366

idx The index of the start of the array subset to process. Pass NA to start with the rst element. len The number of elements to include in the specied process. Pass NA to include the rest of the elements in the src array (from idx to the end of the array). Examples: ex_ArrayOp.nxc.

8.3.3.30

void ArraySort (variant & dest[ ], const variant & src[ ], unsigned int idx, unsigned int len) [inline]

Sort the elements in a numeric array. This function sorts all or a subset of the elements in the numeric src array in ascending order and saves the results in the numeric dest array. Warning: This function requires the enhanced NBC/NXC rmware. Parameters: dest The destination numeric array. src The source numeric array. idx The index of the start of the array subset to process. Pass NA to start with the rst element. len The number of elements to include in the sorting process. Pass NA to include the rest of the elements in the src array (from idx to the end of the array). Examples: ex_ArraySort.nxc.

8.3.3.31

variant ArrayStd (const variant & src[ ], unsigned int idx, unsigned int len) [inline]

Calculate the standard deviation of the elements in a numeric array. This function calculates the standard deviation of all or a subset of the elements in the numeric src array.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1367

Warning: This function requires the enhanced NBC/NXC rmware. Parameters: src The source numeric array. idx The index of the start of the array subset to process. Pass NA to start with the rst element. len The number of elements to include in the calculation. Pass NA to include the rest of the elements in the src array (from idx to the end of the array). Returns: The standard deviation of len elements from the src numeric array (starting from idx). Examples: ex_ArrayStd.nxc.

8.3.3.32

void ArraySubset (variant & aout[ ], variant asrc[ ], unsigned int idx, unsigned int len) [inline]

Copy an array subset. Copy a subset of the source array starting at the specied index and containing the specied number of elements into the destination array. Parameters: aout The output array containing the subset. asrc The input array from which to copy a subset. idx The start index of the array subset. len The length of the array subset. Examples: ex_ArraySubset.nxc.

8.3.3.33

variant ArraySum (const variant & src[ ], unsigned int idx, unsigned int len) [inline]

Calculate the sum of the elements in a numeric array. This function calculates the sum of all or a subset of the elements in the numeric src array.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1368

Warning: This function requires the enhanced NBC/NXC rmware. Parameters: src The source numeric array. idx The index of the start of the array subset to process. Pass NA to start with the rst element. len The number of elements to include in the calculation. Pass NA to include the rest of the elements in the src array (from idx to the end of the array). Returns: The sum of len elements from the src numeric array (starting from idx). Examples: ex_ArraySum.nxc.

8.3.3.34

variant ArraySumSqr (const variant & src[ ], unsigned int idx, unsigned int len) [inline]

Calculate the sum of the squares of the elements in a numeric array. This function calculates the sum of the squares of all or a subset of the elements in the numeric src array. Warning: This function requires the enhanced NBC/NXC rmware. Parameters: src The source numeric array. idx The index of the start of the array subset to process. Pass NA to start with the rst element. len The number of elements to include in the calculation. Pass NA to include the rest of the elements in the src array (from idx to the end of the array). Returns: The sum of the squares of len elements from the src numeric array (starting from idx). Examples: ex_ArraySumSqr.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1369

8.3.3.35

oat asin (oat x) [inline]

Compute arc sine. Computes the principal value of the arc sine of x, expressed in radians. In trigonometrics, arc sine is the inverse operation of sine. Parameters: x Floating point value in the interval [-1,+1]. Returns: Arc sine of x, in the interval [-pi/2,+pi/2] radians. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_asin.nxc.

8.3.3.36

oat asind (oat x) [inline]

Compute arc sine (degrees). Computes the principal value of the arc sine of x, expressed in degrees. In trigonometrics, arc sine is the inverse operation of sine. Parameters: x Floating point value in the interval [-1,+1]. Returns: Arc sine of x, in the interval [-90,+90] degrees. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_asind.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1370

8.3.3.37

oat atan (oat x) [inline]

Compute arc tangent. Computes the principal value of the arc tangent of x, expressed in radians. In trigonometrics, arc tangent is the inverse operation of tangent. Notice that because of the sign ambiguity, a function cannot determine with certainty in which quadrant the angle falls only by its tangent value. You can use atan2() if you need to determine the quadrant. See also: atan2() Parameters: x Floating point value. Returns: Arc tangent of x, in the interval [-pi/2,+pi/2] radians. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_atan.nxc.

8.3.3.38

oat atan2 (oat y, oat x) [inline]

Compute arc tangent with 2 parameters. Computes the principal value of the arc tangent of y/x, expressed in radians. To compute the value, the function uses the sign of both arguments to determine the quadrant. See also: atan() Parameters: y Floating point value representing a y coordinate. x Floating point value representing an x coordinate.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1371

Returns: Arc tangent of y/x, in the interval [-pi,+pi] radians. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_atan2.nxc.

8.3.3.39

oat atan2d (oat y, oat x) [inline]

Compute arc tangent with 2 parameters (degrees). Computes the principal value of the arc tangent of y/x, expressed in degrees. To compute the value, the function uses the sign of both arguments to determine the quadrant. Parameters: y Floating point value representing a y coordinate. x Floating point value representing an x coordinate. Returns: Arc tangent of y/x, in the interval [-180,+180] degrees. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_atan2d.nxc.

8.3.3.40

oat atand (oat x) [inline]

Compute arc tangent (degrees). Computes the principal value of the arc tangent of x, expressed in degrees. In trigonometrics, arc tangent is the inverse operation of tangent. Notice that because of the sign ambiguity, a function cannot determine with certainty in which quadrant the angle falls only by its tangent value. You can use atan2d if you need to determine the quadrant.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1372

Parameters: x Floating point value. Returns: Arc tangent of x, in the interval [-90,+90] degrees. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_atand.nxc.

8.3.3.41

oat atof (const string & str) [inline]

Convert string to oat. Parses the string str interpreting its content as a oating point number and returns its value as a oat. The function rst discards as many whitespace characters as necessary until the rst non-whitespace character is found. Then, starting from this character, takes as many characters as possible that are valid following a syntax resembling that of oating point literals, and interprets them as a numerical value. The rest of the string after the last valid character is ignored and has no effect on the behavior of this function. A valid oating point number for atof is formed by a succession of: An optional plus or minus sign A sequence of digits, optionally containing a decimal-point character An optional exponent part, which itself consists on an e or E character followed by an optional sign and a sequence of digits. If the rst sequence of non-whitespace characters in str does not form a valid oatingpoint number as just dened, or if no such sequence exists because either str is empty or contains only whitespace characters, no conversion is performed. Parameters: str String beginning with the representation of a oating-point number. Returns: On success, the function returns the converted oating point number as a oat value. If no valid conversion could be performed a zero value (0.0) is returned.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1373

Examples: ex_atof.nxc.

8.3.3.42

int atoi (const string & str) [inline]

Convert string to integer. Parses the string str interpreting its content as an integral number, which is returned as an int value. The function rst discards as many whitespace characters as necessary until the rst non-whitespace character is found. Then, starting from this character, takes an optional initial plus or minus sign followed by as many numerical digits as possible, and interprets them as a numerical value. The string can contain additional characters after those that form the integral number, which are ignored and have no effect on the behavior of this function. If the rst sequence of non-whitespace characters in str does not form a valid integral number, or if no such sequence exists because either str is empty or contains only whitespace characters, no conversion is performed. Parameters: str String beginning with the representation of an integral number. Returns: On success, the function returns the converted integral number as an int value. If no valid conversion could be performed a zero value is returned. Examples: ex_atoi.nxc.

8.3.3.43

long atol (const string & str) [inline]

Convert string to long integer. Parses the string str interpreting its content as an integral number, which is returned as a long int value. The function rst discards as many whitespace characters as necessary until the rst non-whitespace character is found. Then, starting from this character, takes an optional initial plus or minus sign followed by as many numerical digits as possible, and interprets them as a numerical value.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1374

The string can contain additional characters after those that form the integral number, which are ignored and have no effect on the behavior of this function. If the rst sequence of non-whitespace characters in str does not form a valid integral number, or if no such sequence exists because either str is empty or contains only whitespace characters, no conversion is performed. Parameters: str String beginning with the representation of an integral number. Returns: On success, the function returns the converted integral number as a long int value. If no valid conversion could be performed a zero value is returned. Examples: ex_atol.nxc.

8.3.3.44

unsigned int BatteryLevel (void) [inline]

Get battery Level. Return the battery level in millivolts. Returns: The battery level Examples: util_battery_1.nxc, and util_battery_2.nxc.

8.3.3.45

byte BatteryState (void) [inline]

Get battery state. Return battery state information (0..4). Returns: The battery state (0..4) Examples: ex_BatteryState.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1375

8.3.3.46

byte bcd2dec (byte bcd) [inline]

Convert from BCD to decimal Return the decimal equivalent of the binary coded decimal value provided. Parameters: bcd The value you want to convert from bcd to decimal. Returns: The decimal equivalent of the binary coded decimal byte. Examples: ex_bcd2dec.nxc.

8.3.3.47

byte BluetoothState (void) [inline]

Get bluetooth state. Return the bluetooth state. Returns: The bluetooth state. See BluetoothState constants. Examples: ex_BluetoothState.nxc.

8.3.3.48

char BluetoothStatus (byte conn) [inline]

Check bluetooth status. Check the status of the bluetooth subsystem for the specied connection slot. Parameters: conn The connection slot (0..3). Connections 0 through 3 are for bluetooth connections. See Remote connection constants. Returns: The bluetooth status for the specied connection.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1376

Examples: ex_BluetoothStatus.nxc, and ex_syscommbtconnection.nxc.

8.3.3.49

char BluetoothWrite (byte conn, byte buffer[ ]) [inline]

Write to a bluetooth connection. This method tells the NXT rmware to write the data in the buffer to the device on the specied Bluetooth connection. Use BluetoothStatus to determine when this write request is completed. Parameters: conn The connection slot (0..3). Connections 0 through 3 are for bluetooth connections. See Remote connection constants. buffer The data to be written (up to 128 bytes) Returns: A char value indicating whether the function call succeeded or not. Examples: ex_BluetoothWrite.nxc.

8.3.3.50

int BrickDataBluecoreVersion (void) [inline]

Get NXT bluecore version. This method returns the bluecore version of the NXT. Returns: The NXTs bluecore version number. Examples: ex_BrickDataBluecoreVersion.nxc.

8.3.3.51

byte BrickDataBtHardwareStatus (void) [inline]

Get NXT bluetooth hardware status. This method returns the Bluetooth hardware status of the NXT.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1377

Returns: The NXTs bluetooth hardware status. Examples: ex_BrickDataBtHardwareStatus.nxc.

8.3.3.52

byte BrickDataBtStateStatus (void) [inline]

Get NXT bluetooth state status. This method returns the Bluetooth state status of the NXT. Returns: The NXTs bluetooth state status. Examples: ex_BrickDataBtStateStatus.nxc.

8.3.3.53

string BrickDataName (void) [inline]

Get NXT name. This method returns the name of the NXT. Returns: The NXTs bluetooth name. Examples: ex_BrickDataName.nxc.

8.3.3.54

byte BrickDataTimeoutValue (void) [inline]

Get NXT bluetooth timeout value. This method returns the Bluetooth timeout value of the NXT. Returns: The NXTs bluetooth timeout value.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1378

Examples: ex_BrickDataTimeoutValue.nxc.

8.3.3.55

long BTConnectionClass (const byte conn) [inline]

Get bluetooth device class. This method returns the class of the device at the specied index within the Bluetooth connection table. Parameters: conn The connection slot (0..3). Returns: The class of the bluetooth device at the specied connection slot. Examples: ex_BTConnectionClass.nxc.

8.3.3.56

byte BTConnectionHandleNum (const byte conn) [inline]

Get bluetooth device handle number. This method returns the handle number of the device at the specied index within the Bluetooth connection table. Parameters: conn The connection slot (0..3). Returns: The handle number of the bluetooth device at the specied connection slot. Examples: ex_BTConnectionHandleNum.nxc.

8.3.3.57

byte BTConnectionLinkQuality (const byte conn) [inline]

Get bluetooth device link quality. This method returns the link quality of the device at the specied index within the Bluetooth connection table.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1379

Parameters: conn The connection slot (0..3). Returns: The link quality of the specied connection slot (unimplemented). Warning: This function is not implemented at the rmware level. Examples: ex_BTConnectionLinkQuality.nxc.

8.3.3.58

string BTConnectionName (const byte conn) [inline]

Get bluetooth device name. This method returns the name of the device at the specied index in the Bluetooth connection table. Parameters: conn The connection slot (0..3). Returns: The name of the bluetooth device at the specied connection slot. Examples: ex_BTConnectionName.nxc.

8.3.3.59

string BTConnectionPinCode (const byte conn) [inline]

Get bluetooth device pin code. This method returns the pin code of the device at the specied index in the Bluetooth connection table. Parameters: conn The connection slot (0..3). Returns: The pin code for the bluetooth device at the specied connection slot.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1380

Examples: ex_BTConnectionPinCode.nxc.

8.3.3.60

byte BTConnectionStreamStatus (const byte conn) [inline]

Get bluetooth device stream status. This method returns the stream status of the device at the specied index within the Bluetooth connection table. Parameters: conn The connection slot (0..3). Returns: The stream status of the bluetooth device at the specied connection slot. Examples: ex_BTConnectionStreamStatus.nxc.

8.3.3.61

int BTDataMode (void) [inline]

Get Bluetooth data mode. This method returns the value of the Bluetooth data mode. Returns: The Bluetooth data mode. See Data mode constants. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Examples: ex_DataMode.nxc.

8.3.3.62

long BTDeviceClass (const byte devidx) [inline]

Get bluetooth device class. This method returns the class of the device at the specied index within the Bluetooth device table.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1381

Parameters: devidx The device table index. Returns: The device class of the specied bluetooth device. Examples: ex_BTDeviceClass.nxc.

8.3.3.63

byte BTDeviceCount (void) [inline]

Get bluetooth device count. This method returns the number of devices dened within the Bluetooth device table. Returns: The count of known bluetooth devices. Examples: ex_BTDeviceCount.nxc.

8.3.3.64

string BTDeviceName (const byte devidx) [inline]

Get bluetooth device name. This method returns the name of the device at the specied index in the Bluetooth device table. Parameters: devidx The device table index. Returns: The device name of the specied bluetooth device. Examples: ex_BTDeviceName.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1382

8.3.3.65

byte BTDeviceNameCount (void) [inline]

Get bluetooth device name count. This method returns the number of device names dened within the Bluetooth device table. This usually has the same value as BTDeviceCount but it can differ in some instances. Returns: The count of known bluetooth device names. Examples: ex_BTDeviceNameCount.nxc.

8.3.3.66

byte BTDeviceStatus (const byte devidx) [inline]

Get bluetooth device status. This method returns the status of the device at the specied index within the Bluetooth device table. Parameters: devidx The device table index. Returns: The status of the specied bluetooth device. Examples: ex_BTDeviceStatus.nxc.

8.3.3.67

byte BTInputBufferInPtr (void) [inline]

Get bluetooth input buffer in-pointer. This method returns the value of the input pointer of the Bluetooth input buffer. Returns: The bluetooth input buffers in-pointer value. Examples: ex_BTInputBufferInPtr.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1383

8.3.3.68

byte BTInputBufferOutPtr (void) [inline]

Get bluetooth input buffer out-pointer. This method returns the value of the output pointer of the Bluetooth input buffer. Returns: The bluetooth input buffers out-pointer value. Examples: ex_BTInputBufferOutPtr.nxc.

8.3.3.69

byte BTOutputBufferInPtr (void) [inline]

Get bluetooth output buffer in-pointer. This method returns the value of the input pointer of the Bluetooth output buffer. Returns: The bluetooth output buffers in-pointer value. Examples: ex_BTOutputBufferInPtr.nxc.

8.3.3.70

byte BTOutputBufferOutPtr (void) [inline]

Get bluetooth output buffer out-pointer. This method returns the value of the output pointer of the Bluetooth output buffer. Returns: The bluetooth output buffers out-pointer value. Examples: ex_BTOutputBufferOutPtr.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1384

8.3.3.71

byte ButtonCount (const byte btn, bool resetCount) [inline]

Get button press count. Return the number of times the specied button has been pressed since the last time the button press count was reset. Optionally clear the count after reading it. Parameters: btn The button to check. See Button name constants. resetCount Whether or not to reset the press counter. Returns: The button press count. Examples: ex_ButtonCount.nxc.

8.3.3.72

byte ButtonLongPressCount (const byte btn) [inline]

Get button long press count. Return the long press count of the specied button. Parameters: btn The button to check. See Button name constants. Returns: The button long press count. Examples: ex_ButtonLongPressCount.nxc.

8.3.3.73

byte ButtonLongReleaseCount (const byte btn) [inline]

Get button long release count. Return the long release count of the specied button. Parameters: btn The button to check. See Button name constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1385

Returns: The button long release count. Examples: ex_ButtonLongReleaseCount.nxc.

8.3.3.74

byte ButtonPressCount (const byte btn) [inline]

Get button press count. Return the press count of the specied button. Parameters: btn The button to check. See Button name constants. Returns: The button press count. Examples: ex_ButtonPressCount.nxc, ex_SetAbortFlag.nxc, and ex_SetLongAbort.nxc.

8.3.3.75

bool ButtonPressed (const byte btn, bool resetCount) [inline]

Check for button press. This function checks whether the specied button is pressed or not. You may optionally reset the press count. Parameters: btn The button to check. See Button name constants. resetCount Whether or not to reset the press counter. Returns: A boolean value indicating whether the button is pressed or not. Examples: ex_buttonpressed.nxc, ex_HTGyroTest.nxc, ex_SetAbortFlag.nxc, and ex_SetLongAbort.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1386

8.3.3.76

byte ButtonReleaseCount (const byte btn) [inline]

Get button release count. Return the release count of the specied button. Parameters: btn The button to check. See Button name constants. Returns: The button release count. Examples: ex_ButtonReleaseCount.nxc.

8.3.3.77

byte ButtonShortReleaseCount (const byte btn) [inline]

Get button short release count. Return the short release count of the specied button. Parameters: btn The button to check. See Button name constants. Returns: The button short release count. Examples: ex_ButtonShortReleaseCount.nxc.

8.3.3.78

byte ButtonState (const byte btn) [inline]

Get button state. Return the state of the specied button. See ButtonState constants. Parameters: btn The button to check. See Button name constants. Returns: The button state.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1387

Examples: ex_ButtonState.nxc.

8.3.3.79

string ByteArrayToStr (byte data[ ]) [inline]

Convert a byte array to a string. Convert the specied array to a string by appending a null terminator to the end of the array elements. The array must be a one-dimensional array of byte. See also: StrToByteArray, ByteArrayToStrEx Parameters: data A byte array. Returns: A string containing data and a null terminator byte. Examples: ex_ByteArrayToStr.nxc, and ex_string.nxc.

8.3.3.80

void ByteArrayToStrEx (byte data[ ], string & str) [inline]

Convert a byte array to a string. Convert the specied array to a string by appending a null terminator to the end of the array elements. The array must be a one-dimensional array of byte. See also: StrToByteArray, ByteArrayToStr Parameters: data A byte array. str A string variable reference which, on output, will contain data and a null terminator byte. Examples: ex_ByteArrayToStrEx.nxc, and ex_string.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1388

8.3.3.81

oat ceil (oat x) [inline]

Round up value. Computes the smallest integral value that is not less than x. Parameters: x Floating point value. Returns: The smallest integral value not less than x. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_ceil.nxc.

8.3.3.82

char CircleOut (int x, int y, byte radius, unsigned long options = DRAW_OPT_NORMAL) [inline]

Draw a circle. This function lets you draw a circle on the screen with its center at the specied x and y location, using the specied radius. Optionally specify drawing options. If this argument is not specied it defaults to DRAW_OPT_NORMAL. Valid display option constants are listed in the Drawing option constants group. See also: SysDrawCircle, DrawCircleType Parameters: x The x value for the center of the circle. y The y value for the center of the circle. radius The radius of the circle. options The optional drawing options. Returns: The result of the drawing operation. Examples: ex_CircleOut.nxc, and ex_le_system.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1389

8.3.3.83

void ClearLine (byte line) [inline]

Clear a line on the LCD screen. This function lets you clear a single line on the NXT LCD. Parameters: line The line you want to clear. See Line number constants. Examples: ex_clearline.nxc.

8.3.3.84

void ClearScreen () [inline]

Clear LCD screen. This function lets you clear the NXT LCD to a blank screen. Examples: ex_ClearScreen.nxc, ex_dispftout.nxc, ex_dispgout.nxc, ex_getmemoryinfo.nxc, ex_PolyOut.nxc, ex_ReadSensorHTAngle.nxc, ex_SetAbortFlag.nxc, ex_SetLongAbort.nxc, ex_string.nxc, ex_sysdrawpolygon.nxc, and ex_sysmemorymanager.nxc.

8.3.3.85

void ClearSensor (const byte & port) [inline]

Clear a sensor value. Clear the value of a sensor - only affects sensors that are congured to measure a cumulative quantity such as rotation or a pulse count. Parameters: port The port to clear. See Input port constants. Examples: ex_ClearSensor.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1390

8.3.3.86

unsigned int CloseFile (byte handle) [inline]

Close a le. Close the le associated with the specied le handle. The loader result code is returned as the value of the function call. The handle parameter must be a constant or a variable. Parameters: handle The le handle. Returns: The function call result. See Loader module error codes. Examples: ex_CloseFile.nxc, ndnextle.nxc. ex_le_system.nxc, ex_ndrstle.nxc, and ex_-

8.3.3.87

void Coast (byte outputs) [inline]

Coast motors. Turn off the specied outputs, making them coast to a stop. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. Examples: ex_coast.nxc.

8.3.3.88

void CoastEx (byte outputs, const byte reset) [inline]

Coast motors and reset counters. Turn off the specied outputs, making them coast to a stop.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1391

Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. reset Position counters reset control. It must be a constant, see Tachometer counter reset ags. Examples: ex_coastex.nxc.

8.3.3.89

unsigned int ColorADRaw (byte port, byte color) [inline]

Read a LEGO color sensor AD raw value. This function lets you directly access a specic LEGO color sensor AD raw value. Both the port and the color index must be constants. Parameters: port The sensor port. See Input port constants. color The color index. See Color sensor array indices. Returns: The AD raw value. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_ColorADRaw.nxc.

8.3.3.90

bool ColorBoolean (byte port, byte color) [inline]

Read a LEGO color sensor boolean value. This function lets you directly access a specic LEGO color sensor boolean value. Both the port and the color index must be constants.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1392

Parameters: port The sensor port. See Input port constants. color The color index. See Color sensor array indices. Returns: The boolean value. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_ColorBoolean.nxc.

8.3.3.91

long ColorCalibration (byte port, byte point, byte color) [inline]

Read a LEGO color sensor calibration point value. This function lets you directly access a specic LEGO color calibration point value. The port, point, and color index must be constants. Parameters: port The sensor port. See Input port constants. point The calibration point. See Color calibration constants. color The color index. See Color sensor array indices. Returns: The calibration point value. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_ColorCalibration.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1393

8.3.3.92

byte ColorCalibrationState (byte port) [inline]

Read LEGO color sensor calibration state. This function lets you directly access the LEGO color calibration state. The port must be a constant. Parameters: port The sensor port. See Input port constants. Returns: The calibration state. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_ColorCalibrationState.nxc.

8.3.3.93

unsigned int ColorCalLimits (byte port, byte point) [inline]

Read a LEGO color sensor calibration limit value. This function lets you directly access a specic LEGO color calibration limit value. The port and the point must be constants. Parameters: port The sensor port. See Input port constants. point The calibration point. See Color calibration constants. Returns: The calibration limit value. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_ColorCalLimits.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1394

8.3.3.94

unsigned int ColorSensorRaw (byte port, byte color) [inline]

Read a LEGO color sensor raw value. This function lets you directly access a specic LEGO color sensor raw value. Both the port and the color index must be constants. Parameters: port The sensor port. See Input port constants. color The color index. See Color sensor array indices. Returns: The raw value. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_ColorSensorRaw.nxc.

8.3.3.95

unsigned int ColorSensorValue (byte port, byte color) [inline]

Read a LEGO color sensor scaled value. This function lets you directly access a specic LEGO color sensor scaled value. Both the port and the color index must be constants. Parameters: port The sensor port. See Input port constants. color The color index. See Color sensor array indices. Returns: The scaled value. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_ColorSensorValue.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1395

8.3.3.96

byte CommandFlags (void) [inline]

Get command ags. Return the command ags. Returns: Command ags. See CommandFlags constants Examples: ex_CommandFlags.nxc.

8.3.3.97

char CongureTemperatureSensor (const byte & port, const byte & cong) [inline]

Congure LEGO Temperature sensor options. Set various LEGO Temperature sensor options. Parameters: port The port to which the temperature sensor is attached. See the Input port constants group. You may use a constant or a variable. cong The temperature sensor conguration settings. See LEGO temperature sensor constants for conguration constants that can be ORed or added together. Returns: A status code indicating whether the read completed successfully or not. See CommLSReadType for possible Result values. Examples: ex_CongureTemperatureSensor.nxc.

8.3.3.98

string Copy (string str, unsigned int idx, unsigned int len) [inline]

Copy a portion of a string. Returns a substring of a string. Parameters: str A string


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1396

idx The starting index of the substring. len The length of the substring. Returns: The specied substring. Examples: ex_copy.nxc.

8.3.3.99

oat cos (oat x) [inline]

Compute cosine. Computes the cosine of an angle of x radians. Parameters: x Floating point value representing an angle expressed in radians. Returns: Cosine of x. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_sin_cos.nxc.

8.3.3.100

oat cosd (oat x) [inline]

Compute cosine (degrees). Computes the cosine of an angle of x degrees. Parameters: x Floating point value representing an angle expressed in degrees. Returns: Cosine of x.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1397

Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_sind_cosd.nxc.

8.3.3.101

oat cosh (oat x) [inline]

Compute hyperbolic cosine. Computes the hyperbolic cosine of x, expressed in radians. Parameters: x Floating point value. Returns: Hyperbolic cosine of x. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_cosh.nxc.

8.3.3.102

oat coshd (oat x) [inline]

Compute hyperbolic cosine (degrees). Computes the hyperbolic cosine of x, expressed in degrees. Parameters: x Floating point value. Returns: Hyperbolic cosine of x. Warning: This function requires the enhanced NBC/NXC rmware.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1398

8.3.3.103

unsigned int CreateFile (string fname, unsigned int fsize, byte & handle) [inline]

Create a le. Create a new le with the specied lename and size and open it for writing. The le handle is returned in the last parameter, which must be a variable. The loader result code is returned as the value of the function call. The lename and size parameters must be constants, constant expressions, or variables. A le created with a size of zero bytes cannot be written to since the NXC le writing functions do not grow the le if its capacity is exceeded during a write attempt. Parameters: fname The name of the le to create. fsize The size of the le. handle The le handle output from the function call. Returns: The function call result. See Loader module error codes. Examples: ex_CreateFile.nxc, and ex_le_system.nxc.

8.3.3.104

unsigned int CreateFileLinear (string fname, unsigned int fsize, byte & handle) [inline]

Create a linear le. Create a new linear le with the specied lename and size and open it for writing. The le handle is returned in the last parameter, which must be a variable. The loader result code is returned as the value of the function call. The lename and size parameters must be constants, constant expressions, or variables. A le created with a size of zero bytes cannot be written to since the NXC le writing functions do not grow the le if its capacity is exceeded during a write attempt. Parameters: fname The name of the le to create. fsize The size of the le. handle The le handle output from the function call. Returns: The function call result. See Loader module error codes.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1399

Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_CreateFileLinear.nxc.

8.3.3.105

unsigned int CreateFileNonLinear (string fname, unsigned int fsize, byte & handle) [inline]

Create a non-linear le. Create a new non-linear le with the specied lename and size and open it for writing. The le handle is returned in the last parameter, which must be a variable. The loader result code is returned as the value of the function call. The lename and size parameters must be constants, constant expressions, or variables. A le created with a size of zero bytes cannot be written to since the NXC le writing functions do not grow the le if its capacity is exceeded during a write attempt. Parameters: fname The name of the le to create. fsize The size of the le. handle The le handle output from the function call. Returns: The function call result. See Loader module error codes. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_CreateFileNonLinear.nxc.

8.3.3.106

unsigned long CurrentTick () [inline]

Read the current system tick. This function lets you current system tick count. Returns: The current system tick count.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1400

Examples: ex_CurrentTick.nxc, ex_dispgout.nxc, and util_rpm.nxc.

8.3.3.107

byte CustomSensorActiveStatus (byte port) [inline]

Get the custom sensor active status. Return the custom sensor active status value of a sensor. Parameters: port The sensor port. See Input port constants. Returns: The custom sensor active status. Examples: ex_CustomSensorActiveStatus.nxc.

8.3.3.108

byte CustomSensorPercentFullScale (byte port) [inline]

Get the custom sensor percent full scale. Return the custom sensor percent full scale value of a sensor. Parameters: port The sensor port. See Input port constants. Returns: The custom sensor percent full scale. Examples: ex_CustomSensorPercentFullScale.nxc.

8.3.3.109

unsigned int CustomSensorZeroOffset (byte port) [inline]

Get the custom sensor zero offset. Return the custom sensor zero offset value of a sensor.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1401

Parameters: port The sensor port. See Input port constants. Returns: The custom sensor zero offset. Examples: ex_CustomSensorZeroOffset.nxc.

8.3.3.110

unsigned int DeleteFile (string fname) [inline]

Delete a le. Delete the specied le. The loader result code is returned as the value of the function call. The lename parameter must be a constant or a variable. Parameters: fname The name of the le to delete. Returns: The function call result. See Loader module error codes. Examples: ex_delete_data_le.nxc, and ex_DeleteFile.nxc.

8.3.3.111

byte DisplayContrast () [inline]

Read the display contrast setting. This function lets you read the current display contrast setting. Returns: The current display contrast (byte). Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Examples: ex_contrast.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1402

8.3.3.112

unsigned long DisplayDisplay () [inline]

Read the display memory address. This function lets you read the current display memory address. Returns: The current display memory address. Examples: ex_DisplayDisplay.nxc, and ex_dispmisc.nxc.

8.3.3.113

unsigned long DisplayEraseMask () [inline]

Read the display erase mask value. This function lets you read the current display erase mask value. Returns: The current display erase mask value. Examples: ex_DisplayEraseMask.nxc, and ex_dispmisc.nxc.

8.3.3.114

byte DisplayFlags () [inline]

Read the display ags. This function lets you read the current display ags. Valid ag values are listed in the Display ags group. Returns: The current display ags. Examples: ex_DisplayFlags.nxc, and ex_dispmisc.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1403

8.3.3.115

unsigned long DisplayFont () [inline]

Read the display font memory address. This function lets you read the current display font memory address. Returns: The current display font memory address. Examples: ex_addressof.nxc, setdisplayfont.nxc. ex_addressofex.nxc, ex_displayfont.nxc, and ex_-

8.3.3.116

byte DisplayTextLinesCenterFlags () [inline]

Read the display text lines center ags. This function lets you read the current display text lines center ags. Returns: The current display text lines center ags. Examples: ex_DisplayTextLinesCenterFlags.nxc, and ex_dispmisc.nxc.

8.3.3.117

unsigned long DisplayUpdateMask () [inline]

Read the display update mask value. This function lets you read the current display update mask value. Returns: The current display update mask. Examples: ex_DisplayUpdateMask.nxc, and ex_dispmisc.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1404

8.3.3.118

int DISTNxDistance (const byte port, const byte i2caddr) [inline]

Read DISTNx distance value. Read the mindsensors DISTNx sensors distance value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The distance value. Examples: ex_DISTNxDistance.nxc.

8.3.3.119

char DISTNxGP2D12 (const byte port, const byte i2caddr) [inline]

Congure DISTNx as GP2D12. Congure the mindsensors DISTNx sensor as GP2D12. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_DISTNxGP2D12.nxc.

8.3.3.120

char DISTNxGP2D120 (const byte port, const byte i2caddr) [inline]

Congure DISTNx as GP2D120. Congure the mindsensors DISTNx sensor as GP2D120. The port must be congured as a Lowspeed port before using this function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1405

Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_DISTNxGP2D120.nxc.

8.3.3.121

char DISTNxGP2YA02 (const byte port, const byte i2caddr) [inline]

Congure DISTNx as GP2YA02. Congure the mindsensors DISTNx sensor as GP2YA02. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_DISTNxGP2YA02.nxc.

8.3.3.122

char DISTNxGP2YA21 (const byte port, const byte i2caddr) [inline]

Congure DISTNx as GP2YA21. Congure the mindsensors DISTNx sensor as GP2YA21. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1406

i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_DISTNxGP2YA21.nxc.

8.3.3.123

int DISTNxMaxDistance (const byte port, const byte i2caddr) [inline]

Read DISTNx maximum distance value. Read the mindsensors DISTNx sensors maximum distance value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The maximum distance value. Examples: ex_DISTNxMaxDistance.nxc.

8.3.3.124

int DISTNxMinDistance (const byte port, const byte i2caddr) [inline]

Read DISTNx minimum distance value. Read the mindsensors DISTNx sensors minimum distance value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1407

Returns: The distance value. Examples: ex_DISTNxMinDistance.nxc.

8.3.3.125

byte DISTNxModuleType (const byte port, const byte i2caddr) [inline]

Read DISTNx module type value. Read the mindsensors DISTNx sensors module type value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The module type value. Examples: ex_DISTNxModuleType.nxc.

8.3.3.126

byte DISTNxNumPoints (const byte port, const byte i2caddr) [inline]

Read DISTNx num points value. Read the mindsensors DISTNx sensors num points value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The num points value. Examples: ex_DISTNxNumPoints.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1408

8.3.3.127

int DISTNxVoltage (const byte port, const byte i2caddr) [inline]

Read DISTNx voltage value. Read the mindsensors DISTNx sensors voltage value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The voltage value. Examples: ex_DISTNxVoltage.nxc.

8.3.3.128

div_t div (int numer, int denom) [inline]

Integral division. Returns the integral quotient and remainder of the division of numerator by denominator as a structure of type div_t, which has two members: quot and rem. Parameters: numer Numerator. denom Denominator. Returns: The result is returned by value in a structure dened in cstdlib, which has two members. For div_t, these are, in either order: int quot; int rem. Examples: ex_div.nxc.

8.3.3.129

char EllipseOut (int x, int y, byte radiusX, byte radiusY, unsigned long options = DRAW_OPT_NORMAL) [inline]

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1409

Draw an ellipse. This function lets you draw an ellipse on the screen with its center at the specied x and y location, using the specied radii. Optionally specify drawing options. If this argument is not specied it defaults to DRAW_OPT_NORMAL. Valid display option constants are listed in the Drawing option constants group. See also: SysDrawEllipse, DrawEllipseType Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: x The x value for the center of the ellipse. y The y value for the center of the ellipse. radiusX The x axis radius. radiusY The y axis radius. options The optional drawing options. Returns: The result of the drawing operation. Examples: ex_EllipseOut.nxc.

8.3.3.130

void ExitTo (task newTask) [inline]

Exit to another task. Immediately exit the current task and start executing the specied task. Parameters: newTask The task to start executing after exiting the current task. Examples: alternating_tasks.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1410

8.3.3.131

oat exp (oat x) [inline]

Compute exponential function. Computes the base-e exponential function of x, which is the e number raised to the power x. Parameters: x Floating point value. Returns: Exponential value of x. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_exp.nxc.

8.3.3.132

int fclose (byte handle) [inline]

Close le. Close the le associated with the specied le handle. The loader result code is returned as the value of the function call. Parameters: handle The handle of the le to be closed. Returns: The loader result code. Examples: ex_fclose.nxc.

8.3.3.133

int feof (byte handle) [inline]

Check End-of-le indicator. Checks whether the End-of-File indicator associated with the handle is set, returning a value different from zero if it is.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1411

Parameters: handle The handle of the le to check. Returns: Currently always returns 0. Examples: ex_feof.nxc.

8.3.3.134

int fush (byte handle) [inline]

Flush le. Writes any buffered data to the le. A zero value indicates success. Parameters: handle The handle of the le to be ushed. Returns: Currently always returns 0. Examples: ex_fush.nxc.

8.3.3.135

char fgetc (byte handle) [inline]

Get character from le. Returns the character currently pointed to by the internal le position indicator of the le specied by the handle. The internal le position indicator is then advanced by one character to point to the next character. The functions fgetc and getc are equivalent. Parameters: handle The handle of the le from which the character is read. Returns: The character read from the le. Examples: ex_fgetc.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1412

8.3.3.136

string fgets (string & str, int num, byte handle) [inline]

Get string from le. Reads characters from a le and stores them as a string into str until (num-1) characters have been read or either a newline or a the End-of-File is reached, whichever comes rst. A newline character makes fgets stop reading, but it is considered a valid character and therefore it is included in the string copied to str. A null character is automatically appended in str after the characters read to signal the end of the string. Returns the string parameter. Parameters: str The string where the characters are stored. num The maximum number of characters to be read. handle The handle of the le from which the characters are read. Returns: The string read from the le. Examples: ex_fgets.nxc.

8.3.3.137

unsigned int FindFirstFile (string & fname, byte & handle) [inline]

Start searching for les. This function lets you begin iterating through les stored on the NXT. Parameters: fname On input this contains the lename pattern you are searching for. On output this contains the name of the rst le found that matches the pattern. handle The search handle input to and output from the function call. Returns: The function call result. See Loader module error codes. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_ndrstle.nxc, and ex_ndnextle.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1413

8.3.3.138

unsigned int FindNextFile (string & fname, byte & handle) [inline]

Continue searching for les. This function lets you continue iterating through les stored on the NXT. Parameters: fname On output this contains the name of the next le found that matches the pattern used when the search began by calling FindFirstFile. handle The search handle input to and output from the function call. Returns: The function call result. See Loader module error codes. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_ndrstle.nxc, and ex_ndnextle.nxc.

8.3.3.139

unsigned long FirstTick () [inline]

Get the rst tick. Return an unsigned 32-bit value, which is the system timing value (called a "tick") in milliseconds at the time that the program began running. Returns: The tick count at the start of program execution. Examples: ex_FirstTick.nxc.

8.3.3.140

string Flatten (variant num) [inline]

Flatten a number to a string. Return a string containing the byte representation of the specied value.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1414

Parameters: num A number. Returns: A string containing the byte representation of the parameter num. Examples: ex_Flatten.nxc, and ex_string.nxc.

8.3.3.141

string FlattenVar (variant x) [inline]

Flatten any data to a string. Return a string containing the byte representation of the specied value. See also: UnattenVar Parameters: x Any NXC datatype. Returns: A string containing the byte representation of the parameter x. Examples: ex_FlattenVar.nxc, ex_string.nxc, and ex_UnattenVar.nxc.

8.3.3.142

void Float (byte outputs) [inline]

Float motors. Make outputs oat. Float is an alias for Coast. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. Examples: ex_oat.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1415

8.3.3.143

oat oor (oat x) [inline]

Round down value. Computes the largest integral value that is not greater than x. Parameters: x Floating point value. Returns: The largest integral value not greater than x. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_oor.nxc.

8.3.3.144

void Follows (task task1, task task2, ..., task taskN) [inline]

Declare tasks that this task follows. Schedule this task to follow the specied tasks so that it will execute once any of the specied tasks has completed executing. This statement should occur once within a task - preferably at the start of the task denition. If multiple tasks declare that they follow the same task then they will all execute simultaneously unless other dependencies prevent them from doing so. Any number of tasks may be listed in the Follows statement. Parameters: task1 The rst task that this task follows. task2 The second task that this task follows. taskN The last task that this task follows. Examples: ex_Follows.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1416

8.3.3.145

char FontNumOut (int x, int y, string lename, variant value, unsigned long options = DRAW_OPT_NORMAL) [inline]

Draw a number with font. Draw a numeric value on the screen at the specied x and y location using a custom RIC font. Optionally specify drawing options. If this argument is not specied it defaults to DRAW_OPT_NORMAL. Valid display option constants are listed in the Drawing option constants group. See the Font drawing option constants for options specic to the font drawing functions. See also: FontTextOut, SysDrawFont, DrawFontType Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: x The x value for the start of the number output. y The y value for the start of the number output. lename The lename of the RIC font. value The value to output to the LCD screen. Any numeric type is supported. options The optional drawing options. Returns: The result of the drawing operation. Examples: ex_dispfnout.nxc.

8.3.3.146

char FontTextOut (int x, int y, string lename, string str, unsigned long options = DRAW_OPT_NORMAL) [inline]

Draw text with font. Draw a text value on the screen at the specied x and y location using a custom RIC font. Optionally specify drawing options. If this argument is not specied it defaults to DRAW_OPT_NORMAL. Valid display option constants are listed in the Drawing option constants group. See the Font drawing option constants for options specic to the font drawing functions.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1417

See also: FontNumOut, SysDrawFont, DrawFontType Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: x The x value for the start of the text output. y The y value for the start of the text output. lename The lename of the RIC font. str The text to output to the LCD screen. options The optional drawing options. Returns: The result of the drawing operation. Examples: ex_dispftout.nxc.

8.3.3.147

byte fopen (string lename, const string mode)

Open le. Opens the le whose name is specied in the parameter lename and associates it with a le handle that can be identied in future operations by the handle that is returned. The operations that are allowed on the stream and how these are performed are dened by the mode parameter. Parameters: lename The name of the le to be opened. mode The le access mode. Valid values are "r" - opens an existing le for reading, "w" - creates a new le and opens it for writing, and "a" - opens an existing le for appending to the end of the le. Returns: The handle to the opened le. Examples: ex_fopen.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1418

8.3.3.148

void ForceOff (byte num) [inline]

Turn off NXT. Force the NXT to turn off if the specied value is greater than zero. Parameters: num If greater than zero the NXT will turn off. Examples: ex_ForceOff.nxc.

8.3.3.149

string FormatNum (string fmt, variant num) [inline]

Format a number. Return the formatted string using the format and value. Use a standard numeric sprintf format specier within the format string. The input string parameter may be a variable, constant, or expression. Parameters: fmt The string format containing a sprintf numeric format specier. num A number. Returns: A string containing the formatted numeric value. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_acos.nxc, ex_acosd.nxc, ex_addressof.nxc, ex_addressofex.nxc, ex_asin.nxc, ex_asind.nxc, ex_atan.nxc, ex_atan2.nxc, ex_atan2d.nxc, ex_atand.nxc, ex_delete_data_le.nxc, ex_displayfont.nxc, ex_le_system.nxc, ex_FormatNum.nxc, ex_GetBrickDataAddress.nxc, ex_reladdressof.nxc, ex_setdisplayfont.nxc, ex_string.nxc, ex_tan.nxc, ex_tand.nxc, util_battery_1.nxc, util_battery_2.nxc, and util_rpm.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1419

8.3.3.150

void fprintf (byte handle, string format, variant value) [inline]

Write formatted data to le. Writes a sequence of data formatted as the format argument species to a le. After the format parameter, the function expects one value argument. Parameters: handle The handle of the le to write to. format A string specifying the desired format. value A value to be formatted for writing to the le. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_fprintf.nxc.

8.3.3.151

char fputc (char ch, byte handle) [inline]

Write character to le. Writes a character to the le and advances the position indicator. The character is written at the current position of the le as indicated by the internal position indicator, which is then advanced one character. If there are no errors, the same character that has been written is returned. If an error occurs, EOF is returned. Parameters: ch The character to be written. handle The handle of the le where the character is to be written. Returns: The character written to the le. Examples: ex_fputc.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1420

8.3.3.152

int fputs (string str, byte handle) [inline]

Write string to le. Writes the string to the le specied by the handle. The null terminating character at the end of the string is not written to the le. If there are no errors, a non-negative value is returned. If an error occurs, EOF is returned. Parameters: str The string of characters to be written. handle The handle of the le where the string is to be written. Returns: The number of characters written to the le. Examples: ex_fputs.nxc.

8.3.3.153

oat frac (oat x) [inline]

Compute fractional part. Computes the fractional part of x. Parameters: x Floating point value. Returns: Fractional part of x. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_frac.nxc.

8.3.3.154

unsigned int FreeMemory (void) [inline]

Get free ash memory. Get the number of bytes of ash memory that are available for use.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1421

Returns: The number of bytes of unused ash memory. Examples: ex_FreeMemory.nxc.

8.3.3.155

int fseek (byte handle, long offset, int origin) [inline]

Reposition le position indicator. Sets the position indicator associated with the le to a new position dened by adding offset to a reference position specied by origin. Parameters: handle The handle of the le. offset The number of bytes to offset from origin. origin Position from where offset is added. It is specied by one of the following constants: SEEK_SET - beginning of le, SEEK_CUR - current position of the le pointer, or SEEK_END - end of le. fseek origin constants Returns: A value of zero if successful or non-zero otherwise. See Loader module error codes. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Examples: ex_fseek.nxc.

8.3.3.156

unsigned long ftell (byte handle) [inline]

Get current position in le. Returns the current value of the le position indicator of the specied handle. Parameters: handle The handle of the le.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1422

Returns: The current le position in the open le. Warning: This function requires the enhanced NBC/NXC rmware version 1.31+. Examples: ex_ftell.nxc.

8.3.3.157

void GetBrickDataAddress (byte & data[ ]) [inline]

Get NXT address. This method reads the address of the NXT and stores it in the data buffer provided. Parameters: data The byte array reference that will contain the device address. Examples: ex_GetBrickDataAddress.nxc.

8.3.3.158

void GetBTConnectionAddress (const byte conn, byte & data[ ]) [inline]

Get bluetooth device address. This method reads the address of the device at the specied index within the Bluetooth connection table and stores it in the data buffer provided. Parameters: conn The connection slot (0..3). data The byte array reference that will contain the device address. Examples: ex_GetBTConnectionAddress.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1423

8.3.3.159

void GetBTDeviceAddress (const byte devidx, byte & data[ ]) [inline]

Get bluetooth device address. This method reads the address of the device at the specied index within the Bluetooth device table and stores it in the data buffer provided. Parameters: devidx The device table index. data The byte array reference that will contain the device address. Examples: ex_GetBTDeviceAddress.nxc.

8.3.3.160

void GetBTInputBuffer (const byte offset, byte cnt, byte & data[ ]) [inline]

Get bluetooth input buffer data. This method reads count bytes of data from the Bluetooth input buffer and writes it to the buffer provided. Parameters: offset A constant offset into the bluetooth input buffer. cnt The number of bytes to read. data The byte array reference which will contain the data read from the bluetooth input buffer. Examples: ex_GetBTInputBuffer.nxc.

8.3.3.161

void GetBTOutputBuffer (const byte offset, byte cnt, byte & data[ ]) [inline]

Get bluetooth output buffer data. This method reads count bytes of data from the Bluetooth output buffer and writes it to the buffer provided.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1424

Parameters: offset A constant offset into the bluetooth output buffer. cnt The number of bytes to read. data The byte array reference which will contain the data read from the bluetooth output buffer. Examples: ex_GetBTOutputBuffer.nxc.

8.3.3.162

void GetButtonModuleValue (unsigned int offset, variant & value) [inline]

Get Button module IOMap value. Read a value from the Button module IOMap structure. You provide the offset into the Button module IOMap structure where you want to read the value from along with a variable that will store the value. The type of the variable determines how many bytes are read from the IOMap. Parameters: offset The number of bytes offset from the start of the IOMap structure where the value should be read. See Button module IOMAP offsets. value A variable that will contain the value read from the IOMap.

8.3.3.163

int getchar () [inline]

Get character from stdin. Returns the next character from the standard input (stdin). It is equivalent to getc with stdin as its argument. On the NXT this means wait for a button press and return the value of the button pressed. Returns: The pressed button. See Button name constants. Examples: ex_getchar.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1425

8.3.3.164

void GetCommandModuleBytes (unsigned int offset, unsigned int count, byte & data[ ]) [inline]

Get Command module IOMap bytes. Read one or more bytes of data from Command module IOMap structure. You provide the offset into the Command module IOMap structure where you want to start reading, the number of bytes to read from that location, and a byte array where the data will be stored. Parameters: offset The number of bytes offset from the start of the Command module IOMap structure where the data should be read. See Command module IOMAP offsets. count The number of bytes to read from the specied Command module IOMap offset. data A byte array that will contain the data read from the Command module IOMap.

8.3.3.165

void GetCommandModuleValue (unsigned int offset, variant & value) [inline]

Get Command module IOMap value. Read a value from the Command module IOMap structure. You provide the offset into the Command module IOMap structure where you want to read the value from along with a variable that will store the value. The type of the variable determines how many bytes are read from the IOMap. Parameters: offset The number of bytes offset from the start of the IOMap structure where the value should be read. See Command module IOMAP offsets. value A variable that will contain the value read from the IOMap.

8.3.3.166

void GetCommModuleBytes (unsigned int offset, unsigned int count, byte & data[ ]) [inline]

Get Comm module IOMap bytes. Read one or more bytes of data from Comm module IOMap structure. You provide the offset into the Comm module IOMap structure where you want to start reading, the number of bytes to read from that location, and a byte array where the data will be stored.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1426

Parameters: offset The number of bytes offset from the start of the Comm module IOMap structure where the data should be read. See Comm module IOMAP offsets. count The number of bytes to read from the specied Comm module IOMap offset. data A byte array that will contain the data read from the Comm module IOMap.

8.3.3.167

void GetCommModuleValue (unsigned int offset, variant & value) [inline]

Get Comm module IOMap value. Read a value from the Comm module IOMap structure. You provide the offset into the Comm module IOMap structure where you want to read the value from along with a variable that will store the value. The type of the variable determines how many bytes are read from the IOMap. Parameters: offset The number of bytes offset from the start of the IOMap structure where the value should be read. See Comm module IOMAP offsets. value A variable that will contain the value read from the IOMap.

8.3.3.168

void GetDisplayModuleBytes (unsigned int offset, unsigned int count, byte & data[ ]) [inline]

Get Display module IOMap bytes. Read one or more bytes of data from Display module IOMap structure. You provide the offset into the Display module IOMap structure where you want to start reading, the number of bytes to read from that location, and a byte array where the data will be stored. Parameters: offset The number of bytes offset from the start of the Display module IOMap structure where the data should be read. See Display module IOMAP offsets. count The number of bytes to read from the specied Display module IOMap offset. data A byte array that will contain the data read from the Display module IOMap.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1427

8.3.3.169

void GetDisplayModuleValue (unsigned int offset, variant & value) [inline]

Get Display module IOMap value. Read a value from the Display module IOMap structure. You provide the offset into the Display module IOMap structure where you want to read the value from along with a variable that will store the value. The type of the variable determines how many bytes are read from the IOMap. Parameters: offset The number of bytes offset from the start of the IOMap structure where the value should be read. See Display module IOMAP offsets. value A variable that will contain the value read from the IOMap.

8.3.3.170

void GetDisplayNormal (const byte x, const byte line, unsigned int cnt, byte & data[ ]) [inline]

Read pixel data from the normal display buffer. Read "cnt" bytes from the normal display memory into the data array. Start reading from the specied x, line coordinate. Each byte of data read from screen memory is a vertical strip of 8 bits at the desired location. Each bit represents a single pixel on the LCD screen. Use TEXTLINE_1 through TEXTLINE_8 for the "line" parameter. Parameters: x The desired x position from which to read pixel data. line The desired line from which to read pixel data. cnt The number of bytes of pixel data to read. data The array of bytes into which pixel data is read. Examples: ex_GetDisplayNormal.nxc.

8.3.3.171

void GetDisplayPopup (const byte x, const byte line, unsigned int cnt, byte & data[ ]) [inline]

Read pixel data from the popup display buffer. Read "cnt" bytes from the popup display memory into the data array. Start reading from the specied x, line coordinate. Each
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1428

byte of data read from screen memory is a vertical strip of 8 bits at the desired location. Each bit represents a single pixel on the LCD screen. Use TEXTLINE_1 through TEXTLINE_8 for the "line" parameter. Parameters: x The desired x position from which to read pixel data. line The desired line from which to read pixel data. cnt The number of bytes of pixel data to read. data The array of bytes into which pixel data is read. Examples: ex_GetDisplayPopup.nxc.

8.3.3.172

void GetHSInputBuffer (const byte offset, byte cnt, byte & data[ ]) [inline]

Get hi-speed port input buffer data. This method reads count bytes of data from the hi-speed port input buffer and writes it to the buffer provided. Parameters: offset A constant offset into the hi-speed port input buffer. cnt The number of bytes to read. data The byte array reference which will contain the data read from the hi-speed port input buffer. Examples: ex_GetHSInputBuffer.nxc.

8.3.3.173

void GetHSOutputBuffer (const byte offset, byte cnt, byte & data[ ]) [inline]

Get hi-speed port output buffer data. This method reads count bytes of data from the hi-speed port output buffer and writes it to the buffer provided. Parameters: offset A constant offset into the hi-speed port output buffer.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1429

cnt The number of bytes to read. data The byte array reference which will contain the data read from the hi-speed port output buffer. Examples: ex_GetHSOutputBuffer.nxc.

8.3.3.174

variant GetInput (const byte & port, const byte eld) [inline]

Get an input eld value. Return the value of the specied eld of a sensor on the specied port. Parameters: port The sensor port. See Input port constants. A constant or a variable may be used (no expressions). eld An input eld constant. See Input eld constants. Returns: The input eld value. Examples: ex_GetInput.nxc.

8.3.3.175

void GetInputModuleValue (unsigned int offset, variant & value) [inline]

Get Input module IOMap value. Read a value from the Input module IOMap structure. You provide the offset into the Input module IOMap structure where you want to read the value from along with a variable that will store the value. The type of the variable determines how many bytes are read from the IOMap. Parameters: offset The number of bytes offset from the start of the IOMap structure where the value should be read. See Input module IOMAP offsets. value A variable that will contain the value read from the IOMap.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1430

8.3.3.176

void GetIOMapBytes (string moduleName, unsigned int offset, unsigned int count, byte & data[ ]) [inline]

Get IOMap bytes by name. Read one or more bytes of data from an IOMap structure. The IOMap structure is specied by its module name. You also provide the offset into the IOMap structure where you want to start reading, the number of bytes to read from that location, and a byte array where the data will be stored. Parameters: moduleName The module name of the IOMap. See NXT rmware module names. offset The number of bytes offset from the start of the IOMap structure where the data should be read count The number of bytes to read from the specied IOMap offset. data A byte array that will contain the data read from the IOMap

8.3.3.177

void GetIOMapBytesByID (unsigned long moduleId, unsigned int offset, unsigned int count, byte & data[ ]) [inline]

Get IOMap bytes by ID. Read one or more bytes of data from an IOMap structure. The IOMap structure is specied by its Module ID. You also provide the offset into the IOMap structure where you want to start reading, the number of bytes to read from that location, and a byte array where the data will be stored. Parameters: moduleId The module ID of the IOMap. See NXT rmware module IDs. offset The number of bytes offset from the start of the IOMap structure where the data should be read. count The number of bytes to read from the specied IOMap offset. data A byte array that will contain the data read from the IOMap. Warning: This function requires the enhanced NBC/NXC rmware.

8.3.3.178

void GetIOMapValue (string moduleName, unsigned int offset, variant & value) [inline]

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1431

Get IOMap value by name. Read a value from an IOMap structure. The IOMap structure is specied by its module name. You also provide the offset into the IOMap structure where you want to read the value along with a variable that will contain the IOMap value. Parameters: moduleName The module name of the IOMap. See NXT rmware module names. offset The number of bytes offset from the start of the IOMap structure where the value should be read value A variable that will contain the value read from the IOMap

8.3.3.179

void GetIOMapValueByID (unsigned long moduleId, unsigned int offset, variant & value) [inline]

Get IOMap value by ID. Read a value from an IOMap structure. The IOMap structure is specied by its Module ID. You also provide the offset into the IOMap structure where you want to read the value along with a variable that will contain the IOMap value. Parameters: moduleId The module ID of the IOMap. See NXT rmware module IDs. offset The number of bytes offset from the start of the IOMap structure where the value should be read. value A variable that will contain the value read from the IOMap. Warning: This function requires the enhanced NBC/NXC rmware.

8.3.3.180

char GetLastResponseInfo (bool Clear, byte & Length, byte & Command, byte & Buffer[ ]) [inline]

Read last response information. Read the last direct or system command response packet received by the NXT. Optionally clear the response after retrieving the information. Warning: This function requires the enhanced NBC/NXC rmware version 1.31+.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1432

Parameters: Clear A boolean value indicating whether to clear the response or not. Length The response packet length. Command The original command byte. Buffer The response packet buffer. Returns: The response status code. Examples: ex_GetLastResponseInfo.nxc.

8.3.3.181

void GetLoaderModuleValue (unsigned int offset, variant & value) [inline]

Get Loader module IOMap value. Read a value from the Loader module IOMap structure. You provide the offset into the Loader module IOMap structure where you want to read the value from along with a variable that will store the value. The type of the variable determines how many bytes are read from the IOMap. Parameters: offset The number of bytes offset from the start of the IOMap structure where the value should be read. See Loader module IOMAP offsets. value A variable that will contain the value read from the IOMap.

8.3.3.182

void GetLowSpeedModuleBytes (unsigned int offset, unsigned int count, byte & data[ ]) [inline]

Get Lowspeed module IOMap bytes. Read one or more bytes of data from Lowspeed module IOMap structure. You provide the offset into the Lowspeed module IOMap structure where you want to start reading, the number of bytes to read from that location, and a byte array where the data will be stored. Parameters: offset The number of bytes offset from the start of the Lowspeed module IOMap structure where the data should be read. See Low speed module IOMAP offsets.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1433

count The number of bytes to read from the specied Lowspeed module IOMap offset. data A byte array that will contain the data read from the Lowspeed module IOMap.

8.3.3.183

void GetLowSpeedModuleValue (unsigned int offset, variant & value) [inline]

Get LowSpeed module IOMap value. Read a value from the LowSpeed module IOMap structure. You provide the offset into the Command module IOMap structure where you want to read the value from along with a variable that will store the value. The type of the variable determines how many bytes are read from the IOMap. Parameters: offset The number of bytes offset from the start of the IOMap structure where the value should be read. See Low speed module IOMAP offsets. value A variable that will contain the value read from the IOMap.

8.3.3.184

void GetLSInputBuffer (const byte port, const byte offset, byte cnt, byte & data[ ]) [inline]

Get I2C input buffer data. This method reads count bytes of data from the I2C input buffer for the specied port and writes it to the buffer provided. Parameters: port A constant port number (S1..S4). See Input port constants. offset A constant offset into the I2C input buffer. cnt The number of bytes to read. data The byte array reference which will contain the data read from the I2C input buffer. Examples: ex_GetLSInputBuffer.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1434

8.3.3.185

void GetLSOutputBuffer (const byte port, const byte offset, byte cnt, byte & data[ ]) [inline]

Get I2C output buffer data. This method reads cnt bytes of data from the I2C output buffer for the specied port and writes it to the buffer provided. Parameters: port A constant port number (S1..S4). See Input port constants. offset A constant offset into the I2C output buffer. cnt The number of bytes to read. data The byte array reference which will contain the data read from the I2C output buffer. Examples: ex_GetLSOutputBuffer.nxc.

8.3.3.186

char GetMemoryInfo (bool Compact, unsigned int & PoolSize, unsigned int & DataspaceSize) [inline]

Read memory information. Read the current pool size and dataspace size. Optionally compact the dataspace before returning the information. Running programs have a maximum of 32k bytes of memory available. The amount of free RAM can be calculated by subtracting the value returned by this function from POOL_MAX_SIZE. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: Compact A boolean value indicating whether to compact the dataspace or not. PoolSize The current pool size. DataspaceSize The current dataspace size. Returns: The function call result. It will be NO_ERR if the compact operation is not performed. Otherwise it will be the result of the compact operation. Examples: ex_getmemoryinfo.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1435

8.3.3.187

variant GetOutput (byte output, const byte eld) [inline]

Get output eld value. Get the value of the specied eld for the specied output. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. eld Output port eld to access, this should be a constant, see Output eld constants. Returns: The requested output eld value. Examples: ex_getoutput.nxc.

8.3.3.188

void GetOutputModuleValue (unsigned int offset, variant & value) [inline]

Get Output module IOMap value. Read a value from the Output module IOMap structure. You provide the offset into the Output module IOMap structure where you want to read the value from along with a variable that will store the value. The type of the variable determines how many bytes are read from the IOMap. Parameters: offset The number of bytes offset from the start of the IOMap structure where the value should be read. See Output module IOMAP offsets. value A variable that will contain the value read from the IOMap.

8.3.3.189

void GetSoundModuleValue (unsigned int offset, variant & value) [inline]

Get Sound module IOMap value. Read a value from the Sound module IOMap structure. You provide the offset into the Sound module IOMap structure where you want to read the value from along with a variable that will store the value. The type of the variable determines how many bytes are read from the IOMap.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1436

Parameters: offset The number of bytes offset from the start of the IOMap structure where the value should be read. See Sound module IOMAP offsets. value A variable that will contain the value read from the IOMap.

8.3.3.190

void GetUIModuleValue (unsigned int offset, variant & value) [inline]

Get Ui module IOMap value. Read a value from the Ui module IOMap structure. You provide the offset into the Ui module IOMap structure where you want to read the value from along with a variable that will store the value. The type of the variable determines how many bytes are read from the IOMap. Parameters: offset The number of bytes offset from the start of the IOMap structure where the value should be read. See Ui module IOMAP offsets. value A variable that will contain the value read from the IOMap.

8.3.3.191

void GetUSBInputBuffer (const byte offset, byte cnt, byte & data[ ]) [inline]

Get usb input buffer data. This method reads count bytes of data from the usb input buffer and writes it to the buffer provided. Parameters: offset A constant offset into the usb input buffer. cnt The number of bytes to read. data The byte array reference which will contain the data read from the usb input buffer. Examples: ex_GetUSBInputBuffer.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1437

8.3.3.192

void GetUSBOutputBuffer (const byte offset, byte cnt, byte & data[ ]) [inline]

Get usb output buffer data. This method reads count bytes of data from the usb output buffer and writes it to the buffer provided. Parameters: offset A constant offset into the usb output buffer. cnt The number of bytes to read. data The byte array reference which will contain the data read from the usb output buffer. Examples: ex_GetUSBOutputBuffer.nxc.

8.3.3.193

void GetUSBPollBuffer (const byte offset, byte cnt, byte & data[ ]) [inline]

Get usb poll buffer data. This method reads count bytes of data from the usb poll buffer and writes it to the buffer provided. Parameters: offset A constant offset into the usb poll buffer. cnt The number of bytes to read. data The byte array reference which will contain the data read from the usb poll buffer. Examples: ex_GetUSBPollBuffer.nxc.

8.3.3.194

void glAddToAngleX (int glValue) [inline]

Add to the X axis angle. Add the specied value to the existing X axis angle. Parameters: glValue The value to add to the X axis angle.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1438

Examples: glBoxDemo.nxc, and glCircleDemo.nxc.

8.3.3.195

void glAddToAngleY (int glValue) [inline]

Add to the Y axis angle. Add the specied value to the existing Y axis angle. Parameters: glValue The value to add to the Y axis angle. Examples: glBoxDemo.nxc, eDemo.nxc. glCircleDemo.nxc, glScaleDemo.nxc, and glTranslat-

8.3.3.196

void glAddToAngleZ (int glValue) [inline]

Add to the Z axis angle. Add the specied value to the existing Z axis angle. Parameters: glValue The value to add to the Z axis angle.

8.3.3.197

void glAddVertex (int glX, int glY, int glZ) [inline]

Add a vertex to an object. Add a vertex to an object currently being dened. This function should only be used between glBegin and glEnd which are themselves nested within a glBeginObject and glEndObject pair. Parameters: glX The X axis coordinate. glY The Y axis coordinate. glZ The Z axis coordinate.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1439

8.3.3.198

void glBegin (int glBeginMode) [inline]

Begin a new polygon for the current object. Start dening a polygon surface for the current graphics object using the specied begin mode. Parameters: glBeginMode The desired mode. See Graphics library begin modes.

8.3.3.199

int glBeginObject () [inline]

Begin dening an object. Start the process of dening a graphics library object using low level functions such as glBegin, glAddVertex, and glEnd. Returns: The object index of the new object being created.

8.3.3.200

void glBeginRender () [inline]

Begin a new render. Start the process of rendering the existing graphic objects. Examples: glBoxDemo.nxc, glCircleDemo.nxc, glRotateDemo.nxc, glScaleDemo.nxc, and glTranslateDemo.nxc.

8.3.3.201

int glBox (int glMode, int glSizeX, int glSizeY, int glSizeZ) [inline]

Create a 3D box. Dene a 3D box using the specied begin mode for all faces. The center of the box is at the origin of the XYZ axis with width, height, and depth specied via the glSizeX, glSizeY, and glSizeZ parameters. Parameters: glMode The begin mode for each surface. See Graphics library begin modes.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1440

glSizeX The X axis size (width). glSizeY The Y axis size (height). glSizeZ The Z axis size (depth). Examples: glBoxDemo.nxc, glCircleDemo.nxc, glRotateDemo.nxc, glScaleDemo.nxc, and glTranslateDemo.nxc.

8.3.3.202

void glCallObject (int glObjectId) [inline]

Call a graphic object. Tell the graphics library that you want it to include the specied object in the render. Parameters: glObjectId The desired object id. Examples: glBoxDemo.nxc, glCircleDemo.nxc, glRotateDemo.nxc, glScaleDemo.nxc, and glTranslateDemo.nxc.

8.3.3.203

int glCos32768 (int glAngle) [inline]

Table-based cosine scaled by 32768. Return the cosine of the specied angle in degrees. The result is scaled by 32768. Parameters: glAngle The angle in degrees. Returns: The cosine value scaled by 32768.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1441

8.3.3.204

int glCube (int glMode, int glSize) [inline]

Create a 3D cube. Dene a 3D cube using the specied begin mode for all faces. The center of the box is at the origin of the XYZ axis with equal width, height, and depth specied via the glSize parameter. Parameters: glMode The begin mode for each surface. See Graphics library begin modes. glSize The cubes width, height, and depth. Examples: glBoxDemo.nxc.

8.3.3.205

void glEnd () [inline]

Finish a polygon for the current object. Stop dening a polgyon surface for the current graphics object. 8.3.3.206 void glEndObject () [inline]

Stop dening an object. Finish the process of dening a graphics library object. Call this function after you have completed the object denition. 8.3.3.207 void glFinishRender () [inline]

Finish the current render. Rotate the vertex list, clear the screen, and draw the rendered objects to the LCD. Examples: glBoxDemo.nxc, glCircleDemo.nxc, glRotateDemo.nxc, glScaleDemo.nxc, and glTranslateDemo.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1442

8.3.3.208

void glInit () [inline]

Initialize graphics library. Setup all the necessary data for the graphics library to function. Call this function before any other graphics library routine. Examples: glBoxDemo.nxc, glCircleDemo.nxc, glRotateDemo.nxc, glScaleDemo.nxc, and glTranslateDemo.nxc.

8.3.3.209

void glObjectAction (int glObjectId, int glAction, int glValue) [inline]

Perform an object action. Execute the specied action on the specied object. Parameters: glObjectId The object id. glAction The action to perform on the object. See Graphics library actions. glValue The setting value. Examples: glBoxDemo.nxc, eDemo.nxc. glRotateDemo.nxc, glScaleDemo.nxc, and glTranslat-

8.3.3.210

int glPyramid (int glMode, int glSizeX, int glSizeY, int glSizeZ) [inline]

Create a 3D pyramid. Dene a 3D pyramid using the specied begin mode for all faces. The center of the pyramid is at the origin of the XYZ axis with width, height, and depth specied via the glSizeX, glSizeY, and glSizeZ parameters. Parameters: glMode glSizeX glSizeY glSizeZ The begin mode for each surface. See Graphics library begin modes. The X axis size (width). The Y axis size (height). The Z axis size (depth).

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1443

8.3.3.211

void glSet (int glType, int glValue) [inline]

Set graphics library options. Adjust graphic library settings for circle size and cull mode. Parameters: glType The setting type. See Graphics library settings. glValue The setting value. For culling modes see Graphics library cull mode. Examples: glCircleDemo.nxc, and glTranslateDemo.nxc.

8.3.3.212

void glSetAngleX (int glValue) [inline]

Set the X axis angle. Set the X axis angle to the specied value. Parameters: glValue The new X axis angle. Examples: glBoxDemo.nxc, glCircleDemo.nxc, glRotateDemo.nxc, glScaleDemo.nxc, and glTranslateDemo.nxc.

8.3.3.213

void glSetAngleY (int glValue) [inline]

Set the Y axis angle. Set the Y axis angle to the specied value. Parameters: glValue The new Y axis angle.

8.3.3.214

void glSetAngleZ (int glValue) [inline]

Set the Z axis angle. Set the Z axis angle to the specied value.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1444

Parameters: glValue The new Z axis angle.

8.3.3.215

int glSin32768 (int glAngle) [inline]

Table-based sine scaled by 32768. Return the sine of the specied angle in degrees. The result is scaled by 32768. Parameters: glAngle The angle in degrees. Returns: The sine value scaled by 32768.

8.3.3.216

char GraphicArrayOut (int x, int y, byte data[ ], unsigned long options = DRAW_OPT_NORMAL) [inline]

Draw a graphic image from byte array. Draw a graphic image byte array on the screen at the specied x and y location. Optionally specify drawing options. If this argument is not specied it defaults to DRAW_OPT_NORMAL. Valid display option constants are listed in the Drawing option constants group. If the le cannot be found then nothing will be drawn and no errors will be reported. See also: SysDrawGraphicArray, DrawGraphicArrayType Parameters: x The x value for the position of the graphic image. y The y value for the position of the graphic image. data The byte array of the RIC graphic image. options The optional drawing options. Returns: The result of the drawing operation. Examples: ex_dispgaout.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1445

8.3.3.217

char GraphicArrayOutEx (int x, int y, byte data[ ], byte vars[ ], unsigned long options = DRAW_OPT_NORMAL) [inline]

Draw a graphic image from byte array with parameters. Draw a graphic image byte array on the screen at the specied x and y location using an array of parameters. Optionally specify drawing options. If this argument is not specied it defaults to DRAW_OPT_NORMAL. Valid display option constants are listed in the Drawing option constants group. If the le cannot be found then nothing will be drawn and no errors will be reported. See also: SysDrawGraphicArray, DrawGraphicArrayType Parameters: x The x value for the position of the graphic image. y The y value for the position of the graphic image. data The byte array of the RIC graphic image. vars The byte array of parameters. options The optional drawing options. Returns: The result of the drawing operation. Examples: ex_dispgaoutex.nxc.

8.3.3.218

char GraphicOut (int x, int y, string lename, unsigned long options = DRAW_OPT_NORMAL) [inline]

Draw a graphic image. Draw a graphic image le on the screen at the specied x and y location. Optionally specify drawing options. If this argument is not specied it defaults to DRAW_OPT_NORMAL. Valid display option constants are listed in the Drawing option constants group. If the le cannot be found then nothing will be drawn and no errors will be reported. See also: SysDrawGraphic, DrawGraphicType

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1446

Parameters: x The x value for the position of the graphic image. y The y value for the position of the graphic image. lename The lename of the RIC graphic image. options The optional drawing options. Returns: The result of the drawing operation. Examples: ex_dispgout.nxc, and ex_GraphicOut.nxc.

8.3.3.219

char GraphicOutEx (int x, int y, string lename, byte vars[ ], unsigned long options = DRAW_OPT_NORMAL) [inline]

Draw a graphic image with parameters. Draw a graphic image le on the screen at the specied x and y location using an array of parameters. Optionally specify drawing options. If this argument is not specied it defaults to DRAW_OPT_NORMAL. Valid display option constants are listed in the Drawing option constants group. If the le cannot be found then nothing will be drawn and no errors will be reported. See also: SysDrawGraphic, DrawGraphicType Parameters: x The x value for the position of the graphic image. y The y value for the position of the graphic image. lename The lename of the RIC graphic image. vars The byte array of parameters. options The optional drawing options. Returns: The result of the drawing operation. Examples: ex_dispgoutex.nxc, and ex_GraphicOutEx.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1447

8.3.3.220

int HSDataMode (void) [inline]

Get hi-speed port datamode. This method returns the value of the hi-speed port data mode. Returns: The hi-speed port data mode. See Data mode constants. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Examples: ex_DataMode.nxc.

8.3.3.221

byte HSFlags (void) [inline]

Get hi-speed port ags. This method returns the value of the hi-speed port ags. Returns: The hi-speed port ags. See Hi-speed port ags constants. Examples: ex_HSFlags.nxc.

8.3.3.222

byte HSInputBufferInPtr (void) [inline]

Get hi-speed port input buffer in-pointer. This method returns the value of the input pointer of the hi-speed port input buffer. Returns: The hi-speed port input buffers in-pointer value. Examples: ex_HSInputBufferInPtr.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1448

8.3.3.223

byte HSInputBufferOutPtr (void) [inline]

Get hi-speed port input buffer out-pointer. This method returns the value of the output pointer of the hi-speed port input buffer. Returns: The hi-speed port input buffers out-pointer value. Examples: ex_HSInputBufferOutPtr.nxc.

8.3.3.224

int HSMode (void) [inline]

Get hi-speed port mode. This method returns the value of the hi-speed port mode. Returns: The hi-speed port mode (data bits, stop bits, parity). See Hi-speed port data bits constants, Hi-speed port stop bits constants, Hi-speed port parity constants, and Hi-speed port combined UART constants. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Examples: ex_HSMode.nxc.

8.3.3.225

byte HSOutputBufferInPtr (void) [inline]

Get hi-speed port output buffer in-pointer. This method returns the value of the input pointer of the hi-speed port output buffer. Returns: The hi-speed port output buffers in-pointer value. Examples: ex_HSOutputBufferInPtr.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1449

8.3.3.226

byte HSOutputBufferOutPtr (void) [inline]

Get hi-speed port output buffer out-pointer. This method returns the value of the output pointer of the hi-speed port output buffer. Returns: The hi-speed port output buffers out-pointer value. Examples: ex_HSOutputBufferOutPtr.nxc.

8.3.3.227

byte HSSpeed (void) [inline]

Get hi-speed port speed. This method returns the value of the hi-speed port speed (baud rate). Returns: The hi-speed port speed (baud rate). See Hi-speed port baud rate constants. Examples: ex_HSSpeed.nxc.

8.3.3.228

byte HSState (void) [inline]

Get hi-speed port state. This method returns the value of the hi-speed port state. Returns: The hi-speed port state. See Hi-speed port state constants. Examples: ex_HSState.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1450

8.3.3.229

char HTIRTrain (const byte port, const byte channel, const byte func) [inline]

HTIRTrain function. Control an IR Train receiver set to the specied channel using the HiTechnic iRLink device. Valid func values are TRAIN_FUNC_STOP, TRAIN_FUNC_INCR_SPEED, TRAIN_FUNC_DECR_SPEED, and TRAIN_FUNC_TOGGLE_LIGHT. Valid channel values are TRAIN_CHANNEL_1 through TRAIN_CHANNEL_3 and TRAIN_CHANNEL_ALL. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. channel The IR Train channel. See IR Train channel constants. func The IR Train function. See PF/IR Train function constants Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_HTIRTrain.nxc.

8.3.3.230

char HTPFComboDirect (const byte port, const byte channel, const byte outa, const byte outb) [inline]

HTPFComboDirect function. Execute a pair of Power Function motor commands on the specied channel using the HiTechnic iRLink device. Commands for outa and outb are PF_CMD_STOP, PF_CMD_REV, PF_CMD_FWD, and PF_CMD_BRAKE. Valid channels are PF_CHANNEL_1 through PF_CHANNEL_4. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. channel The Power Function channel. See Power Function channel constants. outa The Power Function command for output A. See Power Function command constants. outb The Power Function command for output B. See Power Function command constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1451

Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_HTPFComboDirect.nxc.

8.3.3.231

char HTPFComboPWM (const byte port, const byte channel, const byte outa, const byte outb) [inline]

HTPFComboPWM function. Control the speed of both outputs on a Power Function receiver set to the specied channel using the HiTechnic iRLink device. Valid output values are PF_PWM_FLOAT, PF_PWM_FWD1, PF_PWM_FWD2, PF_PWM_FWD3, PF_PWM_FWD4, PF_PWM_FWD5, PF_PWM_FWD6, PF_PWM_FWD7, PF_PWM_BRAKE, PF_PWM_REV7, PF_PWM_REV6, PF_PWM_REV5, PF_PWM_REV4, PF_PWM_REV3, PF_PWM_REV2, and PF_PWM_REV1. Valid channels are PF_CHANNEL_1 through PF_CHANNEL_4. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. channel The Power Function channel. See Power Function channel constants. outa The Power Function PWM command for output A. See Power Function PWM option constants. outb The Power Function PWM command for output B. See Power Function PWM option constants. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_HTPFComboPWM.nxc.

8.3.3.232

char HTPFRawOutput (const byte port, const byte nibble0, const byte nibble1, const byte nibble2) [inline]

HTPFRawOutput function. Control a Power Function receiver set to the specied channel using the HiTechnic iRLink device. Build the raw data stream using the 3 nibbles (4 bit values). The port must be congured as a Lowspeed port before using this function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1452

Parameters: port The sensor port. See Input port constants. nibble0 The rst raw data nibble. nibble1 The second raw data nibble. nibble2 The third raw data nibble. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_HTPFRawOutput.nxc.

8.3.3.233

char HTPFRepeat (const byte port, const byte count, const unsigned int delay) [inline]

HTPFRepeat function. Repeat sending the last Power Function command using the HiTechnic IRLink device. Specify the number of times to repeat the command and the number of milliseconds of delay between each repetition. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. count The number of times to repeat the command. delay The number of milliseconds to delay between each repetition. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_HTPFRepeat.nxc.

8.3.3.234

char HTPFSingleOutputCST (const byte port, const byte channel, const byte out, const byte func) [inline]

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1453

HTPFSingleOutputCST function. Control a single output on a Power Function receiver set to the specied channel using the HiTechnic iRLink device. Select the desired output using PF_OUT_A or PF_OUT_B. Valid functions are PF_CST_CLEAR1_CLEAR2, PF_CST_SET1_CLEAR2, PF_CST_CLEAR1_SET2, PF_CST_SET1_SET2, PF_CST_INCREMENT_PWM, PF_CST_DECREMENT_PWM, PF_CST_FULL_FWD, PF_CST_FULL_REV, and PF_CST_TOGGLE_DIR. Valid channels are PF_CHANNEL_1 through PF_CHANNEL_4. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. channel The Power Function channel. See Power Function channel constants. out The Power Function output. See Power Function output constants. func The Power Function CST function. See Power Function CST options constants. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_HTPFSingleOutputCST.nxc.

8.3.3.235

char HTPFSingleOutputPWM (const byte port, const byte channel, const byte out, const byte func) [inline]

HTPFSingleOutputPWM function. Control the speed of a single output on a Power Function receiver set to the specied channel using the HiTechnic iRLink device. Select the desired output using PF_OUT_A or PF_OUT_B. Valid functions are PF_PWM_FLOAT, PF_PWM_FWD1, PF_PWM_FWD2, PF_PWM_FWD3, PF_PWM_FWD4, PF_PWM_FWD5, PF_PWM_FWD6, PF_PWM_FWD7, PF_PWM_BRAKE, PF_PWM_REV7, PF_PWM_REV6, PF_PWM_REV5, PF_PWM_REV4, PF_PWM_REV3, PF_PWM_REV2, and PF_PWM_REV1. Valid channels are PF_CHANNEL_1 through PF_CHANNEL_4. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. channel The Power Function channel. See Power Function channel constants. out The Power Function output. See Power Function output constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1454

func The Power Function PWM function. See Power Function PWM option constants. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_HTPFSingleOutputPWM.nxc.

8.3.3.236

char HTPFSinglePin (const byte port, const byte channel, const byte out, const byte pin, const byte func, bool cont) [inline]

HTPFSinglePin function. Control a single pin on a Power Function receiver set to the specied channel using the HiTechnic iRLink device. Select the desired output using PF_OUT_A or PF_OUT_B. Select the desired pin using PF_PIN_C1 or PF_PIN_C2. Valid functions are PF_FUNC_NOCHANGE, PF_FUNC_CLEAR, PF_FUNC_SET, and PF_FUNC_TOGGLE. Valid channels are PF_CHANNEL_1 through PF_CHANNEL_4. Specify whether the mode by passing true (continuous) or false (timeout) as the nal parameter. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. channel The Power Function channel. See Power Function channel constants. out The Power Function output. See Power Function output constants. pin The Power Function pin. See Power Function pin constants. func The Power Function single pin function. See Power Function single pin function constants. cont Control whether the mode is continuous or timeout. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_HTPFSinglePin.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1455

8.3.3.237

char HTPFTrain (const byte port, const byte channel, const byte func) [inline]

HTPFTrain function. Control both outputs on a Power Function receiver set to the specied channel using the HiTechnic iRLink device as if it were an IR Train receiver. Valid function values are TRAIN_FUNC_STOP, TRAIN_FUNC_INCR_SPEED, TRAIN_FUNC_DECR_SPEED, and TRAIN_FUNC_TOGGLE_LIGHT. Valid channels are PF_CHANNEL_1 through PF_CHANNEL_4. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. channel The Power Function channel. See Power Function channel constants. func The Power Function train function. See PF/IR Train function constants. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_HTPFTrain.nxc.

8.3.3.238

void HTRCXAddToDatalog (const byte src, const unsigned int value) [inline]

HTRCXAddToDatalog function. Send the AddToDatalog command to an RCX. Parameters: src The RCX source. See RCX and Scout source constants. value The RCX value. Examples: ex_HTRCXAddToDatalog.nxc.

8.3.3.239

int HTRCXBatteryLevel (void) [inline]

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1456

HTRCXBatteryLevel function. Send the BatteryLevel command to an RCX to read the current battery level. Returns: The RCX battery level. Examples: ex_HTRCXBatteryLevel.nxc.

8.3.3.240

void HTRCXClearAllEvents (void) [inline]

HTRCXClearAllEvents function. Send the ClearAllEvents command to an RCX. Examples: ex_HTRCXClearAllEvents.nxc.

8.3.3.241

void HTRCXClearCounter (const byte counter) [inline]

HTRCXClearCounter function. Send the ClearCounter command to an RCX. Parameters: counter The counter to clear. Examples: ex_HTRCXClearCounter.nxc.

8.3.3.242

void HTRCXClearMsg (void) [inline]

HTRCXClearMsg function. Send the ClearMsg command to an RCX. Examples: ex_HTRCXClearMsg.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1457

8.3.3.243

void HTRCXClearSensor (const byte port) [inline]

HTRCXClearSensor function. Send the ClearSensor command to an RCX. Parameters: port The RCX port number. Examples: ex_HTRCXClearSensor.nxc.

8.3.3.244

void HTRCXClearSound (void) [inline]

HTRCXClearSound function. Send the ClearSound command to an RCX. Examples: ex_HTRCXClearSound.nxc.

8.3.3.245

void HTRCXClearTimer (const byte timer) [inline]

HTRCXClearTimer function. Send the ClearTimer command to an RCX. Parameters: timer The timer to clear. Examples: ex_HTRCXClearTimer.nxc.

8.3.3.246

void HTRCXCreateDatalog (const unsigned int size) [inline]

HTRCXCreateDatalog function. Send the CreateDatalog command to an RCX. Parameters: size The new datalog size.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1458

Examples: ex_HTRCXCreateDatalog.nxc.

8.3.3.247

void HTRCXDecCounter (const byte counter) [inline]

HTRCXDecCounter function. Send the DecCounter command to an RCX. Parameters: counter The counter to decrement. Examples: ex_HTRCXDecCounter.nxc.

8.3.3.248

void HTRCXDeleteSub (const byte s) [inline]

HTRCXDeleteSub function. Send the DeleteSub command to an RCX. Parameters: s The subroutine number to delete. Examples: ex_HTRCXDeleteSub.nxc.

8.3.3.249

void HTRCXDeleteSubs (void) [inline]

HTRCXDeleteSubs function. Send the DeleteSubs command to an RCX. Examples: ex_HTRCXDeleteSubs.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1459

8.3.3.250

void HTRCXDeleteTask (const byte t) [inline]

HTRCXDeleteTask function. Send the DeleteTask command to an RCX. Parameters: t The task number to delete. Examples: ex_HTRCXDeleteTask.nxc.

8.3.3.251

void HTRCXDeleteTasks (void) [inline]

HTRCXDeleteTasks function. Send the DeleteTasks command to an RCX. Examples: ex_HTRCXDeleteTasks.nxc.

8.3.3.252

void HTRCXDisableOutput (const byte outputs) [inline]

HTRCXDisableOutput function. Send the DisableOutput command to an RCX. Parameters: outputs The RCX output(s) to disable. See RCX output constants. Examples: ex_HTRCXDisableOutput.nxc.

8.3.3.253

void HTRCXEnableOutput (const byte outputs) [inline]

HTRCXEnableOutput function. Send the EnableOutput command to an RCX. Parameters: outputs The RCX output(s) to enable. See RCX output constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1460

Examples: ex_HTRCXEnableOutput.nxc.

8.3.3.254

void HTRCXEvent (const byte src, const unsigned int value) [inline]

HTRCXEvent function. Send the Event command to an RCX. Parameters: src The RCX source. See RCX and Scout source constants. value The RCX value. Examples: ex_HTRCXEvent.nxc.

8.3.3.255

void HTRCXFloat (const byte outputs) [inline]

HTRCXFloat function. Send commands to an RCX to oat the specied outputs. Parameters: outputs The RCX output(s) to oat. See RCX output constants. Examples: ex_HTRCXFloat.nxc.

8.3.3.256

void HTRCXFwd (const byte outputs) [inline]

HTRCXFwd function. Send commands to an RCX to set the specied outputs to the forward direction. Parameters: outputs The RCX output(s) to set forward. See RCX output constants. Examples: ex_HTRCXFwd.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1461

8.3.3.257

void HTRCXIncCounter (const byte counter) [inline]

HTRCXIncCounter function. Send the IncCounter command to an RCX. Parameters: counter The counter to increment. Examples: ex_HTRCXIncCounter.nxc.

8.3.3.258

void HTRCXInvertOutput (const byte outputs) [inline]

HTRCXInvertOutput function. Send the InvertOutput command to an RCX. Parameters: outputs The RCX output(s) to invert. See RCX output constants. Examples: ex_HTRCXInvertOutput.nxc.

8.3.3.259

void HTRCXMuteSound (void) [inline]

HTRCXMuteSound function. Send the MuteSound command to an RCX. Examples: ex_HTRCXMuteSound.nxc.

8.3.3.260

void HTRCXObvertOutput (const byte outputs) [inline]

HTRCXObvertOutput function. Send the ObvertOutput command to an RCX. Parameters: outputs The RCX output(s) to obvert. See RCX output constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1462

Examples: ex_HTRCXObvertOutput.nxc.

8.3.3.261

void HTRCXOff (const byte outputs) [inline]

HTRCXOff function. Send commands to an RCX to turn off the specied outputs. Parameters: outputs The RCX output(s) to turn off. See RCX output constants. Examples: ex_HTRCXOff.nxc.

8.3.3.262

void HTRCXOn (const byte outputs) [inline]

HTRCXOn function. Send commands to an RCX to turn on the specied outputs. Parameters: outputs The RCX output(s) to turn on. See RCX output constants. Examples: ex_HTRCXOn.nxc.

8.3.3.263

void HTRCXOnFor (const byte outputs, const unsigned int ms) [inline]

HTRCXOnFor function. Send commands to an RCX to turn on the specied outputs in the forward direction for the specied duration. Parameters: outputs The RCX output(s) to turn on. See RCX output constants. ms The number of milliseconds to leave the outputs on Examples: ex_HTRCXOnFor.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1463

8.3.3.264

void HTRCXOnFwd (const byte outputs) [inline]

HTRCXOnFwd function. Send commands to an RCX to turn on the specied outputs in the forward direction. Parameters: outputs The RCX output(s) to turn on in the forward direction. See RCX output constants. Examples: ex_HTRCXOnFwd.nxc.

8.3.3.265

void HTRCXOnRev (const byte outputs) [inline]

HTRCXOnRev function. Send commands to an RCX to turn on the specied outputs in the reverse direction. Parameters: outputs The RCX output(s) to turn on in the reverse direction. See RCX output constants. Examples: ex_HTRCXOnRev.nxc.

8.3.3.266

void HTRCXPBTurnOff (void) [inline]

HTRCXPBTurnOff function. Send the PBTurnOff command to an RCX. Examples: ex_HTRCXPBTurnOff.nxc.

8.3.3.267

void HTRCXPing (void) [inline]

HTRCXPing function. Send the Ping command to an RCX.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1464

Examples: ex_HTRCXPing.nxc.

8.3.3.268

void HTRCXPlaySound (const byte snd) [inline]

HTRCXPlaySound function. Send the PlaySound command to an RCX. Parameters: snd The sound number to play. Examples: ex_HTRCXPlaySound.nxc.

8.3.3.269

void HTRCXPlayTone (const unsigned int freq, const byte duration) [inline]

HTRCXPlayTone function. Send the PlayTone command to an RCX. Parameters: freq The frequency of the tone to play. duration The duration of the tone to play. Examples: ex_HTRCXPlayTone.nxc.

8.3.3.270

void HTRCXPlayToneVar (const byte varnum, const byte duration) [inline]

HTRCXPlayToneVar function. Send the PlayToneVar command to an RCX. Parameters: varnum The variable containing the tone frequency to play. duration The duration of the tone to play.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1465

Examples: ex_HTRCXPlayToneVar.nxc.

8.3.3.271

int HTRCXPoll (const byte src, const byte value) [inline]

HTRCXPoll function Send the Poll command to an RCX to read a signed 2-byte value at the specied source and value combination. Parameters: src The RCX source. See RCX and Scout source constants. value The RCX value. Returns: The value read from the specied port and value. Examples: ex_HTRCXPoll.nxc.

8.3.3.272

int HTRCXPollMemory (const unsigned int address) [inline]

HTRCXPollMemory function. Send the PollMemory command to an RCX. Parameters: address The RCX memory address. Returns: The value read from the specied address. Examples: ex_HTRCXPollMemory.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1466

8.3.3.273

void HTRCXRemote (unsigned int cmd) [inline]

HTRCXRemote function. Send the Remote command to an RCX. Parameters: cmd The RCX IR remote command to send. See RCX IR remote constants. Examples: ex_HTRCXRemote.nxc.

8.3.3.274

void HTRCXRev (const byte outputs) [inline]

HTRCXRev function. Send commands to an RCX to set the specied outputs to the reverse direction. Parameters: outputs The RCX output(s) to reverse direction. See RCX output constants. Examples: ex_HTRCXRev.nxc.

8.3.3.275

void HTRCXSelectDisplay (const byte src, const unsigned int value) [inline]

HTRCXSelectDisplay function. Send the SelectDisplay command to an RCX. Parameters: src The RCX source. See RCX and Scout source constants. value The RCX value. Examples: ex_HTRCXSelectDisplay.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1467

8.3.3.276

void HTRCXSelectProgram (const byte prog) [inline]

HTRCXSelectProgram function. Send the SelectProgram command to an RCX. Parameters: prog The program number to select. Examples: ex_HTRCXSelectProgram.nxc.

8.3.3.277

void HTRCXSendSerial (const byte rst, const byte count) [inline]

HTRCXSendSerial function. Send the SendSerial command to an RCX. Parameters: rst The rst byte address. count The number of bytes to send. Examples: ex_HTRCXSendSerial.nxc.

8.3.3.278

void HTRCXSetDirection (const byte outputs, const byte dir) [inline]

HTRCXSetDirection function. Send the SetDirection command to an RCX to congure the direction of the specied outputs. Parameters: outputs The RCX output(s) to set direction. See RCX output constants. dir The RCX output direction. See RCX output direction constants. Examples: ex_HTRCXSetDirection.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1468

8.3.3.279

void HTRCXSetEvent (const byte evt, const byte src, const byte type) [inline]

HTRCXSetEvent function. Send the SetEvent command to an RCX. Parameters: evt The event number to set. src The RCX source. See RCX and Scout source constants. type The event type. Examples: ex_HTRCXSetEvent.nxc.

8.3.3.280

void HTRCXSetGlobalDirection (const byte outputs, const byte dir) [inline]

HTRCXSetGlobalDirection function. Send the SetGlobalDirection command to an RCX. Parameters: outputs The RCX output(s) to set global direction. See RCX output constants. dir The RCX output direction. See RCX output direction constants. Examples: ex_HTRCXSetGlobalDirection.nxc.

8.3.3.281

void HTRCXSetGlobalOutput (const byte outputs, const byte mode) [inline]

HTRCXSetGlobalOutput function. Send the SetGlobalOutput command to an RCX. Parameters: outputs The RCX output(s) to set global mode. See RCX output constants. mode The RCX output mode. See RCX output mode constants.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1469

Examples: ex_HTRCXSetGlobalOutput.nxc.

8.3.3.282

void HTRCXSetIRLinkPort (const byte port) [inline]

HTRCXSetIRLinkPort function. Set the global port in advance of using the HTRCX and HTScout API functions for sending RCX and Scout messages over the HiTechnic iRLink device. The port must be congured as a Lowspeed port before using any of the HiTechnic RCX and Scout iRLink functions. Parameters: port The sensor port. See Input port constants.

8.3.3.283

void HTRCXSetMaxPower (const byte outputs, const byte pwrsrc, const byte pwrval) [inline]

HTRCXSetMaxPower function. Send the SetMaxPower command to an RCX. Parameters: outputs The RCX output(s) to set max power. See RCX output constants. pwrsrc The RCX source. See RCX and Scout source constants. pwrval The RCX value. Examples: ex_HTRCXSetMaxPower.nxc.

8.3.3.284

void HTRCXSetMessage (const byte msg) [inline]

HTRCXSetMessage function. Send the SetMessage command to an RCX. Parameters: msg The numeric message to send. Examples: ex_HTRCXSetMessage.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1470

8.3.3.285

void HTRCXSetOutput (const byte outputs, const byte mode) [inline]

HTRCXSetOutput function. Send the SetOutput command to an RCX to congure the mode of the specied outputs Parameters: outputs The RCX output(s) to set mode. See RCX output constants. mode The RCX output mode. See RCX output mode constants. Examples: ex_HTRCXSetOutput.nxc.

8.3.3.286

void HTRCXSetPower (const byte outputs, const byte pwrsrc, const byte pwrval) [inline]

HTRCXSetPower function. Send the SetPower command to an RCX to congure the power level of the specied outputs. Parameters: outputs The RCX output(s) to set power. See RCX output constants. pwrsrc The RCX source. See RCX and Scout source constants. pwrval The RCX value. Examples: ex_HTRCXSetPower.nxc.

8.3.3.287

void HTRCXSetPriority (const byte p) [inline]

HTRCXSetPriority function. Send the SetPriority command to an RCX. Parameters: p The new task priority. Examples: ex_HTRCXSetPriority.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1471

8.3.3.288

void HTRCXSetSensorMode (const byte port, const byte mode) [inline]

HTRCXSetSensorMode function. Send the SetSensorMode command to an RCX. Parameters: port The RCX sensor port. mode The RCX sensor mode. Examples: ex_HTRCXSetSensorMode.nxc.

8.3.3.289

void HTRCXSetSensorType (const byte port, const byte type) [inline]

HTRCXSetSensorType function. Send the SetSensorType command to an RCX. Parameters: port The RCX sensor port. type The RCX sensor type. Examples: ex_HTRCXSetSensorType.nxc.

8.3.3.290

void HTRCXSetSleepTime (const byte t) [inline]

HTRCXSetSleepTime function. Send the SetSleepTime command to an RCX. Parameters: t The new sleep time value. Examples: ex_HTRCXSetSleepTime.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1472

8.3.3.291

void HTRCXSetTxPower (const byte pwr) [inline]

HTRCXSetTxPower function. Send the SetTxPower command to an RCX. Parameters: pwr The IR transmit power level. Examples: ex_HTRCXSetTxPower.nxc.

8.3.3.292

void HTRCXSetWatch (const byte hours, const byte minutes) [inline]

HTRCXSetWatch function. Send the SetWatch command to an RCX. Parameters: hours The new watch time hours value. minutes The new watch time minutes value. Examples: ex_HTRCXSetWatch.nxc.

8.3.3.293

void HTRCXStartTask (const byte t) [inline]

HTRCXStartTask function. Send the StartTask command to an RCX. Parameters: t The task number to start. Examples: ex_HTRCXStartTask.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1473

8.3.3.294

void HTRCXStopAllTasks (void) [inline]

HTRCXStopAllTasks function. Send the StopAllTasks command to an RCX. Examples: ex_HTRCXStopAllTasks.nxc.

8.3.3.295

void HTRCXStopTask (const byte t) [inline]

HTRCXStopTask function. Send the StopTask command to an RCX. Parameters: t The task number to stop. Examples: ex_HTRCXStopTask.nxc.

8.3.3.296

void HTRCXToggle (const byte outputs) [inline]

HTRCXToggle function. Send commands to an RCX to toggle the direction of the specied outputs. Parameters: outputs The RCX output(s) to toggle. See RCX output constants. Examples: ex_HTRCXToggle.nxc.

8.3.3.297

void HTRCXUnmuteSound (void) [inline]

HTRCXUnmuteSound function. Send the UnmuteSound command to an RCX. Examples: ex_HTRCXUnmuteSound.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1474

8.3.3.298

void HTScoutCalibrateSensor (void) [inline]

HTScoutCalibrateSensor function. Send the CalibrateSensor command to a Scout. Examples: ex_HTScoutCalibrateSensor.nxc.

8.3.3.299

void HTScoutMuteSound (void) [inline]

HTScoutMuteSound function. Send the MuteSound command to a Scout. Examples: ex_HTScoutMuteSound.nxc.

8.3.3.300

void HTScoutSelectSounds (const byte grp) [inline]

HTScoutSelectSounds function. Send the SelectSounds command to a Scout. Parameters: grp The Scout sound group to select. Examples: ex_HTScoutSelectSounds.nxc.

8.3.3.301

void HTScoutSendVLL (const byte src, const unsigned int value) [inline]

HTScoutSendVLL function. Send the SendVLL command to a Scout. Parameters: src The Scout source. See RCX and Scout source constants. value The Scout value. Examples: ex_HTScoutSendVLL.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1475

8.3.3.302

void HTScoutSetEventFeedback (const byte src, const unsigned int value) [inline]

HTScoutSetEventFeedback function. Scout. Parameters:

Send the SetEventFeedback command to a

src The Scout source. See RCX and Scout source constants. value The Scout value. Examples: ex_HTScoutSetEventFeedback.nxc.

8.3.3.303

void HTScoutSetLight (const byte x) [inline]

HTScoutSetLight function. Send the SetLight command to a Scout. Parameters: x Set the light on or off using this value. See Scout light constants. Examples: ex_HTScoutSetLight.nxc.

8.3.3.304

void HTScoutSetScoutMode (const byte mode) [inline]

HTScoutSetScoutMode function. Send the SetScoutMode command to a Scout. Parameters: mode Set the scout mode. See Scout mode constants. Examples: ex_HTScoutSetScoutMode.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1476

8.3.3.305

void HTScoutSetSensorClickTime (const byte src, const unsigned int value) [inline]

HTScoutSetSensorClickTime function. Send the SetSensorClickTime command to a Scout. Parameters: src The Scout source. See RCX and Scout source constants. value The Scout value. Examples: ex_HTScoutSetSensorClickTime.nxc.

8.3.3.306

void HTScoutSetSensorHysteresis (const byte src, const unsigned int value) [inline]

HTScoutSetSensorHysteresis function. Send the SetSensorHysteresis command to a Scout. Parameters: src The Scout source. See RCX and Scout source constants. value The Scout value. Examples: ex_HTScoutSetSensorHysteresis.nxc.

8.3.3.307

void HTScoutSetSensorLowerLimit (const byte src, const unsigned int value) [inline]

HTScoutSetSensorLowerLimit function. Send the SetSensorLowerLimit command to a Scout. Parameters: src The Scout source. See RCX and Scout source constants. value The Scout value.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1477

Examples: ex_HTScoutSetSensorLowerLimit.nxc.

8.3.3.308

void HTScoutSetSensorUpperLimit (const byte src, const unsigned int value) [inline]

HTScoutSetSensorUpperLimit function. Send the SetSensorUpperLimit command to a Scout. Parameters: src The Scout source. See RCX and Scout source constants. value The Scout value. Examples: ex_HTScoutSetSensorUpperLimit.nxc.

8.3.3.309

void HTScoutUnmuteSound (void) [inline]

HTScoutUnmuteSound function. Send the UnmuteSound command to a Scout. Examples: ex_HTScoutUnmuteSound.nxc.

8.3.3.310

long I2CBytes (const byte port, byte inbuf[ ], byte & count, byte & outbuf[ ]) [inline]

Perform an I2C write/read transaction. This method writes the bytes contained in the input buffer (inbuf) to the I2C device on the specied port, checks for the specied number of bytes to be ready for reading, and then tries to read the specied number (count) of bytes from the I2C device into the output buffer (outbuf). This is a higher-level wrapper around the three main I2C functions. It also maintains a "last good read" buffer and returns values from that buffer if the I2C communication transaction fails.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1478

Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads. inbuf A byte array containing the address of the I2C device, the I2C device register at which to write data, and up to 14 bytes of data to be written at the specied register. count The number of bytes that should be returned by the I2C device. On output count is set to the number of bytes in outbuf. outbuf A byte array that contains the data read from the internal I2C buffer. Returns: Returns true or false indicating whether the I2C transaction succeeded or failed. See also: I2CCheckStatus, I2CWrite, I2CStatus, I2CBytesReady, I2CRead, LowspeedRead, LowspeedWrite, LowspeedCheckStatus, LowspeedBytesReady, and LowspeedStatus Examples: ex_I2CBytes.nxc.

8.3.3.311

byte I2CBytesReady (const byte port) [inline]

Get I2C bytes ready. This method checks the number of bytes that are ready to be read on the specied port. If the last operation on this port was a successful I2CWrite call that requested response data from the device then the return value will be the number of bytes in the internal read buffer. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads. Returns: The number of bytes available to be read from the internal I2C buffer. The maximum number of bytes that can be read is 16.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1479

See also: I2CCheckStatus, I2CRead, I2CWrite, I2CStatus, LowspeedRead, LowspeedWrite, and LowspeedStatus Examples: ex_I2CBytesReady.nxc. LowspeedBytesReady,

8.3.3.312

long I2CCheckStatus (const byte port) [inline]

Check I2C status. This method checks the status of the I2C communication on the specied port. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads. Returns: A status code indicating whether the write completed successfully or not. See CommLSCheckStatusType for possible result values. If the return value is NO_ERR then the last operation did not cause any errors. Avoid calls to I2CRead or I2CWrite while this function returns STAT_COMM_PENDING. See also: I2CStatus, I2CRead, I2CWrite, LowspeedStatus, LowspeedRead, LowspeedWrite, and LowspeedCheckStatus Examples: ex_I2CCheckStatus.nxc.

8.3.3.313

string I2CDeviceId (byte port, byte i2caddr) [inline]

Read I2C device identier. Read standard I2C device identier. The I2C device uses the specied address.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1480

Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads. i2caddr The I2C device address. Returns: A string containing the device identier. Examples: ex_i2cdeviceid.nxc, ex_i2cvendorid.nxc, and ex_i2cversion.nxc.

8.3.3.314

string I2CDeviceInfo (byte port, byte i2caddr, byte info) [inline]

Read I2C device information. Read standard I2C device information: version, vendor, and device ID. The I2C device uses the specied address. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads. i2caddr The I2C device address. info A value indicating the type of device information you are requesting. See Standard I2C constants. Returns: A string containing the requested device information. Examples: ex_i2cdeviceinfo.nxc.

8.3.3.315

long I2CRead (const byte port, byte buen, byte & buffer[ ]) [inline]

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1481

Read I2C data. Read the specied number of bytes from the I2C device on the specied port and store the bytes read in the byte array buffer provided. The maximum number of bytes that can be written or read is 16. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads. buen The initial size of the output buffer. buffer A byte array that contains the data read from the internal I2C buffer. If the return value is negative then the output buffer will be empty. Returns: A status code indicating whether the write completed successfully or not. See CommLSReadType for possible result values. If the return value is NO_ERR then the last operation did not cause any errors. See also: I2CCheckStatus, I2CWrite, I2CStatus, I2CBytesReady, LowspeedRead, LowspeedWrite, LowspeedCheckStatus, LowspeedBytesReady, and LowspeedStatus Examples: ex_I2CRead.nxc.

8.3.3.316

long I2CSendCommand (byte port, byte i2caddr, byte cmd) [inline]

Send an I2C command. Send a command to an I2C device at the standard command register: I2C_REG_CMD. The I2C device uses the specied address. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads. i2caddr The I2C device address. cmd The command to send to the I2C device.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1482

Returns: A status code indicating whether the write completed successfully or not. See CommLSCheckStatusType for possible result values. Examples: ex_I2CSendCommand.nxc.

8.3.3.317

long I2CStatus (const byte port, byte & bytesready) [inline]

Get I2C status. This method checks the status of the I2C communication on the specied port. If the last operation on this port was a successful I2CWrite call that requested response data from the device then bytesready will be set to the number of bytes in the internal read buffer. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads. bytesready The number of bytes available to be read from the internal I2C buffer. The maximum number of bytes that can be read is 16. Returns: A status code indicating whether the write completed successfully or not. See CommLSCheckStatusType for possible return values. If the return value is NO_ERR then the last operation did not cause any errors. Avoid calls to I2CRead or I2CWrite while I2CStatus returns STAT_COMM_PENDING. See also: I2CCheckStatus, I2CRead, I2CWrite, LowspeedStatus, LowspeedWrite, and LowspeedCheckStatus Examples: ex_I2CStatus.nxc. LowspeedRead,

8.3.3.318

string I2CVendorId (byte port, byte i2caddr) [inline]

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1483

Read I2C device vendor. Read standard I2C device vendor. The I2C device uses the specied address. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads. i2caddr The I2C device address. Returns: A string containing the device vendor. Examples: ex_i2cdeviceid.nxc, ex_i2cvendorid.nxc, and ex_i2cversion.nxc.

8.3.3.319

string I2CVersion (byte port, byte i2caddr) [inline]

Read I2C device version. Read standard I2C device version. The I2C device uses the specied address. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads. i2caddr The I2C device address. Returns: A string containing the device version. Examples: ex_i2cdeviceid.nxc, ex_i2cvendorid.nxc, and ex_i2cversion.nxc.

8.3.3.320

long I2CWrite (const byte port, byte retlen, byte buffer[ ]) [inline]

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1484

Write I2C data. This method starts a transaction to write the bytes contained in the array buffer to the I2C device on the specied port. It also tells the I2C device the number of bytes that should be included in the response. The maximum number of bytes that can be written or read is 16. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads. retlen The number of bytes that should be returned by the I2C device. buffer A byte array containing the address of the I2C device, the I2C device register at which to write data, and up to 14 bytes of data to be written at the specied register. Returns: A status code indicating whether the write completed successfully or not. See CommLSWriteType for possible result values. If the return value is NO_ERR then the last operation did not cause any errors. See also: I2CCheckStatus, I2CRead, I2CStatus, I2CBytesReady, LowspeedRead, LowspeedWrite, LowspeedCheckStatus, LowspeedBytesReady, and LowspeedStatus Examples: ex_I2CWrite.nxc.

8.3.3.321

int isalnum (int c) [inline]

Check if character is alphanumeric. Checks if parameter c is either a decimal digit or an uppercase or lowercase letter. The result is true if either isalpha or isdigit would also return true. Parameters: c Character to be checked. Returns: Returns a non-zero value (true) if c is either a digit or a letter, otherwise it returns 0 (false).
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1485

Examples: ex_ctype.nxc, and ex_isalnum.nxc.

8.3.3.322

int isalpha (int c) [inline]

Check if character is alphabetic. Checks if parameter c is either an uppercase or lowercase letter. Parameters: c Character to be checked. Returns: Returns a non-zero value (true) if c is an alphabetic letter, otherwise it returns 0 (false). Examples: ex_ctype.nxc, and ex_isalpha.nxc.

8.3.3.323

int iscntrl (int c) [inline]

Check if character is a control character. Checks if parameter c is a control character. Parameters: c Character to be checked. Returns: Returns a non-zero value (true) if c is a control character, otherwise it returns 0 (false). Examples: ex_ctype.nxc, and ex_iscntrl.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1486

8.3.3.324

int isdigit (int c) [inline]

Check if character is decimal digit. Checks if parameter c is a decimal digit character. Parameters: c Character to be checked. Returns: Returns a non-zero value (true) if c is a decimal digit, otherwise it returns 0 (false). Examples: ex_ctype.nxc, and ex_isdigit.nxc.

8.3.3.325

int isgraph (int c) [inline]

Check if character has graphical representation. Checks if parameter c is a character with a graphical representation. Parameters: c Character to be checked. Returns: Returns a non-zero value (true) if c has a graphical representation, otherwise it returns 0 (false). Examples: ex_ctype.nxc, and ex_isgraph.nxc.

8.3.3.326

int islower (int c) [inline]

Check if character is lowercase letter. Checks if parameter c is an lowercase alphabetic letter. Parameters: c Character to be checked.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1487

Returns: Returns a non-zero value (true) if c is an lowercase alphabetic letter, otherwise it returns 0 (false). Examples: ex_ctype.nxc, and ex_islower.nxc.

8.3.3.327

bool isNAN (oat value) [inline]

Is the value NaN. Returns true if the oating point value is NaN (not a number). Parameters: value A oating point variable. Returns: Whether the value is NaN. Examples: ex_isnan.nxc, and ex_labs.nxc.

8.3.3.328

int isprint (int c) [inline]

Check if character is printable. Checks if parameter c is a printable character (i.e., not a control character). Parameters: c Character to be checked. Returns: Returns a non-zero value (true) if c is a printable character, otherwise it returns 0 (false). Examples: ex_ctype.nxc, and ex_isprint.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1488

8.3.3.329

int ispunct (int c) [inline]

Check if character is a punctuation. Checks if parameter c is a punctuation character. Parameters: c Character to be checked. Returns: Returns a non-zero value (true) if c is a punctuation character, otherwise it returns 0 (false). Examples: ex_ctype.nxc, and ex_ispunct.nxc.

8.3.3.330

int isspace (int c) [inline]

Check if character is a white-space. Checks if parameter c is a white-space character. Parameters: c Character to be checked. Returns: Returns a non-zero value (true) if c is a white-space character, otherwise it returns 0 (false). Examples: ex_ctype.nxc, and ex_isspace.nxc.

8.3.3.331

int isupper (int c) [inline]

Check if character is uppercase letter. Checks if parameter c is an uppercase alphabetic letter. Parameters: c Character to be checked.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1489

Returns: Returns a non-zero value (true) if c is an uppercase alphabetic letter, otherwise it returns 0 (false). Examples: ex_ctype.nxc, and ex_isupper.nxc.

8.3.3.332

int isxdigit (int c) [inline]

Check if character is hexadecimal digit. Checks if parameter c is a hexadecimal digit character. Parameters: c Character to be checked. Returns: Returns a non-zero value (true) if c is a hexadecimal digit character, otherwise it returns 0 (false). Examples: ex_ctype.nxc, and ex_isxdigit.nxc.

8.3.3.333

long labs (long n) [inline]

Absolute value. Return the absolute value of parameter n. Parameters: n Integral value. Returns: The absolute value of n.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1490

8.3.3.334

ldiv_t ldiv (long numer, long denom) [inline]

Integral division. Returns the integral quotient and remainder of the division of numerator by denominator as a structure of type ldiv_t, which has two members: quot and rem. Parameters: numer Numerator. denom Denominator. Returns: The result is returned by value in a structure dened in cstdlib, which has two members. For ldiv_t, these are, in either order: long quot; long rem. Examples: ex_ldiv.nxc.

8.3.3.335

string LeftStr (string str, unsigned int size) [inline]

Copy a portion from the start of a string. Returns the substring of a specied length that appears at the start of a string. Parameters: str A string size The size or length of the substring. Returns: The substring of a specied length that appears at the start of a string. Examples: ex_leftstr.nxc.

8.3.3.336

char LineOut (int x1, int y1, int x2, int y2, unsigned long options = DRAW_OPT_NORMAL) [inline]

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1491

Draw a line. This function lets you draw a line on the screen from x1, y1 to x2, y2. Optionally specify drawing options. If this argument is not specied it defaults to DRAW_OPT_NORMAL. Valid display option constants are listed in the Drawing option constants group. See also: SysDrawLine, DrawLineType Parameters: x1 The x value for the start of the line. y1 The y value for the start of the line. x2 The x value for the end of the line. y2 The y value for the end of the line. options The optional drawing options. Returns: The result of the drawing operation. Examples: ex_LineOut.nxc.

8.3.3.337

oat log (oat x) [inline]

Compute natural logarithm. Computes the natural logarithm of x. The natural logarithm is the base-e logarithm, the inverse of the natural exponential function (exp). For base-10 logarithms, a specic function log10() exists. See also: log10(), exp() Parameters: x Floating point value. Returns: Natural logarithm of x. Warning: This function requires the enhanced NBC/NXC rmware.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1492

Examples: ex_log.nxc.

8.3.3.338

oat log10 (oat x) [inline]

Compute common logarithm. Computes the common logarithm of x. The common logarithm is the base-10 logarithm. For base-e logarithms, a specic function log() exists. See also: log(), exp() Parameters: x Floating point value. Returns: Common logarithm of x. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_log10.nxc.

8.3.3.339

byte LongAbort (void) [inline]

Read long abort setting. Return the enhanced NBC/NXC rmwares long abort setting. See also: AbortFlag Returns: The current abort ag value. See ButtonState constants. Warning: This function requires the enhanced NBC/NXC rmware.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1493

Examples: ex_LongAbort.nxc.

8.3.3.340

byte LowspeedBytesReady (const byte port) [inline]

Get lowspeed bytes ready. This method checks the number of bytes that are ready to be read on the specied port. If the last operation on this port was a successful LowspeedWrite call that requested response data from the device then the return value will be the number of bytes in the internal read buffer. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads. Returns: The number of bytes available to be read from the internal I2C buffer. The maximum number of bytes that can be read is 16. See also: I2CCheckStatus, I2CRead, I2CWrite, I2CStatus, LowspeedRead, LowspeedWrite, and LowspeedStatus Examples: ex_LowspeedBytesReady.nxc. I2CBytesReady,

8.3.3.341

long LowspeedCheckStatus (const byte port) [inline]

Check lowspeed status. This method checks the status of the I2C communication on the specied port. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1494

Returns: A status code indicating whether the write completed successfully or not. See CommLSCheckStatusType for possible result values. If the return value is NO_ERR then the last operation did not cause any errors. Avoid calls to LowspeedRead or LowspeedWrite while LowspeedCheckStatus returns STAT_COMM_PENDING. See also: I2CCheckStatus, I2CRead, I2CWrite, I2CStatus, LowspeedRead, LowspeedWrite, and LowspeedStatus Examples: ex_LowspeedCheckStatus.nxc. I2CBytesReady,

8.3.3.342

long LowspeedRead (const byte port, byte buen, byte & buffer[ ]) [inline]

Read lowspeed data. Read the specied number of bytes from the I2C device on the specied port and store the bytes read in the byte array buffer provided. The maximum number of bytes that can be written or read is 16. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads. buen The initial size of the output buffer. buffer A byte array that contains the data read from the internal I2C buffer. If the return value is negative then the output buffer will be empty. Returns: A status code indicating whether the write completed successfully or not. See CommLSReadType for possible result values. If the return value is NO_ERR then the last operation did not cause any errors. See also: I2CCheckStatus, I2CRead, I2CWrite, I2CStatus, I2CBytesReady, LowspeedWrite, LowspeedCheckStatus, LowspeedBytesReady, and LowspeedStatus

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1495

Examples: ex_LowspeedRead.nxc.

8.3.3.343

long LowspeedStatus (const byte port, byte & bytesready) [inline]

Get lowspeed status. This method checks the status of the I2C communication on the specied port. If the last operation on this port was a successful LowspeedWrite call that requested response data from the device then bytesready will be set to the number of bytes in the internal read buffer. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads. bytesready The number of bytes available to be read from the internal I2C buffer. The maximum number of bytes that can be read is 16. Returns: A status code indicating whether the write completed successfully or not. See CommLSCheckStatusType for possible result values. If the return value is NO_ERR then the last operation did not cause any errors. Avoid calls to LowspeedRead or LowspeedWrite while LowspeedStatus returns STAT_COMM_PENDING. See also: I2CStatus, I2CRead, I2CWrite, I2CCheckStatus, LowspeedRead, LowspeedWrite, and LowspeedCheckStatus Examples: ex_LowspeedStatus.nxc. I2CBytesReady,

8.3.3.344

long LowspeedWrite (const byte port, byte retlen, byte buffer[ ]) [inline]

Write lowspeed data. This method starts a transaction to write the bytes contained in the array buffer to the I2C device on the specied port. It also tells the I2C device the
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1496

number of bytes that should be included in the response. The maximum number of bytes that can be written or read is 16. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. Constants should be used where possible to avoid blocking access to I2C devices on other ports by code running on other threads. retlen The number of bytes that should be returned by the I2C device. buffer A byte array containing the address of the I2C device, the I2C device register at which to write data, and up to 14 bytes of data to be written at the specied register. Returns: A status code indicating whether the write completed successfully or not. See CommLSWriteType for possible result values. If the return value is NO_ERR then the last operation did not cause any errors. See also: I2CCheckStatus, I2CRead, I2CWrite, I2CStatus, I2CBytesReady, LowspeedRead, LowspeedCheckStatus, LowspeedBytesReady, and LowspeedStatus Examples: ex_LowspeedWrite.nxc.

8.3.3.345

byte LSChannelState (const byte port) [inline]

Get I2C channel state. This method returns the value of the I2C channel state for the specied port. Parameters: port A constant port number (S1..S4). See Input port constants. Returns: The I2C port channel state. See LSChannelState constants. Examples: ex_LSChannelState.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1497

8.3.3.346

byte LSErrorType (const byte port) [inline]

Get I2C error type. This method returns the value of the I2C error type for the specied port. Parameters: port A constant port number (S1..S4). See Input port constants. Returns: The I2C port error type. See LSErrorType constants. Examples: ex_LSErrorType.nxc.

8.3.3.347

byte LSInputBufferBytesToRx (const byte port) [inline]

Get I2C input buffer bytes to rx. This method returns the value of the bytes to rx eld of the I2C input buffer for the specied port. Parameters: port A constant port number (S1..S4). See Input port constants. Returns: The I2C input buffers bytes to rx value. Examples: ex_LSInputBufferBytesToRx.nxc.

8.3.3.348

byte LSInputBufferInPtr (const byte port) [inline]

Get I2C input buffer in-pointer. This method returns the value of the input pointer of the I2C input buffer for the specied port. Parameters: port A constant port number (S1..S4). See Input port constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1498

Returns: The I2C input buffers in-pointer value. Examples: ex_LSInputBufferInPtr.nxc.

8.3.3.349

byte LSInputBufferOutPtr (const byte port) [inline]

Get I2C input buffer out-pointer. This method returns the value of the output pointer of the I2C input buffer for the specied port. Parameters: port A constant port number (S1..S4). See Input port constants. Returns: The I2C input buffers out-pointer value. Examples: ex_LSInputBufferOutPtr.nxc.

8.3.3.350

byte LSMode (const byte port) [inline]

Get I2C mode. This method returns the value of the I2C mode for the specied port. Parameters: port A constant port number (S1..S4). See Input port constants. Returns: The I2C port mode. See LSMode constants. Examples: ex_LSMode.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1499

8.3.3.351

byte LSNoRestartOnRead () [inline]

Get I2C no restart on read setting. This method returns the value of the I2C no restart on read eld. Returns: The I2C no restart on read eld. See LSNoRestartOnRead constants. Examples: ex_LSNoRestartOnRead.nxc.

8.3.3.352

byte LSOutputBufferBytesToRx (const byte port) [inline]

Get I2C output buffer bytes to rx. This method returns the value of the bytes to rx eld of the I2C output buffer for the specied port. Parameters: port A constant port number (S1..S4). See Input port constants. Returns: The I2C output buffers bytes to rx value. Examples: ex_LSOutputBufferBytesToRx.nxc.

8.3.3.353

byte LSOutputBufferInPtr (const byte port) [inline]

Get I2C output buffer in-pointer. This method returns the value of the input pointer of the I2C output buffer for the specied port. Parameters: port A constant port number (S1..S4). See Input port constants. Returns: The I2C output buffers in-pointer value.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1500

Examples: ex_LSOutputBufferInPtr.nxc.

8.3.3.354

byte LSOutputBufferOutPtr (const byte port) [inline]

Get I2C output buffer out-pointer. This method returns the value of the output pointer of the I2C output buffer for the specied port. Parameters: port A constant port number (S1..S4). See Input port constants. Returns: The I2C output buffers out-pointer value. Examples: ex_LSOutputBufferOutPtr.nxc.

8.3.3.355

byte LSSpeed () [inline]

Get I2C speed. This method returns the value of the I2C speed. Returns: The I2C speed. Warning: This function is unimplemented within the rmware. Examples: ex_LSSpeed.nxc.

8.3.3.356

byte LSState () [inline]

Get I2C state. This method returns the value of the I2C state.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1501

Returns: The I2C state. See LSState constants. Examples: ex_LSState.nxc.

8.3.3.357

char memcmp (variant ptr1, variant ptr2, byte num) [inline]

Compare two blocks of memory. Compares the variant ptr1 to the variant ptr2. Returns an integral value indicating the relationship between the variables. The num argument is ignored. Parameters: ptr1 A variable to be compared. ptr2 A variable to be compared. num The number of bytes to compare (ignored). Examples: ex_memcmp.nxc.

8.3.3.358

void memcpy (variant dest, variant src, byte num) [inline]

Copy memory. Copies memory contents from the source to the destination. The num argument is ignored. Parameters: dest The destination variable. src The source variable. num The number of bytes to copy (ignored). Examples: ex_memcpy.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1502

8.3.3.359

void memmove (variant dest, variant src, byte num) [inline]

Move memory. Moves memory contents from the source to the destination. The num argument is ignored. Parameters: dest The destination variable. src The source variable. num The number of bytes to copy (ignored). Examples: ex_memmove.nxc.

8.3.3.360

string MidStr (string str, unsigned int idx, unsigned int len) [inline]

Copy a portion from the middle of a string. Returns the substring of a specied length that appears at a specied position in a string. Parameters: str A string idx The starting index of the substring. len The length of the substring. Returns: The substring of a specied length that appears at a specied position in a string. Examples: ex_midstr.nxc.

8.3.3.361

char MotorActualSpeed (byte output) [inline]

Get motor actual speed. Get the actual speed value of the specied output.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1503

Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. Returns: The actual speed value of the specied output. Examples: ex_motoractualspeed.nxc.

8.3.3.362

long MotorBlockTachoCount (byte output) [inline]

Get motor block-relative counter. Get the block-relative position counter value of the specied output. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. Returns: The block-relative position counter value of the specied output. Examples: ex_motorblocktachocount.nxc.

8.3.3.363

byte MotorMaxAcceleration (byte output) [inline]

Get motor max acceleration. Get the max acceleration value of the specied output. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. Returns: The max acceleration value of the specied output.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1504

Examples: ex_PosReg.nxc.

8.3.3.364

byte MotorMaxSpeed (byte output) [inline]

Get motor max speed. Get the max speed value of the specied output. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. Returns: The max speed value of the specied output. Examples: ex_PosReg.nxc.

8.3.3.365

byte MotorMode (byte output) [inline]

Get motor mode. Get the mode of the specied output. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. Returns: The mode of the specied output. Examples: ex_motormode.nxc.

8.3.3.366

byte MotorOutputOptions (byte output) [inline]

Get motor options. Get the options value of the specied output.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1505

Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. Returns: The options value of the specied output. Examples: ex_motoroutputoptions.nxc.

8.3.3.367

bool MotorOverload (byte output) [inline]

Get motor overload status. Get the overload value of the specied output. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. Returns: The overload value of the specied output. Examples: ex_motoroverload.nxc.

8.3.3.368

char MotorPower (byte output) [inline]

Get motor power level. Get the power level of the specied output. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. Returns: The power level of the specied output. Examples: ex_motorpower.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1506

8.3.3.369

byte MotorPwnFreq () [inline]

Get motor regulation frequency. Get the current motor regulation frequency in milliseconds. Returns: The motor regulation frequency. Examples: ex_motorpwnfreq.nxc.

8.3.3.370

byte MotorRegDValue (byte output) [inline]

Get motor D value. Get the derivative PID value of the specied output. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. Returns: The derivative PID value of the specied output. Examples: ex_motorregdvalue.nxc.

8.3.3.371

byte MotorRegIValue (byte output) [inline]

Get motor I value. Get the integral PID value of the specied output. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. Returns: The integral PID value of the specied output.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1507

Examples: ex_motorregivalue.nxc.

8.3.3.372

byte MotorRegPValue (byte output) [inline]

Get motor P value. Get the proportional PID value of the specied output. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. Returns: The proportional PID value of the specied output. Examples: ex_motorregpvalue.nxc.

8.3.3.373

byte MotorRegulation (byte output) [inline]

Get motor regulation mode. Get the regulation value of the specied output. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. Returns: The regulation value of the specied output. Examples: ex_motorregulation.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1508

8.3.3.374

byte MotorRegulationOptions () [inline]

Get motor regulation options. Get the current motor regulation options. Returns: The motor regulation options. Examples: ex_PosReg.nxc.

8.3.3.375

byte MotorRegulationTime () [inline]

Get motor regulation time. Get the current motor regulation time in milliseconds. Returns: The motor regulation time. Examples: ex_PosReg.nxc.

8.3.3.376

long MotorRotationCount (byte output) [inline]

Get motor program-relative counter. Get the program-relative position counter value of the specied output. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. Returns: The program-relative position counter value of the specied output. Examples: ex_motorrotationcount.nxc, and util_rpm.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1509

8.3.3.377

byte MotorRunState (byte output) [inline]

Get motor run state. Get the RunState value of the specied output, see Output port run state constants. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. Returns: The RunState value of the specied output. Examples: ex_motorrunstate.nxc.

8.3.3.378

long MotorTachoCount (byte output) [inline]

Get motor tachometer counter. Get the tachometer count value of the specied output. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. Returns: The tachometer count value of the specied output. Examples: ex_motortachocount.nxc.

8.3.3.379

long MotorTachoLimit (byte output) [inline]

Get motor tachometer limit. Get the tachometer limit value of the specied output. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1510

Returns: The tachometer limit value of the specied output. Examples: ex_motortacholimit.nxc.

8.3.3.380

char MotorTurnRatio (byte output) [inline]

Get motor turn ratio. Get the turn ratio value of the specied output. Parameters: output Desired output port. Can be OUT_A, OUT_B, OUT_C or a variable containing one of these values, see Output port constants. Returns: The turn ratio value of the specied output. Examples: ex_motorturnratio.nxc.

8.3.3.381

char MSADPAOff (const byte port, const byte i2caddr) [inline]

Turn off mindsensors ADPA mode. Turn ADPA mode off for the mindsensors device on the specied port. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_MSADPAOff.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1511

8.3.3.382

char MSADPAOn (const byte port, const byte i2caddr) [inline]

Turn on mindsensors ADPA mode. Turn ADPA mode on for the mindsensors device on the specied port. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_MSADPAOn.nxc.

8.3.3.383

char MSDeenergize (const byte port, const byte i2caddr) [inline]

Turn off power to device. Turn power off for the mindsensors device on the specied port. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_MSDeenergize.nxc.

8.3.3.384

char MSEnergize (const byte port, const byte i2caddr) [inline]

Turn on power to device. Turn the power on for the mindsensors device on the specied port. The port must be congured as a Lowspeed port before using this function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1512

Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_MSEnergize.nxc.

8.3.3.385

char MSIRTrain (const byte port, const byte i2caddr, const byte channel, const byte func) [inline]

MSIRTrain function. Control an IR Train receiver set to the specied channel using the mindsensors NRLink device. Valid function values are TRAIN_FUNC_STOP, TRAIN_FUNC_INCR_SPEED, TRAIN_FUNC_DECR_SPEED, and TRAIN_FUNC_TOGGLE_LIGHT. Valid channels are TRAIN_CHANNEL_1 through TRAIN_CHANNEL_3 and TRAIN_CHANNEL_ALL. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. channel The IR Train channel. See IR Train channel constants. func The IR Train function. See PF/IR Train function constants Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_MSIRTrain.nxc.

8.3.3.386

char MSPFComboDirect (const byte port, const byte i2caddr, const byte channel, const byte outa, const byte outb) [inline]

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1513

MSPFComboDirect function. Execute a pair of Power Function motor commands on the specied channel using the mindsensors NRLink device. Commands for outa and outb are PF_CMD_STOP, PF_CMD_REV, PF_CMD_FWD, and PF_CMD_BRAKE. Valid channels are PF_CHANNEL_1 through PF_CHANNEL_4. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. channel The Power Function channel. See Power Function channel constants. outa The Power Function command for output A. See Power Function command constants. outb The Power Function command for output B. See Power Function command constants. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_MSPFComboDirect.nxc.

8.3.3.387

char MSPFComboPWM (const byte port, const byte i2caddr, const byte channel, const byte outa, const byte outb) [inline]

MSPFComboPWM function. Control the speed of both outputs on a Power Function receiver set to the specied channel using the mindsensors NRLink device. Valid output values are PF_PWM_FLOAT, PF_PWM_FWD1, PF_PWM_FWD2, PF_PWM_FWD3, PF_PWM_FWD4, PF_PWM_FWD5, PF_PWM_FWD6, PF_PWM_FWD7, PF_PWM_BRAKE, PF_PWM_REV7, PF_PWM_REV6, PF_PWM_REV5, PF_PWM_REV4, PF_PWM_REV3, PF_PWM_REV2, and PF_PWM_REV1. Valid channels are PF_CHANNEL_1 through PF_CHANNEL_4. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. channel The Power Function channel. See Power Function channel constants. outa The Power Function PWM command for output A. See Power Function PWM option constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1514

outb The Power Function PWM command for output B. See Power Function PWM option constants. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_MSPFComboPWM.nxc.

8.3.3.388

char MSPFRawOutput (const byte port, const byte i2caddr, const byte nibble0, const byte nibble1, const byte nibble2) [inline]

MSPFRawOutput function. Control a Power Function receiver set to the specied channel using the mindsensors NRLink device. Build the raw data stream using the 3 nibbles (4 bit values). The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. nibble0 The rst raw data nibble. nibble1 The second raw data nibble. nibble2 The third raw data nibble. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_MSPFRawOutput.nxc.

8.3.3.389

char MSPFRepeat (const byte port, const byte i2caddr, const byte count, const unsigned int delay) [inline]

MSPFRepeat function. Repeat sending the last Power Function command using the mindsensors NRLink device. Specify the number of times to repeat the command and the number of milliseconds of delay between each repetition. The port must be congured as a Lowspeed port before using this function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1515

Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. count The number of times to repeat the command. delay The number of milliseconds to delay between each repetition. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_MSPFRepeat.nxc.

8.3.3.390

char MSPFSingleOutputCST (const byte port, const byte i2caddr, const byte channel, const byte out, const byte func) [inline]

MSPFSingleOutputCST function. Control a single output on a Power Function receiver set to the specied channel using the mindsensors NRLink device. Select the desired output using PF_OUT_A or PF_OUT_B. Valid functions are PF_CST_CLEAR1_CLEAR2, PF_CST_SET1_CLEAR2, PF_CST_CLEAR1_SET2, PF_CST_SET1_SET2, PF_CST_INCREMENT_PWM, PF_CST_DECREMENT_PWM, PF_CST_FULL_FWD, PF_CST_FULL_REV, and PF_CST_TOGGLE_DIR. Valid channels are PF_CHANNEL_1 through PF_CHANNEL_4. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. channel The Power Function channel. See Power Function channel constants. out The Power Function output. See Power Function output constants. func The Power Function CST function. See Power Function CST options constants. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_MSPFSingleOutputCST.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1516

8.3.3.391

char MSPFSingleOutputPWM (const byte port, const byte i2caddr, const byte channel, const byte out, const byte func) [inline]

MSPFSingleOutputPWM function. Control the speed of a single output on a Power Function receiver set to the specied channel using the mindsensors NRLink device. Select the desired output using PF_OUT_A or PF_OUT_B. Valid functions are PF_PWM_FLOAT, PF_PWM_FWD1, PF_PWM_FWD2, PF_PWM_FWD3, PF_PWM_FWD4, PF_PWM_FWD5, PF_PWM_FWD6, PF_PWM_FWD7, PF_PWM_BRAKE, PF_PWM_REV7, PF_PWM_REV6, PF_PWM_REV5, PF_PWM_REV4, PF_PWM_REV3, PF_PWM_REV2, and PF_PWM_REV1. Valid channels are PF_CHANNEL_1 through PF_CHANNEL_4. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. channel The Power Function channel. See Power Function channel constants. out The Power Function output. See Power Function output constants. func The Power Function PWM function. See Power Function PWM option constants. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_MSPFSingleOutputPWM.nxc.

8.3.3.392

char MSPFSinglePin (const byte port, const byte i2caddr, const byte channel, const byte out, const byte pin, const byte func, bool cont) [inline]

MSPFSinglePin function. Control a single pin on a Power Function receiver set to the specied channel using the mindsensors NRLink device. Select the desired output using PF_OUT_A or PF_OUT_B. Select the desired pin using PF_PIN_C1 or PF_PIN_C2. Valid functions are PF_FUNC_NOCHANGE, PF_FUNC_CLEAR, PF_FUNC_SET, and PF_FUNC_TOGGLE. Valid channels are PF_CHANNEL_1 through PF_CHANNEL_4. Specify whether the mode by passing true (continuous) or false (timeout) as the nal parameter. The port must be congured as a Lowspeed port before using this function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1517

Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. channel The Power Function channel. See Power Function channel constants. out The Power Function output. See Power Function output constants. pin The Power Function pin. See Power Function pin constants. func The Power Function single pin function. See Power Function single pin function constants. cont Control whether the mode is continuous or timeout. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_MSPFSinglePin.nxc.

8.3.3.393

char MSPFTrain (const byte port, const byte i2caddr, const byte channel, const byte func) [inline]

MSPFTrain function. Control both outputs on a Power Function receiver set to the specied channel using the mindsensors NRLink device as if it were an IR Train receiver. Valid function values are TRAIN_FUNC_STOP, TRAIN_FUNC_INCR_SPEED, TRAIN_FUNC_DECR_SPEED, and TRAIN_FUNC_TOGGLE_LIGHT. Valid channels are PF_CHANNEL_1 through PF_CHANNEL_4. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. channel The Power Function channel. See Power Function channel constants. func The Power Function train function. See PF/IR Train function constants. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_MSPFTrain.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1518

8.3.3.394

void MSRCXAbsVar (const byte varnum, const byte byte src, const unsigned int value) [inline]

MSRCXAbsVar function. Send the AbsVar command to an RCX. Parameters: varnum The variable number to change. src The RCX source. See RCX and Scout source constants. value The RCX value. Examples: ex_MSRCXAbsVar.nxc.

8.3.3.395

void MSRCXAddToDatalog (const byte src, const unsigned int value) [inline]

MSRCXAddToDatalog function. Send the AddToDatalog command to an RCX. Parameters: src The RCX source. See RCX and Scout source constants. value The RCX value. Examples: ex_MSRCXAddToDatalog.nxc.

8.3.3.396

void MSRCXAndVar (const byte varnum, const byte src, const unsigned int value) [inline]

MSRCXAndVar function. Send the AndVar command to an RCX. Parameters: varnum The variable number to change. src The RCX source. See RCX and Scout source constants. value The RCX value.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1519

Examples: ex_MSRCXAndVar.nxc.

8.3.3.397

int MSRCXBatteryLevel (void) [inline]

MSRCXBatteryLevel function. Send the BatteryLevel command to an RCX to read the current battery level. Returns: The RCX battery level. Examples: ex_MSRCXBatteryLevel.nxc.

8.3.3.398

void MSRCXBoot (void) [inline]

MSRCXBoot function. Send the Boot command to an RCX. Examples: ex_MSRCXBoot.nxc.

8.3.3.399

void MSRCXCalibrateEvent (const byte evt, const byte low, const byte hi, const byte hyst) [inline]

MSRCXCalibrateEvent function. Send the CalibrateEvent command to an RCX. Parameters: evt The event number. low The low threshold. hi The high threshold. hyst The hysterisis value. Examples: ex_MSRCXCalibrateEvent.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1520

8.3.3.400

void MSRCXClearAllEvents (void) [inline]

MSRCXClearAllEvents function. Send the ClearAllEvents command to an RCX. Examples: ex_MSRCXClearAllEvents.nxc.

8.3.3.401

void MSRCXClearCounter (const byte counter) [inline]

MSRCXClearCounter function. Send the ClearCounter command to an RCX. Parameters: counter The counter to clear. Examples: ex_MSRCXClearCounter.nxc.

8.3.3.402

void MSRCXClearMsg (void) [inline]

MSRCXClearMsg function. Send the ClearMsg command to an RCX. Examples: ex_MSRCXClearMsg.nxc.

8.3.3.403

void MSRCXClearSensor (const byte port) [inline]

MSRCXClearSensor function. Send the ClearSensor command to an RCX. Parameters: port The RCX port number. Examples: ex_MSRCXClearSensor.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1521

8.3.3.404

void MSRCXClearSound (void) [inline]

MSRCXClearSound function. Send the ClearSound command to an RCX. Examples: ex_MSRCXClearSound.nxc.

8.3.3.405

void MSRCXClearTimer (const byte timer) [inline]

MSRCXClearTimer function. Send the ClearTimer command to an RCX. Parameters: timer The timer to clear. Examples: ex_MSRCXClearTimer.nxc.

8.3.3.406

void MSRCXCreateDatalog (const unsigned int size) [inline]

MSRCXCreateDatalog function. Send the CreateDatalog command to an RCX. Parameters: size The new datalog size. Examples: ex_MSRCXCreateDatalog.nxc.

8.3.3.407

void MSRCXDecCounter (const byte counter) [inline]

MSRCXDecCounter function. Send the DecCounter command to an RCX. Parameters: counter The counter to decrement.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1522

Examples: ex_MSRCXDecCounter.nxc.

8.3.3.408

void MSRCXDeleteSub (const byte s) [inline]

MSRCXDeleteSub function. Send the DeleteSub command to an RCX. Parameters: s The subroutine number to delete. Examples: ex_MSRCXDeleteSub.nxc.

8.3.3.409

void MSRCXDeleteSubs (void) [inline]

MSRCXDeleteSubs function. Send the DeleteSubs command to an RCX. Examples: ex_MSRCXDeleteSubs.nxc.

8.3.3.410

void MSRCXDeleteTask (const byte t) [inline]

MSRCXDeleteTask function. Send the DeleteTask command to an RCX. Parameters: t The task number to delete. Examples: ex_MSRCXDeleteTask.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1523

8.3.3.411

void MSRCXDeleteTasks (void) [inline]

MSRCXDeleteTasks function. Send the DeleteTasks command to an RCX. Examples: ex_MSRCXDeleteTasks.nxc.

8.3.3.412

void MSRCXDisableOutput (const byte outputs) [inline]

MSRCXDisableOutput function. Send the DisableOutput command to an RCX. Parameters: outputs The RCX output(s) to disable. See RCX output constants. Examples: ex_MSRCXDisableOutput.nxc.

8.3.3.413

void MSRCXDivVar (const byte varnum, const byte src, const unsigned int value) [inline]

MSRCXDivVar function. Send the DivVar command to an RCX. Parameters: varnum The variable number to change. src The RCX source. See RCX and Scout source constants. value The RCX value. Examples: ex_MSRCXDivVar.nxc.

8.3.3.414

void MSRCXEnableOutput (const byte outputs) [inline]

MSRCXEnableOutput function. Send the EnableOutput command to an RCX.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1524

Parameters: outputs The RCX output(s) to enable. See RCX output constants. Examples: ex_MSRCXEnableOutput.nxc.

8.3.3.415

void MSRCXEvent (const byte src, const unsigned int value) [inline]

MSRCXEvent function. Send the Event command to an RCX. Parameters: src The RCX source. See RCX and Scout source constants. value The RCX value. Examples: ex_MSRCXEvent.nxc.

8.3.3.416

void MSRCXFloat (const byte outputs) [inline]

MSRCXFloat function. Send commands to an RCX to oat the specied outputs. Parameters: outputs The RCX output(s) to oat. See RCX output constants. Examples: ex_MSRCXFloat.nxc.

8.3.3.417

void MSRCXFwd (const byte outputs) [inline]

MSRCXFwd function. Send commands to an RCX to set the specied outputs to the forward direction.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1525

Parameters: outputs The RCX output(s) to set forward. See RCX output constants. Examples: ex_MSRCXFwd.nxc.

8.3.3.418

void MSRCXIncCounter (const byte counter) [inline]

MSRCXIncCounter function. Send the IncCounter command to an RCX. Parameters: counter The counter to increment. Examples: ex_MSRCXIncCounter.nxc.

8.3.3.419

void MSRCXInvertOutput (const byte outputs) [inline]

MSRCXInvertOutput function. Send the InvertOutput command to an RCX. Parameters: outputs The RCX output(s) to invert. See RCX output constants. Examples: ex_MSRCXInvertOutput.nxc.

8.3.3.420

void MSRCXMulVar (const byte varnum, const byte src, unsigned int value) [inline]

MSRCXMulVar function. Send the MulVar command to an RCX. Parameters: varnum The variable number to change.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1526

src The RCX source. See RCX and Scout source constants. value The RCX value. Examples: ex_MSRCXMulVar.nxc.

8.3.3.421

void MSRCXMuteSound (void) [inline]

MSRCXMuteSound function. Send the MuteSound command to an RCX. Examples: ex_MSRCXMuteSound.nxc.

8.3.3.422

void MSRCXObvertOutput (const byte outputs) [inline]

MSRCXObvertOutput function. Send the ObvertOutput command to an RCX. Parameters: outputs The RCX output(s) to obvert. See RCX output constants. Examples: ex_MSRCXObvertOutput.nxc.

8.3.3.423

void MSRCXOff (const byte outputs) [inline]

MSRCXOff function. Send commands to an RCX to turn off the specied outputs. Parameters: outputs The RCX output(s) to turn off. See RCX output constants. Examples: ex_MSRCXOff.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1527

8.3.3.424

void MSRCXOn (const byte outputs) [inline]

MSRCXOn function. Send commands to an RCX to turn on the specied outputs. Parameters: outputs The RCX output(s) to turn on. See RCX output constants. Examples: ex_MSRCXOn.nxc.

8.3.3.425

void MSRCXOnFor (const byte outputs, const unsigned int ms) [inline]

MSRCXOnFor function. Send commands to an RCX to turn on the specied outputs in the forward direction for the specied duration. Parameters: outputs The RCX output(s) to turn on. See RCX output constants. ms The number of milliseconds to leave the outputs on Examples: ex_MSRCXOnFor.nxc.

8.3.3.426

void MSRCXOnFwd (const byte outputs) [inline]

MSRCXOnFwd function. Send commands to an RCX to turn on the specied outputs in the forward direction. Parameters: outputs The RCX output(s) to turn on in the forward direction. See RCX output constants. Examples: ex_MSRCXOnFwd.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1528

8.3.3.427

void MSRCXOnRev (const byte outputs) [inline]

MSRCXOnRev function. Send commands to an RCX to turn on the specied outputs in the reverse direction. Parameters: outputs The RCX output(s) to turn on in the reverse direction. See RCX output constants. Examples: ex_MSRCXOnRev.nxc.

8.3.3.428

void MSRCXOrVar (const byte varnum, const byte src, const unsigned int value) [inline]

MSRCXOrVar function. Send the OrVar command to an RCX. Parameters: varnum The variable number to change. src The RCX source. See RCX and Scout source constants. value The RCX value. Examples: ex_MSRCXOrVar.nxc.

8.3.3.429

void MSRCXPBTurnOff (void) [inline]

MSRCXPBTurnOff function. Send the PBTurnOff command to an RCX. Examples: ex_MSRCXPBTurnOff.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1529

8.3.3.430

void MSRCXPing (void) [inline]

MSRCXPing function. Send the Ping command to an RCX. Examples: ex_MSRCXPing.nxc.

8.3.3.431

void MSRCXPlaySound (const byte snd) [inline]

MSRCXPlaySound function. Send the PlaySound command to an RCX. Parameters: snd The sound number to play. Examples: ex_MSRCXPlaySound.nxc.

8.3.3.432

void MSRCXPlayTone (const unsigned int freq, const byte duration) [inline]

MSRCXPlayTone function. Send the PlayTone command to an RCX. Parameters: freq The frequency of the tone to play. duration The duration of the tone to play. Examples: ex_MSRCXPlayTone.nxc.

8.3.3.433

void MSRCXPlayToneVar (const byte varnum, const byte duration) [inline]

MSRCXPlayToneVar function. Send the PlayToneVar command to an RCX.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1530

Parameters: varnum The variable containing the tone frequency to play. duration The duration of the tone to play. Examples: ex_MSRCXPlayToneVar.nxc.

8.3.3.434

int MSRCXPoll (const byte src, const byte value) [inline]

MSRCXPoll function. Send the Poll command to an RCX to read a signed 2-byte value at the specied source and value combination. Parameters: src The RCX source. See RCX and Scout source constants. value The RCX value. Returns: The value read from the specied port and value. Examples: ex_MSRCXPoll.nxc.

8.3.3.435

int MSRCXPollMemory (const unsigned int address) [inline]

MSRCXPollMemory function. Send the PollMemory command to an RCX. Parameters: address The RCX memory address. Returns: The value read from the specied address. Examples: ex_MSRCXPollMemory.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1531

8.3.3.436

void MSRCXRemote (unsigned int cmd) [inline]

MSRCXRemote function. Send the Remote command to an RCX. Parameters: cmd The RCX IR remote command to send. See RCX IR remote constants. Examples: ex_MSRCXRemote.nxc.

8.3.3.437

void MSRCXReset (void) [inline]

MSRCXReset function. Send the Reset command to an RCX. Examples: ex_MSRCXReset.nxc.

8.3.3.438

void MSRCXRev (const byte outputs) [inline]

MSRCXRev function. Send commands to an RCX to set the specied outputs to the reverse direction. Parameters: outputs The RCX output(s) to reverse direction. See RCX output constants. Examples: ex_MSRCXRev.nxc.

8.3.3.439

void MSRCXSelectDisplay (const byte src, const unsigned int value) [inline]

MSRCXSelectDisplay function. Send the SelectDisplay command to an RCX.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1532

Parameters: src The RCX source. See RCX and Scout source constants. value The RCX value. Examples: ex_MSRCXSelectDisplay.nxc.

8.3.3.440

void MSRCXSelectProgram (const byte prog) [inline]

MSRCXSelectProgram function. Send the SelectProgram command to an RCX. Parameters: prog The program number to select. Examples: ex_MSRCXSelectProgram.nxc.

8.3.3.441

void MSRCXSendSerial (const byte rst, const byte count) [inline]

MSRCXSendSerial function. Send the SendSerial command to an RCX. Parameters: rst The rst byte address. count The number of bytes to send. Examples: ex_MSRCXSendSerial.nxc.

8.3.3.442

void MSRCXSet (const byte dstsrc, const byte dstval, const byte src, unsigned int value) [inline]

MSRCXSet function. Send the Set command to an RCX.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1533

Parameters: dstsrc The RCX destination source. See RCX and Scout source constants. dstval The RCX destination value. src The RCX source. See RCX and Scout source constants. value The RCX value. Examples: ex_MSRCXSet.nxc.

8.3.3.443

void MSRCXSetDirection (const byte outputs, const byte dir) [inline]

MSRCXSetDirection function. Send the SetDirection command to an RCX to congure the direction of the specied outputs. Parameters: outputs The RCX output(s) to set direction. See RCX output constants. dir The RCX output direction. See RCX output direction constants. Examples: ex_MSRCXSetDirection.nxc.

8.3.3.444

void MSRCXSetEvent (const byte evt, const byte src, const byte type) [inline]

MSRCXSetEvent function. Send the SetEvent command to an RCX. Parameters: evt The event number to set. src The RCX source. See RCX and Scout source constants. type The event type. Examples: ex_MSRCXSetEvent.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1534

8.3.3.445

void MSRCXSetGlobalDirection (const byte outputs, const byte dir) [inline]

MSRCXSetGlobalDirection function. Send the SetGlobalDirection command to an RCX. Parameters: outputs The RCX output(s) to set global direction. See RCX output constants. dir The RCX output direction. See RCX output direction constants. Examples: ex_MSRCXSetGlobalDirection.nxc.

8.3.3.446

void MSRCXSetGlobalOutput (const byte outputs, const byte mode) [inline]

MSRCXSetGlobalOutput function. Send the SetGlobalOutput command to an RCX. Parameters: outputs The RCX output(s) to set global mode. See RCX output constants. mode The RCX output mode. See RCX output mode constants. Examples: ex_MSRCXSetGlobalOutput.nxc.

8.3.3.447

void MSRCXSetMaxPower (const byte outputs, const byte pwrsrc, const byte pwrval) [inline]

MSRCXSetMaxPower function. Send the SetMaxPower command to an RCX. Parameters: outputs The RCX output(s) to set max power. See RCX output constants. pwrsrc The RCX source. See RCX and Scout source constants. pwrval The RCX value.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1535

Examples: ex_MSRCXSetMaxPower.nxc.

8.3.3.448

void MSRCXSetMessage (const byte msg) [inline]

MSRCXSetMessage function. Send the SetMessage command to an RCX. Parameters: msg The numeric message to send. Examples: ex_MSRCXSetMessage.nxc.

8.3.3.449

void MSRCXSetNRLinkPort (const byte port, const byte i2caddr) [inline]

MSRCXSetIRLinkPort function. Set the global port in advance of using the MSRCX and MSScout API functions for sending RCX and Scout messages over the mindsensors NRLink device. The port must be congured as a Lowspeed port before using any of the mindsensors RCX and Scout NRLink functions. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Examples: ex_MSRCXSetNRLinkPort.nxc.

8.3.3.450

void MSRCXSetOutput (const byte outputs, const byte mode) [inline]

MSRCXSetOutput function. Send the SetOutput command to an RCX to congure the mode of the specied outputs

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1536

Parameters: outputs The RCX output(s) to set mode. See RCX output constants. mode The RCX output mode. See RCX output mode constants. Examples: ex_MSRCXSetOutput.nxc.

8.3.3.451

void MSRCXSetPower (const byte outputs, const byte pwrsrc, const byte pwrval) [inline]

MSRCXSetPower function. Send the SetPower command to an RCX to congure the power level of the specied outputs. Parameters: outputs The RCX output(s) to set power. See RCX output constants. pwrsrc The RCX source. See RCX and Scout source constants. pwrval The RCX value. Examples: ex_MSRCXSetPower.nxc.

8.3.3.452

void MSRCXSetPriority (const byte p) [inline]

MSRCXSetPriority function. Send the SetPriority command to an RCX. Parameters: p The new task priority. Examples: ex_MSRCXSetPriority.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1537

8.3.3.453

void MSRCXSetSensorMode (const byte port, const byte mode) [inline]

MSRCXSetSensorMode function. Send the SetSensorMode command to an RCX. Parameters: port The RCX sensor port. mode The RCX sensor mode. Examples: ex_MSRCXSetSensorMode.nxc.

8.3.3.454

void MSRCXSetSensorType (const byte port, const byte type) [inline]

MSRCXSetSensorType function. Send the SetSensorType command to an RCX. Parameters: port The RCX sensor port. type The RCX sensor type. Examples: ex_MSRCXSetSensorType.nxc.

8.3.3.455

void MSRCXSetSleepTime (const byte t) [inline]

MSRCXSetSleepTime function. Send the SetSleepTime command to an RCX. Parameters: t The new sleep time value. Examples: ex_MSRCXSetSleepTime.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1538

8.3.3.456

void MSRCXSetTxPower (const byte pwr) [inline]

MSRCXSetTxPower function. Send the SetTxPower command to an RCX. Parameters: pwr The IR transmit power level. Examples: ex_MSRCXSetTxPower.nxc.

8.3.3.457

void MSRCXSetUserDisplay (const byte src, const unsigned int value, const byte precision) [inline]

MSRCXSetUserDisplay function. Send the SetUserDisplay command to an RCX. Parameters: src The RCX source. See RCX and Scout source constants. value The RCX value. precision The number of digits of precision. Examples: ex_MSRCXSetUserDisplay.nxc.

8.3.3.458

void MSRCXSetVar (const byte varnum, const byte src, const unsigned int value) [inline]

MSRCXSetVar function. Send the SetVar command to an RCX. Parameters: varnum The variable number to change. src The RCX source. See RCX and Scout source constants. value The RCX value. Examples: ex_MSRCXSetVar.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1539

8.3.3.459

void MSRCXSetWatch (const byte hours, const byte minutes) [inline]

MSRCXSetWatch function. Send the SetWatch command to an RCX. Parameters: hours The new watch time hours value. minutes The new watch time minutes value. Examples: ex_MSRCXSetWatch.nxc.

8.3.3.460

void MSRCXSgnVar (const byte varnum, const byte src, const unsigned int value) [inline]

MSRCXSgnVar function. Send the SgnVar command to an RCX. Parameters: varnum The variable number to change. src The RCX source. See RCX and Scout source constants. value The RCX value. Examples: ex_MSRCXSgnVar.nxc.

8.3.3.461

void MSRCXStartTask (const byte t) [inline]

MSRCXStartTask function. Send the StartTask command to an RCX. Parameters: t The task number to start. Examples: ex_MSRCXStartTask.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1540

8.3.3.462

void MSRCXStopAllTasks (void) [inline]

MSRCXStopAllTasks function. Send the StopAllTasks command to an RCX. Examples: ex_MSRCXStopAllTasks.nxc.

8.3.3.463

void MSRCXStopTask (const byte t) [inline]

MSRCXStopTask function. Send the StopTask command to an RCX. Parameters: t The task number to stop. Examples: ex_MSRCXStopTask.nxc.

8.3.3.464

void MSRCXSubVar (const byte varnum, const byte src, const unsigned int value) [inline]

MSRCXSubVar function. Send the SubVar command to an RCX. Parameters: varnum The variable number to change. src The RCX source. See RCX and Scout source constants. value The RCX value. Examples: ex_MSRCXSubVar.nxc.

8.3.3.465

void MSRCXSumVar (const byte varnum, const byte src, const unsigned int value) [inline]

MSRCXSumVar function. Send the SumVar command to an RCX.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1541

Parameters: varnum The variable number to change. src The RCX source. See RCX and Scout source constants. value The RCX value. Examples: ex_MSRCXSumVar.nxc.

8.3.3.466

void MSRCXToggle (const byte outputs) [inline]

MSRCXToggle function. Send commands to an RCX to toggle the direction of the specied outputs. Parameters: outputs The RCX output(s) to toggle. See RCX output constants. Examples: ex_MSRCXToggle.nxc.

8.3.3.467

void MSRCXUnlock (void) [inline]

MSRCXUnlock function. Send the Unlock command to an RCX. Examples: ex_MSRCXUnlock.nxc.

8.3.3.468

void MSRCXUnmuteSound (void) [inline]

MSRCXUnmuteSound function. Send the UnmuteSound command to an RCX. Examples: ex_MSRCXUnmuteSound.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1542

8.3.3.469

int MSReadValue (const byte port, const byte i2caddr, const byte reg, const byte numbytes) [inline]

Read a mindsensors device value. Read a one, two, or four byte value from a mindsensors sensor. The value must be stored with the least signcant byte (LSB) rst (i.e., little endian). Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. reg The device register to read. numbytes The number of bytes to read. Only 1, 2 or 4 byte values are supported. Returns: The function call result. Examples: ex_MSReadValue.nxc.

8.3.3.470

void MSScoutCalibrateSensor (void) [inline]

MSScoutCalibrateSensor function. Send the CalibrateSensor command to a Scout. Examples: ex_MSScoutCalibrateSensor.nxc.

8.3.3.471

void MSScoutMuteSound (void) [inline]

MSScoutMuteSound function. Send the MuteSound command to a Scout. Examples: ex_MSScoutMuteSound.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1543

8.3.3.472

void MSScoutSelectSounds (const byte grp) [inline]

MSScoutSelectSounds function. Send the SelectSounds command to a Scout. Parameters: grp The Scout sound group to select. Examples: ex_MSScoutSelectSounds.nxc.

8.3.3.473

void MSScoutSendVLL (const byte src, const unsigned int value) [inline]

MSScoutSendVLL function. Send the SendVLL command to a Scout. Parameters: src The Scout source. See RCX and Scout source constants. value The Scout value. Examples: ex_MSScoutSendVLL.nxc.

8.3.3.474

void MSScoutSetCounterLimit (const byte ctr, const byte src, const unsigned int value) [inline]

MSScoutSetCounterLimit function. Send the SetCounterLimit command to a Scout. Parameters: ctr The counter for which to set the limit. src The Scout source. See RCX and Scout source constants. value The Scout value. Examples: ex_MSScoutSetCounterLimit.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1544

8.3.3.475

void MSScoutSetEventFeedback (const byte src, const unsigned int value) [inline]

MSScoutSetEventFeedback function. Scout. Parameters:

Send the SetEventFeedback command to a

src The Scout source. See RCX and Scout source constants. value The Scout value. Examples: ex_MSScoutSetEventFeedback.nxc.

8.3.3.476

void MSScoutSetLight (const byte x) [inline]

MSScoutSetLight function. Send the SetLight command to a Scout. Parameters: x Set the light on or off using this value. See Scout light constants. Examples: ex_MSScoutSetLight.nxc.

8.3.3.477

void MSScoutSetScoutMode (const byte mode) [inline]

MSScoutSetScoutMode function. Send the SetScoutMode command to a Scout. Parameters: mode Set the scout mode. See Scout mode constants. Examples: ex_MSScoutSetScoutMode.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1545

8.3.3.478

void MSScoutSetScoutRules (const byte m, const byte t, const byte l, const byte tm, const byte fx) [inline]

MSScoutSetScoutRules function. Send the SetScoutRules command to a Scout. Parameters: m Scout motion rule. See Scout motion rule constants. t Scout touch rule. See Scout touch rule constants. l Scout light rule. See Scout light rule constants. tm Scout transmit rule. See Scout transmit rule constants. fx Scout special effects rule. See Scout special effect constants. Examples: ex_MSScoutSetScoutRules.nxc.

8.3.3.479

void MSScoutSetSensorClickTime (const byte src, const unsigned int value) [inline]

MSScoutSetSensorClickTime function. Send the SetSensorClickTime command to a Scout. Parameters: src The Scout source. See RCX and Scout source constants. value The Scout value. Examples: ex_MSScoutSetSensorClickTime.nxc.

8.3.3.480

void MSScoutSetSensorHysteresis (const byte src, const unsigned int value) [inline]

MSScoutSetSensorHysteresis function. Send the SetSensorHysteresis command to a Scout.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1546

Parameters: src The Scout source. See RCX and Scout source constants. value The Scout value. Examples: ex_MSScoutSetSensorHysteresis.nxc.

8.3.3.481

void MSScoutSetSensorLowerLimit (const byte src, const unsigned int value) [inline]

MSScoutSetSensorLowerLimit function. Send the SetSensorLowerLimit command to a Scout. Parameters: src The Scout source. See RCX and Scout source constants. value The Scout value. Examples: ex_MSScoutSetSensorLowerLimit.nxc.

8.3.3.482

void MSScoutSetSensorUpperLimit (const byte src, const unsigned int value) [inline]

MSScoutSetSensorUpperLimit function. Send the SetSensorUpperLimit command to a Scout. Parameters: src The Scout source. See RCX and Scout source constants. value The Scout value. Examples: ex_MSScoutSetSensorUpperLimit.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1547

8.3.3.483

void MSScoutSetTimerLimit (const byte tmr, const byte src, const unsigned int value) [inline]

MSScoutSetTimerLimit function. Send the SetTimerLimit command to a Scout. Parameters: tmr The timer for which to set a limit. src The Scout source. See RCX and Scout source constants. value The Scout value. Examples: ex_MSScoutSetTimerLimit.nxc.

8.3.3.484

void MSScoutUnmuteSound (void) [inline]

MSScoutUnmuteSound function. Send the UnmuteSound command to a Scout. Examples: ex_MSScoutUnmuteSound.nxc.

8.3.3.485

long muldiv32 (long a, long b, long c) [inline]

Multiply and divide. Multiplies two 32-bit values and then divides the 64-bit result by a third 32-bit value. Parameters: a 32-bit long value. b 32-bit long value. c 32-bit long value. Returns: The result of multiplying a times b and dividing by c. Warning: This function requires the enhanced NBC/NXC rmware.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1548

Examples: ex_muldiv32.nxc.

8.3.3.486

char NRLink2400 (const byte port, const byte i2caddr) [inline]

Congure NRLink in 2400 baud mode. Congure the mindsensors NRLink device in 2400 baud mode. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_NRLink2400.nxc.

8.3.3.487

char NRLink4800 (const byte port, const byte i2caddr) [inline]

Congure NRLink in 4800 baud mode. Congure the mindsensors NRLink device in 4800 baud mode. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_NRLink4800.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1549

8.3.3.488

char NRLinkFlush (const byte port, const byte i2caddr) [inline]

Flush NRLink buffers. Flush the mindsensors NRLink device buffers. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_NRLinkFlush.nxc.

8.3.3.489

char NRLinkIRLong (const byte port, const byte i2caddr) [inline]

Congure NRLink in IR long mode. Congure the mindsensors NRLink device in IR long mode. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_NRLinkIRLong.nxc.

8.3.3.490

char NRLinkIRShort (const byte port, const byte i2caddr) [inline]

Congure NRLink in IR short mode. Congure the mindsensors NRLink device in IR short mode. The port must be congured as a Lowspeed port before using this function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1550

Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_NRLinkIRShort.nxc.

8.3.3.491

char NRLinkSetPF (const byte port, const byte i2caddr) [inline]

Congure NRLink in power function mode. Congure the mindsensors NRLink device in power function mode. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_NRLinkSetPF.nxc.

8.3.3.492

char NRLinkSetRCX (const byte port, const byte i2caddr) [inline]

Congure NRLink in RCX mode. Congure the mindsensors NRLink device in RCX mode. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1551

Returns: The function call result. Examples: ex_NRLinkSetRCX.nxc.

8.3.3.493

char NRLinkSetTrain (const byte port, const byte i2caddr) [inline]

Congure NRLink in IR train mode. Congure the mindsensors NRLink device in IR train mode. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_NRLinkSetTrain.nxc.

8.3.3.494

byte NRLinkStatus (const byte port, const byte i2caddr) [inline]

Read NRLink status. Read the status of the mindsensors NRLink device. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The mindsensors NRLink status. Examples: ex_NRLinkStatus.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1552

8.3.3.495

char NRLinkTxRaw (const byte port, const byte i2caddr) [inline]

Congure NRLink in raw IR transmit mode. Congure the mindsensors NRLink device in raw IR transmit mode. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_NRLinkTxRaw.nxc.

8.3.3.496

char NumOut (int x, int y, variant value, unsigned long options = DRAW_OPT_NORMAL) [inline]

Draw a number. Draw a numeric value on the screen at the specied x and y location. The y value must be a multiple of 8. Valid line number constants are listed in the Line number constants group. Optionally specify drawing options. If this argument is not specied it defaults to DRAW_OPT_NORMAL. Valid display option constants are listed in the Drawing option constants group. See also: SysDrawText, DrawTextType Parameters: x The x value for the start of the number output. y The text line number for the number output. value The value to output to the LCD screen. Any numeric type is supported. options The optional drawing options. Returns: The result of the drawing operation.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1553

Examples: ex_ArrayBuild.nxc, ex_ArrayMax.nxc, ex_ArrayMean.nxc, ex_ArrayMin.nxc, ex_ArrayOp.nxc, ex_ArraySort.nxc, ex_ArrayStd.nxc, ex_ArraySum.nxc, ex_ArraySumSqr.nxc, ex_atof.nxc, ex_atoi.nxc, ex_atol.nxc, ex_buttonpressed.nxc, ex_contrast.nxc, ex_ctype.nxc, ex_dispgaout.nxc, ex_dispgout.nxc, ex_dispmisc.nxc, ex_div.nxc, ex_ndrstle.nxc, ex_ndnextle.nxc, ex_FlattenVar.nxc, ex_getchar.nxc, ex_getmemoryinfo.nxc, ex_HTGyroTest.nxc, ex_isnan.nxc, ex_labs.nxc, ex_ldiv.nxc, ex_memcmp.nxc, ex_motoroutputoptions.nxc, ex_NumOut.nxc, ex_NXTLineLeader.nxc, ex_NXTPowerMeter.nxc, ex_NXTServo.nxc, ex_NXTSumoEyes.nxc, ex_Pos.nxc, ex_ReadSensorHTAngle.nxc, ex_reladdressof.nxc, ex_SensorHTGyro.nxc, ex_SetAbortFlag.nxc, ex_SetLongAbort.nxc, ex_SizeOf.nxc, ex_StrIndex.nxc, ex_string.nxc, ex_StrLenOld.nxc, ex_strtod.nxc, ex_strtol.nxc, ex_strtoul.nxc, ex_SysColorSensorRead.nxc, ex_syscommbtconnection.nxc, ex_sysdataloggettimes.nxc, ex_sysleread.nxc, ex_syslewrite.nxc, ex_sysmemorymanager.nxc, ex_SysReadLastResponse.nxc, ex_SysReadSemData.nxc, ex_SysUpdateCalibCacheInfo.nxc, ex_SysWriteSemData.nxc, and ex_UnattenVar.nxc.

8.3.3.497

string NumToStr (variant num) [inline]

Convert number to string. Return the string representation of the specied numeric value. Parameters: num A number. Returns: The string representation of the parameter num. Examples: ex_NumToStr.nxc, ex_RS485Send.nxc, and ex_string.nxc.

8.3.3.498

char NXTHIDAsciiMode (const byte & port, const byte & i2caddr) [inline]

Set NXTHID into ASCII data mode. Set the NXTHID device into ASCII data mode. Only printable characters can be transmitted in this mode. The port must be congured as a Lowspeed port before using this function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1554

Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTHID.nxc.

8.3.3.499

char NXTHIDDirectMode (const byte & port, const byte & i2caddr) [inline]

Set NXTHID into direct data mode. Set the NXTHID device into direct data mode. Any character can be transmitted while in this mode. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTHID.nxc.

8.3.3.500

char NXTHIDLoadCharacter (const byte & port, const byte & i2caddr, const byte & modier, const byte & character) [inline]

Load NXTHID character. Load a character into the NXTHID device. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1555

i2caddr The sensor I2C address. See sensor documentation for this value. modier The key modier. See the MindSensors NXTHID modier keys group. character The character. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTHID.nxc.

8.3.3.501

char NXTHIDTransmit (const byte & port, const byte & i2caddr) [inline]

Transmit NXTHID character. Transmit a single character to a computer using the NXTHID device. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTHID.nxc.

8.3.3.502

char NXTLineLeaderAverage (const byte & port, const byte & i2caddr) [inline]

Read NXTLineLeader average. Read the mindsensors NXTLineLeader devices average value. The average is a weighted average of the bits set to 1 based on the position. The left most bit has a weight of 10, second bit has a weight of 20, and so forth. When all 8 sensors are over a black surface the average will be 45. The port must be congured as a Lowspeed port before using this function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1556

Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The NXTLineLeader average value. Examples: ex_NXTLineLeader.nxc.

8.3.3.503

char NXTLineLeaderCalibrateBlack (const byte & port, const byte & i2caddr) [inline]

Calibrate NXTLineLeader black color. Store calibration data for the black color. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTLineLeader.nxc.

8.3.3.504

char NXTLineLeaderCalibrateWhite (const byte & port, const byte & i2caddr) [inline]

Calibrate NXTLineLeader white color. Store calibration data for the white color. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1557

i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTLineLeader.nxc.

8.3.3.505

char NXTLineLeaderInvert (const byte & port, const byte & i2caddr) [inline]

Invert NXTLineLeader colors. Invert color sensing so that the device can detect a white line on a black background. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTLineLeader.nxc.

8.3.3.506

char NXTLineLeaderPowerDown (const byte & port, const byte & i2caddr) [inline]

Powerdown NXTLineLeader device. Put the NXTLineLeader to sleep so that it does not consume power when it is not required. The device wakes up on its own when any I2C communication happens or you can specically wake it up by using the NXTLineLeaderPowerUp command. The port must be congured as a Lowspeed port before using this function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1558

Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTLineLeader.nxc.

8.3.3.507

char NXTLineLeaderPowerUp (const byte & port, const byte & i2caddr) [inline]

Powerup NXTLineLeader device. Wake up the NXTLineLeader device so that it can be used. The device can be put to sleep using the NXTLineLeaderPowerDown command. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTLineLeader.nxc.

8.3.3.508

char NXTLineLeaderReset (const byte & port, const byte & i2caddr) [inline]

Reset NXTLineLeader color inversion. Reset the NXTLineLeader color detection back to its default state (black line on a white background). The port must be congured as a Lowspeed port before using this function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1559

Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTLineLeader.nxc.

8.3.3.509

byte NXTLineLeaderResult (const byte & port, const byte & i2caddr) [inline]

Read NXTLineLeader result. Read the mindsensors NXTLineLeader devices result value. This is a single byte showing the 8 sensors readings. Each bit corresponding to the sensor where the line is seen is set to 1, otherwise it is set to 0. When all 8 sensors are over a black surface the result will be 255 (b11111111). The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The NXTLineLeader result value. Examples: ex_NXTLineLeader.nxc.

8.3.3.510

char NXTLineLeaderSnapshot (const byte & port, const byte & i2caddr) [inline]

Take NXTLineLeader line snapshot. Takes a snapshot of the line under the sensor and tracks that position in subsequent tracking operations. This function also will set color inversion if it sees a white line on a black background. The port must be congured as a Lowspeed port before using this function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1560

Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTLineLeader.nxc.

8.3.3.511

char NXTLineLeaderSteering (const byte & port, const byte & i2caddr) [inline]

Read NXTLineLeader steering. Read the mindsensors NXTLineLeader devices steering value. This is the power returned by the sensor to correct your course. Add this value to your left motor and subtract it from your right motor. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The NXTLineLeader steering value. Examples: ex_NXTLineLeader.nxc.

8.3.3.512

int NXTPowerMeterCapacityUsed (const byte & port, const byte & i2caddr) [inline]

Read NXTPowerMeter capacity used. Read the mindsensors NXTPowerMeter devices capacity used since the last reset command. The port must be congured as a Lowspeed port before using this function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1561

Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The NXTPowerMeter capacity used value. Examples: ex_NXTPowerMeter.nxc.

8.3.3.513

long NXTPowerMeterElapsedTime (const byte & port, const byte & i2caddr) [inline]

Read NXTPowerMeter elapsed time. Read the mindsensors NXTPowerMeter devices elapsed time since the last reset command. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The NXTPowerMeter elapsed time value. Examples: ex_NXTPowerMeter.nxc.

8.3.3.514

int NXTPowerMeterErrorCount (const byte & port, const byte & i2caddr) [inline]

Read NXTPowerMeter error count. Read the mindsensors NXTPowerMeter devices error count value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1562

i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The NXTPowerMeter error count value. Examples: ex_NXTPowerMeter.nxc.

8.3.3.515

int NXTPowerMeterMaxCurrent (const byte & port, const byte & i2caddr) [inline]

Read NXTPowerMeter maximum current. Read the mindsensors NXTPowerMeter devices maximum current value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The NXTPowerMeter maximum current value. Examples: ex_NXTPowerMeter.nxc.

8.3.3.516

int NXTPowerMeterMaxVoltage (const byte & port, const byte & i2caddr) [inline]

Read NXTPowerMeter maximum voltage. Read the mindsensors NXTPowerMeter devices maximum voltage value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1563

Returns: The NXTPowerMeter maximum voltage value. Examples: ex_NXTPowerMeter.nxc.

8.3.3.517

int NXTPowerMeterMinCurrent (const byte & port, const byte & i2caddr) [inline]

Read NXTPowerMeter minimum current. Read the mindsensors NXTPowerMeter devices minimum current value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The NXTPowerMeter minimum current value. Examples: ex_NXTPowerMeter.nxc.

8.3.3.518

int NXTPowerMeterMinVoltage (const byte & port, const byte & i2caddr) [inline]

Read NXTPowerMeter minimum voltage. Read the mindsensors NXTPowerMeter devices minimum voltage value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The NXTPowerMeter minimum voltage value.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1564

Examples: ex_NXTPowerMeter.nxc.

8.3.3.519

int NXTPowerMeterPresentCurrent (const byte & port, const byte & i2caddr) [inline]

Read NXTPowerMeter present current. Read the mindsensors NXTPowerMeter devices present current value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The NXTPowerMeter present current. Examples: ex_NXTPowerMeter.nxc.

8.3.3.520

int NXTPowerMeterPresentPower (const byte & port, const byte & i2caddr) [inline]

Read NXTPowerMeter present power. Read the mindsensors NXTPowerMeter devices present power value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The NXTPowerMeter present power value. Examples: ex_NXTPowerMeter.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1565

8.3.3.521

int NXTPowerMeterPresentVoltage (const byte & port, const byte & i2caddr) [inline]

Read NXTPowerMeter present voltage. Read the mindsensors NXTPowerMeter devices present voltage value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The NXTPowerMeter present voltage. Examples: ex_NXTPowerMeter.nxc.

8.3.3.522

char NXTPowerMeterResetCounters (const byte & port, const byte & i2caddr) [inline]

Reset NXTPowerMeter counters. Reset the NXTPowerMeter counters back to zero. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTPowerMeter.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1566

8.3.3.523

long NXTPowerMeterTotalPowerConsumed (const byte & port, const byte & i2caddr) [inline]

Read NXTPowerMeter total power consumed. Read the mindsensors NXTPowerMeter devices total power consumed since the last reset command. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The NXTPowerMeter total power consumed value. Examples: ex_NXTPowerMeter.nxc.

8.3.3.524

byte NXTServoBatteryVoltage (const byte & port, const byte & i2caddr) [inline]

Read NXTServo battery voltage value. Read the mindsensors NXTServo devices battery voltage value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The battery level. Examples: ex_NXTServo.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1567

8.3.3.525

char NXTServoEditMacro (const byte & port, const byte & i2caddr) [inline]

Edit NXTServo macro. Put the NXTServo device into macro edit mode. This operation changes the I2C address of the device to 0x40. Macros are written to EEPROM addresses between 0x21 and 0xFF. Use NXTServoQuitEdit to return the device to its normal operation mode. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible result values. Examples: ex_NXTServo.nxc.

8.3.3.526

char NXTServoGotoMacroAddress (const byte & port, const byte & i2caddr, const byte & macro) [inline]

Goto NXTServo macro address. Run the macro found at the specied EEPROM macro address. This command re-initializes the macro environment. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. macro The EEPROM macro address. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible result values. Examples: ex_NXTServo.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1568

8.3.3.527

char NXTServoHaltMacro (const byte & port, const byte & i2caddr) [inline]

Halt NXTServo macro. Halt a macro executing on the NXTServo device. This command re-initializes the macro environment. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible result values. Examples: ex_NXTServo.nxc.

8.3.3.528

char NXTServoInit (const byte & port, const byte & i2caddr, const byte servo) [inline]

Initialize NXTServo servo properties. Store the initial speed and position properties of the servo motor n. Current speed and position values of the nth servo is read from the servo speed register and servo position register and written to permanent memory. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. servo The servo number. See MindSensors NXTServo servo numbers group. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible result values. Examples: ex_NXTServo.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1569

8.3.3.529

char NXTServoPauseMacro (const byte & port, const byte & i2caddr) [inline]

Pause NXTServo macro. Pause a macro executing on the NXTServo device. This command will pause the currently executing macro, and save the environment for subsequent resumption. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible result values. Examples: ex_NXTServo.nxc.

8.3.3.530

unsigned int NXTServoPosition (const byte & port, const byte & i2caddr, const byte servo) [inline]

Read NXTServo servo position value. Read the mindsensors NXTServo devices servo position value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. servo The servo number. See MindSensors NXTServo servo numbers group. Returns: The specied servos position value. Examples: ex_NXTServo.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1570

8.3.3.531

char NXTServoQuitEdit (const byte & port) [inline]

Quit NXTServo macro edit mode. Stop editing NXTServo device macro EEPROM memory. Use NXTServoEditMacro to start editing a macro. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible result values. Examples: ex_NXTServo.nxc.

8.3.3.532

char NXTServoReset (const byte & port, const byte & i2caddr) [inline]

Reset NXTServo properties. Reset NXTServo device properties to factory defaults. Initial position = 1500. Initial speed = 0. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible result values. Examples: ex_NXTServo.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1571

8.3.3.533

char NXTServoResumeMacro (const byte & port, const byte & i2caddr) [inline]

Resume NXTServo macro. Resume a macro executing on the NXTServo device. This command resumes executing a macro where it was paused last, using the same environment. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible result values. Examples: ex_NXTServo.nxc.

8.3.3.534

byte NXTServoSpeed (const byte & port, const byte & i2caddr, const byte servo) [inline]

Read NXTServo servo speed value. Read the mindsensors NXTServo devices servo speed value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. servo The servo number. See MindSensors NXTServo servo numbers group. Returns: The specied servos speed value. Examples: ex_NXTServo.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1572

8.3.3.535

void Off (byte outputs) [inline]

Turn motors off. Turn the specied outputs off (with braking). Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. Examples: ex_off.nxc.

8.3.3.536

void OffEx (byte outputs, const byte reset) [inline]

Turn motors off and reset counters. Turn the specied outputs off (with braking). Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. reset Position counters reset control. It must be a constant, see Tachometer counter reset ags. Examples: ex_offex.nxc.

8.3.3.537

byte OnBrickProgramPointer (void) [inline]

Read the on brick program pointer value. Return the current OBP (on-brick program) step Returns: On brick program pointer (step).
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1573

Examples: ex_OnBrickProgramPointer.nxc.

8.3.3.538

void OnFwd (byte outputs, char pwr) [inline]

Run motors forward. Set outputs to forward direction and turn them on. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. Examples: ex_onfwd.nxc, ex_yield.nxc, and util_rpm.nxc.

8.3.3.539

void OnFwdEx (byte outputs, char pwr, const byte reset) [inline]

Run motors forward and reset counters. Set outputs to forward direction and turn them on. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. reset Position counters reset control. It must be a constant, see Tachometer counter reset ags. Examples: ex_onfwdex.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1574

8.3.3.540

void OnFwdReg (byte outputs, char pwr, byte regmode) [inline]

Run motors forward regulated. Run the specied outputs forward using the specied regulation mode. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. regmode Regulation mode, see Output port regulation mode constants. Examples: ex_onfwdreg.nxc.

8.3.3.541

void OnFwdRegEx (byte outputs, char pwr, byte regmode, const byte reset) [inline]

Run motors forward regulated and reset counters. Run the specied outputs forward using the specied regulation mode. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. regmode Regulation mode, see Output port regulation mode constants. reset Position counters reset control. It must be a constant, see Tachometer counter reset ags. Examples: ex_onfwdregex.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1575

8.3.3.542

void OnFwdRegExPID (byte outputs, char pwr, byte regmode, const byte reset, byte p, byte i, byte d) [inline]

Run motors forward regulated and reset counters with PID factors. Run the specied outputs forward using the specied regulation mode. Specify proportional, integral, and derivative factors. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. regmode Regulation mode, see Output port regulation mode constants. reset Position counters reset control. It must be a constant, see Tachometer counter reset ags. p Proportional factor used by the rmwares PID motor control algorithm. See PID constants. i Integral factor used by the rmwares PID motor control algorithm. See PID constants. d Derivative factor used by the rmwares PID motor control algorithm. See PID constants. Examples: ex_onfwdregexpid.nxc.

8.3.3.543

void OnFwdRegPID (byte outputs, char pwr, byte regmode, byte p, byte i, byte d) [inline]

Run motors forward regulated with PID factors. Run the specied outputs forward using the specied regulation mode. Specify proportional, integral, and derivative factors. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1576

pwr Output power, 0 to 100. Can be negative to reverse direction. regmode Regulation mode, see Output port regulation mode constants. p Proportional factor used by the rmwares PID motor control algorithm. See PID constants. i Integral factor used by the rmwares PID motor control algorithm. See PID constants. d Derivative factor used by the rmwares PID motor control algorithm. See PID constants. Examples: ex_onfwdregpid.nxc.

8.3.3.544

void OnFwdSync (byte outputs, char pwr, char turnpct) [inline]

Run motors forward synchronised. Run the specied outputs forward with regulated synchronization using the specied turn ratio. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. turnpct Turn ratio, -100 to 100. The direction of your vehicle will depend on its construction. Examples: ex_onfwdsync.nxc.

8.3.3.545

void OnFwdSyncEx (byte outputs, char pwr, char turnpct, const byte reset) [inline]

Run motors forward synchronised and reset counters. Run the specied outputs forward with regulated synchronization using the specied turn ratio.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1577

Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. turnpct Turn ratio, -100 to 100. The direction of your vehicle will depend on its construction. reset Position counters reset control. It must be a constant, see Tachometer counter reset ags. Examples: ex_onfwdsyncex.nxc.

8.3.3.546

void OnFwdSyncExPID (byte outputs, char pwr, char turnpct, const byte reset, byte p, byte i, byte d) [inline]

Run motors forward synchronised and reset counters with PID factors. Run the specied outputs forward with regulated synchronization using the specied turn ratio. Specify proportional, integral, and derivative factors. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. turnpct Turn ratio, -100 to 100. The direction of your vehicle will depend on its construction. reset Position counters reset control. It must be a constant, see Tachometer counter reset ags. p Proportional factor used by the rmwares PID motor control algorithm. See PID constants. i Integral factor used by the rmwares PID motor control algorithm. See PID constants. d Derivative factor used by the rmwares PID motor control algorithm. See PID constants. Examples: ex_onfwdsyncexpid.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1578

8.3.3.547

void OnFwdSyncPID (byte outputs, char pwr, char turnpct, byte p, byte i, byte d) [inline]

Run motors forward synchronised with PID factors. Run the specied outputs forward with regulated synchronization using the specied turn ratio. Specify proportional, integral, and derivative factors. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. turnpct Turn ratio, -100 to 100. The direction of your vehicle will depend on its construction. p Proportional factor used by the rmwares PID motor control algorithm. See PID constants. i Integral factor used by the rmwares PID motor control algorithm. See PID constants. d Derivative factor used by the rmwares PID motor control algorithm. See PID constants. Examples: ex_onfwdsyncpid.nxc.

8.3.3.548

void OnRev (byte outputs, char pwr) [inline]

Run motors backward. Set outputs to reverse direction and turn them on. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. Examples: ex_onrev.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1579

8.3.3.549

void OnRevEx (byte outputs, char pwr, const byte reset) [inline]

Run motors backward and reset counters. Set outputs to reverse direction and turn them on. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. reset Position counters reset control. It must be a constant, see Tachometer counter reset ags. Examples: ex_onrevex.nxc.

8.3.3.550

void OnRevReg (byte outputs, char pwr, byte regmode) [inline]

Run motors forward regulated. Run the specied outputs in reverse using the specied regulation mode. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. regmode Regulation mode, see Output port regulation mode constants. Examples: ex_onrevreg.nxc.

8.3.3.551

void OnRevRegEx (byte outputs, char pwr, byte regmode, const byte reset) [inline]

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1580

Run motors backward regulated and reset counters. Run the specied outputs in reverse using the specied regulation mode. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. regmode Regulation mode, see Output port regulation mode constants. reset Position counters reset control. It must be a constant, see Tachometer counter reset ags. Examples: ex_onrevregex.nxc.

8.3.3.552

void OnRevRegExPID (byte outputs, char pwr, byte regmode, const byte reset, byte p, byte i, byte d) [inline]

Run motors backward regulated and reset counters with PID factors. Run the specied outputs in reverse using the specied regulation mode. Specify proportional, integral, and derivative factors. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. regmode Regulation mode, see Output port regulation mode constants. reset Position counters reset control. It must be a constant, see Tachometer counter reset ags. p Proportional factor used by the rmwares PID motor control algorithm. See PID constants. i Integral factor used by the rmwares PID motor control algorithm. See PID constants. d Derivative factor used by the rmwares PID motor control algorithm. See PID constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1581

Examples: ex_onrevregexpid.nxc.

8.3.3.553

void OnRevRegPID (byte outputs, char pwr, byte regmode, byte p, byte i, byte d) [inline]

Run motors reverse regulated with PID factors. Run the specied outputs in reverse using the specied regulation mode. Specify proportional, integral, and derivative factors. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. regmode Regulation mode, see Output port regulation mode constants. p Proportional factor used by the rmwares PID motor control algorithm. See PID constants. i Integral factor used by the rmwares PID motor control algorithm. See PID constants. d Derivative factor used by the rmwares PID motor control algorithm. See PID constants. Examples: ex_onrevregpid.nxc.

8.3.3.554

void OnRevSync (byte outputs, char pwr, char turnpct) [inline]

Run motors backward synchronised. Run the specied outputs in reverse with regulated synchronization using the specied turn ratio. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1582

pwr Output power, 0 to 100. Can be negative to reverse direction. turnpct Turn ratio, -100 to 100. The direction of your vehicle will depend on its construction. Examples: ex_onrevsync.nxc.

8.3.3.555

void OnRevSyncEx (byte outputs, char pwr, char turnpct, const byte reset) [inline]

Run motors backward synchronised and reset counters. Run the specied outputs in reverse with regulated synchronization using the specied turn ratio. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. turnpct Turn ratio, -100 to 100. The direction of your vehicle will depend on its construction. reset Position counters reset control. It must be a constant, see Tachometer counter reset ags. Examples: ex_onrevsyncex.nxc.

8.3.3.556

void OnRevSyncExPID (byte outputs, char pwr, char turnpct, const byte reset, byte p, byte i, byte d) [inline]

Run motors backward synchronised and reset counters with PID factors. Run the specied outputs in reverse with regulated synchronization using the specied turn ratio. Specify proportional, integral, and derivative factors. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1583

single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. turnpct Turn ratio, -100 to 100. The direction of your vehicle will depend on its construction. reset Position counters reset control. It must be a constant, see Tachometer counter reset ags. p Proportional factor used by the rmwares PID motor control algorithm. See PID constants. i Integral factor used by the rmwares PID motor control algorithm. See PID constants. d Derivative factor used by the rmwares PID motor control algorithm. See PID constants. Examples: ex_onrevsyncexpid.nxc.

8.3.3.557

void OnRevSyncPID (byte outputs, char pwr, char turnpct, byte p, byte i, byte d) [inline]

Run motors backward synchronised with PID factors. Run the specied outputs in reverse with regulated synchronization using the specied turn ratio. Specify proportional, integral, and derivative factors. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. turnpct Turn ratio, -100 to 100. The direction of your vehicle will depend on its construction. p Proportional factor used by the rmwares PID motor control algorithm. See PID constants. i Integral factor used by the rmwares PID motor control algorithm. See PID constants. d Derivative factor used by the rmwares PID motor control algorithm. See PID constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1584

Examples: ex_onrevsyncpid.nxc.

8.3.3.558

unsigned int OpenFileAppend (string fname, unsigned int & fsize, byte & handle) [inline]

Open a le for appending. Open an existing le with the specied lename for writing. The le size is returned in the second parameter, which must be a variable. The le handle is returned in the last parameter, which must be a variable. The loader result code is returned as the value of the function call. The lename parameter must be a constant or a variable. Parameters: fname The name of the le to open. fsize The size of the le returned by the function. handle The le handle output from the function call. Returns: The function call result. See Loader module error codes. Examples: ex_le_system.nxc, and ex_OpenFileAppend.nxc.

8.3.3.559

unsigned int OpenFileRead (string fname, unsigned int & fsize, byte & handle) [inline]

Open a le for reading. Open an existing le with the specied lename for reading. The le size is returned in the second parameter, which must be a variable. The le handle is returned in the last parameter, which must be a variable. The loader result code is returned as the value of the function call. The lename parameter must be a constant or a variable. Parameters: fname The name of the le to open. fsize The size of the le returned by the function. handle The le handle output from the function call.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1585

Returns: The function call result. See Loader module error codes. Examples: ex_le_system.nxc, and ex_OpenFileRead.nxc.

8.3.3.560

unsigned int OpenFileReadLinear (string fname, unsigned int & fsize, byte & handle) [inline]

Open a linear le for reading. Open an existing linear le with the specied lename for reading. The le size is returned in the second parameter, which must be a variable. The le handle is returned in the last parameter, which must be a variable. The loader result code is returned as the value of the function call. The lename parameter must be a constant or a variable. Parameters: fname The name of the le to open. fsize The size of the le returned by the function. handle The le handle output from the function call. Returns: The function call result. See Loader module error codes. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_OpenFileReadLinear.nxc.

8.3.3.561

bool PFMateSend (const byte & port, const byte & i2caddr, const byte & channel, const byte & motors, const byte & cmdA, const byte & spdA, const byte & cmdB, const byte & spdB) [inline]

Send PFMate command. Send a PFMate command to the power function IR receiver. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1586

Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. channel The power function IR receiver channel. See the PFMate channel constants group. motors The motor(s) to control. See the PFMate motor constants group. cmdA The power function command for motor A. spdA The power function speed for motor A. cmdB The power function command for motor B. spdB The power function speed for motor B. Returns: The function call result. Examples: ex_PFMate.nxc.

8.3.3.562

bool PFMateSendRaw (const byte & port, const byte & i2caddr, const byte & channel, const byte & b1, const byte & b2) [inline]

Send raw PFMate command. Send a raw PFMate command to the power function IR receiver. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. channel The power function IR receiver channel. See the PFMate channel constants group. b1 Raw byte 1. b2 Raw byte 2. Returns: The function call result. Examples: ex_PFMate.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1587

8.3.3.563

char PlayFile (string lename) [inline]

Play a le. Play the specied le. The lename may be any valid string expression. The sound le can either be an RSO le containing PCM or compressed ADPCM samples or it can be an NXT melody (RMD) le containing frequency and duration values. Parameters: lename The name of the sound or melody le to play. Examples: ex_PlayFile.nxc.

8.3.3.564

char PlayFileEx (string lename, byte volume, bool loop) [inline]

Play a le with extra options. Play the specied le. The lename may be any valid string expression. Volume should be a number from 0 (silent) to 4 (loudest). Play the le repeatedly if loop is true. The sound le can either be an RSO le containing PCM or compressed ADPCM samples or it can be an NXT melody (RMD) le containing frequency and duration values. Parameters: lename The name of the sound or melody le to play. volume The desired tone volume. loop A boolean ag indicating whether to play the le repeatedly. Examples: ex_PlayFileEx.nxc.

8.3.3.565

void PlaySound (const int & aCode)

Play a system sound. Play a sound that mimics the RCX system sounds using one of the RCX and Scout sound constants.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1588

aCode SOUND_CLICK SOUND_DOUBLE_BEEP SOUND_DOWN SOUND_UP SOUND_LOW_BEEP SOUND_FAST_UP Parameters:

Resulting Sound key click sound double beep sweep down sweep up error sound fast sweep up

aCode The system sound to play. See RCX and Scout sound constants. Examples: ex_playsound.nxc.

8.3.3.566

char PlayTone (unsigned int frequency, unsigned int duration) [inline]

Play a tone. Play a single tone of the specied frequency and duration. The frequency is in Hz (see the Tone constants group). The duration is in 1000ths of a second (see the Time constants group). The tone is played at the loudest sound level supported by the rmware and it is not looped. Parameters: frequency The desired tone frequency, in Hz. duration The desired tone duration, in ms. Examples: alternating_tasks.nxc, ex_le_system.nxc, ex_PlayTone.nxc, and ex_yield.nxc.

8.3.3.567

char PlayToneEx (unsigned int frequency, unsigned int duration, byte volume, bool loop) [inline]

Play a tone with extra options. Play a single tone of the specied frequency, duration, and volume. The frequency is in Hz (see the Tone constants group). The duration is in 1000ths of a second (see the Time constants group). Volume should be a number from 0 (silent) to 4 (loudest). Play the tone repeatedly if loop is true.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1589

Parameters: frequency The desired tone frequency, in Hz. duration The desired tone duration, in ms. volume The desired tone volume. loop A boolean ag indicating whether to play the tone repeatedly. Examples: ex_PlayToneEx.nxc.

8.3.3.568

void PlayTones (Tone tones[ ])

Play multiple tones. Play a series of tones contained in the tones array. Each element in the array is an instance of the Tone structure, containing a frequency and a duration. Parameters: tones The array of tones to play. Examples: ex_playtones.nxc.

8.3.3.569

char PointOut (int x, int y, unsigned long options = DRAW_OPT_NORMAL) [inline]

Draw a point. This function lets you draw a point on the screen at x, y. Optionally specify drawing options. If this argument is not specied it defaults to DRAW_OPT_NORMAL. Valid display option constants are listed in the Drawing option constants group. See also: SysDrawPoint, DrawPointType Parameters: x The x value for the point. y The y value for the point. options The optional drawing options.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1590

Returns: The result of the drawing operation. Examples: ex_PointOut.nxc, ex_sin_cos.nxc, and ex_sind_cosd.nxc.

8.3.3.570

char PolyOut (LocationType points[ ], unsigned long options = DRAW_OPT_NORMAL) [inline]

Draw a polygon. This function lets you draw a polygon on the screen using an array of points. Optionally specify drawing options. If this argument is not specied it defaults to DRAW_OPT_NORMAL. Valid display option constants are listed in the Drawing option constants group. See also: SysDrawPolygon, DrawPolygonType Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: points An array of LocationType points that dene the polygon. options The optional drawing options. Returns: The result of the drawing operation. Examples: ex_PolyOut.nxc.

8.3.3.571

int Pos (string Substr, string S) [inline]

Find substring position. Returns the index value of the rst character in a specied substring that occurs in a given string. Pos searches for Substr within S and returns an integer value that is the index of the rst character of Substr within S. Pos is casesensitive. If Substr is not found, Pos returns negative one.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1591

Parameters: Substr A substring to search for in another string. S A string that might contain the specied substring. Returns: The position of the substring in the specied string or -1 if it is not found. Examples: ex_Pos.nxc.

8.3.3.572

void PosRegAddAngle (byte output, long angle_add) [inline]

Add to the current value for set angle. Add an offset to the current set position. Returns immediately, but keep regulating. Parameters: output Desired output port. Can be a constant or a variable, see Output port constants. angle_add Value to add to the current set position, in degree. Can be negative. Can be greater than 360 degree to make several turns. Examples: ex_PosReg.nxc.

8.3.3.573

void PosRegEnable (byte output, byte p = PID_3, byte i = PID_1, byte d = PID_1) [inline]

Enable absolute position regulation with PID factors. Enable absolute position regulation on the specied output. Motor is kept regulated as long as this is enabled. Optionally specify proportional, integral, and derivative factors. Parameters: output Desired output port. Can be a constant or a variable, see Output port constants. p Proportional factor used by the rmwares PID motor control algorithm. See PID constants. Default value is PID_3.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1592

i Integral factor used by the rmwares PID motor control algorithm. See PID constants. Default value is PID_1. d Derivative factor used by the rmwares PID motor control algorithm. See PID constants. Default value is PID_1. Examples: ex_PosReg.nxc.

8.3.3.574

void PosRegSetAngle (byte output, long angle) [inline]

Change the current value for set angle. Make the absolute position regulation going toward the new provided angle. Returns immediately, but keep regulating. Parameters: output Desired output port. Can be a constant or a variable, see Output port constants. angle New set position, in degree. The 0 angle corresponds to the position of the motor when absolute position regulation was rst enabled. Can be negative. Can be greater than 360 degree to make several turns. Examples: ex_PosReg.nxc.

8.3.3.575

void PosRegSetMax (byte output, byte max_speed, byte max_acceleration) [inline]

Set maximum limits. Set maximum speed and acceleration. Parameters: output Desired output port. Can be a constant or a variable, see Output port constants. max_speed Maximum speed, or 0 to disable speed limiting. max_acceleration Maximum acceleration, or 0 to disable acceleration limiting. The max_speed parameter should not be 0 if this is not 0. Examples: ex_PosReg.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1593

8.3.3.576

oat pow (oat base, oat exponent) [inline]

Raise to power. Computes base raised to the power exponent. Parameters: base Floating point value. exponent Floating point value. Returns: The result of raising base to the power exponent. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_pow.nxc.

8.3.3.577

void PowerDown () [inline]

Power down the NXT. This function powers down the NXT. The running program will terminate as a result of this action. Examples: ex_PowerDown.nxc.

8.3.3.578

void Precedes (task task1, task task2, ..., task taskN) [inline]

Declare tasks that this task precedes. Schedule the listed tasks for execution once the current task has completed executing. The tasks will all execute simultaneously unless other dependencies prevent them from doing so. This statement should be used once within a task - preferably at the start of the task denition. Any number of tasks may be listed in the Precedes statement. Parameters: task1 The rst task to start executing after the current task ends.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1594

task2 The second task to start executing after the current task ends. taskN The last task to start executing after the current task ends. Examples: alternating_tasks.nxc, ex_Precedes.nxc, and ex_yield.nxc.

8.3.3.579

void printf (string format, variant value) [inline]

Print formatted data to stdout. Writes to the LCD at 0, LCD_LINE1 a sequence of data formatted as the format argument species. After the format parameter, the function expects one value argument. Parameters: format A string specifying the desired format. value A value to be formatted for writing to the LCD. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_printf.nxc.

8.3.3.580

char PSPNxAnalog (const byte & port, const byte & i2caddr) [inline]

Congure PSPNx in analog mode. Congure the mindsensors PSPNx device in analog mode. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_PSPNxAnalog.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1595

8.3.3.581

char PSPNxDigital (const byte & port, const byte & i2caddr) [inline]

Congure PSPNx in digital mode. Congure the mindsensors PSPNx device in digital mode. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The function call result. Examples: ex_PSPNxDigital.nxc.

8.3.3.582

unsigned int rand () [inline]

Generate random number. Returns a pseudo-random integral number in the range 0 to RAND_MAX. Returns: An integer value between 0 and RAND_MAX. Examples: ex_ArrayMean.nxc, ex_ArrayMin.nxc, ex_ArrayOp.nxc, ex_ArraySort.nxc, ex_ArrayStd.nxc, ex_ArraySum.nxc, ex_ArraySumSqr.nxc, and ex_rand.nxc.

8.3.3.583

int Random (unsigned int n = 0) [inline]

Generate random number. Return a signed or unsigned 16-bit random number. If the optional argument n is not provided the function will return a signed value. Otherwise the returned value will range between 0 and n (exclusive). Parameters: n The maximum unsigned value desired (optional).
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1596

Returns: A random number Examples: ex_ArrayMax.nxc, ex_CircleOut.nxc, ex_dispgoutex.nxc, ex_EllipseOut.nxc, ex_le_system.nxc, ex_Random.nxc, ex_sin_cos.nxc, ex_sind_cosd.nxc, ex_string.nxc, ex_SysDrawEllipse.nxc, and ex_wait.nxc.

8.3.3.584

unsigned int Read (byte handle, variant & value) [inline]

Read a value from a le. Read a value from the le associated with the specied handle. The handle parameter must be a variable. The value parameter must be a variable. The type of the value parameter determines the number of bytes of data read. Parameters: handle The le handle. value The variable to store the data read from the le. Returns: The function call result. See Loader module error codes. Examples: ex_le_system.nxc, and ex_Read.nxc.

8.3.3.585

char ReadButtonEx (const byte btn, bool reset, bool & pressed, unsigned int & count) [inline]

Read button information. Read the specied button. Set the pressed and count parameters with the current state of the button. Optionally reset the press count after reading it. Parameters: btn The button to check. See Button name constants. reset Whether or not to reset the press counter. pressed The button pressed state. count The button press count.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1597

Returns: The function call result. Examples: ex_ReadButtonEx.nxc.

8.3.3.586

unsigned int ReadBytes (byte handle, unsigned int & length, byte & buf[ ]) [inline]

Read bytes from a le. Read the specied number of bytes from the le associated with the specied handle. The handle parameter must be a variable. The length parameter must be a variable. The buf parameter must be an array or a string variable. The actual number of bytes read is returned in the length parameter. Parameters: handle The le handle. length The number of bytes to read. Returns the number of bytes actually read. buf The byte array where the data is stored on output. Returns: The function call result. See Loader module error codes. Examples: ex_ReadBytes.nxc.

8.3.3.587

char ReadI2CRegister (byte port, byte i2caddr, byte reg, byte & out) [inline]

Read I2C register. Read a single byte from an I2C device register. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. i2caddr The I2C device address. reg The I2C device register from which to read a single byte.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1598

out The single byte read from the I2C device. Returns: A status code indicating whether the read completed successfully or not. See CommLSReadType for possible result values. Examples: ex_readi2cregister.nxc.

8.3.3.588

unsigned int ReadLn (byte handle, variant & value) [inline]

Read a value from a le plus line ending. Read a value from the le associated with the specied handle. The handle parameter must be a variable. The value parameter must be a variable. The type of the value parameter determines the number of bytes of data read. The ReadLn function reads two additional bytes from the le which it assumes are a carriage return and line feed pair. Parameters: handle The le handle. value The variable to store the data read from the le. Returns: The function call result. See Loader module error codes. Examples: ex_ReadLn.nxc.

8.3.3.589

unsigned int ReadLnString (byte handle, string & output) [inline]

Read a string from a le plus line ending. Read a string from the le associated with the specied handle. The handle parameter must be a variable. The output parameter must be a variable. Appends bytes to the output variable until a line ending (CRLF) is reached. The line ending is also read but it is not appended to the output parameter. Parameters: handle The le handle.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1599

output The variable to store the string read from the le. Returns: The function call result. See Loader module error codes.

8.3.3.590

bool ReadNRLinkBytes (const byte port, const byte i2caddr, byte & data[ ]) [inline]

Read data from NRLink. Read data from the mindsensors NRLink device on the specied port. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. data A byte array that will contain the data read from the device on output. Returns: The function call result. Examples: ex_ReadNRLinkBytes.nxc.

8.3.3.591

int ReadSensorColorEx (const byte & port, int & colorval, unsigned int & raw[ ], unsigned int & norm[ ], int & scaled[ ]) [inline]

Read LEGO color sensor extra. This function lets you read the LEGO color sensor. It returns the color value, and three arrays containing raw, normalized, and scaled color values for red, green, blue, and none indices. Parameters: port The sensor port. See Input port constants. colorval The color value. See Color values. raw An array containing four raw color values. See Color sensor array indices. norm An array containing four normalized color values. See Color sensor array indices.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1600

scaled An array containing four scaled color values. See Color sensor array indices. Returns: The function call result. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_ReadSensorColorEx.nxc.

8.3.3.592

int ReadSensorColorRaw (const byte & port, unsigned int & rawVals[ ]) [inline]

Read LEGO color sensor raw values. This function lets you read the LEGO color sensor. It returns an array containing raw color values for red, green, blue, and none indices. Parameters: port The sensor port. See Input port constants. rawVals An array containing four raw color values. See Color sensor array indices. Returns: The function call result. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_ReadSensorColorRaw.nxc.

8.3.3.593

char ReadSensorEMeter (const byte & port, oat & vIn, oat & aIn, oat & vOut, oat & aOut, int & joules, oat & wIn, oat & wOut) [inline]

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1601

Read the LEGO EMeter values. Read all the LEGO EMeter register values. They must all be read at once to ensure data coherency. Parameters: port The port to which the LEGO EMeter sensor is attached. See the Input port constants group. You may use a constant or a variable. vIn Input voltage aIn Input current vOut Output voltage aOut Output current joules The number of joules stored in the EMeter wIn The number of watts generated wOut The number of watts consumed Returns: A status code indicating whether the read completed successfully or not. See CommLSReadType for possible result values. Examples: ex_ReadSensorEMeter.nxc.

8.3.3.594

bool ReadSensorHTAccel (const byte port, int & x, int & y, int & z) [inline]

Read HiTechnic acceleration values. Read X, Y, and Z axis acceleration values from the HiTechnic Accelerometer sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. x The output x-axis acceleration. y The output y-axis acceleration. z The output z-axis acceleration. Returns: The function call result.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1602

Examples: ex_ReadSensorHTAccel.nxc.

8.3.3.595

bool ReadSensorHTAngle (const byte port, int & Angle, long & AccAngle, int & RPM) [inline]

Read HiTechnic Angle sensor values. Read values from the HiTechnic Angle sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. Angle Current angle in degrees (0-359). AccAngle Accumulated angle in degrees (-2147483648 to 2147483647). RPM rotations per minute (-1000 to 1000). Returns: The function call result. Examples: ex_ReadSensorHTAngle.nxc.

8.3.3.596

bool ReadSensorHTColor (const byte port, byte & ColorNum, byte & Red, byte & Green, byte & Blue) [inline]

Read HiTechnic Color values. Read color number, red, green, and blue values from the HiTechnic Color sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. ColorNum The output color number. Red The red color value. Green The green color value.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1603

Blue The blue color value. Returns: The function call result. Examples: ex_ReadSensorHTColor.nxc.

8.3.3.597

bool ReadSensorHTColor2Active (byte port, byte & ColorNum, byte & Red, byte & Green, byte & Blue, byte & White) [inline]

Read HiTechnic Color2 active values. Read color number, red, green, and blue values from the HiTechnic Color2 sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. ColorNum The output color number. Red The red color value. Green The green color value. Blue The blue color value. White The white color value. Returns: The function call result. Examples: ex_ReadSensorHTColor2Active.nxc.

8.3.3.598

bool ReadSensorHTIRReceiver (const byte port, char & pfdata[ ]) [inline]

Read HiTechnic IRReceiver Power Function bytes. Read Power Function bytes from the HiTechnic IRReceiver sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1604

Parameters: port The sensor port. See Input port constants. pfdata Eight bytes of power function remote IR data. Returns: The function call result. Examples: ex_ReadSensorHTIRReceiver.nxc.

8.3.3.599

bool ReadSensorHTIRReceiverEx (const byte port, const byte offset, char & pfchar) [inline]

Read HiTechnic IRReceiver Power Function value. Read a Power Function byte from the HiTechnic IRReceiver sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. offset The power function data offset. See HiTechnic IRReceiver constants. pfchar A single byte of power function remote IR data. Returns: The function call result. Examples: ex_ReadSensorHTIRReceiverEx.nxc.

8.3.3.600

bool ReadSensorHTIRSeeker (const byte port, byte & dir, byte & s1, byte & s3, byte & s5, byte & s7, byte & s9) [inline]

Read HiTechnic IRSeeker values. Read direction, and ve signal strength values from the HiTechnic IRSeeker sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1605

Parameters: port The sensor port. See Input port constants. dir The direction. s1 The signal strength from sensor 1. s3 The signal strength from sensor 3. s5 The signal strength from sensor 5. s7 The signal strength from sensor 7. s9 The signal strength from sensor 9. Returns: The function call result. Examples: ex_ReadSensorHTIRSeeker.nxc.

8.3.3.601

bool ReadSensorHTIRSeeker2AC (const byte port, byte & dir, byte & s1, byte & s3, byte & s5, byte & s7, byte & s9) [inline]

Read HiTechnic IRSeeker2 AC values. Read direction, and ve signal strength values from the HiTechnic IRSeeker2 sensor in AC mode. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. dir The direction. s1 The signal strength from sensor 1. s3 The signal strength from sensor 3. s5 The signal strength from sensor 5. s7 The signal strength from sensor 7. s9 The signal strength from sensor 9. Returns: The function call result. Examples: ex_ReadSensorHTIRSeeker2AC.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1606

8.3.3.602

bool ReadSensorHTIRSeeker2DC (const byte port, byte & dir, byte & s1, byte & s3, byte & s5, byte & s7, byte & s9, byte & avg) [inline]

Read HiTechnic IRSeeker2 DC values. Read direction, ve signal strength, and average strength values from the HiTechnic IRSeeker2 sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. dir The direction. s1 The signal strength from sensor 1. s3 The signal strength from sensor 3. s5 The signal strength from sensor 5. s7 The signal strength from sensor 7. s9 The signal strength from sensor 9. avg The average signal strength. Returns: The function call result. Examples: ex_ReadSensorHTIRSeeker2DC.nxc.

8.3.3.603

bool ReadSensorHTNormalizedColor (const byte port, byte & ColorIdx, byte & Red, byte & Green, byte & Blue) [inline]

Read HiTechnic Color normalized values. Read the color index and the normalized red, green, and blue values from the HiTechnic Color sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. ColorIdx The output color index.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1607

Red The normalized red color value. Green The normalized green color value. Blue The normalized blue color value. Returns: The function call result. Examples: ex_ReadSensorHTNormalizedColor.nxc.

8.3.3.604

bool ReadSensorHTNormalizedColor2Active (const byte port, byte & ColorIdx, byte & Red, byte & Green, byte & Blue) [inline]

Read HiTechnic Color2 normalized active values. Read the color index and the normalized red, green, and blue values from the HiTechnic Color2 sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. ColorIdx The output color index. Red The normalized red color value. Green The normalized green color value. Blue The normalized blue color value. Returns: The function call result. Examples: ex_ReadSensorHTNormalizedColor2Active.nxc.

8.3.3.605

bool ReadSensorHTRawColor (const byte port, unsigned int & Red, unsigned int & Green, unsigned int & Blue) [inline]

Read HiTechnic Color raw values. Read the raw red, green, and blue values from the HiTechnic Color sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1608

Parameters: port The sensor port. See Input port constants. Red The raw red color value. Green The raw green color value. Blue The raw blue color value. Returns: The function call result. Examples: ex_ReadSensorHTRawColor.nxc.

8.3.3.606

bool ReadSensorHTRawColor2 (const byte port, unsigned int & Red, unsigned int & Green, unsigned int & Blue, unsigned int & White) [inline]

Read HiTechnic Color2 raw values. Read the raw red, green, and blue values from the HiTechnic Color2 sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. Red The raw red color value. Green The raw green color value. Blue The raw blue color value. White The raw white color value. Returns: The function call result. Examples: ex_ReadSensorHTRawColor2.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1609

8.3.3.607

void ReadSensorHTTouchMultiplexer (const byte port, byte & t1, byte & t2, byte & t3, byte & t4) [inline]

Read HiTechnic touch multiplexer. Read touch sensor values from the HiTechnic touch multiplexer device. Parameters: port The sensor port. See Input port constants. t1 The value of touch sensor 1. t2 The value of touch sensor 2. t3 The value of touch sensor 3. t4 The value of touch sensor 4. Examples: ex_ReadSensorHTTouchMultiplexer.nxc.

8.3.3.608

bool ReadSensorMSAccel (const byte port, const byte i2caddr, int & x, int & y, int & z) [inline]

Read mindsensors acceleration values. Read X, Y, and Z axis acceleration values from the mindsensors Accelerometer sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. x The output x-axis acceleration. y The output y-axis acceleration. z The output z-axis acceleration. Returns: The function call result. Examples: ex_ReadSensorMSAccel.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1610

8.3.3.609

bool ReadSensorMSPlayStation (const byte port, const byte i2caddr, byte & btnset1, byte & btnset2, byte & xleft, byte & yleft, byte & xright, byte & yright) [inline]

Read mindsensors playstation controller values. Read playstation controller values from the mindsensors playstation sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. btnset1 The button set 1 values. See MindSensors PSP-Nx button set 1 constants. btnset2 The button set 2 values. See MindSensors PSP-Nx button set 2 constants. xleft The left joystick x value. yleft The left joystick y value. xright The right joystick x value. yright The right joystick y value. Returns: The function call result. Examples: ex_ReadSensorMSPlayStation.nxc.

8.3.3.610

bool ReadSensorMSRTClock (const byte port, byte & sec, byte & min, byte & hrs, byte & dow, byte & date, byte & month, byte & year) [inline]

Read mindsensors RTClock values. Read real-time clock values from the Mindsensors RTClock sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. sec The seconds.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1611

min The minutes. hrs The hours. dow The day of week number. date The day. month The month. year The year. Returns: The function call result. Examples: ex_ReadSensorMSRTClock.nxc.

8.3.3.611

bool ReadSensorMSTilt (const byte & port, const byte & i2caddr, byte & x, byte & y, byte & z) [inline]

Read mindsensors tilt values. Read X, Y, and Z axis tilt values from the mindsensors tilt sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. x The output x-axis tilt. y The output y-axis tilt. z The output z-axis tilt. Returns: The function call result. Examples: ex_ReadSensorMSTilt.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1612

8.3.3.612

char ReadSensorUSEx (const byte port, byte & values[ ]) [inline]

Read multiple ultrasonic sensor values. Return eight ultrasonic sensor distance values. Parameters: port The port to which the ultrasonic sensor is attached. See the Input port constants group. You may use a constant or a variable. values An array of bytes that will contain the 8 distance values read from the ultrasonic sensor. Returns: A status code indicating whether the read completed successfully or not. See CommLSReadType for possible result values. Examples: ex_ReadSensorUSEx.nxc.

8.3.3.613

void RebootInFirmwareMode () [inline]

Reboot the NXT in rmware download mode. This function lets you reboot the NXT into SAMBA or rmware download mode. The running program will terminate as a result of this action. Examples: ex_RebootInFirmwareMode.nxc.

8.3.3.614

char ReceiveMessage (byte queue, bool clear, string & msg) [inline]

Read a message from a queue/mailbox. Read a message from a mailbox and optionally remove it. If the local mailbox is empty and this NXT is the master then it attempts to poll one of its slave NXTs for a message from the response mailbox that corresponds to the specied local mailbox number. Parameters: queue The mailbox number. See Mailbox constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1613

clear A ag indicating whether to remove the message from the mailbox after it has been read. msg The message that is read from the mailbox. Returns: A char value indicating whether the function call succeeded or not.

8.3.3.615

char ReceiveRemoteBool (byte queue, bool clear, bool & bval) [inline]

Read a boolean value from a queue/mailbox. Read a boolean value from a mailbox and optionally remove it. If the local mailbox is empty and this NXT is the master then it attempts to poll one of its slave NXTs for a message from the response mailbox that corresponds to the specied local mailbox number. Parameters: queue The mailbox number. See Mailbox constants. clear A ag indicating whether to remove the message from the mailbox after it has been read. bval The boolean value that is read from the mailbox. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_ReceiveRemoteBool.nxc, and ex_ReceiveRemoteNumber.nxc.

8.3.3.616

char ReceiveRemoteMessageEx (byte queue, bool clear, string & str, long & val, bool & bval) [inline]

Read a value from a queue/mailbox. Read a value from a mailbox and optionally remove it. If the local mailbox is empty and this NXT is the master then it attempts to poll one of its slave NXTs for a message from the response mailbox that corresponds to the specied local mailbox number. Output the value in string, number, and boolean form.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1614

Parameters: queue The mailbox number. See Mailbox constants. clear A ag indicating whether to remove the message from the mailbox after it has been read. str The string value that is read from the mailbox. val The numeric value that is read from the mailbox. bval The boolean value that is read from the mailbox. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_ReceiveRemoteMessageEx.nxc.

8.3.3.617

char ReceiveRemoteNumber (byte queue, bool clear, long & val) [inline]

Read a numeric value from a queue/mailbox. Read a numeric value from a mailbox and optionally remove it. If the local mailbox is empty and this NXT is the master then it attempts to poll one of its slave NXTs for a message from the response mailbox that corresponds to the specied local mailbox number. Parameters: queue The mailbox number. See Mailbox constants. clear A ag indicating whether to remove the message from the mailbox after it has been read. val The numeric value that is read from the mailbox. Returns: A char value indicating whether the function call succeeded or not.

8.3.3.618

char ReceiveRemoteString (byte queue, bool clear, string & str) [inline]

Read a string value from a queue/mailbox. Read a string value from a mailbox and optionally remove it. If the local mailbox is empty and this NXT is the master then it attempts to poll one of its slave NXTs for a message from the response mailbox that corresponds to the specied local mailbox number.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1615

Parameters: queue The mailbox number. See Mailbox constants. clear A ag indicating whether to remove the message from the mailbox after it has been read. str The string value that is read from the mailbox. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_ReceiveRemoteString.nxc.

8.3.3.619

bool RechargeableBattery (void) [inline]

Read battery type. Return whether the NXT has a rechargeable battery installed or not. Returns: Whether the battery is rechargeable or not. (false = no, true = yes) Examples: ex_RechargeableBattery.nxc.

8.3.3.620

char RectOut (int x, int y, int width, int height, unsigned long options = DRAW_OPT_NORMAL) [inline]

Draw a rectangle. This function lets you draw a rectangle on the screen at x, y with the specied width and height. Optionally specify drawing options. If this argument is not specied it defaults to DRAW_OPT_NORMAL. Valid display option constants are listed in the Drawing option constants group. See also: SysDrawRect, DrawRectType Parameters: x The x value for the top left corner of the rectangle.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1616

y The y value for the top left corner of the rectangle. width The width of the rectangle. height The height of the rectangle. options The optional drawing options. Returns: The result of the drawing operation. Examples: ex_RectOut.nxc.

8.3.3.621

unsigned long reladdressOf (variant data) [inline]

Get the relative address of a variable. Get the relative address of a variable and return it to the calling routine as an unsigned long value. The relative address is an offset from the Command modules MemoryPool address. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: data A variable whose address you wish to get. Returns: The relative address of the variable. Examples: ex_reladdressof.nxc.

8.3.3.622

void Release (mutex m) [inline]

Acquire a mutex. Release the specied mutex variable. Use this to relinquish a mutex so that it can be acquired by another task. Release should always be called after a matching call to Acquire and as soon as possible after a shared resource is no longer needed.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1617

Parameters: m The mutex to release. Examples: ex_Acquire.nxc, and ex_Release.nxc.

8.3.3.623

char RemoteBluetoothFactoryReset (byte conn) [inline]

Send a BluetoothFactoryReset message. This method sends a BluetoothFactoryReset system command to the device on the specied connection. Use RemoteConnectionIdle to determine when this write request is completed. This command cannot be sent over a bluetooth connection. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteBluetoothFactoryReset.nxc.

8.3.3.624

char RemoteCloseFile (byte conn, byte handle) [inline]

Send a CloseFile message. Send the CloseFile system command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1618

handle The handle of the le to close. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteCloseFile.nxc.

8.3.3.625

bool RemoteConnectionIdle (byte conn) [inline]

Check if remote connection is idle. Check whether a Bluetooth or RS485 hi-speed port connection is idle, i.e., not currently sending data. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. Returns: A boolean value indicating whether the connection is idle or busy. Warning: Checking the status of the RS485 hi-speed connection requires the enhanced NBC/NXC rmware Examples: ex_RemoteConnectionIdle.nxc.

8.3.3.626

char RemoteConnectionWrite (byte conn, byte buffer[ ]) [inline]

Write to a remote connection. This method tells the NXT rmware to write the data in the buffer to the device on the specied connection. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1619

buffer The data to be written (up to 128 bytes) Returns: A char value indicating whether the function call succeeded or not. Warning: Writing to the RS485 hi-speed connection requires the enhanced NBC/NXC rmware Examples: ex_RemoteConnectionWrite.nxc.

8.3.3.627

char RemoteDatalogRead (byte conn, bool remove, byte & cnt, byte & log[ ]) [inline]

Send a DatalogRead message. Send the DatalogRead direct command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. remove Remove the datalog message from the queue after reading it (true or false). cnt The number of bytes read from the datalog. log A byte array containing the datalog contents. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteDatalogRead.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1620

8.3.3.628

char RemoteDatalogSetTimes (byte conn, long synctime) [inline]

Send a DatalogSetTimes message. Send the DatalogSetTimes direct command on the specied connection slot. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. synctime The datalog sync time. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteDatalogSetTimes.nxc.

8.3.3.629

char RemoteDeleteFile (byte conn, string lename) [inline]

Send a DeleteFile message. Send the DeleteFile system command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. lename The name of the le to delete. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteDeleteFile.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1621

8.3.3.630

char RemoteDeleteUserFlash (byte conn) [inline]

Send a DeleteUserFlash message. This method sends a DeleteUserFlash system command to the device on the specied connection. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteDeleteUserFlash.nxc.

8.3.3.631

char RemoteFindFirstFile (byte conn, string mask, byte & handle, string & name, long & size) [inline]

Send a FindFirstFile message. Send the FindFirstFile system command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. mask The lename mask for the les you want to nd. handle The handle of the found le. name The name of the found le. size The size of the found le.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1622

Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteFindFirstFile.nxc.

8.3.3.632

char RemoteFindNextFile (byte conn, byte & handle, string & name, long & size) [inline]

Send a FindNextFile message. Send the FindNextFile system command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. handle The handle returned by the last FindFirstFile or FindNextFile call. name The name of the next found le. size The size of the next found le. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteFindNextFile.nxc.

8.3.3.633

char RemoteGetBatteryLevel (byte conn, int & value) [inline]

Send a GetBatteryLevel message. Send the GetBatteryLevel direct command to the device on the specied connection. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1623

Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. value The battery level value. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteGetBatteryLevel.nxc.

8.3.3.634

char RemoteGetBluetoothAddress (byte conn, byte & btaddr[ ]) [inline]

Send a GetBluetoothAddress message. This method sends a GetBluetoothAddress system command to the device on the specied connection. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. btaddr The bluetooth address of the remote device. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteGetBluetoothAddress.nxc.

8.3.3.635

char RemoteGetConnectionCount (byte conn, byte & cnt) [inline]

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1624

Send a GetConnectionCount message. This method sends a GetConnectionCount direct command to the device on the specied connection. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. cnt The number of connections. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteGetConnectionCount.nxc.

8.3.3.636

char RemoteGetConnectionName (byte conn, byte idx, string & name) [inline]

Send a GetConnectionName message. Send the GetConnectionName direct command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. idx The index of the connection. name The name of the specied connection. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteGetConnectionName.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1625

8.3.3.637

char RemoteGetContactCount (byte conn, byte & cnt) [inline]

Send a GetContactCount message. This method sends a GetContactCount direct command to the device on the specied connection. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. cnt The number of contacts. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteGetContactCount.nxc.

8.3.3.638

char RemoteGetContactName (byte conn, byte idx, string & name) [inline]

Send a GetContactName message. Send the GetContactName direct command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. idx The index of the contact. name The name of the specied contact.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1626

Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteGetContactName.nxc.

8.3.3.639

char RemoteGetCurrentProgramName (byte conn, string & name) [inline]

Send a GetCurrentProgramName message. This method sends a GetCurrentProgramName direct command to the device on the specied connection. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. name The current program name. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteGetCurrentProgramName.nxc.

8.3.3.640

char RemoteGetDeviceInfo (byte conn, string & name, byte & btaddr[ ], byte & btsignal[ ], long & freemem) [inline]

Send a GetDeviceInfo message. This method sends a GetDeviceInfo system command to the device on the specied connection. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1627

Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. name The name of the remote device. btaddr The bluetooth address of the remote device. btsignal The signal strength of each connection on the remote device. freemem The number of bytes of free ash memory on the remote device. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteGetDeviceInfo.nxc.

8.3.3.641

char RemoteGetFirmwareVersion (byte conn, byte & pmin, byte & pmaj, byte & fmin, byte & fmaj) [inline]

Send a GetFirmwareVersion message. This method sends a GetFirmwareVersion system command to the device on the specied connection. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. pmin The protocol minor version byte. pmaj The protocol major version byte. fmin The rmware minor version byte. fmaj The rmware major version byte. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteGetFirmwareVersion.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1628

8.3.3.642

char RemoteGetInputValues (byte conn, InputValuesType & params) [inline]

Send a GetInputValues message. Send the GetInputValues direct command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. params The input and output parameters for the function call. See InputValuesType. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteGetInputValues.nxc.

8.3.3.643

char RemoteGetOutputState (byte conn, OutputStateType & params) [inline]

Send a GetOutputState message. Send the GetOutputState direct command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. params The input and output parameters for the function call. See OutputStateType.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1629

Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteGetOutputState.nxc.

8.3.3.644

char RemoteGetProperty (byte conn, byte property, variant & value) [inline]

Send a GetProperty message. Send the GetProperty direct command on the specied connection slot. Use RemoteConnectionIdle to determine when this write request is completed. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. property The property to read. See Property constants. value The property value. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteGetProperty.nxc.

8.3.3.645

char RemoteIOMapRead (byte conn, long id, int offset, int & numbytes, byte & data[ ]) [inline]

Send an IOMapRead message. Send the IOMapRead system command on the specied connection slot.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1630

Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. id The ID of the module from which to read data. offset The offset into the IOMap structure from which to read. numbytes The number of bytes of data to read. Returns the number of bytes actually read. data A byte array containing the response data. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteIOMapRead.nxc.

8.3.3.646

char RemoteIOMapWriteBytes (byte conn, long id, int offset, byte data[ ]) [inline]

Send an IOMapWrite bytes message. Send the IOMapWrite system command on the specied connection slot to write the data provided. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. id The ID of the module to which to write data. offset The offset into the IOMap structure to which to write. data A byte array containing the data you are writing to the IOMap structure. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteIOMapWriteBytes.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1631

8.3.3.647

char RemoteIOMapWriteValue (byte conn, long id, int offset, variant value) [inline]

Send an IOMapWrite value message. Send the IOMapWrite system command on the specied connection slot to write the value provided. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. id The ID of the module to which to write data. offset The offset into the IOMap structure to which to write. value A scalar variable containing the value you are writing to the IOMap structure. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteIOMapWriteValue.nxc.

8.3.3.648

char RemoteKeepAlive (byte conn) [inline]

Send a KeepAlive message. This method sends a KeepAlive direct command to the device on the specied connection. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteKeepAlive.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1632

8.3.3.649

char RemoteLowspeedGetStatus (byte conn, byte & value) [inline]

Send a LowspeedGetStatus message. This method sends a LowspeedGetStatus direct command to the device on the specied connection. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. value The count of available bytes to read. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteLowspeedGetStatus.nxc.

8.3.3.650

char RemoteLowspeedRead (byte conn, byte port, byte & bread, byte & data[ ]) [inline]

Send a LowspeedRead message. Send the LowspeedRead direct command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. port The input port from which to read I2C data. See Input port constants. bread The number of bytes read.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1633

data A byte array containing the data read from the I2C device. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteLowspeedRead.nxc.

8.3.3.651

char RemoteLowspeedWrite (byte conn, byte port, byte txlen, byte rxlen, byte data[ ]) [inline]

Send a LowspeedWrite message. Send the LowspeedWrite direct command on the specied connection slot. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. port The I2C port. See Input port constants. txlen The number of bytes you are writing to the I2C device. rxlen The number of bytes want to read from the I2C device. data A byte array containing the data you are writing to the device. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteLowspeedWrite.nxc.

8.3.3.652

char RemoteMessageRead (byte conn, byte queue) [inline]

Send a MessageRead message. This method sends a MessageRead direct command to the device on the specied connection. Use RemoteConnectionIdle to determine when this write request is completed.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1634

Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. queue The mailbox to read. See Mailbox constants. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteMessageRead.nxc.

8.3.3.653

char RemoteMessageWrite (byte conn, byte queue, string msg) [inline]

Send a MessageWrite message. This method sends a MessageWrite direct command to the device on the specied connection. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. queue The mailbox to write. See Mailbox constants. msg The message to write to the mailbox. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteMessageWrite.nxc.

8.3.3.654

char RemoteOpenAppendData (byte conn, string lename, byte & handle, long & size) [inline]

Send an OpenAppendData message. Send the OpenAppendData system command on the specied connection slot.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1635

Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. lename The name of the le to open for appending. handle The handle of the le. size The size of the le. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteOpenAppendData.nxc.

8.3.3.655

char RemoteOpenRead (byte conn, string lename, byte & handle, long & size) [inline]

Send an OpenRead message. Send the OpenRead system command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. lename The name of the le to open for reading. handle The handle of the le. size The size of the le. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteOpenRead.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1636

8.3.3.656

char RemoteOpenWrite (byte conn, string lename, long size, byte & handle) [inline]

Send an OpenWrite message. Send the OpenWrite system command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. lename The name of the le to open for writing (i.e., create the le). size The size for the new le. handle The handle of the new le. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteOpenWrite.nxc.

8.3.3.657

char RemoteOpenWriteData (byte conn, string lename, long size, byte & handle) [inline]

Send an OpenWriteData message. Send the OpenWriteData system command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1637

lename The name of the le to open for writing (i.e., create the le). size The size for the new le. handle The handle of the new le. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteOpenWriteData.nxc.

8.3.3.658

char RemoteOpenWriteLinear (byte conn, string lename, long size, byte & handle) [inline]

Send an OpenWriteLinear message. Send the OpenWriteLinear system command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. lename The name of the le to open for writing (i.e., create the le). size The size for the new le. handle The handle of the new le. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteOpenWriteLinear.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1638

8.3.3.659

char RemotePlaySoundFile (byte conn, string lename, bool bloop) [inline]

Send a PlaySoundFile message. Send the PlaySoundFile direct command on the specied connection slot. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. lename The name of the sound le to play. bloop A boolean value indicating whether to loop the sound le or not. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemotePlaySoundFile.nxc.

8.3.3.660

char RemotePlayTone (byte conn, unsigned int frequency, unsigned int duration) [inline]

Send a PlayTone message. Send the PlayTone direct command on the specied connection slot. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. frequency The frequency of the tone. duration The duration of the tone. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemotePlayTone.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1639

8.3.3.661

char RemotePollCommand (byte conn, byte bufnum, byte & len, byte & data[ ]) [inline]

Send a PollCommand message. Send the PollCommand system command on the specied connection slot to write the data provided. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. bufnum The buffer from which to read data (0=USBPoll, 1=HiSpeed). len The number of bytes to read. Returns the number of bytes actually read. data A byte array containing the response data. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemotePollCommand.nxc.

8.3.3.662

char RemotePollCommandLength (byte conn, byte bufnum, byte & length) [inline]

Send a PollCommandLength message. Send the PollCommandLength system command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1640

bufnum The poll buffer you want to query (0=USBPoll, 1=HiSpeed). length The number of bytes available for polling. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemotePollCommandLength.nxc.

8.3.3.663

char RemoteRead (byte conn, byte & handle, int & numbytes, byte & data[ ]) [inline]

Send a Read message. Send the Read system command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. handle The handle of the le you are reading from. numbytes The number of bytes you want to read. Returns the number of bytes actually read. data A byte array containing the response data. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteRead.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1641

8.3.3.664

char RemoteRenameFile (byte conn, string oldname, string newname) [inline]

Send a RenameFile message. Send the RenameFile system command on the specied connection slot to write the data provided. Use RemoteConnectionIdle to determine when this write request is completed. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. oldname The old lename. newname The new lename. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteRenameFile.nxc.

8.3.3.665

char RemoteResetMotorPosition (byte conn, byte port, bool brelative) [inline]

Send a ResetMotorPosition message. Send the ResetMotorPosition direct command on the specied connection slot. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. port The output port to reset. brelative A ag indicating whether the counter to reset is relative.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1642

Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteResetMotorPosition.nxc.

8.3.3.666

char RemoteResetScaledValue (byte conn, byte port) [inline]

Send a ResetScaledValue message. Send the ResetScaledValue direct command on the specied connection slot. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. port The input port to reset. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteResetScaledValue.nxc.

8.3.3.667

char RemoteResetTachoCount (byte conn, byte port) [inline]

Send a ResetTachoCount message. Send the ResetTachoCount direct command on the specied connection slot. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. port The output port to reset the tachometer count on. See Output port constants.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1643

Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteResetTachoCount.nxc.

8.3.3.668

char RemoteSetBrickName (byte conn, string name) [inline]

Send a SetBrickName message. Send the SetBrickName system command on the specied connection slot to write the data provided. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. name The new brick name. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteSetBrickName.nxc.

8.3.3.669

char RemoteSetInputMode (byte conn, byte port, byte type, byte mode) [inline]

Send a SetInputMode message. Send the SetInputMode direct command on the specied connection slot. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. port The input port to congure. See Input port constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1644

type The sensor type. See Sensor type constants. mode The sensor mode. See Sensor mode constants. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteSetInputMode.nxc.

8.3.3.670

char RemoteSetOutputState (byte conn, byte port, char speed, byte mode, byte regmode, char turnpct, byte runstate, unsigned long tacholimit) [inline]

Send a SetOutputMode message. Send the SetOutputMode direct command on the specied connection slot. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. port The output port to congure. See Output port constants. speed The motor speed. (-100..100) mode The motor mode. See Output port mode constants. regmode The motor regulation mode. See Output port regulation mode constants. turnpct The motor synchronized turn percentage. (-100..100) runstate The motor run state. See Output port run state constants. tacholimit The motor tachometer limit. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteSetOutputState.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1645

8.3.3.671

char RemoteSetProperty (byte conn, byte prop, variant value) [inline]

Send a SetProperty message. Send the SetProperty direct command on the specied connection slot. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. prop The property to set. See Property constants. value The new property value. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteSetProperty.nxc.

8.3.3.672

char RemoteStartProgram (byte conn, string lename) [inline]

Send a StartProgram message. Send the StartProgram direct command on the specied connection slot. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. lename The name of the program to start running. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteStartProgram.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1646

8.3.3.673

char RemoteStopProgram (byte conn) [inline]

Send a StopProgram message. Send the StopProgram direct command on the specied connection slot. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteStopProgram.nxc.

8.3.3.674

char RemoteStopSound (byte conn) [inline]

Send a StopSound message. Send the StopSound direct command on the specied connection slot. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteStopSound.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1647

8.3.3.675

char RemoteWrite (byte conn, byte & handle, int & numbytes, byte data[ ]) [inline]

Send a Write message. Send the Write system command on the specied connection slot. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. handle The handle of the le you are writing to. numbytes The number of bytes actually written. data A byte array containing the data you are writing. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_RemoteWrite.nxc.

8.3.3.676

int remove (string lename) [inline]

Remove le. Delete the specied le. The loader result code is returned as the value of the function call. Parameters: lename The name of the le to be deleted. Returns: The loader result code.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1648

8.3.3.677

int rename (string old, string new) [inline]

Rename le. Rename a le from the old lename to the new lename. The loader result code is returned as the value of the function call. Parameters: old The name of the le to be renamed. new The new name for the le. Returns: The loader result code. Examples: ex_rename.nxc.

8.3.3.678

unsigned int RenameFile (string oldname, string newname) [inline]

Rename a le. Rename a le from the old lename to the new lename. The loader result code is returned as the value of the function call. The lename parameters must be constants or variables. Parameters: oldname The old lename. newname The new lename. Returns: The function call result. See Loader module error codes. Examples: ex_RenameFile.nxc.

8.3.3.679

void ResetAllTachoCounts (byte outputs) [inline]

Reset all tachometer counters. Reset all three position counters and reset the current tachometer limit goal for the specied outputs.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1649

Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. For multiple outputs at the same time you need to add single output port values into a byte array and pass the array instead of a single numeric value. Examples: ex_resetalltachocounts.nxc.

8.3.3.680

void ResetBlockTachoCount (byte outputs) [inline]

Reset block-relative counter. Reset the block-relative position counter for the specied outputs. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. For multiple outputs at the same time you need to add single output port values into a byte array and pass the array instead of a single numeric value. Examples: ex_resetblocktachocount.nxc.

8.3.3.681

void ResetRotationCount (byte outputs) [inline]

Reset program-relative counter. Reset the program-relative position counter for the specied outputs. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. For multiple outputs at the same time you need to add single output port values into a byte array and pass the array instead of a single numeric value. Examples: ex_resetrotationcount.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1650

8.3.3.682

void ResetScreen () [inline]

Reset LCD screen. This function lets you restore the standard NXT running program screen. Examples: ex_ResetScreen.nxc.

8.3.3.683

void ResetSensor (const byte & port) [inline]

Reset the sensor port. Sets the invalid data ag on the specied port and waits for it to become valid again. After changing the type or the mode of a sensor port you must call this function to give the rmware time to recongure the sensor port. Parameters: port The port to reset. See Input port constants. Examples: ex_ResetSensor.nxc.

8.3.3.684

char ResetSensorHTAngle (const byte port, const byte mode) [inline]

Reset HiTechnic Angle sensor. Reset the HiTechnic Angle sensor on the specied port. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. mode The Angle reset mode. See HiTechnic Angle sensor constants. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_ResetSensorHTAngle.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1651

8.3.3.685

long ResetSleepTimer () [inline]

Reset the sleep timer. This function lets you reset the sleep timer. Returns: The result of resetting the sleep timer. Examples: ex_ResetSleepTimer.nxc.

8.3.3.686

void ResetTachoCount (byte outputs) [inline]

Reset tachometer counter. Reset the tachometer count and tachometer limit goal for the specied outputs. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. For multiple outputs at the same time you need to add single output port values into a byte array and pass the array instead of a single numeric value. Examples: ex_resettachocount.nxc.

8.3.3.687

unsigned int ResizeFile (string fname, const unsigned int newsize) [inline]

Resize a le. Resize the specied le. The loader result code is returned as the value of the function call. The lename parameter must be a constant or a variable. Parameters: fname The name of the le to resize. newsize The new size for the le. Returns: The function call result. See Loader module error codes.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1652

Examples: ex_resizele.nxc.

8.3.3.688

unsigned int ResolveHandle (string lename, byte & handle, bool & writeable) [inline]

Resolve a handle. Resolve a le handle from the specied lename. The le handle is returned in the second parameter, which must be a variable. A boolean value indicating whether the handle can be used to write to the le or not is returned in the last parameter, which must be a variable. The loader result code is returned as the value of the function call. The lename parameter must be a constant or a variable. Parameters: lename The name of the le for which to resolve a handle. handle The le handle output from the function call. writeable A boolean ag indicating whether the handle is to a le open for writing (true) or reading (false). Returns: The function call result. See Loader module error codes. Examples: ex_ResolveHandle.nxc.

8.3.3.689

void rewind (byte handle) [inline]

Set position indicator to the beginning. Sets the position indicator associated with stream to the beginning of the le. Parameters: handle The handle of the le. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Examples: ex_rewind.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1653

8.3.3.690

bool RFIDInit (const byte & port) [inline]

RFIDInit function. Initialize the Codatex RFID sensor. Parameters: port The port to which the Codatex RFID sensor is attached. See the Input port constants group. You may use a constant or a variable. Returns: The boolean function call result. Examples: ex_RFIDInit.nxc.

8.3.3.691

bool RFIDMode (const byte & port, const byte & mode) [inline]

RFIDMode function. Congure the Codatex RFID sensor mode. Parameters: port The port to which the Codatex RFID sensor is attached. See the Input port constants group. You may use a constant or a variable. mode The RFID sensor mode. See the Codatex RFID sensor modes group. Returns: The boolean function call result. Examples: ex_RFIDMode.nxc.

8.3.3.692

bool RFIDRead (const byte & port, byte & output[ ]) [inline]

RFIDRead function. Read the Codatex RFID sensor value. Parameters: port The port to which the Codatex RFID sensor is attached. See the Input port constants group. You may use a constant or a variable.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1654

output The ve bytes of RFID data. Returns: The boolean function call result. Examples: ex_RFIDRead.nxc.

8.3.3.693

bool RFIDReadContinuous (const byte & port, byte & output[ ]) [inline]

RFIDReadContinuous function. Set the Codatex RFID sensor into continuous mode, if necessary, and read the RFID data. Parameters: port The port to which the Codatex RFID sensor is attached. See the Input port constants group. You may use a constant or a variable. output The ve bytes of RFID data. Returns: The boolean function call result. Examples: ex_RFIDReadContinuous.nxc.

8.3.3.694

bool RFIDReadSingle (const byte & port, byte & output[ ]) [inline]

RFIDReadSingle function. Set the Codatex RFID sensor into single mode and read the RFID data. Parameters: port The port to which the Codatex RFID sensor is attached. See the Input port constants group. You may use a constant or a variable. output The ve bytes of RFID data.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1655

Returns: The boolean function call result. Examples: ex_RFIDReadSingle.nxc.

8.3.3.695

byte RFIDStatus (const byte & port) [inline]

RFIDStatus function. Read the Codatex RFID sensor status. Parameters: port The port to which the Codatex RFID sensor is attached. See the Input port constants group. You may use a constant or a variable. Returns: The RFID sensor status. Examples: ex_RFIDStatus.nxc.

8.3.3.696

bool RFIDStop (const byte & port) [inline]

RFIDStop function. Stop the Codatex RFID sensor. Parameters: port The port to which the Codatex RFID sensor is attached. See the Input port constants group. You may use a constant or a variable. Returns: The boolean function call result. Examples: ex_RFIDStop.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1656

8.3.3.697

string RightStr (string str, unsigned int size) [inline]

Copy a portion from the end of a string. Returns the substring of a specied length that appears at the end of a string. Parameters: str A string size The size or length of the substring. Returns: The substring of a specied length that appears at the end of a string. Examples: ex_rightstr.nxc.

8.3.3.698

void RotateMotor (byte outputs, char pwr, long angle) [inline]

Rotate motor. Run the specied outputs forward for the specied number of degrees. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. angle Angle limit, in degree. Can be negative to reverse direction. Examples: ex_rotatemotor.nxc.

8.3.3.699

void RotateMotorEx (byte outputs, char pwr, long angle, char turnpct, bool sync, bool stop) [inline]

Rotate motor. Run the specied outputs forward for the specied number of degrees.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1657

Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. angle Angle limit, in degree. Can be negative to reverse direction. turnpct Turn ratio, -100 to 100. The direction of your vehicle will depend on its construction. sync Synchronise two motors. Should be set to true if a non-zero turn percent is specied or no turning will occur. stop Specify whether the motor(s) should brake at the end of the rotation. Examples: ex_rotatemotorex.nxc.

8.3.3.700

void RotateMotorExPID (byte outputs, char pwr, long angle, char turnpct, bool sync, bool stop, byte p, byte i, byte d) [inline]

Rotate motor. Run the specied outputs forward for the specied number of degrees. Specify proportional, integral, and derivative factors. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. angle Angle limit, in degree. Can be negative to reverse direction. turnpct Turn ratio, -100 to 100. The direction of your vehicle will depend on its construction. sync Synchronise two motors. Should be set to true if a non-zero turn percent is specied or no turning will occur. stop Specify whether the motor(s) should brake at the end of the rotation. p Proportional factor used by the rmwares PID motor control algorithm. See PID constants. i Integral factor used by the rmwares PID motor control algorithm. See PID constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1658

d Derivative factor used by the rmwares PID motor control algorithm. See PID constants. Examples: ex_rotatemotorexpid.nxc.

8.3.3.701

void RotateMotorPID (byte outputs, char pwr, long angle, byte p, byte i, byte d) [inline]

Rotate motor with PID factors. Run the specied outputs forward for the specied number of degrees. Specify proportional, integral, and derivative factors. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function. pwr Output power, 0 to 100. Can be negative to reverse direction. angle Angle limit, in degree. Can be negative to reverse direction. p Proportional factor used by the rmwares PID motor control algorithm. See PID constants. i Integral factor used by the rmwares PID motor control algorithm. See PID constants. d Derivative factor used by the rmwares PID motor control algorithm. See PID constants. Examples: ex_rotatemotorpid.nxc.

8.3.3.702

char RS485Control (byte cmd, byte baud, unsigned int mode) [inline]

Control the RS485 port. Control the RS485 hi-speed port using the specied parameters. Parameters: cmd The control command to send to the port. See Hi-speed port SysCommHSControl constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1659

baud The baud rate for the RS485 port. See Hi-speed port baud rate constants. mode The RS485 port mode (data bits, stop bits, parity). See Hi-speed port data bits constants, Hi-speed port stop bits constants, Hi-speed port parity constants, and Hi-speed port combined UART constants. Returns: A char value indicating whether the function call succeeded or not. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_RS485Receive.nxc, and ex_RS485Send.nxc.

8.3.3.703

bool RS485DataAvailable (void) [inline]

Check for RS485 available data. Check the RS485 hi-speed port for available data. Returns: A value indicating whether data is available or not. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_RS485Receive.nxc.

8.3.3.704

char RS485Disable (void) [inline]

Disable RS485. Turn off the RS485 port. Returns: A char value indicating whether the function call succeeded or not.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1660

Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_RS485Receive.nxc, and ex_RS485Send.nxc.

8.3.3.705

char RS485Enable (void) [inline]

Enable RS485. Turn on the RS485 hi-speed port so that it can be used. Returns: A char value indicating whether the function call succeeded or not. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_RS485Receive.nxc, and ex_RS485Send.nxc.

8.3.3.706

char RS485Initialize (void) [inline]

Initialize RS485 port. Initialize the RS485 UART port to its default values. The baud rate is set to 921600 and the mode is set to 8N1 (8 data bits, no parity, 1 stop bit). Data cannot be sent or received over the RS485 port until the port is congured as as a hi-speed port, the port is turned on, and the UART is initialized. Returns: A char value indicating whether the function call succeeded or not. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_RS485Receive.nxc, and ex_RS485Send.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1661

8.3.3.707

char RS485Read (byte & buffer[ ]) [inline]

Read RS485 data. Read data from the RS485 hi-speed port. Parameters: buffer A byte array that will contain the data read from the RS485 port. Returns: A char value indicating whether the function call succeeded or not. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_RS485Receive.nxc.

8.3.3.708

bool RS485SendingData (void) [inline]

Is RS485 sending data. Check whether the RS485 is actively sending data. Returns: A value indicating whether data is being sent or not. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_RS485Send.nxc.

8.3.3.709

void RS485Status (bool & sendingData, bool & dataAvail) [inline]

Check RS485 status. Check the status of the RS485 hi-speed port.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1662

Parameters: sendingData A boolean value set to true on output if data is being sent. dataAvail A boolean value set to true on output if data is available to be read. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_RS485Receive.nxc, and ex_RS485Send.nxc.

8.3.3.710

char RS485Uart (byte baud, unsigned int mode) [inline]

Congure RS485 UART. Congure the RS485 UART parameters, including baud rate, data bits, stop bits, and parity. Parameters: baud The baud rate for the RS485 port. See Hi-speed port baud rate constants. mode The RS485 port mode (data bits, stop bits, parity). See Hi-speed port data bits constants, Hi-speed port stop bits constants, Hi-speed port parity constants, and Hi-speed port combined UART constants. Returns: A char value indicating whether the function call succeeded or not. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_RS485Receive.nxc, and ex_RS485Send.nxc.

8.3.3.711

char RS485Write (byte buffer[ ]) [inline]

Write RS485 data. Write data to the RS485 hi-speed port.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1663

Parameters: buffer A byte array containing the data to write to the RS485 port. Returns: A char value indicating whether the function call succeeded or not. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_RS485Send.nxc.

8.3.3.712

char RunNRLinkMacro (const byte port, const byte i2caddr, const byte macro) [inline]

Run NRLink macro. Run the specied mindsensors NRLink device macro. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. macro The address of the macro to execute. Returns: The function call result. Examples: ex_RunNRLinkMacro.nxc.

8.3.3.713

char SendMessage (byte queue, string msg) [inline]

Send a message to a queue/mailbox. Write a message into a local mailbox. Parameters: queue The mailbox number. See Mailbox constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1664

msg The message to write to the mailbox. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_SendMessage.nxc.

8.3.3.714

char SendRemoteBool (byte conn, byte queue, bool bval) [inline]

Send a boolean value to a remote mailbox. Send a boolean value on the specied connection to the specied remote mailbox number. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. queue The mailbox number. See Mailbox constants. bval The boolean value to send. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_SendRemoteBool.nxc.

8.3.3.715

char SendRemoteNumber (byte conn, byte queue, long val) [inline]

Send a numeric value to a remote mailbox. Send a numeric value on the specied connection to the specied remote mailbox number. Use RemoteConnectionIdle to determine when this write request is completed.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1665

Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. queue The mailbox number. See Mailbox constants. val The numeric value to send. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_SendRemoteNumber.nxc.

8.3.3.716

char SendRemoteString (byte conn, byte queue, string str) [inline]

Send a string value to a remote mailbox. Send a string value on the specied connection to the specied remote mailbox number. Use RemoteConnectionIdle to determine when this write request is completed. Parameters: conn The connection slot (0..4). Connections 0 through 3 are for bluetooth connections. Connection 4 refers to the RS485 hi-speed port. See Remote connection constants. queue The mailbox number. See Mailbox constants. str The string value to send. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_SendRemoteString.nxc.

8.3.3.717

char SendResponseBool (byte queue, bool bval) [inline]

Write a boolean value to a local response mailbox. Write a boolean value to a response mailbox (the mailbox number + 10).
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1666

Parameters: queue The mailbox number. See Mailbox constants. This function shifts the specied value into the range of response mailbox numbers by adding 10. bval The boolean value to write. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_SendResponseBool.nxc.

8.3.3.718

char SendResponseNumber (byte queue, long val) [inline]

Write a numeric value to a local response mailbox. Write a numeric value to a response mailbox (the mailbox number + 10). Parameters: queue The mailbox number. See Mailbox constants. This function shifts the specied value into the range of response mailbox numbers by adding 10. val The numeric value to write. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_SendResponseNumber.nxc.

8.3.3.719

char SendResponseString (byte queue, string str) [inline]

Write a string value to a local response mailbox. Write a string value to a response mailbox (the mailbox number + 10). Parameters: queue The mailbox number. See Mailbox constants. This function shifts the specied value into the range of response mailbox numbers by adding 10.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1667

str The string value to write. Returns: A char value indicating whether the function call succeeded or not. Examples: ex_SendResponseString.nxc.

8.3.3.720

char SendRS485Bool (bool bval) [inline]

Write RS485 boolean. Write a boolean value to the RS485 hi-speed port. Parameters: bval A boolean value to write over the RS485 port. Returns: A char value indicating whether the function call succeeded or not. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_RS485Send.nxc.

8.3.3.721

char SendRS485Number (long val) [inline]

Write RS485 numeric. Write a numeric value to the RS485 hi-speed port. Parameters: val A numeric value to write over the RS485 port. Returns: A char value indicating whether the function call succeeded or not.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1668

Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_RS485Send.nxc.

8.3.3.722

char SendRS485String (string str) [inline]

Write RS485 string. Write a string value to the RS485 hi-speed port. Parameters: str A string value to write over the RS485 port. Returns: A char value indicating whether the function call succeeded or not. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_RS485Send.nxc.

8.3.3.723

unsigned int Sensor (const byte & port) [inline]

Read sensor scaled value. Return the processed sensor reading for a sensor on the specied port. This is the same value that is returned by the sensor value names (e.g. SENSOR_1). Parameters: port The sensor port. See Input port constants. A variable whose value is the desired sensor port may also be used. Returns: The sensors scaled value. Examples: ex_Sensor.nxc, and ex_SysComputeCalibValue.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1669

8.3.3.724

bool SensorBoolean (const byte port) [inline]

Read sensor boolean value. Return the boolean value of a sensor on the specied port. Boolean conversion is either done based on preset cutoffs, or a slope parameter specied by calling SetSensorMode. Parameters: port The sensor port. See Input port constants. Must be a constant. Returns: The sensors boolean value. Examples: ex_SensorBoolean.nxc.

8.3.3.725

byte SensorDigiPinsDirection (const byte port) [inline]

Read sensor digital pins direction. Return the digital pins direction value of a sensor on the specied port. Parameters: port The sensor port. See Input port constants. Must be a constant. Returns: The sensors digital pins direction. Examples: ex_SensorDigiPinsDirection.nxc.

8.3.3.726

byte SensorDigiPinsOutputLevel (const byte port) [inline]

Read sensor digital pins output level. Return the digital pins output level value of a sensor on the specied port.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1670

Parameters: port The sensor port. See Input port constants. Must be a constant. Returns: The sensors digital pins output level. Examples: ex_SensorDigiPinsOutputLevel.nxc.

8.3.3.727

byte SensorDigiPinsStatus (const byte port) [inline]

Read sensor digital pins status. Return the digital pins status value of a sensor on the specied port. Parameters: port The sensor port. See Input port constants. Must be a constant. Returns: The sensors digital pins status. Examples: ex_SensorDigiPinsStatus.nxc.

8.3.3.728

int SensorHTColorNum (const byte & port) [inline]

Read HiTechnic color sensor color number. Read the color number from the HiTechnic Color sensor on the specied port. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. Returns: The color number. Examples: ex_SensorHTColorNum.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1671

8.3.3.729

int SensorHTCompass (const byte & port) [inline]

Read HiTechnic compass. Read the compass heading value of the HiTechnic Compass sensor on the specied port. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. Returns: The compass heading. Examples: ex_SensorHTCompass.nxc.

8.3.3.730

int SensorHTEOPD (const byte & port) [inline]

Read HiTechnic EOPD sensor. Read the HiTechnic EOPD sensor on the specied port. Parameters: port The sensor port. See Input port constants. Returns: The EOPD sensor reading. Examples: ex_SensorHTEOPD.nxc.

8.3.3.731

int SensorHTGyro (const byte & port, int offset = 0) [inline]

Read HiTechnic Gyro sensor. Read the HiTechnic Gyro sensor on the specied port. The offset value should be calculated by averaging several readings with an offset of zero while the sensor is perfectly still.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1672

Parameters: port The sensor port. See Input port constants. offset The zero offset. Returns: The Gyro sensor reading. Examples: ex_HTGyroTest.nxc, and ex_SensorHTGyro.nxc.

8.3.3.732

int SensorHTIRSeeker2ACDir (const byte & port) [inline]

Read HiTechnic IRSeeker2 AC direction. Read the AC direction value from the HiTechnic IR Seeker2 on the specied port. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. Returns: The IRSeeker2 AC direction. Examples: ex_SensorHTIRSeeker2ACDir.nxc.

8.3.3.733

int SensorHTIRSeeker2Addr (const byte & port, const byte reg) [inline]

Read HiTechnic IRSeeker2 register. Read a register value from the HiTechnic IR Seeker2 on the specied port. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. reg The register address. See HiTechnic IRSeeker2 constants.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1673

Returns: The IRSeeker2 register value. Examples: ex_SensorHTIRSeeker2Addr.nxc.

8.3.3.734

int SensorHTIRSeeker2DCDir (const byte & port) [inline]

Read HiTechnic IRSeeker2 DC direction. Read the DC direction value from the HiTechnic IR Seeker2 on the specied port. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. Returns: The IRSeeker2 DC direction. Examples: ex_SensorHTIRSeeker2DCDir.nxc.

8.3.3.735

int SensorHTIRSeekerDir (const byte & port) [inline]

Read HiTechnic IRSeeker direction. Read the direction value of the HiTechnic IR Seeker on the specied port. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. Returns: The IRSeeker direction. Examples: ex_SensorHTIRSeekerDir.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1674

8.3.3.736

int SensorHTMagnet (const byte & port, int offset = 0) [inline]

Read HiTechnic Magnet sensor. Read the HiTechnic Magnet sensor on the specied port. The offset value should be calculated by averaging several readings with an offset of zero while the sensor is perfectly still. Parameters: port The sensor port. See Input port constants. offset The zero offset. Returns: The Magnet sensor reading. Examples: ex_SensorHTMagnet.nxc.

8.3.3.737

bool SensorInvalid (const byte & port) [inline]

Read sensor invalid data ag. Return the value of the InvalidData ag of a sensor on the specied port. Parameters: port The sensor port. See Input port constants. A variable whose value is the desired sensor port may also be used. Returns: The sensors invalid data ag. Examples: ex_SensorInvalid.nxc.

8.3.3.738

byte SensorMode (const byte & port) [inline]

Read sensor mode. Return the mode of a sensor on the specied port.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1675

Parameters: port The sensor port. See Input port constants. A variable whose value is the desired sensor port may also be used. Returns: The sensors mode. See Sensor mode constants. Examples: ex_SensorMode.nxc.

8.3.3.739

int SensorMSCompass (const byte & port, const byte i2caddr) [inline]

Read mindsensors compass value. Return the Mindsensors Compass sensor value. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. Returns: The mindsensors compass value Examples: ex_SensorMSCompass.nxc.

8.3.3.740

int SensorMSDROD (const byte & port) [inline]

Read mindsensors DROD value. Return the Mindsensors DROD sensor value. Parameters: port The sensor port. See Input port constants. Returns: The mindsensors DROD value Examples: ex_SensorMSDROD.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1676

8.3.3.741

int SensorMSPressure (const byte & port) [inline]

Read mindsensors pressure sensor. Read the pressure sensor value of the mindsensors pressure sensor on the specied port. Parameters: port The sensor port. See Input port constants. Returns: The pressure reading. Examples: ex_SensorMSPressure.nxc.

8.3.3.742

int SensorMSPressureRaw (const byte & port) [inline]

Read mindsensors raw pressure value. Return the Mindsensors pressure sensor raw value. Parameters: port The sensor port. See Input port constants. Returns: The mindsensors raw pressure value Examples: ex_SensorMSPressureRaw.nxc.

8.3.3.743

unsigned int SensorNormalized (const byte & port) [inline]

Read sensor normalized value. Return the normalized value of a sensor on the specied port. Parameters: port The sensor port. See Input port constants. A variable whose value is the desired sensor port may also be used.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1677

Returns: The sensors normalized value. Examples: ex_SensorNormalized.nxc.

8.3.3.744

char SensorNXTSumoEyes (const byte & port)

Read mindsensors NXTSumoEyes obstacle zone. Return the Mindsensors NXTSumoEyes sensor obstacle zone value. The port should be congured for the NXTSumoEyes device using SetSensorNXTSumoEyes before calling this function. Parameters: port The sensor port. See Input port constants. Returns: The mindsensors NXTSumoEyes obstacle zone value. NXTSumoEyes constants. Examples: ex_NXTSumoEyes.nxc. See MindSensors

8.3.3.745

int SensorNXTSumoEyesRaw (const byte & port) [inline]

Read mindsensors NXTSumoEyes raw value. Return the Mindsensors NXTSumoEyes raw sensor value. The port should be congured for the NXTSumoEyes device using SetSensorNXTSumoEyes before calling this function. Parameters: port The sensor port. See Input port constants. Returns: The mindsensors NXTSumoEyes raw value Examples: ex_NXTSumoEyes.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1678

8.3.3.746

unsigned int SensorRaw (const byte & port) [inline]

Read sensor raw value. Return the raw value of a sensor on the specied port. Parameters: port The sensor port. See Input port constants. A variable whose value is the desired sensor port may also be used. Returns: The sensors raw value. Examples: ex_SensorRaw.nxc.

8.3.3.747

unsigned int SensorScaled (const byte & port) [inline]

Read sensor scaled value. Return the processed sensor reading for a sensor on the specied port. This is the same value that is returned by the sensor value names (e.g. SENSOR_1) or the Sensor function. Parameters: port The sensor port. See Input port constants. A variable whose value is the desired sensor port may also be used. Returns: The sensors scaled value. Examples: ex_SensorScaled.nxc.

8.3.3.748

oat SensorTemperature (const byte & port) [inline]

Read the LEGO Temperature sensor value. Return the temperature sensor value in degrees celcius. Since a temperature sensor is an I2C digital sensor its value cannot be read using the standard Sensor(n) value. The port must be congured as a temperature sensor port before using this function. Use SetSensorTemperature to congure the port.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1679

Parameters: port The port to which the temperature sensor is attached. See the Input port constants group. You may use a constant or a variable. Returns: The temperature sensor value in degrees celcius. Examples: ex_SensorTemperature.nxc.

8.3.3.749

byte SensorType (const byte & port) [inline]

Read sensor type. Return the type of a sensor on the specied port. Parameters: port The sensor port. See Input port constants. A variable whose value is the desired sensor port may also be used. Returns: The sensors type. See Sensor type constants. Examples: ex_SensorType.nxc.

8.3.3.750

byte SensorUS (const byte port) [inline]

Read ultrasonic sensor value. Return the ultrasonic sensor distance value. Since an ultrasonic sensor is an I2C digital sensor its value cannot be read using the standard Sensor(n) value. The port must be congured as a Lowspeed port before using this function. Parameters: port The port to which the ultrasonic sensor is attached. See the Input port constants group. You may use a constant or a variable. Returns: The ultrasonic sensor distance value (0..255)
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1680

Examples: ex_SensorUS.nxc.

8.3.3.751

unsigned int SensorValue (const byte & port) [inline]

Read sensor scaled value. Return the processed sensor reading for a sensor on the specied port. This is the same value that is returned by the sensor value names (e.g. SENSOR_1) or the Sensor function. Parameters: port The sensor port. See Input port constants. A variable whose value is the desired sensor port may also be used. Returns: The sensors scaled value. Examples: ex_SensorValue.nxc.

8.3.3.752

bool SensorValueBool (const byte port) [inline]

Read sensor boolean value. Return the boolean value of a sensor on the specied port. Boolean conversion is either done based on preset cutoffs, or a slope parameter specied by calling SetSensorMode. Parameters: port The sensor port. See Input port constants. Must be a constant. Returns: The sensors boolean value. Examples: ex_SensorValueBool.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1681

8.3.3.753

unsigned int SensorValueRaw (const byte & port) [inline]

Read sensor raw value. Return the raw value of a sensor on the specied port. Parameters: port The sensor port. See Input port constants. A variable whose value is the desired sensor port may also be used. Returns: The sensors raw value. Examples: ex_SensorValueRaw.nxc.

8.3.3.754

void set_fopen_size (unsigned long fsize) [inline]

Set the default fopen le size. Set the default size of a le created via a call to fopen. Parameters: fsize The default new le size for fopen.

8.3.3.755

void SetAbortFlag (byte abortFlag) [inline]

Set abort ag. Set the enhanced NBC/NXC rmwares program abort ag. By default the running program can be interrupted by a short press of the escape button. You can change this to any other button state ag. Parameters: abortFlag The new abort ag value. See ButtonState constants Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_SetAbortFlag.nxc, and ex_SetLongAbort.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1682

8.3.3.756

char SetACCLNxSensitivity (const byte port, const byte i2caddr, byte slevel) [inline]

Set ACCL-Nx sensitivity. Reset the mindsensors ACCL-Nx sensor calibration to factory settings. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. slevel The sensitivity level. See MindSensors ACCL-Nx sensitivity level constants. Returns: The function call result. Examples: ex_SetACCLNxSensitivity.nxc.

8.3.3.757

void SetBatteryState (byte state) [inline]

Set battery state. Set battery state information. Parameters: state The desired battery state (0..4). Examples: ex_SetBatteryState.nxc.

8.3.3.758

void SetBluetoothState (byte state) [inline]

Set bluetooth state. Set the Bluetooth state. Parameters: state The desired bluetooth state. See BluetoothState constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1683

Examples: ex_SetBluetoothState.nxc.

8.3.3.759

void SetBTDataMode (const byte dataMode) [inline]

Set Bluetooth data mode. This method sets the value of the Bluetooth data mode. Parameters: dataMode The Bluetooth data mode. See Data mode constants. Must be a constant. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Examples: ex_DataMode.nxc.

8.3.3.760

void SetBTInputBuffer (const byte offset, byte cnt, byte data[ ]) [inline]

Set bluetooth input buffer data. Write cnt bytes of data to the bluetooth input buffer at offset. Parameters: offset A constant offset into the input buffer cnt The number of bytes to write data A byte array containing the data to write Examples: ex_SetBTInputBuffer.nxc.

8.3.3.761

void SetBTInputBufferInPtr (byte n) [inline]

Set bluetooth input buffer in-pointer. Set the value of the input buffer in-pointer.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1684

Parameters: n The new in-pointer value (0..127). Examples: ex_SetBTInputBufferInPtr.nxc.

8.3.3.762

void SetBTInputBufferOutPtr (byte n) [inline]

Set bluetooth input buffer out-pointer. Set the value of the input buffer out-pointer. Parameters: n The new out-pointer value (0..127). Examples: ex_SetBTInputBufferOutPtr.nxc.

8.3.3.763

void SetBTOutputBuffer (const byte offset, byte cnt, byte data[ ]) [inline]

Set bluetooth output buffer data. Write cnt bytes of data to the bluetooth output buffer at offset. Parameters: offset A constant offset into the output buffer cnt The number of bytes to write data A byte array containing the data to write Examples: ex_SetBTOutputBuffer.nxc.

8.3.3.764

void SetBTOutputBufferInPtr (byte n) [inline]

Set bluetooth output buffer in-pointer. Set the value of the output buffer in-pointer.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1685

Parameters: n The new in-pointer value (0..127). Examples: ex_SetBTOutputBufferInPtr.nxc.

8.3.3.765

void SetBTOutputBufferOutPtr (byte n) [inline]

Set bluetooth output buffer out-pointer. Set the value of the output buffer out-pointer. Parameters: n The new out-pointer value (0..127). Examples: ex_SetBTOutputBufferOutPtr.nxc.

8.3.3.766

void SetButtonLongPressCount (const byte btn, const byte n) [inline]

Set button long press count. Set the long press count of the specied button. Parameters: btn The button number. See Button name constants. n The new long press count value. Examples: ex_SetButtonLongPressCount.nxc.

8.3.3.767

void SetButtonLongReleaseCount (const byte btn, const byte n) [inline]

Set button long release count. Set the long release count of the specied button.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1686

Parameters: btn The button number. See Button name constants. n The new long release count value. Examples: ex_SetButtonLongReleaseCount.nxc.

8.3.3.768

void SetButtonModuleValue (unsigned int offset, variant value) [inline]

Set Button module IOMap value. Set one of the elds of the Button module IOMap structure to a new value. You provide the offset into the Button module IOMap structure where you want to write the value along with a variable containing the new value. Parameters: offset The number of bytes offset from the start of the Button module IOMap structure where the new value should be written. See Button module IOMAP offsets. value A variable containing the new value to write to the Button module IOMap.

8.3.3.769

void SetButtonPressCount (const byte btn, const byte n) [inline]

Set button press count. Set the press count of the specied button. Parameters: btn The button number. See Button name constants. n The new press count value. Examples: ex_SetButtonPressCount.nxc.

8.3.3.770

void SetButtonReleaseCount (const byte btn, const byte n) [inline]

Set button release count. Set the release count of the specied button.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1687

Parameters: btn The button number. See Button name constants. n The new release count value. Examples: ex_SetButtonReleaseCount.nxc.

8.3.3.771

void SetButtonShortReleaseCount (const byte btn, const byte n) [inline]

Set button short release count. Set the short release count of the specied button. Parameters: btn The button number. See Button name constants. n The new short release count value. Examples: ex_SetButtonShortReleaseCount.nxc.

8.3.3.772

void SetButtonState (const byte btn, const byte state) [inline]

Set button state. Set the state of the specied button. Parameters: btn The button to check. See Button name constants. state The new button state. See ButtonState constants. Examples: ex_SetButtonState.nxc.

8.3.3.773

void SetCommandFlags (const byte cmdFlags) [inline]

Set command ags. Set the command ags.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1688

Parameters: cmdFlags The new command ags. See CommandFlags constants. Examples: ex_SetCommandFlags.nxc.

8.3.3.774

void SetCommandModuleBytes (unsigned int offset, unsigned int count, byte data[ ]) [inline]

Set Command module IOMap bytes. Modify one or more bytes of data in the Command module IOMap structure. You provide the offset into the Command module IOMap structure where you want to start writing, the number of bytes to write at that location, and a byte array containing the new data. Parameters: offset The number of bytes offset from the start of the Command module IOMap structure where the data should be written. See Command module IOMAP offsets. count The number of bytes to write at the specied Command module IOMap offset. data The byte array containing the data to write to the Command module IOMap.

8.3.3.775

void SetCommandModuleValue (unsigned int offset, variant value) [inline]

Set Command module IOMap value. Set one of the elds of the Command module IOMap structure to a new value. You provide the offset into the Command module IOMap structure where you want to write the value along with a variable containing the new value. Parameters: offset The number of bytes offset from the start of the Command module IOMap structure where the new value should be written. See Command module IOMAP offsets. value A variable containing the new value to write to the Command module IOMap.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1689

8.3.3.776

void SetCommModuleBytes (unsigned int offset, unsigned int count, byte data[ ]) [inline]

Set Comm module IOMap bytes. Modify one or more bytes of data in an IOMap structure. You provide the offset into the Comm module IOMap structure where you want to start writing, the number of bytes to write at that location, and a byte array containing the new data. Parameters: offset The number of bytes offset from the start of the Comm module IOMap structure where the data should be written. See Comm module IOMAP offsets. count The number of bytes to write at the specied Comm module IOMap offset. data The byte array containing the data to write to the Comm module IOMap.

8.3.3.777

void SetCommModuleValue (unsigned int offset, variant value) [inline]

Set Comm module IOMap value. Set one of the elds of the Comm module IOMap structure to a new value. You provide the offset into the Comm module IOMap structure where you want to write the value along with a variable containing the new value. Parameters: offset The number of bytes offset from the start of the Comm module IOMap structure where the new value should be written. See Comm module IOMAP offsets. value A variable containing the new value to write to the Comm module IOMap.

8.3.3.778

void SetCustomSensorActiveStatus (byte port, byte activeStatus) [inline]

Set active status. Sets the active status value of a custom sensor. Parameters: port The sensor port. See Input port constants. activeStatus The new active status value.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1690

Examples: ex_SetCustomSensorActiveStatus.nxc.

8.3.3.779

void SetCustomSensorPercentFullScale (byte port, byte pctFullScale) [inline]

Set percent full scale. Sets the percent full scale value of a custom sensor. Parameters: port The sensor port. See Input port constants. pctFullScale The new percent full scale value. Examples: ex_SetCustomSensorPercentFullScale.nxc.

8.3.3.780

void SetCustomSensorZeroOffset (byte port, int zeroOffset) [inline]

Set custom zero offset. Sets the zero offset value of a custom sensor. Parameters: port The sensor port. See Input port constants. zeroOffset The new zero offset value. Examples: ex_SetCustomSensorZeroOffset.nxc.

8.3.3.781

void SetDisplayContrast (byte contrast) [inline]

Set the display contrast. This function lets you set the display contrast setting. Parameters: contrast The desired display contrast.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1691

Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Examples: ex_contrast.nxc, and ex_setdisplaycontrast.nxc.

8.3.3.782

void SetDisplayDisplay (unsigned long dispaddr) [inline]

Set the display memory address. This function lets you set the current display memory address. Parameters: dispaddr The new display memory address. Examples: ex_dispmisc.nxc, and ex_SetDisplayDisplay.nxc.

8.3.3.783

void SetDisplayEraseMask (unsigned long eraseMask) [inline]

Set the display erase mask. This function lets you set the current display erase mask. Parameters: eraseMask The new display erase mask. Examples: ex_dispmisc.nxc, and ex_SetDisplayEraseMask.nxc.

8.3.3.784

void SetDisplayFlags (byte ags) [inline]

Set the display ags. This function lets you set the current display ags. Parameters: ags The new display ags. See Display ags.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1692

Examples: ex_dispmisc.nxc, and ex_SetDisplayFlags.nxc.

8.3.3.785

void SetDisplayFont (unsigned long fontaddr) [inline]

Set the display font memory address. This function lets you set the current display font memory address. Parameters: fontaddr The new display font memory address. Examples: ex_addressof.nxc, setdisplayfont.nxc. ex_addressofex.nxc, ex_displayfont.nxc, and ex_-

8.3.3.786

void SetDisplayModuleBytes (unsigned int offset, unsigned int count, byte data[ ]) [inline]

Set Display module IOMap bytes. Modify one or more bytes of data in the Display module IOMap structure. You provide the offset into the Display module IOMap structure where you want to start writing, the number of bytes to write at that location, and a byte array containing the new data. Parameters: offset The number of bytes offset from the start of the Display module IOMap structure where the data should be written. See Display module IOMAP offsets. count The number of bytes to write at the specied Display module IOMap offset. data The byte array containing the data to write to the Display module IOMap.

8.3.3.787

void SetDisplayModuleValue (unsigned int offset, variant value) [inline]

Set Display module IOMap value. Set one of the elds of the Display module IOMap structure to a new value. You provide the offset into the Display module IOMap structure where you want to write the value along with a variable containing the new value.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1693

Parameters: offset The number of bytes offset from the start of the Display module IOMap structure where the new value should be written. See Display module IOMAP offsets. value A variable containing the new value to write to the Display module IOMap.

8.3.3.788

void SetDisplayNormal (const byte x, const byte line, unsigned int cnt, byte data[ ]) [inline]

Write pixel data to the normal display buffer. Write "cnt" bytes to the normal display memory from the data array. Start writing at the specied x, line coordinate. Each byte of data is a vertical strip of 8 bits at the desired location. Each bit represents a single pixel on the LCD screen. Use TEXTLINE_1 through TEXTLINE_8 for the "line" parameter. Parameters: x The desired x position where you wish to write pixel data. line The desired line where you wish to write pixel data. cnt The number of bytes of pixel data to write. data The array of bytes from which pixel data is read. Examples: ex_SetDisplayNormal.nxc.

8.3.3.789

void SetDisplayPopup (const byte x, const byte line, unsigned int cnt, byte data[ ]) [inline]

Write pixel data to the popup display buffer. Write "cnt" bytes to the popup display memory from the data array. Start writing at the specied x, line coordinate. Each byte of data is a vertical strip of 8 bits at the desired location. Each bit represents a single pixel on the LCD screen. Use TEXTLINE_1 through TEXTLINE_8 for the "line" parameter. Parameters: x The desired x position where you wish to write pixel data. line The desired line where you wish to write pixel data.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1694

cnt The number of bytes of pixel data to write. data The array of bytes from which pixel data is read. Examples: ex_SetDisplayPopup.nxc.

8.3.3.790

void SetDisplayTextLinesCenterFlags (byte ctrFlags) [inline]

Set the display text lines center ags. This function lets you set the current display text lines center ags. Parameters: ctrFlags The new display text lines center ags. Examples: ex_dispmisc.nxc, and ex_SetDisplayTextLinesCenterFlags.nxc.

8.3.3.791

void SetDisplayUpdateMask (unsigned long updateMask) [inline]

Set the display update mask. This function lets you set the current display update mask. Parameters: updateMask The new display update mask. Examples: ex_dispmisc.nxc, and ex_SetDisplayUpdateMask.nxc.

8.3.3.792

void SetHSDataMode (const byte dataMode) [inline]

Set hi-speed port data mode. This method sets the value of the hi-speed port data mode.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1695

Parameters: dataMode The hi-speed port data mode. See Data mode constants. Must be a constant. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Examples: ex_DataMode.nxc.

8.3.3.793

void SetHSFlags (byte hsFlags) [inline]

Set hi-speed port ags. This method sets the value of the hi-speed port ags. Parameters: hsFlags The hi-speed port ags. See Hi-speed port ags constants. Examples: ex_SetHSFlags.nxc.

8.3.3.794

void SetHSInputBuffer (const byte offset, byte cnt, byte data[ ]) [inline]

Set hi-speed port input buffer data. Write cnt bytes of data to the hi-speed port input buffer at offset. Parameters: offset A constant offset into the input buffer cnt The number of bytes to write data A byte array containing the data to write Examples: ex_SetHSInputBuffer.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1696

8.3.3.795

void SetHSInputBufferInPtr (byte n) [inline]

Set hi-speed port input buffer in-pointer. Set the value of the input buffer in-pointer. Parameters: n The new in-pointer value (0..127). Examples: ex_SetHSInputBufferInPtr.nxc.

8.3.3.796

void SetHSInputBufferOutPtr (byte n) [inline]

Set hi-speed port input buffer out-pointer. Set the value of the input buffer out-pointer. Parameters: n The new out-pointer value (0..127). Examples: ex_SetHSInputBufferOutPtr.nxc.

8.3.3.797

void SetHSMode (unsigned int hsMode) [inline]

Set hi-speed port mode. This method sets the value of the hi-speed port mode. Parameters: hsMode The hi-speed port mode (data bits, stop bits, parity). See Hi-speed port data bits constants, Hi-speed port stop bits constants, Hi-speed port parity constants, and Hi-speed port combined UART constants. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Examples: ex_sethsmode.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1697

8.3.3.798

void SetHSOutputBuffer (const byte offset, byte cnt, byte data[ ]) [inline]

Set hi-speed port output buffer data. Write cnt bytes of data to the hi-speed port output buffer at offset. Parameters: offset A constant offset into the output buffer cnt The number of bytes to write data A byte array containing the data to write Examples: ex_SetHSOutputBuffer.nxc.

8.3.3.799

void SetHSOutputBufferInPtr (byte n) [inline]

Set hi-speed port output buffer in-pointer. Set the value of the output buffer in-pointer. Parameters: n The new in-pointer value (0..127). Examples: ex_SetHSOutputBufferInPtr.nxc.

8.3.3.800

void SetHSOutputBufferOutPtr (byte n) [inline]

Set hi-speed port output buffer out-pointer. Set the value of the output buffer outpointer. Parameters: n The new out-pointer value (0..127). Examples: ex_SetHSOutputBufferOutPtr.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1698

8.3.3.801

void SetHSSpeed (byte hsSpeed) [inline]

Set hi-speed port speed. This method sets the value of the hi-speed port speed (baud rate). Parameters: hsSpeed The hi-speed port speed (baud rate). See Hi-speed port baud rate constants. Examples: ex_SetHSSpeed.nxc.

8.3.3.802

void SetHSState (byte hsState) [inline]

Set hi-speed port state. This method sets the value of the hi-speed port state. Parameters: hsState The hi-speed port state. See Hi-speed port state constants. Examples: ex_SetHSState.nxc.

8.3.3.803

char SetHTColor2Mode (const byte & port, byte mode) [inline]

Set HiTechnic Color2 mode. Set the mode of the HiTechnic Color2 sensor on the specied port. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. mode The Color2 mode. See HiTechnic Color2 constants. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_sethtcolor2mode.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1699

8.3.3.804

char SetHTIRSeeker2Mode (const byte & port, const byte mode) [inline]

Set HiTechnic IRSeeker2 mode. Set the mode of the HiTechnic IRSeeker2 sensor on the specied port. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. mode The IRSeeker2 mode. See HiTechnic IRSeeker2 constants. Returns: The function call result. NO_ERR or Communications specic errors. Examples: ex_sethtirseeker2mode.nxc, and ex_setsensorboolean.nxc.

8.3.3.805

void SetInput (const byte & port, const int eld, variant value) [inline]

Set an input eld value. Set the specied eld of the sensor on the specied port to the value provided. Parameters: port The sensor port. See Input port constants. A constant or a variable may be used (no expressions). eld An input eld constant. See Input eld constants. value The new value, which may be any valid expression. Examples: ex_SetInput.nxc.

8.3.3.806

void SetInputModuleValue (unsigned int offset, variant value) [inline]

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1700

Set Input module IOMap value. Set one of the elds of the Input module IOMap structure to a new value. You provide the offset into the Input module IOMap structure where you want to write the value along with a variable containing the new value. Parameters: offset The number of bytes offset from the start of the Input module IOMap structure where the new value should be written. See Input module IOMAP offsets. value A variable containing the new value to write to the Input module IOMap.

8.3.3.807

void SetIOCtrlModuleValue (unsigned int offset, variant value) [inline]

Set IOCtrl module IOMap value. Set one of the elds of the IOCtrl module IOMap structure to a new value. You provide the offset into the IOCtrl module IOMap structure where you want to write the value along with a variable containing the new value. Parameters: offset The number of bytes offset from the start of the IOCtrl module IOMap structure where the new value should be written. See IOCtrl module IOMAP offsets. value A variable containing the new value to write to the IOCtrl module IOMap.

8.3.3.808

void SetIOMapBytes (string moduleName, unsigned int offset, unsigned int count, byte data[ ]) [inline]

Set IOMap bytes by name. Modify one or more bytes of data in an IOMap structure. The IOMap structure is specied by its module name. You also provide the offset into the IOMap structure where you want to start writing, the number of bytes to write at that location, and a byte array containing the new data. Parameters: moduleName The module name of the IOMap to modify. See NXT rmware module names. offset The number of bytes offset from the start of the IOMap structure where the data should be written count The number of bytes to write at the specied IOMap offset. data The byte array containing the data to write to the IOMap

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1701

8.3.3.809

void SetIOMapBytesByID (unsigned long moduleId, unsigned int offset, unsigned int count, byte data[ ]) [inline]

Set IOMap bytes by ID. Modify one or more bytes of data in an IOMap structure. The IOMap structure is specied by its Module ID. You also provide the offset into the IOMap structure where you want to start writing, the number of bytes to write at that location, and a byte array containing the new data. Parameters: moduleId The module ID of the IOMap to modify. See NXT rmware module IDs. offset The number of bytes offset from the start of the IOMap structure where the data should be written. count The number of bytes to write at the specied IOMap offset. data The byte array containing the data to write to the IOMap. Warning: This function requires the enhanced NBC/NXC rmware.

8.3.3.810

void SetIOMapValue (string moduleName, unsigned int offset, variant value) [inline]

Set IOMap value by name. Set one of the elds of an IOMap structure to a new value. The IOMap structure is specied by its module name. You also provide the offset into the IOMap structure where you want to write the value along with a variable containing the new value. Parameters: moduleName The module name of the IOMap to modify. See NXT rmware module names. offset The number of bytes offset from the start of the IOMap structure where the new value should be written value A variable containing the new value to write to the IOMap

8.3.3.811

void SetIOMapValueByID (unsigned long moduleId, unsigned int offset, variant value) [inline]

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1702

Set IOMap value by ID. Set one of the elds of an IOMap structure to a new value. The IOMap structure is specied by its Module ID. You also provide the offset into the IOMap structure where you want to write the value along with a variable containing the new value. Parameters: moduleId The module ID of the IOMap to modify. See NXT rmware module IDs. offset The number of bytes offset from the start of the IOMap structure where the new value should be written. value A variable containing the new value to write to the IOMap. Warning: This function requires the enhanced NBC/NXC rmware.

8.3.3.812

void SetLoaderModuleValue (unsigned int offset, variant value) [inline]

Set Loader module IOMap value. Set one of the elds of the Loader module IOMap structure to a new value. You provide the offset into the Loader module IOMap structure where you want to write the value along with a variable containing the new value. Parameters: offset The number of bytes offset from the start of the Loader module IOMap structure where the new value should be written. See Loader module IOMAP offsets. value A variable containing the new value to write to the Loader module IOMap.

8.3.3.813

void SetLongAbort (bool longAbort) [inline]

Set long abort. Set the enhanced NBC/NXC rmwares long abort setting (true or false). If set to true then a program has access the escape button. Aborting a program requires a long press of the escape button. Parameters: longAbort If true then require a long press of the escape button to abort a program, otherwise a short press will abort it.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1703

Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_buttonpressed.nxc, SetLongAbort.nxc. ex_getchar.nxc, ex_SetAbortFlag.nxc, and ex_-

8.3.3.814

void SetLowSpeedModuleBytes (unsigned int offset, unsigned int count, byte data[ ]) [inline]

Set Lowspeed module IOMap bytes. Modify one or more bytes of data in the Lowspeed module IOMap structure. You provide the offset into the Lowspeed module IOMap structure where you want to start writing, the number of bytes to write at that location, and a byte array containing the new data. Parameters: offset The number of bytes offset from the start of the Lowspeed module IOMap structure where the data should be written. See Low speed module IOMAP offsets. count The number of bytes to write at the specied Lowspeed module IOMap offset. data The byte array containing the data to write to the Lowspeed module IOMap.

8.3.3.815

void SetLowSpeedModuleValue (unsigned int offset, variant value) [inline]

Set Lowspeed module IOMap value. Set one of the elds of the Lowspeed module IOMap structure to a new value. You provide the offset into the Lowspeed module IOMap structure where you want to write the value along with a variable containing the new value. Parameters: offset The number of bytes offset from the start of the Lowspeed module IOMap structure where the new value should be written. See Low speed module IOMAP offsets. value A variable containing the new value to write to the Lowspeed module IOMap.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1704

8.3.3.816

void SetMotorPwnFreq (byte n) [inline]

Set motor regulation frequency. Set the motor regulation frequency in milliseconds. By default this is set to 100ms. Parameters: n The motor regulation frequency. Examples: ex_SetMotorPwnFreq.nxc.

8.3.3.817

void SetMotorRegulationOptions (byte n) [inline]

Set regulation options. Set the motor regulation options. Parameters: n The motor regulation options. Examples: ex_PosReg.nxc.

8.3.3.818

void SetMotorRegulationTime (byte n) [inline]

Set regulation time. Set the motor regulation time in milliseconds. By default this is set to 100ms. Parameters: n The motor regulation time. Examples: ex_PosReg.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1705

8.3.3.819

char SetNXTLineLeaderKdFactor (const byte & port, const byte & i2caddr, const byte & value) [inline]

Write NXTLineLeader Kd factor. Write a Kd divisor factor to the NXTLineLeader device. Value ranges between 1 and 255. Change this value if you need more granularities in Kd value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. value The new Kd factor (1..255). Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTLineLeader.nxc.

8.3.3.820

char SetNXTLineLeaderKdValue (const byte & port, const byte & i2caddr, const byte & value) [inline]

Write NXTLineLeader Kd value. Write a Kd value to the NXTLineLeader device. This value divided by PID Factor for Kd is the Derivative value for the PID control. Suggested value is 8 with a divisor factor of 32 (which is also a factory default), start with this value, and tune it to meet your needs. Value ranges between 0 and 255. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. value The new Kd value (0..255). Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1706

Examples: ex_NXTLineLeader.nxc.

8.3.3.821

char SetNXTLineLeaderKiFactor (const byte & port, const byte & i2caddr, const byte & value) [inline]

Write NXTLineLeader Ki factor. Write a Ki divisor factor to the NXTLineLeader device. Value ranges between 1 and 255. Change this value if you need more granularities in Ki value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. value The new Ki factor (1..255). Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTLineLeader.nxc.

8.3.3.822

char SetNXTLineLeaderKiValue (const byte & port, const byte & i2caddr, const byte & value) [inline]

Write NXTLineLeader Ki value. Write a Ki value to the NXTLineLeader device. This value divided by PID Factor for Ki is the Integral value for the PID control. Suggested value is 0 with a divisor factor of 32 (which is also a factory default), start with this value, and tune it to meet your needs. Value ranges between 0 and 255. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. value The new Ki value (0..255).

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1707

Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTLineLeader.nxc.

8.3.3.823

char SetNXTLineLeaderKpFactor (const byte & port, const byte & i2caddr, const byte & value) [inline]

Write NXTLineLeader Kp factor. Write a Kp divisor factor to the NXTLineLeader device. Value ranges between 1 and 255. Change this value if you need more granularities in Kp value. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. value The new Kp factor (1..255). Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTLineLeader.nxc.

8.3.3.824

char SetNXTLineLeaderKpValue (const byte & port, const byte & i2caddr, const byte & value) [inline]

Write NXTLineLeader Kp value. Write a Kp value to the NXTLineLeader device. This value divided by PID Factor for Kp is the Proportional value for the PID control. Suggested value is 25 with a divisor factor of 32 (which is also a factory default), start with this value, and tune it to meet your needs. Value ranges between 0 and 255. The port must be congured as a Lowspeed port before using this function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1708

Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. value The new Kp value (0..255). Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTLineLeader.nxc.

8.3.3.825

char SetNXTLineLeaderSetpoint (const byte & port, const byte & i2caddr, const byte & value) [inline]

Write NXTLineLeader setpoint. Write a new setpoint value to the NXTLineLeader device. The Set Point is a value you can ask sensor to maintain the average to. The default value is 45, whereby the line is maintained in center of the sensor. If you need to maintain line towards left of the sensor, set the Set Point to a lower value (minimum: 10). If you need it to be towards on the right of the sensor, set it to higher value (maximum: 80). Set point is also useful while tracking an edge of dark and light areas. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. value The new setpoint value (10..80). Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible Result values. Examples: ex_NXTLineLeader.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1709

8.3.3.826

char SetNXTServoPosition (const byte & port, const byte & i2caddr, const byte servo, const byte & pos) [inline]

Set NXTServo servo motor position. Set the position of a servo motor controlled by the NXTServo device. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. servo The servo number. See MindSensors NXTServo servo numbers group. pos The servo position. See MindSensors NXTServo position constants group. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible result values. Examples: ex_NXTServo.nxc.

8.3.3.827

char SetNXTServoQuickPosition (const byte & port, const byte & i2caddr, const byte servo, const byte & qpos) [inline]

Set NXTServo servo motor quick position. Set the quick position of a servo motor controlled by the NXTServo device. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. servo The servo number. See MindSensors NXTServo servo numbers group. qpos The servo quick position. See MindSensors NXTServo quick position constants group. Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible result values.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1710

Examples: ex_NXTServo.nxc.

8.3.3.828

char SetNXTServoSpeed (const byte & port, const byte & i2caddr, const byte servo, const byte & speed) [inline]

Set NXTServo servo motor speed. Set the speed of a servo motor controlled by the NXTServo device. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See NBC Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. servo The servo number. See MindSensors NXTServo servo numbers group. speed The servo speed. (0..255) Returns: A status code indicating whether the operation completed successfully or not. See CommLSCheckStatusType for possible result values. Examples: ex_NXTServo.nxc.

8.3.3.829

void SetOnBrickProgramPointer (byte obpStep) [inline]

Set on-brick program pointer. Set the current OBP (on-brick program) step. Parameters: obpStep The new on-brick program step. Examples: ex_SetOnBrickProgramPointer.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1711

8.3.3.830

void SetOutput (byte outputs, byte eld1, variant val1, ..., byte eldN, variant valN) [inline]

Set output elds. Set the specied eld of the outputs to the value provided. The eld must be a valid output eld constant. This function takes a variable number of eld/value pairs. Parameters: outputs Desired output ports. Can be a constant or a variable, see Output port constants. For multiple outputs at the same time you need to add single output port values into a byte array and pass the array instead of a single numeric value. eld1 The 1st output port eld to access, this should be a constant, see Output eld constants. val1 Value to set for the 1st eld. eldN The Nth output port eld to access, this should be a constant, see Output eld constants. valN The value to set for the Nth eld. Examples: ex_setoutput.nxc.

8.3.3.831

void SetOutputModuleValue (unsigned int offset, variant value) [inline]

Set Output module IOMap value. Set one of the elds of the Output module IOMap structure to a new value. You provide the offset into the Output module IOMap structure where you want to write the value along with a variable containing the new value. Parameters: offset The number of bytes offset from the start of the Output module IOMap structure where the new value should be written. See Output module IOMAP offsets. value A variable containing the new value to write to the Output module IOMap.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1712

8.3.3.832

void SetSensor (const byte & port, const unsigned int cong) [inline]

Set sensor conguration. Set the type and mode of the given sensor to the specied conguration, which must be a special constant containing both type and mode information. See also: SetSensorType(), SetSensorMode(), and ResetSensor() Parameters: port The port to congure. See Input port constants. cong The conguration constant containing both the type and mode. See Combined sensor type and mode constants. Examples: ex_SetSensor.nxc.

8.3.3.833

void SetSensorBoolean (byte port, bool value) [inline]

Set sensor boolean value. Sets the boolean value of a sensor. Parameters: port The sensor port. See Input port constants. value The new boolean value.

8.3.3.834

void SetSensorColorBlue (const byte & port) [inline]

Congure an NXT 2.0 blue light sensor. Congure the sensor on the specied port as an NXT 2.0 color sensor in blue light mode. Requires an NXT 2.0 compatible rmware. Parameters: port The port to congure. See Input port constants. Warning: This function requires an NXT 2.0 compatible rmware.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1713

Examples: ex_setsensorcolorblue.nxc.

8.3.3.835

void SetSensorColorFull (const byte & port) [inline]

Congure an NXT 2.0 full color sensor. Congure the sensor on the specied port as an NXT 2.0 color sensor in full color mode. Requires an NXT 2.0 compatible rmware. Parameters: port The port to congure. See Input port constants. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_setsensorcolorfull.nxc, and ex_SysColorSensorRead.nxc.

8.3.3.836

void SetSensorColorGreen (const byte & port) [inline]

Congure an NXT 2.0 green light sensor. Congure the sensor on the specied port as an NXT 2.0 color sensor in green light mode. Requires an NXT 2.0 compatible rmware. Parameters: port The port to congure. See Input port constants. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_setsensorcolorgreen.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1714

8.3.3.837

void SetSensorColorNone (const byte & port) [inline]

Congure an NXT 2.0 no light sensor. Congure the sensor on the specied port as an NXT 2.0 color sensor in no light mode. Requires an NXT 2.0 compatible rmware. Parameters: port The port to congure. See Input port constants. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_setsensorcolornone.nxc.

8.3.3.838

void SetSensorColorRed (const byte & port) [inline]

Congure an NXT 2.0 red light sensor. Congure the sensor on the specied port as an NXT 2.0 color sensor in red light mode. Requires an NXT 2.0 compatible rmware. Parameters: port The port to congure. See Input port constants. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_setsensorcolorred.nxc.

8.3.3.839

void SetSensorDigiPinsDirection (byte port, byte direction) [inline]

Set digital pins direction. Sets the digital pins direction value of a sensor. Parameters: port The sensor port. See Input port constants.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1715

direction The new digital pins direction value. Examples: ex_SetSensorDigiPinsDirection.nxc.

8.3.3.840

void SetSensorDigiPinsOutputLevel (byte port, byte outputLevel) [inline]

Set digital pins output level. Sets the digital pins output level value of a sensor. Parameters: port The sensor port. See Input port constants. outputLevel The new digital pins output level value. Examples: ex_SetSensorDigiPinsOutputLevel.nxc.

8.3.3.841

void SetSensorDigiPinsStatus (byte port, byte status) [inline]

Set digital pins status. Sets the digital pins status value of a sensor. Parameters: port The sensor port. See Input port constants. status The new digital pins status value. Examples: ex_SetSensorDigiPinsStatus.nxc.

8.3.3.842

void SetSensorEMeter (const byte & port) [inline]

Congure an EMeter sensor. Congure the sensor on the specied port as an EMeter sensor.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1716

Parameters: port The port to congure. See Input port constants. Examples: ex_SetSensorEMeter.nxc.

8.3.3.843

void SetSensorHTEOPD (const byte & port, bool bStandard) [inline]

Set sensor as HiTechnic EOPD. Congure the sensor on the specied port as a HiTechnic EOPD sensor. Parameters: port The sensor port. See Input port constants. bStandard Congure in standard or long-range mode. Examples: ex_setsensorhteopd.nxc.

8.3.3.844

void SetSensorHTGyro (const byte & port) [inline]

Set sensor as HiTechnic Gyro. Congure the sensor on the specied port as a HiTechnic Gyro sensor. Parameters: port The sensor port. See Input port constants. Examples: ex_HTGyroTest.nxc, ex_SensorHTGyro.nxc, and ex_SetSensorHTGyro.nxc.

8.3.3.845

void SetSensorHTMagnet (const byte & port) [inline]

Set sensor as HiTechnic Magnet. Congure the sensor on the specied port as a HiTechnic Magnet sensor.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1717

Parameters: port The sensor port. See Input port constants. Examples: ex_SetSensorHTMagnet.nxc.

8.3.3.846

void SetSensorLight (const byte & port, bool bActive = true) [inline]

Congure a light sensor. Congure the sensor on the specied port as an NXT light sensor. Parameters: port The port to congure. See Input port constants. bActive A boolean ag indicating whether to congure the port as an active or inactive light sensor. The default value for this optional parameter is true. Examples: ex_SetSensorLight.nxc.

8.3.3.847

void SetSensorLowspeed (const byte & port, bool bIsPowered = true) [inline]

Congure an I2C sensor. Congure the sensor on the specied port as an I2C digital sensor for either powered (9 volt) or unpowered devices. Parameters: port The port to congure. See Input port constants. bIsPowered A boolean ag indicating whether to congure the port for powered or unpowered I2C devices. The default value for this optional parameter is true. Examples: ex_HTRCXSetIRLinkPort.nxc, ex_i2cdeviceid.nxc, ex_i2cdeviceinfo.nxc, ex_i2cvendorid.nxc, ex_i2cversion.nxc, ex_NXTHID.nxc, ex_NXTLineLeader.nxc, ex_NXTPowerMeter.nxc, ex_NXTServo.nxc, ex_PFMate.nxc, ex_ReadSensorHTAngle.nxc, ex_ResetSensorHTAngle.nxc, and ex_SetSensorLowspeed.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1718

8.3.3.848

void SetSensorMode (const byte & port, byte mode) [inline]

Set sensor mode. Set a sensors mode, which should be one of the predened sensor mode constants. A slope parameter for boolean conversion, if desired, may be added to the mode. After changing the type or the mode of a sensor port you must call ResetSensor to give the rmware time to recongure the sensor port. See also: SetSensorType(), SetSensor() Parameters: port The port to congure. See Input port constants. mode The desired sensor mode. See Sensor mode constants. Examples: ex_SetSensorMode.nxc.

8.3.3.849

void SetSensorMSDROD (const byte & port, bool bActive) [inline]

Congure a mindsensors DROD sensor. Congure the specied port for a mindsensors DROD sensor. Parameters: port The port to congure. See Input port constants. bActive A ag indicating whether to congure the sensor in active or inactive mode. Examples: ex_setsensormsdrod.nxc.

8.3.3.850

void SetSensorMSPressure (const byte & port) [inline]

Congure a mindsensors pressure sensor. Congure the specied port for a mindsensors pressure sensor.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1719

Parameters: port The port to congure. See Input port constants. Examples: ex_setsensormspressure.nxc.

8.3.3.851

void SetSensorNXTSumoEyes (const byte & port, bool bLong) [inline]

Congure a mindsensors SumoEyes sensor. Congure the specied port for a mindsensors SumoEyes sensor. Parameters: port The port to congure. See Input port constants. bLong A ag indicating whether to congure the sensor in long range or short range mode. Examples: ex_NXTSumoEyes.nxc.

8.3.3.852

void SetSensorSound (const byte & port, bool bdBScaling = true) [inline]

Congure a sound sensor. Congure the sensor on the specied port as a sound sensor. Parameters: port The port to congure. See Input port constants. bdBScaling A boolean ag indicating whether to congure the port as a sound sensor with dB or dBA scaling. The default value for this optional parameter is true, meaning dB scaling. Examples: ex_SetSensorSound.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1720

8.3.3.853

void SetSensorTemperature (const byte & port) [inline]

Congure a temperature sensor. Congure the sensor on the specied port as a temperature sensor. Use this to setup the temperature sensor rather than SetSensorLowspeed so that the sensor is properly congured in 12-bit conversion mode. Parameters: port The port to congure. See Input port constants. Examples: ex_SetSensorTemperature.nxc.

8.3.3.854

void SetSensorTouch (const byte & port) [inline]

Congure a touch sensor. Congure the sensor on the specied port as a touch sensor. Parameters: port The port to congure. See Input port constants. Examples: ex_ReadSensorHTTouchMultiplexer.nxc, and ex_SetSensorTouch.nxc.

8.3.3.855

void SetSensorType (const byte & port, byte type) [inline]

Set sensor type. Set a sensors type, which must be one of the predened sensor type constants. After changing the type or the mode of a sensor port you must call ResetSensor to give the rmware time to recongure the sensor port. See also: SetSensorMode(), SetSensor() Parameters: port The port to congure. See Input port constants. type The desired sensor type. See Sensor type constants.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1721

Examples: ex_SetSensorType.nxc.

8.3.3.856

void SetSensorUltrasonic (const byte & port) [inline]

Congure an ultrasonic sensor. Congure the sensor on the specied port as an ultrasonic sensor. Parameters: port The port to congure. See Input port constants. Examples: ex_SetSensorUltrasonic.nxc.

8.3.3.857

void SetSleepTime (const byte n) [inline]

Set sleep time. Set the NXT sleep timeout value to the specied number of minutes. Parameters: n The minutes to wait before sleeping. See also: SetSleepTimeout, SleepTimeout Examples: ex_setsleeptime.nxc.

8.3.3.858

void SetSleepTimeout (const byte n) [inline]

Set sleep timeout. Set the NXT sleep timeout value to the specied number of minutes. Parameters: n The minutes to wait before sleeping.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1722

Examples: ex_SetSleepTimeout.nxc.

8.3.3.859

void SetSleepTimer (const byte n) [inline]

Set the sleep timer. Set the system sleep timer to the specied number of minutes. Parameters: n The minutes left on the timer. Examples: ex_SetSleepTimer.nxc.

8.3.3.860

void SetSoundDuration (unsigned int duration) [inline]

Set sound duration. Set the sound duration. See also: SoundDuration() Parameters: duration The new sound duration Examples: ex_SetSoundDuration.nxc.

8.3.3.861

void SetSoundFlags (byte ags) [inline]

Set sound module ags. Set the sound module ags. See the SoundFlags constants group. See also: SetSoundFlags(), SysSoundSetState(), SysSoundGetState()

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1723

Parameters: ags The new sound module ags Examples: ex_SetSoundFlags.nxc.

8.3.3.862

void SetSoundFrequency (unsigned int frequency) [inline]

Set sound frequency. Set the sound frequency. See also: SoundFrequency() Parameters: frequency The new sound frequency Examples: ex_SetSoundFrequency.nxc.

8.3.3.863

void SetSoundMode (byte mode) [inline]

Set sound mode. Set the sound mode. See the SoundMode constants group. See also: SoundMode() Parameters: mode The new sound mode Examples: ex_SetSoundMode.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1724

8.3.3.864

void SetSoundModuleState (byte state) [inline]

Set sound module state. Set the sound module state. See the SoundState constants group. See also: SoundState(), SysSoundSetState(), SysSoundGetState() Parameters: state The new sound state Examples: ex_SetSoundModuleState.nxc.

8.3.3.865

void SetSoundModuleValue (unsigned int offset, variant value) [inline]

Set Sound module IOMap value. Set one of the elds of the Sound module IOMap structure to a new value. You provide the offset into the Sound module IOMap structure where you want to write the value along with a variable containing the new value. Parameters: offset The number of bytes offset from the start of the Sound module IOMap structure where the new value should be written. See Sound module IOMAP offsets. value A variable containing the new value to write to the Sound module IOMap.

8.3.3.866

void SetSoundSampleRate (unsigned int sampleRate) [inline]

Set sample rate. Set the sound sample rate. See also: SoundSampleRate() Parameters: sampleRate The new sample rate
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1725

Examples: ex_SetSoundSampleRate.nxc.

8.3.3.867

void SetSoundVolume (byte volume) [inline]

Set sound volume. Set the sound volume. See also: SoundVolume() Parameters: volume The new volume Examples: ex_SetSoundVolume.nxc.

8.3.3.868

void SetUIButton (byte btn) [inline]

Set UI button. Set user interface button information. Parameters: btn A user interface button value. See UIButton constants. Examples: ex_SetUIButton.nxc.

8.3.3.869

void SetUIModuleValue (unsigned int offset, variant value) [inline]

Set Ui module IOMap value. Set one of the elds of the Ui module IOMap structure to a new value. You provide the offset into the Ui module IOMap structure where you want to write the value along with a variable containing the new value.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1726

Parameters: offset The number of bytes offset from the start of the Ui module IOMap structure where the new value should be written. See Ui module IOMAP offsets. value A variable containing the new value to write to the Ui module IOMap.

8.3.3.870

void SetUIState (byte state) [inline]

Set UI state. Set the user interface state. Parameters: state A user interface state value. See UIState constants. Examples: ex_SetUIState.nxc.

8.3.3.871

void SetUSBInputBuffer (const byte offset, byte cnt, byte data[ ]) [inline]

Set USB input buffer data. Write cnt bytes of data to the USB input buffer at offset. Parameters: offset A constant offset into the input buffer cnt The number of bytes to write data A byte array containing the data to write Examples: ex_SetUSBInputBuffer.nxc.

8.3.3.872

void SetUSBInputBufferInPtr (byte n) [inline]

Set USB input buffer in-pointer. Set the value of the input buffer in-pointer. Parameters: n The new in-pointer value (0..63).
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1727

Examples: ex_SetUSBInputBufferInPtr.nxc.

8.3.3.873

void SetUSBInputBufferOutPtr (byte n) [inline]

Set USB input buffer out-pointer. Set the value of the input buffer out-pointer. Parameters: n The new out-pointer value (0..63). Examples: ex_SetUSBInputBufferOutPtr.nxc.

8.3.3.874

void SetUSBOutputBuffer (const byte offset, byte cnt, byte data[ ]) [inline]

Set USB output buffer data. Write cnt bytes of data to the USB output buffer at offset. Parameters: offset A constant offset into the output buffer cnt The number of bytes to write data A byte array containing the data to write Examples: ex_SetUSBOutputBuffer.nxc.

8.3.3.875

void SetUSBOutputBufferInPtr (byte n) [inline]

Set USB output buffer in-pointer. Set the value of the output buffer in-pointer. Parameters: n The new in-pointer value (0..63). Examples: ex_SetUSBOutputBufferInPtr.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1728

8.3.3.876

void SetUSBOutputBufferOutPtr (byte n) [inline]

Set USB output buffer out-pointer. Set the value of the output buffer out-pointer. Parameters: n The new out-pointer value (0..63). Examples: ex_SetUSBOutputBufferOutPtr.nxc.

8.3.3.877

void SetUSBPollBuffer (const byte offset, byte cnt, byte data[ ]) [inline]

Set USB poll buffer data. Write cnt bytes of data to the USB poll buffer at offset. Parameters: offset A constant offset into the poll buffer cnt The number of bytes to write data A byte array containing the data to write Examples: ex_SetUSBPollBuffer.nxc.

8.3.3.878

void SetUSBPollBufferInPtr (byte n) [inline]

Set USB poll buffer in-pointer. Set the value of the poll buffer in-pointer. Parameters: n The new in-pointer value (0..63). Examples: ex_SetUSBPollBufferInPtr.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1729

8.3.3.879

void SetUSBPollBufferOutPtr (byte n) [inline]

Set USB poll buffer out-pointer. Set the value of the poll buffer out-pointer. Parameters: n The new out-pointer value (0..63). Examples: ex_SetUSBPollBufferOutPtr.nxc.

8.3.3.880

void SetUSBState (byte usbState) [inline]

Set USB state. This method sets the value of the USB state. Parameters: usbState The USB state. Examples: ex_SetUsbState.nxc.

8.3.3.881

void SetVMRunState (const byte vmRunState) [inline]

Set VM run state. Set VM run state information. Parameters: vmRunState The desired VM run state. See VM run state constants. Warning: It is not a good idea to change the VM run state from within a running program unless you know what you are doing. Examples: ex_SetVMRunState.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1730

8.3.3.882

void SetVolume (byte volume) [inline]

Set volume. Set the user interface volume level. Valid values are from 0 to 4. Parameters: volume The new volume level. Examples: ex_SetVolume.nxc.

8.3.3.883

char sign (variant num) [inline]

Sign value. Return the sign of the value argument (-1, 0, or 1). Any scalar type can be passed into this function. Parameters: num The numeric value for which to calculate its sign value. Returns: -1 if the parameter is negative, 0 if the parameter is zero, or 1 if the parameter is positive. Examples: ex_sign.nxc.

8.3.3.884

oat sin (oat x) [inline]

Compute sine. Computes the sine of an angle of x radians. Parameters: x Floating point value representing an angle expressed in radians. Returns: Sine of x.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1731

Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_sin_cos.nxc.

8.3.3.885

oat sind (oat x) [inline]

Compute sine (degrees). Computes the sine of an angle of x degrees. Parameters: x Floating point value representing an angle expressed in degrees. Returns: Sine of x. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_sind_cosd.nxc.

8.3.3.886

oat sinh (oat x) [inline]

Compute hyperbolic sine. Computes the hyperbolic sine of x, expressed in radians. Parameters: x Floating point value. Returns: Hyperbolic sine of x. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_sinh.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1732

8.3.3.887

oat sinhd (oat x) [inline]

Compute hyperbolic sine (degrees). Computes the hyperbolic sine of x, expressed in degrees. Parameters: x Floating point value. Returns: Hyperbolic sine of x. Warning: This function requires the enhanced NBC/NXC rmware.

8.3.3.888

unsigned int SizeOf (variant & value) [inline]

Calculate the size of a variable. Calculate the number of bytes required to store the contents of the variable passed into the function. Parameters: value The variable. Returns: The number of bytes occupied by the variable. Examples: ex_SizeOf.nxc.

8.3.3.889

void SleepNow () [inline]

Put the brick to sleep immediately. This function lets you immediately put the NXT to sleep. The running program will terminate as a result of this action. Examples: ex_SleepNow.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1733

8.3.3.890

byte SleepTime (void) [inline]

Read sleep time. Return the number of minutes that the NXT will remain on before it automatically shuts down. Returns: The sleep time value See also: SleepTimeout Examples: ex_sleeptime.nxc.

8.3.3.891

byte SleepTimeout (void) [inline]

Read sleep timeout. Return the number of minutes that the NXT will remain on before it automatically shuts down. Returns: The sleep timeout value Examples: ex_SleepTimeout.nxc.

8.3.3.892

byte SleepTimer (void) [inline]

Read sleep timer. Return the number of minutes left in the countdown to zero from the original SleepTimeout value. When the SleepTimer value reaches zero the NXT will shutdown. Returns: The sleep timer value Examples: ex_SleepTimer.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1734

8.3.3.893

unsigned int SoundDuration () [inline]

Get sound duration. Return the current sound duration. See also: SetSoundDuration() Returns: The current sound duration. Examples: ex_SoundDuration.nxc.

8.3.3.894

byte SoundFlags () [inline]

Get sound module ags. Return the current sound module ags. See the SoundFlags constants group. See also: SetSoundFlags(), SysSoundSetState(), SysSoundGetState() Returns: The current sound module ags. Examples: ex_SoundFlags.nxc.

8.3.3.895

unsigned int SoundFrequency () [inline]

Get sound frequency. Return the current sound frequency. See also: SetSoundFrequency()

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1735

Returns: The current sound frequency. Examples: ex_SoundFrequency.nxc.

8.3.3.896

byte SoundMode () [inline]

Get sound mode. Return the current sound mode. See the SoundMode constants group. See also: SetSoundMode() Returns: The current sound mode. Examples: ex_SoundMode.nxc.

8.3.3.897

unsigned int SoundSampleRate () [inline]

Get sample rate. Return the current sound sample rate. See also: SetSoundSampleRate() Returns: The current sound sample rate. Examples: ex_SoundSampleRate.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1736

8.3.3.898

byte SoundState () [inline]

Get sound module state. Return the current sound module state. See the SoundState constants group. See also: SetSoundModuleState(), SysSoundSetState(), SysSoundGetState() Returns: The current sound module state. Examples: ex_SoundState.nxc.

8.3.3.899

byte SoundVolume () [inline]

Get volume. Return the current sound volume. See also: SetSoundVolume() Returns: The current sound volume. Examples: ex_SoundVolume.nxc.

8.3.3.900

void sprintf (string & str, string format, variant value) [inline]

Write formatted data to string. Writes a sequence of data formatted as the format argument species to a string. After the format parameter, the function expects one value argument. Parameters: str The string to write to.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1737

format A string specifying the desired format. value A value to be formatted for writing to the string. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_sprintf.nxc.

8.3.3.901

oat sqrt (oat x) [inline]

Compute square root. Computes the square root of x. Parameters: x Floating point value. Returns: Square root of x. Examples: ex_isnan.nxc, ex_labs.nxc, and ex_sqrt.nxc.

8.3.3.902

void StartTask (task t) [inline]

Start a task. Start the specied task. Parameters: t The task to start. Examples: ex_StartTask.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1738

8.3.3.903

void Stop (bool bvalue) [inline]

Stop the running program. Stop the running program if bvalue is true. This will halt the program completely, so any code following this command will be ignored. Parameters: bvalue If this value is true the program will stop executing. Examples: ex_le_system.nxc, and ex_Stop.nxc.

8.3.3.904

void StopAllTasks () [inline]

Stop all tasks. Stop all currently running tasks. This will halt the program completely, so any code following this command will be ignored. Examples: ex_StopAllTasks.nxc.

8.3.3.905

byte StopSound () [inline]

Stop sound. Stop playing of the current tone or le. Returns: The result Todo ?. Examples: ex_StopSound.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1739

8.3.3.906

void StopTask (task t) [inline]

Stop a task. Stop the specied task. Parameters: t The task to stop. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_StopTask.nxc.

8.3.3.907

string strcat (string & dest, const string & src) [inline]

Concatenate strings. Appends a copy of the source string to the destination string. The terminating null character in destination is overwritten by the rst character of source, and a new null-character is appended at the end of the new string formed by the concatenation of both in destination. The destination string is returned. Parameters: dest The destination string. src The string to be appended. Returns: The destination string. Examples: ex_StrCat.nxc.

8.3.3.908

string StrCat (string str1, string str2, string strN) [inline]

Concatenate strings. Return a string which is the result of concatenating all of the string arguments together. This function accepts any number of parameters which may be string variables, constants, or expressions.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1740

Parameters: str1 The rst string. str2 The second string. strN The Nth string. Returns: The concatenated string. Examples: ex_GetBrickDataAddress.nxc, ex_StrCatOld.nxc, StrReplace.nxc, and util_battery_1.nxc. ex_string.nxc, ex_-

8.3.3.909

int strcmp (const string & str1, const string & str2) [inline]

Compare two strings. Compares the string str1 to the string str2. Parameters: str1 A string to be compared. str2 A string to be compared. Returns: Returns an integral value indicating the relationship between the strings. A zero value indicates that both strings are equal. A value greater than zero indicates that the rst character that does not match has a greater value in str1 than in str2. A value less than zero indicates the opposite. Examples: ex_strcmp.nxc.

8.3.3.910

string strcpy (string & dest, const string & src) [inline]

Copy string. Copies the string pointed by source into the array pointed by destination, including the terminating null character. The destination string is returned. Parameters: dest The destination string.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1741

src The string to be appended. Returns: The destination string. Examples: ex_strcpy.nxc.

8.3.3.911

byte StrIndex (string str, unsigned int idx) [inline]

Extract a character from a string. Return the numeric value of the character in the specied string at the specied index. The input string parameter may be a variable, constant, or expression. Parameters: str A string. idx The index of the character to retrieve. Returns: The numeric value of the character at the specied index. Examples: ex_StrIndex.nxc, and ex_string.nxc.

8.3.3.912

int strlen (const string & str) [inline]

Get string length. Return the length of the specied string. The length of a string does not include the null terminator at the end of the string. Parameters: str A string. Returns: The length of the string. Examples: ex_string.nxc, and ex_StrLen.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1742

8.3.3.913

unsigned int StrLen (string str) [inline]

Get string length. Return the length of the specied string. The length of a string does not include the null terminator at the end of the string. The input string parameter may be a variable, constant, or expression. Parameters: str A string. Returns: The length of the string. Examples: ex_string.nxc, and ex_StrLenOld.nxc.

8.3.3.914

string strncat (string & dest, const string & src, unsigned int num) [inline]

Append characters from string. Appends the rst num characters of source to destination, plus a terminating null-character. If the length of the string in source is less than num, only the content up to the terminating null-character is copied. The destination string is returned. Parameters: dest The destination string. src The string to be appended. num The maximum number of characters to be appended. Returns: The destination string. Examples: ex_strncat.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1743

8.3.3.915

int strncmp (const string & str1, const string & str2, unsigned int num) [inline]

Compare characters of two strings. Compares up to num characters of the string str1 to those of the string str2. Parameters: str1 A string to be compared. str2 A string to be compared. num The maximum number of characters to be compared. Returns: Returns an integral value indicating the relationship between the strings. A zero value indicates that the characters compared in both strings are all equal. A value greater than zero indicates that the rst character that does not match has a greater value in str1 than in str2. A value less than zero indicates the opposite. Examples: ex_strncmp.nxc.

8.3.3.916

string strncpy (string & dest, const string & src, unsigned int num) [inline]

Copy characters from string. Copies the rst num characters of source to destination. The destination string is returned. Parameters: dest The destination string. src The string to be appended. num The maximum number of characters to be appended. Returns: The destination string. Examples: ex_strncpy.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1744

8.3.3.917

string StrReplace (string str, unsigned int idx, string strnew) [inline]

Replace a portion of a string. Return a string with the part of the string replaced (starting at the specied index) with the contents of the new string value provided in the third argument. The input string parameters may be variables, constants, or expressions. Parameters: str A string. idx The starting point for the replace operation. strnew The replacement string. Returns: The modied string. Examples: ex_string.nxc, and ex_StrReplace.nxc.

8.3.3.918

void StrToByteArray (string str, byte & data[ ]) [inline]

Convert a string to a byte array. Convert the specied string to an array of byte by removing the null terminator at the end of the string. The output array variable must be a one-dimensional array of byte. See also: ByteArrayToStr, ByteArrayToStrEx Parameters: str A string data A byte array reference which, on output, will contain str without its null terminator. Examples: ex_string.nxc, and ex_StrToByteArray.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1745

8.3.3.919

oat strtod (const string & str, string & endptr) [inline]

Convert string to oat. Parses the string str interpreting its content as a oating point number and returns its value as a oat. The function rst discards as many whitespace characters as necessary until the rst non-whitespace character is found. Then, starting from this character, takes as many characters as possible that are valid following a syntax resembling that of oating point literals, and interprets them as a numerical value. A string containing the rest of the string after the last valid character is stored in endptr. A valid oating point number for atof is formed by a succession of: An optional plus or minus sign A sequence of digits, optionally containing a decimal-point character An optional exponent part, which itself consists on an e or E character followed by an optional sign and a sequence of digits. If the rst sequence of non-whitespace characters in str does not form a valid oatingpoint number as just dened, or if no such sequence exists because either str is empty or contains only whitespace characters, no conversion is performed. Parameters: str String beginning with the representation of a oating-point number. endptr Reference to a string, whose value is set by the function to the remaining characters in str after the numerical value. Returns: On success, the function returns the converted oating point number as a oat value. If no valid conversion could be performed a zero value (0.0) is returned. Examples: ex_strtod.nxc.

8.3.3.920

long strtol (const string & str, string & endptr, int base = 10) [inline]

Convert string to long integer. Parses the C string str interpreting its content as an integral number of the specied base, which is returned as a long int value.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1746

The function rst discards as many whitespace characters as necessary until the rst non-whitespace character is found. Then, starting from this character, takes as many characters as possible that are valid following a syntax that depends on the base parameter, and interprets them as a numerical value. A string containing the rest of the characters following the integer representation in str is stored in endptr. If the rst sequence of non-whitespace characters in str does not form a valid integral number, or if no such sequence exists because either str is empty or contains only whitespace characters, no conversion is performed. Parameters: str String beginning with the representation of an integral number. endptr Reference to a string, whose value is set by the function to the remaining characters in str after the numerical value. base Optional and ignored if specied. Returns: On success, the function returns the converted integral number as a long int value. If no valid conversion could be performed a zero value is returned. Warning: Only base = 10 is currently supported. Examples: ex_strtol.nxc.

8.3.3.921

variant StrToNum (string str) [inline]

Convert string to number. Return the numeric value specied by the string passed to the function. If the content of the string is not a numeric value then this function returns zero. The input string parameter may be a variable, constant, or expression. Parameters: str String beginning with the representation of a number. str A string. Returns: A number.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1747

Examples: ex_string.nxc, and ex_StrToNum.nxc.

8.3.3.922

long strtoul (const string & str, string & endptr, int base = 10) [inline]

Convert string to unsigned long integer. Parses the C string str interpreting its content as an unsigned integral number of the specied base, which is returned as an unsigned long int value. The function rst discards as many whitespace characters as necessary until the rst non-whitespace character is found. Then, starting from this character, takes as many characters as possible that are valid following a syntax that depends on the base parameter, and interprets them as a numerical value. A string containing the rest of the characters following the integer representation in str is stored in endptr. If the rst sequence of non-whitespace characters in str does not form a valid integral number, or if no such sequence exists because either str is empty or contains only whitespace characters, no conversion is performed. Parameters: str String containing the representation of an unsigned integral number. endptr Reference to a string, whose value is set by the function to the remaining characters in str after the numerical value. base Optional and ignored if specied. Returns: On success, the function returns the converted integral number as an unsigned long int value. If no valid conversion could be performed a zero value is returned. Warning: Only base = 10 is currently supported. Examples: ex_strtoul.nxc.

8.3.3.923

string SubStr (string str, unsigned int idx, unsigned int len) [inline]

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1748

Extract a portion of a string. Return a sub-string from the specied input string starting at idx and including the specied number of characters. The input string parameter may be a variable, constant, or expression. Parameters: str A string. idx The starting point of the sub-string. len The length of the sub-string. Returns: The sub-string extracted from parameter str. Examples: ex_StrCatOld.nxc, ex_string.nxc, and ex_SubStr.nxc.

8.3.3.924

void SysCall (byte funcID, variant & args) [inline]

Call any system function. This generic macro can be used to call any system function. No type checking is performed so you need to make sure you use the correct structure type given the selected system function ID. This is, however, the fastest possible way to call a system function in NXC. Valid function ID constants are dened in the System Call function constants group. Parameters: funcID The function ID constant corresponding to the function to be called. args The structure containing the needed parameters. Examples: ex_dispgout.nxc, and ex_syscall.nxc.

8.3.3.925

void SysColorSensorRead (ColorSensorReadType & args) [inline]

Read LEGO color sensor. This function lets you read the LEGO color sensor given the parameters you pass in via the ColorSensorReadType structure.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1749

Parameters: args The ColorSensorReadType structure containing the required parameters. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_SysColorSensorRead.nxc.

8.3.3.926

void SysCommBTCheckStatus (CommBTCheckStatusType & args)

Check Bluetooth connection status. This function lets you check the status of a Bluetooth connection using the values specied via the CommBTCheckStatusType structure. Parameters: args The CommBTCheckStatusType structure containing the needed parameters. Examples: ex_syscommbtcheckstatus.nxc.

8.3.3.927

void SysCommBTConnection (CommBTConnectionType & args) [inline]

Connect or disconnect a bluetooth device. This function lets you connect or disconnect a bluetooth device using the values specied via the CommBTConnectionType structure. Parameters: args The CommBTConnectionType structure containing the needed parameters. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_syscommbtconnection.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1750

8.3.3.928

void SysCommBTOnOff (CommBTOnOffType & args) [inline]

Turn on or off the bluetooth subsystem. This function lets you turn on or off the bluetooth subsystem using the values specied via the CommBTOnOffType structure. Parameters: args The CommBTOnOffType structure containing the needed parameters. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_SysCommBTOnOff.nxc.

8.3.3.929

void SysCommBTWrite (CommBTWriteType & args)

Write data to a Bluetooth connection. This function lets you write to a Bluetooth connection using the values specied via the CommBTWriteType structure. Parameters: args The CommBTWriteType structure containing the needed parameters. Examples: ex_syscommbtwrite.nxc.

8.3.3.930

void SysCommExecuteFunction (CommExecuteFunctionType & args) [inline]

Execute any Comm module command. This function lets you directly execute the Comm modules primary function using the values specied via the CommExecuteFunctionType structure. Parameters: args The CommExecuteFunctionType structure containing the needed parameters.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1751

Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_syscommexecutefunction.nxc.

8.3.3.931

void SysCommHSCheckStatus (CommHSCheckStatusType & args) [inline]

Check the hi-speed port status. This function lets you check the hi-speed port status using the values specied via the CommHSCheckStatusType structure. Parameters: args The CommHSCheckStatusType structure containing the needed parameters. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_SysCommHSCheckStatus.nxc.

8.3.3.932

void SysCommHSControl (CommHSControlType & args) [inline]

Control the hi-speed port. This function lets you control the hi-speed port using the values specied via the CommHSControlType structure. Parameters: args The CommHSControlType structure containing the needed parameters. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_SysCommHSControl.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1752

8.3.3.933

void SysCommHSRead (CommHSReadWriteType & args) [inline]

Read from the hi-speed port. This function lets you read from the hi-speed port using the values specied via the CommHSReadWriteType structure. Parameters: args The CommHSReadWriteType structure containing the needed parameters. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_SysCommHSRead.nxc.

8.3.3.934

void SysCommHSWrite (CommHSReadWriteType & args) [inline]

Write to the hi-speed port. This function lets you write to the hi-speed port using the values specied via the CommHSReadWriteType structure. Parameters: args The CommHSReadWriteType structure containing the needed parameters. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_SysCommHSWrite.nxc.

8.3.3.935

void SysCommLSCheckStatus (CommLSCheckStatusType & args) [inline]

Check Lowspeed sensor status. This function lets you check the status of an I2C (Lowspeed) sensor transaction using the values specied via the CommLSCheckStatusType structure.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1753

Parameters: args The CommLSCheckStatusType structure containing the needed parameters. Examples: ex_syscommlscheckstatus.nxc.

8.3.3.936

void SysCommLSRead (CommLSReadType & args) [inline]

Read from a Lowspeed sensor. This function lets you read from an I2C (Lowspeed) sensor using the values specied via the CommLSReadType structure. Parameters: args The CommLSReadType structure containing the needed parameters. Examples: ex_syscommlsread.nxc.

8.3.3.937

void SysCommLSWrite (CommLSWriteType & args) [inline]

Write to a Lowspeed sensor. This function lets you write to an I2C (Lowspeed) sensor using the values specied via the CommLSWriteType structure. Parameters: args The CommLSWriteType structure containing the needed parameters. Examples: ex_syscommlswrite.nxc.

8.3.3.938

void SysCommLSWriteEx (CommLSWriteExType & args) [inline]

Write to a Lowspeed sensor (extra). This function lets you write to an I2C (Lowspeed) sensor using the values specied via the CommLSWriteExType structure. This is the
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1754

same as the SysCommLSWrite function except that you also can specify whether or not the Lowspeed module should issue a restart command to the I2C device before beginning to read data from the device. Parameters: args The CommLSWriteExType structure containing the desired parameters. Examples: ex_syscommlswriteex.nxc.

8.3.3.939

void SysComputeCalibValue (ComputeCalibValueType & args) [inline]

Compute calibration values. This function lets you compute calibration values using the values specied via the ComputeCalibValueType structure. Todo gure out what this function is intended for Parameters: args The ComputeCalibValueType structure containing the needed parameters. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_SysComputeCalibValue.nxc.

8.3.3.940

void SysDatalogGetTimes (DatalogGetTimesType & args) [inline]

Get datalog times. This function lets you get datalog times using the values specied via the DatalogGetTimesType structure. Todo gure out what this function is intended for
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1755

Parameters: args The DatalogGetTimesType structure containing the needed parameters. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_sysdataloggettimes.nxc.

8.3.3.941

void SysDatalogWrite (DatalogWriteType & args) [inline]

Write to the datalog. This function lets you write to the datalog using the values specied via the DatalogWriteType structure. Todo gure out what this function is intended for Parameters: args The DatalogWriteType structure containing the needed parameters. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_SysDatalogWrite.nxc.

8.3.3.942

void SysDisplayExecuteFunction (DisplayExecuteFunctionType & args) [inline]

Execute any Display module command. This function lets you directly execute the Display modules primary drawing function using the values specied via the DisplayExecuteFunctionType structure. Parameters: args The DisplayExecuteFunctionType structure containing the drawing parameters.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1756

Examples: ex_dispfunc.nxc, and ex_sysdisplayexecutefunction.nxc.

8.3.3.943

void SysDrawCircle (DrawCircleType & args) [inline]

Draw a circle. This function lets you draw a circle on the NXT LCD given the parameters you pass in via the DrawCircleType structure. Parameters: args The DrawCircleType structure containing the drawing parameters. Examples: ex_sysdrawcircle.nxc.

8.3.3.944

void SysDrawEllipse (DrawEllipseType & args) [inline]

Draw an ellipse. This function lets you draw an ellipse on the NXT LCD given the parameters you pass in via the DrawEllipseType structure. Parameters: args The DrawEllipseType structure containing the drawing parameters. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Examples: ex_SysDrawEllipse.nxc.

8.3.3.945

void SysDrawFont (DrawFontType & args) [inline]

Draw text using a custom font. This function lets you draw text on the NXT LCD using a custom font with parameters you pass in via the DrawFontType structure.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1757

Parameters: args The DrawFontType structure containing the drawing parameters. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Examples: ex_dispftout.nxc, and ex_sysdrawfont.nxc.

8.3.3.946

void SysDrawGraphic (DrawGraphicType & args) [inline]

Draw a graphic (RIC le). This function lets you draw a graphic image (RIC le) on the NXT LCD given the parameters you pass in via the DrawGraphicType structure. Parameters: args The DrawGraphicType structure containing the drawing parameters. Examples: ex_sysdrawgraphic.nxc.

8.3.3.947

void SysDrawGraphicArray (DrawGraphicArrayType & args) [inline]

Draw a graphic image from a byte array. This function lets you draw a graphic image on the NXT LCD given the parameters you pass in via the DrawGraphicArrayType structure. Parameters: args The DrawGraphicArrayType structure containing the drawing parameters. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Examples: ex_sysdrawgraphicarray.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1758

8.3.3.948

void SysDrawLine (DrawLineType & args) [inline]

Draw a line. This function lets you draw a line on the NXT LCD given the parameters you pass in via the DrawLineType structure. Parameters: args The DrawLineType structure containing the drawing parameters. Examples: ex_sysdrawline.nxc.

8.3.3.949

void SysDrawPoint (DrawPointType & args) [inline]

Draw a point. This function lets you draw a pixel on the NXT LCD given the parameters you pass in via the DrawPointType structure. Parameters: args The DrawPointType structure containing the drawing parameters. Examples: ex_sysdrawpoint.nxc.

8.3.3.950

void SysDrawPolygon (DrawPolygonType & args) [inline]

Draw a polygon. This function lets you draw a polygon on the NXT LCD given the parameters you pass in via the DrawPolygonType structure. Parameters: args The DrawPolygonType structure containing the drawing parameters. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Examples: ex_sysdrawpolygon.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1759

8.3.3.951

void SysDrawRect (DrawRectType & args) [inline]

Draw a rectangle. This function lets you draw a rectangle on the NXT LCD given the parameters you pass in via the DrawRectType structure. Parameters: args The DrawRectType structure containing the drawing parameters. Examples: ex_sysdrawrect.nxc.

8.3.3.952

void SysDrawText (DrawTextType & args) [inline]

Draw text. This function lets you draw text on the NXT LCD given the parameters you pass in via the DrawTextType structure. Parameters: args The DrawTextType structure containing the drawing parameters. Examples: ex_sysdrawtext.nxc.

8.3.3.953

void SysFileClose (FileCloseType & args) [inline]

Close le handle. This function lets you close a le using the values specied via the FileCloseType structure. Parameters: args The FileCloseType structure containing the needed parameters. Examples: ex_sysleclose.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1760

8.3.3.954

void SysFileDelete (FileDeleteType & args) [inline]

Delete le. This function lets you delete a le using the values specied via the FileDeleteType structure. Parameters: args The FileDeleteType structure containing the needed parameters. Examples: ex_sysledelete.nxc.

8.3.3.955

void SysFileFindFirst (FileFindType & args) [inline]

Start nding les. This function lets you begin iterating through les stored on the NXT. Parameters: args The FileFindType structure containing the needed parameters. Warning: This function requires the extended rmware. Examples: ex_syslendrst.nxc.

8.3.3.956

void SysFileFindNext (FileFindType & args) [inline]

Continue nding les. This function lets you continue iterating through les stored on the NXT. Parameters: args The FileFindType structure containing the needed parameters. Warning: This function requires the extended rmware.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1761

Examples: ex_syslendnext.nxc.

8.3.3.957

void SysFileOpenAppend (FileOpenType & args) [inline]

Open le for writing at end of le. This function lets you open an existing le that you can write to using the values specied via the FileOpenType structure. The available length remaining in the le is returned via the Length member. Parameters: args The FileOpenType structure containing the needed parameters. Examples: ex_sysleopenappend.nxc.

8.3.3.958

void SysFileOpenRead (FileOpenType & args) [inline]

Open le for reading. This function lets you open an existing le for reading using the values specied via the FileOpenType structure. The number of bytes that can be read from the le is returned via the Length member. Parameters: args The FileOpenType structure containing the needed parameters. Examples: ex_sysleopenread.nxc.

8.3.3.959

void SysFileOpenReadLinear (FileOpenType & args) [inline]

Open linear le for reading. This function lets you open an existing linear le for reading using the values specied via the FileOpenType structure.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1762

Parameters: args The FileOpenType structure containing the needed parameters. Warning: This function requires the extended rmware. Examples: ex_sysleopenreadlinear.nxc.

8.3.3.960

void SysFileOpenWrite (FileOpenType & args) [inline]

Open and create le for writing. This function lets you create a le that you can write to using the values specied via the FileOpenType structure. The desired maximum le capacity in bytes is specied via the Length member. Parameters: args The FileOpenType structure containing the needed parameters. Examples: ex_sysleopenwrite.nxc.

8.3.3.961

void SysFileOpenWriteLinear (FileOpenType & args) [inline]

Open and create linear le for writing. This function lets you create a linear le that you can write to using the values specied via the FileOpenType structure. Parameters: args The FileOpenType structure containing the needed parameters. Warning: This function requires the extended rmware. Examples: ex_sysleopenwritelinear.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1763

8.3.3.962

void SysFileOpenWriteNonLinear (FileOpenType & args) [inline]

Open and create non-linear le for writing. This function lets you create a non-linear linear le that you can write to using the values specied via the FileOpenType structure. Parameters: args The FileOpenType structure containing the needed parameters. Warning: This function requires the extended rmware. Examples: ex_sysleopenwritenonlinear.nxc.

8.3.3.963

void SysFileRead (FileReadWriteType & args) [inline]

Read from le. This function lets you read from a le using the values specied via the FileReadWriteType structure. Parameters: args The FileReadWriteType structure containing the needed parameters. Examples: ex_sysleread.nxc.

8.3.3.964

void SysFileRename (FileRenameType & args) [inline]

Rename le. This function lets you rename a le using the values specied via the FileRenameType structure. Parameters: args The FileRenameType structure containing the needed parameters.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1764

Examples: ex_syslerename.nxc.

8.3.3.965

void SysFileResize (FileResizeType & args) [inline]

Resize a le. This function lets you resize a le using the values specied via the FileResizeType structure. Parameters: args The FileResizeType structure containing the needed parameters. Warning: This function requires the extended rmware. It has not yet been implemented at the rmware level. Examples: ex_sysleresize.nxc.

8.3.3.966

void SysFileResolveHandle (FileResolveHandleType & args) [inline]

File resolve handle. This function lets you resolve the handle of a le using the values specied via the FileResolveHandleType structure. This will nd a previously opened le handle. Parameters: args The FileResolveHandleType structure containing the needed parameters. Examples: ex_sysleresolvehandle.nxc.

8.3.3.967

void SysFileSeek (FileSeekType & args) [inline]

Seek to le position. This function lets you seek to a specic le position using the values specied via the FileSeekType structure.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1765

Parameters: args The FileSeekType structure containing the needed parameters. Warning: This function requires the extended rmware. Examples: ex_sysleseek.nxc.

8.3.3.968

void SysFileTell (FileTellType & args) [inline]

Return the le position. This function returns the current le position in the open le specied via the FileTellType structure. Parameters: args The FileTellType structure containing the needed parameters. Warning: This function requires the extended rmware.

8.3.3.969

void SysFileWrite (FileReadWriteType & args) [inline]

File write. This function lets you write to a le using the values specied via the FileReadWriteType structure. Parameters: args The FileReadWriteType structure containing the needed parameters. Examples: ex_syslewrite.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1766

8.3.3.970

void SysGetStartTick (GetStartTickType & args) [inline]

Get start tick. This function lets you obtain the tick value at the time your program began executing via the GetStartTickType structure. Parameters: args The GetStartTickType structure receiving results. Examples: ex_sysgetstarttick.nxc.

8.3.3.971

void SysIOMapRead (IOMapReadType & args) [inline]

Read from IOMap by name. This function lets you read data from a rmware modules IOMap using the values specied via the IOMapReadType structure. Parameters: args The IOMapReadType structure containing the needed parameters. Examples: ex_sysiomapread.nxc.

8.3.3.972

void SysIOMapReadByID (IOMapReadByIDType & args) [inline]

Read from IOMap by identier. This function lets you read data from a rmware modules IOMap using the values specied via the IOMapReadByIDType structure. This function can be as much as three times faster than using SysIOMapRead since it does not have to do a string lookup using the ModuleName. Parameters: args The IOMapReadByIDType structure containing the needed parameters. Warning: This function requires the enhanced NBC/NXC rmware.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1767

Examples: ex_reladdressof.nxc, and ex_sysiomapreadbyid.nxc.

8.3.3.973

void SysIOMapWrite (IOMapWriteType & args) [inline]

Write to IOMap by name. This function lets you write data to a rmware modules IOMap using the values specied via the IOMapWriteType structure. Parameters: args The IOMapWriteType structure containing the needed parameters. Examples: ex_sysiomapwrite.nxc.

8.3.3.974

void SysIOMapWriteByID (IOMapWriteByIDType & args) [inline]

Write to IOMap by identier. This function lets you write data to a rmware modules IOMap using the values specied via the IOMapWriteByIDType structure. This function can be as much as three times faster than using SysIOMapWrite since it does not have to do a string lookup using the ModuleName. Parameters: args The IOMapWriteByIDType structure containing the needed parameters. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_reladdressof.nxc, and ex_sysiomapwritebyid.nxc.

8.3.3.975

void SysKeepAlive (KeepAliveType & args) [inline]

Keep alive. This function lets you reset the sleep timer via the KeepAliveType structure.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1768

Parameters: args The KeepAliveType structure receiving results. Examples: ex_syskeepalive.nxc.

8.3.3.976

void SysListFiles (ListFilesType & args) [inline]

List les. This function lets you retrieve a list of les on the NXT using the values specied via the ListFilesType structure. Parameters: args The ListFilesType structure containing the needed parameters. Examples: ex_syslistles.nxc.

8.3.3.977

void SysLoaderExecuteFunction (LoaderExecuteFunctionType & args) [inline]

Execute any Loader module command. This function lets you directly execute the Loader modules primary function using the values specied via the LoaderExecuteFunctionType structure. Parameters: args The LoaderExecuteFunctionType structure containing the needed parameters. Warning: This function requires the extended rmware. Examples: ex_sysloaderexecutefunction.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1769

8.3.3.978

void SysMemoryManager (MemoryManagerType & args) [inline]

Read memory information. This function lets you read memory information using the values specied via the MemoryManagerType structure. Parameters: args The MemoryManagerType structure containing the required parameters. Warning: This function requires the enhanced NBC/NXC rmware version 1.28+. Examples: ex_sysmemorymanager.nxc.

8.3.3.979

void SysMessageRead (MessageReadType & args)

Read message. This function lets you read a message from a queue (aka mailbox) using the values specied via the MessageReadType structure. Parameters: args The MessageReadType structure containing the needed parameters. Examples: ex_sysmessageread.nxc.

8.3.3.980

void SysMessageWrite (MessageWriteType & args)

Write message. This function lets you write a message to a queue (aka mailbox) using the values specied via the MessageWriteType structure. Parameters: args The MessageWriteType structure containing the needed parameters. Examples: ex_sysmessagewrite.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1770

8.3.3.981

void SysRandomNumber (RandomNumberType & args) [inline]

Draw a random number. This function lets you obtain a random number via the RandomNumberType structure. Parameters: args The RandomNumberType structure receiving results. Examples: ex_sysrandomnumber.nxc.

8.3.3.982

void SysReadButton (ReadButtonType & args) [inline]

Read button. This function lets you read button state information via the ReadButtonType structure. Parameters: args The ReadButtonType structure containing the needed parameters. Examples: ex_sysreadbutton.nxc.

8.3.3.983

void SysReadLastResponse (ReadLastResponseType & args) [inline]

Read last response information. This function lets you read the last system or direct command response received by the NXT using the values specied via the ReadLastResponseType structure. Parameters: args The ReadLastResponseType structure containing the required parameters. Warning: This function requires the enhanced NBC/NXC rmware version 1.31+.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1771

Examples: ex_SysReadLastResponse.nxc.

8.3.3.984

void SysReadSemData (ReadSemDataType & args) [inline]

Read semaphore data. This function lets you read global motor semaphore data using the values specied via the ReadSemDataType structure. Parameters: args The ReadSemDataType structure containing the needed parameters. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_SysReadSemData.nxc.

8.3.3.985

void SysSetScreenMode (SetScreenModeType & args) [inline]

Set the screen mode. This function lets you set the screen mode of the NXT LCD given the parameters you pass in via the DrawTextType structure. Parameters: args The SetScreenModeType structure containing the screen mode parameters. Examples: ex_syssetscreenmode.nxc.

8.3.3.986

void SysSetSleepTimeout (SetSleepTimeoutType & args) [inline]

Set system sleep timeout. This function lets you set the system sleep timeout value given the parameters you pass in via the SetSleepTimeoutType structure.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1772

Parameters: args The SetSleepTimeoutType structure containing the required parameters. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_SysSetSleepTimeout.nxc.

8.3.3.987

void SysSoundGetState (SoundGetStateType & args) [inline]

Get sound state. This function lets you retrieve information about the sound module state via the SoundGetStateType structure. Parameters: args The SoundGetStateType structure containing the needed parameters. Examples: ex_syssoundgetstate.nxc.

8.3.3.988

void SysSoundPlayFile (SoundPlayFileType & args) [inline]

Play sound le. This function lets you play a sound le given the parameters you pass in via the SoundPlayFileType structure. The sound le can either be an RSO le containing PCM or compressed ADPCM samples or it can be an NXT melody (RMD) le containing frequency and duration values. Parameters: args The SoundPlayFileType structure containing the needed parameters. Examples: ex_syssoundplayle.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1773

8.3.3.989

void SysSoundPlayTone (SoundPlayToneType & args) [inline]

Play tone. This function lets you play a tone given the parameters you pass in via the SoundPlayToneType structure. Parameters: args The SoundPlayToneType structure containing the needed parameters. Examples: ex_syssoundplaytone.nxc.

8.3.3.990

void SysSoundSetState (SoundSetStateType & args) [inline]

Set sound state. This function lets you set sound module state settings via the SoundSetStateType structure. Parameters: args The SoundSetStateType structure containing the needed parameters. Examples: ex_syssoundsetstate.nxc.

8.3.3.991

void SysUpdateCalibCacheInfo (UpdateCalibCacheInfoType & args) [inline]

Update calibration cache information. This function lets you update calibration cache information using the values specied via the UpdateCalibCacheInfoType structure. Todo gure out what this function is intended for Parameters: args The UpdateCalibCacheInfoType structure containing the needed parameters.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1774

Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_SysUpdateCalibCacheInfo.nxc.

8.3.3.992

void SysWriteSemData (WriteSemDataType & args) [inline]

Write semaphore data. This function lets you write global motor semaphore data using the values specied via the WriteSemDataType structure. Parameters: args The WriteSemDataType structure containing the needed parameters. Warning: This function requires an NXT 2.0 compatible rmware. Examples: ex_SysWriteSemData.nxc.

8.3.3.993

oat tan (oat x) [inline]

Compute tangent. Computes the tangent of an angle of x radians. Parameters: x Floating point value representing an angle expressed in radians. Returns: Tangent of x. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_tan.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1775

8.3.3.994

oat tand (oat x) [inline]

Compute tangent (degrees). Computes the tangent of an angle of x degrees. Parameters: x Floating point value representing an angle expressed in degrees. Returns: Tangent of x. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_tand.nxc.

8.3.3.995

oat tanh (oat x) [inline]

Compute hyperbolic tangent. Computes the hyperbolic tangent of x, expressed in radians. Parameters: x Floating point value. Returns: Hyperbolic tangent of x. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_tanh.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1776

8.3.3.996

oat tanhd (oat x) [inline]

Compute hyperbolic tangent (degrees). Computes the hyperbolic tangent of x, expressed in degrees. Parameters: x Floating point value. Returns: Hyperbolic tangent of x. Warning: This function requires the enhanced NBC/NXC rmware.

8.3.3.997

char TextOut (int x, int y, string str, unsigned long options = DRAW_OPT_NORMAL) [inline]

Draw text. Draw a text value on the screen at the specied x and y location. The y value must be a multiple of 8. Valid line number constants are listed in the Line number constants group. Optionally specify drawing options. If this argument is not specied it defaults to DRAW_OPT_NORMAL. Valid display option constants are listed in the Drawing option constants group. See also: SysDrawText, DrawTextType Parameters: x The x value for the start of the text output. y The text line number for the text output. str The text to output to the LCD screen. options The optional drawing options. Returns: The result of the drawing operation.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1777

Examples: ex_acos.nxc, ex_acosd.nxc, ex_addressof.nxc, ex_addressofex.nxc, ex_ArrayMax.nxc, ex_ArrayMean.nxc, ex_ArrayMin.nxc, ex_ArrayOp.nxc, ex_ArraySort.nxc, ex_ArrayStd.nxc, ex_ArraySum.nxc, ex_ArraySumSqr.nxc, ex_asin.nxc, ex_asind.nxc, ex_atan.nxc, ex_atan2.nxc, ex_atan2d.nxc, ex_atand.nxc, ex_clearline.nxc, ex_copy.nxc, ex_ctype.nxc, ex_DataMode.nxc, ex_delete_data_le.nxc, ex_dispgout.nxc, ex_displayfont.nxc, ex_le_system.nxc, ex_ndrstle.nxc, ex_ndnextle.nxc, ex_GetBrickDataAddress.nxc, ex_HTGyroTest.nxc, ex_i2cdeviceid.nxc, ex_i2cdeviceinfo.nxc, ex_i2cvendorid.nxc, ex_i2cversion.nxc, ex_isnan.nxc, ex_labs.nxc, ex_leftstr.nxc, ex_midstr.nxc, ex_ReadSensorHTTouchMultiplexer.nxc, ex_reladdressof.nxc, ex_rightstr.nxc, ex_RS485Receive.nxc, ex_RS485Send.nxc, ex_SetAbortFlag.nxc, ex_setdisplayfont.nxc, ex_SetLongAbort.nxc, ex_StrCatOld.nxc, ex_string.nxc, ex_StrReplace.nxc, ex_strtod.nxc, ex_strtol.nxc, ex_strtoul.nxc, ex_SubStr.nxc, ex_syscommbtconnection.nxc, ex_SysCommBTOnOff.nxc, ex_SysCommHSCheckStatus.nxc, ex_SysCommHSControl.nxc, ex_SysCommHSRead.nxc, ex_SysComputeCalibValue.nxc, ex_SysDatalogWrite.nxc, ex_syslendrst.nxc, ex_syslendnext.nxc, ex_sysleread.nxc, ex_syslistles.nxc, ex_sysmessageread.nxc, ex_tan.nxc, ex_tand.nxc, ex_TextOut.nxc, util_battery_1.nxc, util_battery_2.nxc, and util_rpm.nxc.

8.3.3.998

int tolower (int c) [inline]

Convert uppercase letter to lowercase. Converts parameter c to its lowercase equivalent if c is an uppercase letter and has a lowercase equivalent. If no such conversion is possible, the value returned is c unchanged. Parameters: c Uppercase letter character to be converted. Returns: The lowercase equivalent to c, if such value exists, or c (unchanged) otherwise.. Examples: ex_ctype.nxc, and ex_tolower.nxc.

8.3.3.999

int toupper (int c) [inline]

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1778

Convert lowercase letter to uppercase. Converts parameter c to its uppercase equivalent if c is a lowercase letter and has an uppercase equivalent. If no such conversion is possible, the value returned is c unchanged. Parameters: c Lowercase letter character to be converted. Returns: The uppercase equivalent to c, if such value exists, or c (unchanged) otherwise.. Examples: ex_ctype.nxc, and ex_toupper.nxc.

8.3.3.1000

long trunc (oat x) [inline]

Compute integral part. Computes the integral part of x. Parameters: x Floating point value. Returns: Integral part of x. Warning: This function requires the enhanced NBC/NXC rmware. Examples: ex_sin_cos.nxc, ex_sind_cosd.nxc, and ex_trunc.nxc.

8.3.3.1001

byte UIButton (void) [inline]

Read UI button. Return user interface button information. Returns: A UI button value. See UIButton constants. Examples: ex_UIButton.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1779

8.3.3.1002

byte UIState (void) [inline]

Get UI module state. Return the user interface state. Returns: The UI module state. See UIState constants. Examples: ex_UIState.nxc.

8.3.3.1003

int UnattenVar (string str, variant & x) [inline]

Unatten a string into a data type. Convert a string containing the byte representation of the specied variable back into the original variable type. See also: FlattenVar, Flatten Parameters: str A string containing attened data. x A variable reference where the unattened data is stored. Returns: A boolean value indicating whether the operation succeeded or not. Examples: ex_FlattenVar.nxc, ex_string.nxc, and ex_UnattenVar.nxc.

8.3.3.1004

byte USBInputBufferInPtr (void) [inline]

Get usb port input buffer in-pointer. This method returns the value of the input pointer of the usb port input buffer. Returns: The USB port input buffers in-pointer value.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1780

Examples: ex_USBInputBufferInPtr.nxc.

8.3.3.1005

byte USBInputBufferOutPtr (void) [inline]

Get usb port input buffer out-pointer. This method returns the value of the output pointer of the usb port input buffer. Returns: The USB port input buffers out-pointer value. Examples: ex_USBInputBufferOutPtr.nxc.

8.3.3.1006

byte USBOutputBufferInPtr (void) [inline]

Get usb port output buffer in-pointer. This method returns the value of the input pointer of the usb port output buffer. Returns: The USB port output buffers in-pointer value. Examples: ex_USBOutputBufferInPtr.nxc.

8.3.3.1007

byte USBOutputBufferOutPtr (void) [inline]

Get usb port output buffer out-pointer. This method returns the value of the output pointer of the usb port output buffer. Returns: The USB port output buffers out-pointer value. Examples: ex_USBOutputBufferOutPtr.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1781

8.3.3.1008

byte USBPollBufferInPtr (void) [inline]

Get usb port poll buffer in-pointer. This method returns the value of the input pointer of the usb port poll buffer. Returns: The USB port poll buffers in-pointer value. Examples: ex_USBPollBufferInPtr.nxc.

8.3.3.1009

byte USBPollBufferOutPtr (void) [inline]

Get usb port poll buffer out-pointer. This method returns the value of the output pointer of the usb port poll buffer. Returns: The USB port poll buffers out-pointer value. Examples: ex_USBPollBufferOutPtr.nxc, and ex_UsbState.nxc.

8.3.3.1010

byte UsbState (void) [inline]

Get UI module USB state. This method returns the UI module USB state. Returns: The UI module USB state. (0=disconnected, 1=connected, 2=working) Examples: ex_UiUsbState.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1782

8.3.3.1011

byte USBState (void) [inline]

Get USB state. This method returns the value of the USB state. Returns: The USB state.

8.3.3.1012

void UseRS485 (void) [inline]

Use the RS485 port. Congure port 4 for RS485 usage. Examples: ex_RS485Receive.nxc, and ex_RS485Send.nxc.

8.3.3.1013

byte VMRunState (void) [inline]

Read VM run state. Return VM run state information. Returns: VM run state. See VM run state constants. Examples: ex_VMRunState.nxc.

8.3.3.1014

byte Volume (void) [inline]

Read volume. Return the user interface volume level. Valid values are from 0 to 4. Returns: The UI module volume. (0..4) Examples: ex_Volume.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1783

8.3.3.1015

void Wait (unsigned long ms) [inline]

Wait some milliseconds. Make a task sleep for specied amount of time (in 1000ths of a second). Parameters: ms The number of milliseconds to sleep. Examples: alternating_tasks.nxc, ex_addressof.nxc, ex_addressofex.nxc, ex_ArrayMax.nxc, ex_ArrayMean.nxc, ex_ArrayMin.nxc, ex_ArrayOp.nxc, ex_ArraySort.nxc, ex_ArrayStd.nxc, ex_ArraySum.nxc, ex_ArraySumSqr.nxc, ex_atof.nxc, ex_atoi.nxc, ex_atol.nxc, ex_CircleOut.nxc, ex_clearline.nxc, ex_ClearScreen.nxc, ex_contrast.nxc, ex_copy.nxc, ex_ctype.nxc, ex_DataMode.nxc, ex_delete_data_le.nxc, ex_dispftout.nxc, ex_dispfunc.nxc, ex_dispgaout.nxc, ex_dispgout.nxc, ex_dispgoutex.nxc, ex_displayfont.nxc, ex_dispmisc.nxc, ex_div.nxc, ex_le_system.nxc, ex_ndrstle.nxc, ex_ndnextle.nxc, ex_FlattenVar.nxc, ex_getchar.nxc, ex_getmemoryinfo.nxc, ex_HTGyroTest.nxc, ex_i2cdeviceinfo.nxc, ex_isnan.nxc, ex_labs.nxc, ex_ldiv.nxc, ex_leftstr.nxc, ex_LineOut.nxc, ex_memcmp.nxc, ex_midstr.nxc, ex_NXTHID.nxc, ex_NXTLineLeader.nxc, ex_NXTPowerMeter.nxc, ex_NXTServo.nxc, ex_NXTSumoEyes.nxc, ex_PFMate.nxc, ex_playsound.nxc, ex_playtones.nxc, ex_PolyOut.nxc, ex_PosReg.nxc, ex_ReadSensorHTAngle.nxc, ex_reladdressof.nxc, ex_ResetSensorHTAngle.nxc, ex_rightstr.nxc, ex_RS485Receive.nxc, ex_RS485Send.nxc, ex_SensorHTGyro.nxc, ex_setdisplayfont.nxc, ex_sin_cos.nxc, ex_sind_cosd.nxc, ex_StrCatOld.nxc, ex_StrIndex.nxc, ex_string.nxc, ex_StrLenOld.nxc, ex_StrReplace.nxc, ex_strtod.nxc, ex_strtol.nxc, ex_strtoul.nxc, ex_SubStr.nxc, ex_syscommbtconnection.nxc, ex_SysCommHSControl.nxc, ex_SysCommHSRead.nxc, ex_sysdataloggettimes.nxc, ex_sysdrawfont.nxc, ex_sysdrawgraphicarray.nxc, ex_sysdrawpolygon.nxc, ex_syslistles.nxc, ex_sysmemorymanager.nxc, ex_UnattenVar.nxc, ex_wait.nxc, ex_yield.nxc, glBoxDemo.nxc, glScaleDemo.nxc, util_battery_1.nxc, util_battery_2.nxc, and util_rpm.nxc.

8.3.3.1016

unsigned int Write (byte handle, const variant & value) [inline]

Write value to le. Write a value to the le associated with the specied handle. The handle parameter must be a variable. The value parameter must be a constant, a constant expression, or a variable. The type of the value parameter determines the number of bytes of data written.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1784

Parameters: handle The le handle. value The value to write to the le. Returns: The function call result. See Loader module error codes. Examples: ex_le_system.nxc, and ex_Write.nxc.

8.3.3.1017

unsigned int WriteBytes (byte handle, const byte & buf[ ], unsigned int & cnt) [inline]

Write bytes to le. Write the contents of the data array to the le associated with the specied handle. The handle parameter must be a variable. The cnt parameter must be a variable. The data parameter must be a byte array. The actual number of bytes written is returned in the cnt parameter. Parameters: handle The le handle. buf The byte array or string containing the data to write. cnt The number of bytes actually written to the le. Returns: The function call result. See Loader module error codes. Examples: ex_WriteBytes.nxc.

8.3.3.1018

unsigned int WriteBytesEx (byte handle, unsigned int & len, const byte & buf[ ]) [inline]

Write bytes to a le with limit. Write the specied number of bytes to the le associated with the specied handle. The handle parameter must be a variable. The len parameter must be a variable. The buf parameter must be a byte array or a string variable or string constant. The actual number of bytes written is returned in the len parameter.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1785

Parameters: handle The le handle. len The maximum number of bytes to write on input. Returns the actual number of bytes written. buf The byte array or string containing the data to write. Returns: The function call result. See Loader module error codes. Examples: ex_WriteBytesEx.nxc.

8.3.3.1019

char WriteI2CRegister (byte port, byte i2caddr, byte reg, byte val) [inline]

Write I2C register. Write a single byte to an I2C device register. Parameters: port The port to which the I2C device is attached. See the Input port constants group. You may use a constant or a variable. i2caddr The I2C device address. reg The I2C device register to which to write a single byte. val The byte to write to the I2C device. Returns: A status code indicating whether the write completed successfully or not. See CommLSCheckStatusType for possible result values. Examples: ex_writei2cregister.nxc.

8.3.3.1020

unsigned int WriteLn (byte handle, const variant & value) [inline]

Write a value and new line to a le. Write a value to the le associated with the specied handle. The handle parameter must be a variable. The value parameter must
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1786

be a constant, a constant expression, or a variable. The type of the value parameter determines the number of bytes of data written. This function also writes a carriage return and a line feed to the le following the numeric data. Parameters: handle The le handle. value The value to write to the le. Returns: The function call result. See Loader module error codes. Examples: ex_WriteLn.nxc.

8.3.3.1021

unsigned int WriteLnString (byte handle, const string & str, unsigned int & cnt) [inline]

Write string and new line to a le. Write the string to the le associated with the specied handle. The handle parameter must be a variable. The count parameter must be a variable. The str parameter must be a string variable or string constant. This function also writes a carriage return and a line feed to the le following the string data. The total number of bytes written is returned in the cnt parameter. Parameters: handle The le handle. str The string to write to the le. cnt The number of bytes actually written to the le. Returns: The function call result. See Loader module error codes. Examples: ex_WriteLnString.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

8.3

NXCDefs.h File Reference

1787

8.3.3.1022

char WriteNRLinkBytes (const byte port, const byte i2caddr, const byte data[ ]) [inline]

Write data to NRLink. Write data to the mindsensors NRLink device on the specied port. The port must be congured as a Lowspeed port before using this function. Parameters: port The sensor port. See Input port constants. i2caddr The sensor I2C address. See sensor documentation for this value. data A byte array containing the data to write. Returns: The function call result. Examples: ex_writenrlinkbytes.nxc.

8.3.3.1023

unsigned int WriteString (byte handle, const string & str, unsigned int & cnt) [inline]

Write string to a le. Write the string to the le associated with the specied handle. The handle parameter must be a variable. The count parameter must be a variable. The str parameter must be a string variable or string constant. The actual number of bytes written is returned in the cnt parameter. Parameters: handle The le handle. str The string to write to the le. cnt The number of bytes actually written to the le. Returns: The function call result. See Loader module error codes. Examples: ex_WriteString.nxc.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9 Example Documentation

1788

8.3.3.1024

void Yield () [inline]

Yield to another task. Make a task yield to another concurrently running task. Examples: ex_yield.nxc.

9
9.1

Example Documentation
alternating_tasks.nxc

This is an example of how to use the ExitTo function.


// When run, this program alternates between task A and task B until halted // by pressing the gray button. task B(); void beep(const int tone) { PlayTone(tone, MS_500); Wait(SEC_1); } task A() { beep(TONE_C4); ExitTo(B); } task B() { beep(TONE_C6); ExitTo(A); } task main() { // ExitTo(B) would work as well here. Precedes(B); }

9.2

ex_abort.nxc

This is an example of how to use the abort function.


abort(); // stop the program

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.3

ex_AbortFlag.nxc

1789

9.3

ex_AbortFlag.nxc

This is an example of how to use the AbortFlag function.


byte af = AbortFlag();

9.4

ex_abs.nxc

This is an example of how to use the abs function.


float val = abs(x); // return the absolute value of x

9.5

ex_ACCLNxCalibrateX.nxc

This is an example of how to use the ACCLNxCalibrateX function.


result = ACCLNxCalibrateX(S1, MS_ADDR_ACCLNX);

9.6

ex_ACCLNxCalibrateXEnd.nxc

This is an example of how to use the ACCLNxCalibrateXEnd function.


result = ACCLNxCalibrateXEnd(S1, MS_ADDR_ACCLNX);

9.7

ex_ACCLNxCalibrateY.nxc

This is an example of how to use the ACCLNxCalibrateY function.


result = ACCLNxCalibrateY(S1, MS_ADDR_ACCLNX);

9.8

ex_ACCLNxCalibrateYEnd.nxc

This is an example of how to use the ACCLNxCalibrateYEnd function.


result = ACCLNxCalibrateYEnd(S1, MS_ADDR_ACCLNX);

9.9

ex_ACCLNxCalibrateZ.nxc

This is an example of how to use the ACCLNxCalibrateZ function.


result = ACCLNxCalibrateZ(S1, MS_ADDR_ACCLNX);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.10

ex_ACCLNxCalibrateZEnd.nxc

1790

9.10

ex_ACCLNxCalibrateZEnd.nxc

This is an example of how to use the ACCLNxCalibrateZEnd function.


result = ACCLNxCalibrateZEnd(S1, MS_ADDR_ACCLNX);

9.11

ex_ACCLNxResetCalibration.nxc

This is an example of how to use the ACCLNxResetCalibration function.


result = ACCLNxResetCalibration(S1, MS_ADDR_ACCLNX);

9.12

ex_ACCLNxSensitivity.nxc

This is an example of how to use the ACCLNxSensitivity function.


result = ACCLNxSensitivity(S1, MS_ADDR_ACCLNX);

9.13

ex_ACCLNxXOffset.nxc

This is an example of how to use the ACCLNxXOffset function.


result = ACCLNxXOffset(S1, MS_ADDR_ACCLNX);

9.14

ex_ACCLNxXRange.nxc

This is an example of how to use the ACCLNxXRange function.


result = ACCLNxXRange(S1, MS_ADDR_ACCLNX);

9.15

ex_ACCLNxYOffset.nxc

This is an example of how to use the ACCLNxYOffset function.


result = ACCLNxYOffset(S1, MS_ADDR_ACCLNX);

9.16

ex_ACCLNxYRange.nxc

This is an example of how to use the ACCLNxYRange function.


result = ACCLNxYRange(S1, MS_ADDR_ACCLNX);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.17

ex_ACCLNxZOffset.nxc

1791

9.17

ex_ACCLNxZOffset.nxc

This is an example of how to use the ACCLNxZOffset function.


result = ACCLNxZOffset(S1, MS_ADDR_ACCLNX);

9.18

ex_ACCLNxZRange.nxc

This is an example of how to use the ACCLNxZRange function.


result = ACCLNxZRange(S1, MS_ADDR_ACCLNX);

9.19

ex_acos.nxc

This is an example of how to use the acos function.


// // // // ex_acos.nxc Display values of the acos API call. This program runs indefinitely -- press gray button to exit. Reguires enhanced firmware 1.28 or later. MIN_VAL MID_VAL MAX_VAL INVALID -1.0 0.0 1.0 2.0

#define #define #define #define

inline void show_acos(const float val, const int screen_y) { TextOut(0, screen_y, FormatNum("%7.4f RAD", acos(val))); } task main() { show_acos(MIN_VAL, LCD_LINE1); // shows 3.1416 RAD show_acos(MID_VAL, LCD_LINE2); // shows 1.5708 RAD show_acos(MAX_VAL, LCD_LINE3); // shows 0.0000 RAD // An invalid value returns not-a-number (nan). show_acos(INVALID, LCD_LINE4); // shows -nan RAD while (true); }

9.20

ex_acosd.nxc

This is an example of how to use the acosd function.


// ex_acosd.nxc // Display values of the acosd API call. // This program runs indefinitely -- press gray button to exit.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.21

ex_Acquire.nxc

1792

// Reguires enhanced firmware 1.28 or later. #define #define #define #define MIN_VAL MID_VAL MAX_VAL INVALID -1.0 0.0 1.0 2.0

inline void show_acos(const float val, const int screen_y) { TextOut(0, screen_y, FormatNum("%6.2f DEG", acosd(val))); } task main() { show_acos(MIN_VAL, LCD_LINE1); // shows 180.00 DEG show_acos(MID_VAL, LCD_LINE2); // shows 90.00 DEG show_acos(MAX_VAL, LCD_LINE3); // shows 0.00 DEG // An invalid value returns not-a-number (nan). show_acos(INVALID, LCD_LINE4); // shows -nan DEG while (true); }

9.21

ex_Acquire.nxc

This is an example of how to use the Acquire function.


mutex motorMutex; // ... Acquire(motorMutex); // make sure we have exclusive access // use the motors Release(motorMutex);

9.22

ex_addressof.nxc

This is an example of how to use the addressOf function.


const byte NewFont[] = { 0x04,0x00, // Graphics Format 0x02,0x40, // Graphics DataSize 0x10, // Graphics Count X 0x06, // Graphics Count Y 0x06, // Graphics Width 0x08, // Graphics Height 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x5F,0x06,0x00,0x00,0x07,0x03,0x00,0x07 ,0x03,0x00,0x24,0x7E,0x24,0x7E,0x24,0x00,0x24,0x2B,0x6A,0x12,0x00,0x00,0x63,0x13, 0x08,0x64,0x63,0x00,0x30,0x4C,0x52,0x22,0x50,0x00,0x00,0x07,0x03,0x00,0x00,0x00,0 x00,0x3E,0x41,0x00,0x00,0x00,0x00,0x41,0x3E,0x00,0x00,0x00,0x08,0x3E,0x1C,0x3E,0x 08,0x00,0x08,0x08,0x3E,0x08,0x08,0x00,0x80,0x60,0x60,0x00,0x00,0x00,0x08,0x08,0x0 8,0x08,0x08,0x00,0x00,0x60,0x60,0x00,0x00,0x00,0x20,0x10,0x08,0x04,0x02,0x00, 0x3E,0x51,0x49,0x45,0x3E,0x00,0x00,0x42,0x7F,0x40,0x00,0x00,0x62,0x51,0x49,0x49

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.23

ex_addressofex.nxc

1793

,0x46,0x00,0x22,0x49,0x49,0x49,0x36,0x00,0x18,0x14,0x12,0x7F,0x10,0x00,0x2F,0x49, 0x49,0x49,0x31,0x00,0x3C,0x4A,0x49,0x49,0x30,0x00,0x01,0x71,0x09,0x05,0x03,0x00,0 x36,0x49,0x49,0x49,0x36,0x00,0x06,0x49,0x49,0x29,0x1E,0x00,0x00,0x6C,0x6C,0x00,0x 00,0x00,0x00,0xEC,0x6C,0x00,0x00,0x00,0x08,0x14,0x22,0x41,0x00,0x00,0x24,0x24,0x2 4,0x24,0x24,0x00,0x00,0x41,0x22,0x14,0x08,0x00,0x02,0x01,0x59,0x09,0x06,0x00, 0x3E,0x41,0x5D,0x55,0x1E,0x00,0x7E,0x11,0x11,0x11,0x7E,0x00,0x7F,0x49,0x49,0x49 ,0x36,0x00,0x3E,0x41,0x41,0x41,0x22,0x00,0x7F,0x41,0x41,0x41,0x3E,0x00,0x7F,0x49, 0x49,0x49,0x41,0x00,0x7F,0x09,0x09,0x09,0x01,0x00,0x3E,0x41,0x49,0x49,0x7A,0x00,0 x7F,0x08,0x08,0x08,0x7F,0x00,0x00,0x41,0x7F,0x41,0x00,0x00,0x30,0x40,0x40,0x40,0x 3F,0x00,0x7F,0x08,0x14,0x22,0x41,0x00,0x7F,0x40,0x40,0x40,0x40,0x00,0x7F,0x02,0x0 4,0x02,0x7F,0x00,0x7F,0x02,0x04,0x08,0x7F,0x00,0x3E,0x41,0x41,0x41,0x3E,0x00, 0x7F,0x09,0x09,0x09,0x06,0x00,0x3E,0x41,0x51,0x21,0x5E,0x00,0x7F,0x09,0x09,0x19 ,0x66,0x00,0x26,0x49,0x49,0x49,0x32,0x00,0x01,0x01,0x7F,0x01,0x01,0x00,0x3F,0x40, 0x40,0x40,0x3F,0x00,0x1F,0x20,0x40,0x20,0x1F,0x00,0x3F,0x40,0x3C,0x40,0x3F,0x00,0 x63,0x14,0x08,0x14,0x63,0x00,0x07,0x08,0x70,0x08,0x07,0x00,0x71,0x49,0x45,0x43,0x 00,0x00,0x00,0x7F,0x41,0x41,0x00,0x00,0x02,0x04,0x08,0x10,0x20,0x00,0x00,0x41,0x4 1,0x7F,0x00,0x00,0x04,0x02,0x01,0x02,0x04,0x00,0x80,0x80,0x80,0x80,0x80,0x00, 0x00,0x02,0x05,0x02,0x00,0x00,0x20,0x54,0x54,0x54,0x78,0x00,0x7F,0x44,0x44,0x44 ,0x38,0x00,0x38,0x44,0x44,0x44,0x28,0x00,0x38,0x44,0x44,0x44,0x7F,0x00,0x38,0x54, 0x54,0x54,0x08,0x00,0x08,0x7E,0x09,0x09,0x00,0x00,0x18,0x24,0xA4,0xA4,0xFC,0x00,0 x7F,0x04,0x04,0x78,0x00,0x00,0x00,0x00,0x7D,0x40,0x00,0x00,0x40,0x80,0x84,0x7D,0x 00,0x00,0x7F,0x10,0x28,0x44,0x00,0x00,0x00,0x00,0x7F,0x40,0x00,0x00,0x7C,0x04,0x1 8,0x04,0x78,0x00,0x7C,0x04,0x04,0x78,0x00,0x00,0x38,0x44,0x44,0x44,0x38,0x00, 0xFC,0x44,0x44,0x44,0x38,0x00,0x38,0x44,0x44,0x44,0xFC,0x00,0x44,0x78,0x44,0x04 ,0x08,0x00,0x08,0x54,0x54,0x54,0x20,0x00,0x04,0x3E,0x44,0x24,0x00,0x00,0x3C,0x40, 0x20,0x7C,0x00,0x00,0x1C,0x20,0x40,0x20,0x1C,0x00,0x3C,0x60,0x30,0x60,0x3C,0x00,0 x6C,0x10,0x10,0x6C,0x00,0x00,0x9C,0xA0,0x60,0x3C,0x00,0x00,0x64,0x54,0x54,0x4C,0x 00,0x00,0x08,0x3E,0x41,0x41,0x00,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0x00,0x41,0x4 1,0x3E,0x08,0x00,0x02,0x01,0x02,0x01,0x00,0x00,0x10,0x20,0x40,0x38,0x07,0x00 }; task main() { unsigned long ptr, pOldFont; ptr = addressOf(NewFont); TextOut(0, LCD_LINE1, FormatNum("%x", ptr)); pOldFont = DisplayFont(); SetDisplayFont(ptr); TextOut(0, LCD_LINE2, "Testing 1, 2, 3"); SetDisplayFont(pOldFont); TextOut(0, LCD_LINE4, "Testing 1, 2, 3"); Wait(SEC_10); }

9.23

ex_addressofex.nxc

This is an example of how to use the addressOfEx function.


const byte NewFont[] = { 0x04,0x00, // Graphics 0x02,0x40, // Graphics 0x10, // Graphics 0x06, // Graphics 0x06, // Graphics

Format DataSize Count X Count Y Width

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.24

ex_ArrayBuild.nxc

1794

0x08, // Graphics Height 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x5F,0x06,0x00,0x00,0x07,0x03,0x00,0x07 ,0x03,0x00,0x24,0x7E,0x24,0x7E,0x24,0x00,0x24,0x2B,0x6A,0x12,0x00,0x00,0x63,0x13, 0x08,0x64,0x63,0x00,0x30,0x4C,0x52,0x22,0x50,0x00,0x00,0x07,0x03,0x00,0x00,0x00,0 x00,0x3E,0x41,0x00,0x00,0x00,0x00,0x41,0x3E,0x00,0x00,0x00,0x08,0x3E,0x1C,0x3E,0x 08,0x00,0x08,0x08,0x3E,0x08,0x08,0x00,0x80,0x60,0x60,0x00,0x00,0x00,0x08,0x08,0x0 8,0x08,0x08,0x00,0x00,0x60,0x60,0x00,0x00,0x00,0x20,0x10,0x08,0x04,0x02,0x00, 0x3E,0x51,0x49,0x45,0x3E,0x00,0x00,0x42,0x7F,0x40,0x00,0x00,0x62,0x51,0x49,0x49 ,0x46,0x00,0x22,0x49,0x49,0x49,0x36,0x00,0x18,0x14,0x12,0x7F,0x10,0x00,0x2F,0x49, 0x49,0x49,0x31,0x00,0x3C,0x4A,0x49,0x49,0x30,0x00,0x01,0x71,0x09,0x05,0x03,0x00,0 x36,0x49,0x49,0x49,0x36,0x00,0x06,0x49,0x49,0x29,0x1E,0x00,0x00,0x6C,0x6C,0x00,0x 00,0x00,0x00,0xEC,0x6C,0x00,0x00,0x00,0x08,0x14,0x22,0x41,0x00,0x00,0x24,0x24,0x2 4,0x24,0x24,0x00,0x00,0x41,0x22,0x14,0x08,0x00,0x02,0x01,0x59,0x09,0x06,0x00, 0x3E,0x41,0x5D,0x55,0x1E,0x00,0x7E,0x11,0x11,0x11,0x7E,0x00,0x7F,0x49,0x49,0x49 ,0x36,0x00,0x3E,0x41,0x41,0x41,0x22,0x00,0x7F,0x41,0x41,0x41,0x3E,0x00,0x7F,0x49, 0x49,0x49,0x41,0x00,0x7F,0x09,0x09,0x09,0x01,0x00,0x3E,0x41,0x49,0x49,0x7A,0x00,0 x7F,0x08,0x08,0x08,0x7F,0x00,0x00,0x41,0x7F,0x41,0x00,0x00,0x30,0x40,0x40,0x40,0x 3F,0x00,0x7F,0x08,0x14,0x22,0x41,0x00,0x7F,0x40,0x40,0x40,0x40,0x00,0x7F,0x02,0x0 4,0x02,0x7F,0x00,0x7F,0x02,0x04,0x08,0x7F,0x00,0x3E,0x41,0x41,0x41,0x3E,0x00, 0x7F,0x09,0x09,0x09,0x06,0x00,0x3E,0x41,0x51,0x21,0x5E,0x00,0x7F,0x09,0x09,0x19 ,0x66,0x00,0x26,0x49,0x49,0x49,0x32,0x00,0x01,0x01,0x7F,0x01,0x01,0x00,0x3F,0x40, 0x40,0x40,0x3F,0x00,0x1F,0x20,0x40,0x20,0x1F,0x00,0x3F,0x40,0x3C,0x40,0x3F,0x00,0 x63,0x14,0x08,0x14,0x63,0x00,0x07,0x08,0x70,0x08,0x07,0x00,0x71,0x49,0x45,0x43,0x 00,0x00,0x00,0x7F,0x41,0x41,0x00,0x00,0x02,0x04,0x08,0x10,0x20,0x00,0x00,0x41,0x4 1,0x7F,0x00,0x00,0x04,0x02,0x01,0x02,0x04,0x00,0x80,0x80,0x80,0x80,0x80,0x00, 0x00,0x02,0x05,0x02,0x00,0x00,0x20,0x54,0x54,0x54,0x78,0x00,0x7F,0x44,0x44,0x44 ,0x38,0x00,0x38,0x44,0x44,0x44,0x28,0x00,0x38,0x44,0x44,0x44,0x7F,0x00,0x38,0x54, 0x54,0x54,0x08,0x00,0x08,0x7E,0x09,0x09,0x00,0x00,0x18,0x24,0xA4,0xA4,0xFC,0x00,0 x7F,0x04,0x04,0x78,0x00,0x00,0x00,0x00,0x7D,0x40,0x00,0x00,0x40,0x80,0x84,0x7D,0x 00,0x00,0x7F,0x10,0x28,0x44,0x00,0x00,0x00,0x00,0x7F,0x40,0x00,0x00,0x7C,0x04,0x1 8,0x04,0x78,0x00,0x7C,0x04,0x04,0x78,0x00,0x00,0x38,0x44,0x44,0x44,0x38,0x00, 0xFC,0x44,0x44,0x44,0x38,0x00,0x38,0x44,0x44,0x44,0xFC,0x00,0x44,0x78,0x44,0x04 ,0x08,0x00,0x08,0x54,0x54,0x54,0x20,0x00,0x04,0x3E,0x44,0x24,0x00,0x00,0x3C,0x40, 0x20,0x7C,0x00,0x00,0x1C,0x20,0x40,0x20,0x1C,0x00,0x3C,0x60,0x30,0x60,0x3C,0x00,0 x6C,0x10,0x10,0x6C,0x00,0x00,0x9C,0xA0,0x60,0x3C,0x00,0x00,0x64,0x54,0x54,0x4C,0x 00,0x00,0x08,0x3E,0x41,0x41,0x00,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0x00,0x41,0x4 1,0x3E,0x08,0x00,0x02,0x01,0x02,0x01,0x00,0x00,0x10,0x20,0x40,0x38,0x07,0x00 }; task main() { unsigned long ptr, pOldFont; ptr = addressOfEx(NewFont, false); TextOut(0, LCD_LINE1, FormatNum("%x", ptr)); pOldFont = DisplayFont(); SetDisplayFont(ptr); TextOut(0, LCD_LINE2, "Testing 1, 2, 3"); SetDisplayFont(pOldFont); TextOut(0, LCD_LINE4, "Testing 1, 2, 3"); Wait(SEC_10); }

9.24

ex_ArrayBuild.nxc

This is an example of how to use the ArrayBuild function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.25

ex_ArrayInit.nxc

1795

task main() { byte myArray[]; byte src1 = 0x45, src2 = 0x1f, srcN = 0x7a; ArrayBuild(myArray, src1, src2, srcN); // myArray = {0x45, 0x1f, 0x7a}; int abSample[]; int s1[] = {0, 1, 2, 3}; int s2 = 4, s3 = 5, s4 = 6, sN[] = {7, 8}; ArrayBuild(abSample, s1, s2, s3, s4, sN); // abSample = {0, 1, 2, 3, 4, 5, 6, 7, 8}; NumOut(0, LCD_LINE4, myArray[2]); NumOut(0, LCD_LINE5, abSample[1]); }

9.25

ex_ArrayInit.nxc

This is an example of how to use the ArrayInit function.


ArrayInit(myArray, 0, 10); // 10 elements == zero

9.26

ex_ArrayLen.nxc

This is an example of how to use the ArrayLen function.


x = ArrayLen(myArray);

9.27

ex_ArrayMax.nxc

This is an example of how to use the ArrayMax function.


task main() { int data[40]; for (int i = 0; i < 40; i++) data[i] = Random(); TextOut(0, LCD_LINE1, "Max value = "); int x = ArrayMax(data, NA, NA); // start at 0 and go to length(data); NumOut(0, LCD_LINE2, x); Wait(SEC_3); }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.28

ex_ArrayMean.nxc

1796

9.28

ex_ArrayMean.nxc

This is an example of how to use the ArrayMean function.


task main() { int data[40]; for (int i = 0; i < 40; i++) data[i] = rand(); TextOut(0, LCD_LINE1, "Mean value = "); int x = ArrayMean(data, NA, NA); // start at 0 and go to length(data); NumOut(0, LCD_LINE2, x); Wait(SEC_3); }

9.29

ex_ArrayMin.nxc

This is an example of how to use the ArrayMin function.


task main() { int data[40]; for (int i = 0; i < 40; i++) data[i] = rand(); TextOut(0, LCD_LINE1, "Min value = "); int x = ArrayMin(data, NA, NA); // start at 0 and go to length(data); NumOut(0, LCD_LINE2, x); Wait(SEC_3); }

9.30

ex_ArrayOp.nxc

This is an example of how to use the ArrayOp function.


task main() { int data[40]; for (int i = 0; i < 40; i++) data[i] = rand(); TextOut(0, LCD_LINE1, "Max value = "); int x; ArrayOp(OPARR_MAX, x, data, NA, NA); // start at 0 and go to length(data); NumOut(0, LCD_LINE2, x); Wait(SEC_3); }

9.31

ex_ArraySort.nxc

This is an example of how to use the ArraySort function.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.32

ex_ArrayStd.nxc

1797

task main() { int data[40]; int tmp[]; for (int i = 0; i < 40; i++) data[i] = rand(); ArraySort(tmp, data, NA, NA); // start at 0 and go to length(data); TextOut(0, LCD_LINE1, "Min value = "); NumOut(0, LCD_LINE2, tmp[0]); TextOut(0, LCD_LINE3, "Max value = "); NumOut(0, LCD_LINE4, tmp[39]); TextOut(0, LCD_LINE5, "Min value = "); NumOut(0, LCD_LINE6, ArrayMin(data, NA, NA)); TextOut(0, LCD_LINE7, "Max value = "); NumOut(0, LCD_LINE8, ArrayMax(data, NA, NA)); Wait(SEC_3); }

9.32

ex_ArrayStd.nxc

This is an example of how to use the ArrayStd function.


task main() { long data[40]; for (int i = 0; i < 40; i++) data[i] = rand(); TextOut(0, LCD_LINE1, "StdDev values = "); long x = ArrayStd(data, NA, NA); // start at 0 and go to length(data); NumOut(0, LCD_LINE2, x); Wait(SEC_3); }

9.33

ex_ArraySubset.nxc

This is an example of how to use the ArraySubset function.


// copy 5 elements starting with the 3rd element, i.e., srcArray[2] ArraySubset(myArray, srcArray, 2, 5);

9.34

ex_ArraySum.nxc

This is an example of how to use the ArraySum function.


task main() { long data[40]; for (int i = 0; i < 40; i++)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.35

ex_ArraySumSqr.nxc

1798

data[i] = rand(); TextOut(0, LCD_LINE1, "Sum of values = "); long x = ArraySum(data, NA, NA); // start at 0 and go to length(data); NumOut(0, LCD_LINE2, x); Wait(SEC_3); }

9.35

ex_ArraySumSqr.nxc

This is an example of how to use the ArraySumSqr function.


task main() { long data[40]; for (int i = 0; i < 40; i++) data[i] = rand(); TextOut(0, LCD_LINE1, "SumSqr values = "); long x = ArraySumSqr(data, NA, NA); // start at 0 and go to length(data); NumOut(0, LCD_LINE2, x); Wait(SEC_3); }

9.36

ex_asin.nxc

This is an example of how to use the asin function.


// // // // ex_asin.nxc Display values of the asin API call. This program runs indefinitely -- press gray button to exit. Reguires enhanced firmware 1.28 or later. MIN_VAL MID_VAL MAX_VAL INVALID -1.0 0.0 1.0 2.0

#define #define #define #define

inline void show_asin(const float val, const int screen_y) { TextOut(0, screen_y, FormatNum("%7.4f RAD", asin(val))); } task main() { show_asin(MIN_VAL, LCD_LINE1); // shows -1.5708 RAD show_asin(MID_VAL, LCD_LINE2); // shows 0.0000 RAD show_asin(MAX_VAL, LCD_LINE3); // shows 1.5708 RAD // An invalid value returns not-a-number (nan). show_asin(INVALID, LCD_LINE4); // shows -nan RAD while (true); }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.37

ex_asind.nxc

1799

9.37

ex_asind.nxc

This is an example of how to use the asind function.


// // // // ex_asind.nxc Display values of the asind API call. This program runs indefinitely -- press gray button to exit. Reguires enhanced firmware 1.28 or later. MIN_VAL MID_VAL MAX_VAL INVALID -1.0 0.0 1.0 2.0

#define #define #define #define

inline void show_asin(const float val, const int screen_y) { TextOut(0, screen_y, FormatNum("%6.2f DEG", asind(val))); } task main() { show_asin(MIN_VAL, LCD_LINE1); // shows -90.00 DEG show_asin(MID_VAL, LCD_LINE2); // shows 0.00 DEG show_asin(MAX_VAL, LCD_LINE3); // shows 90.00 DEG // An invalid value returns not-a-number (nan). show_asin(INVALID, LCD_LINE4); // shows -nan DEG while (true); }

9.38

ex_atan.nxc

This is an example of how to use the atan function.


// // // // ex_atan.nxc Display values of the atan API call. This program runs indefinitely -- press gray button to exit. Reguires enhanced firmware 1.28 or later. BIG_NEG_VAL -1000.0 NEG_VAL -1.0 POS_VAL 1.0 BIG_POS_VAL 1000.0

#define #define #define #define

inline void show_atan(const float val, const int screen_y) { TextOut(0, screen_y, FormatNum("%7.4f RAD", atan(val))); } task main() { show_atan(BIG_NEG_VAL, LCD_LINE1); show_atan(NEG_VAL, LCD_LINE2); show_atan(0.0, LCD_LINE3); show_atan(POS_VAL, LCD_LINE4);

// // // //

shows -1.5698 RAD shows -0.7854 RAD shows 0.0000 RAD shows 0.7854 RAD

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.39

ex_atan2.nxc

1800

show_atan(BIG_POS_VAL, LCD_LINE5); // shows while (true); }

1.5698 RAD

9.39

ex_atan2.nxc

This is an example of how to use the atan2 function.


// // // // ex_atan2.nxc Display values of the atan2 API call. This program runs indefinitely -- press gray button to exit. Reguires enhanced firmware 1.28 or later. and y coordinates of the corners and centered at the origin and having 0.0, 1.0, 1.0, 1.0, 0.0}; 1.0, 1.0, 0.0, -1.0, -1.0};

// The following two arrays comprise the x // the mid-points of the sides of a square // sides two units long. const float y_coord[] = {-1.0, -1.0, -1.0, const float x_coord[] = {-1.0, 0.0, 1.0,

// Display the angles made by lines from the origin to the points on the square // as specified above. task main() { const int pts = ArrayLen(y_coord); for (int i = 0; i < pts; ++i) { float angle = atan2(y_coord[i], x_coord[i]); TextOut(0, 56 - 8 * i, FormatNum("%7.4f RAD", angle)); } while (true); }

9.40

ex_atan2d.nxc

This is an example of how to use the atan2d function.


// // // // ex_atan2d.nxc Display values of the atan2d API call. This program runs indefinitely -- press gray button to exit. Reguires enhanced firmware 1.28 or later. and y coordinates of the corners and centered at the origin and having 0.0, 1.0, 1.0, 1.0, 0.0}; 1.0, 1.0, 0.0, -1.0, -1.0};

// The following two arrays comprise the x // the mid-points of the sides of a square // sides two units long. const float y_coord[] = {-1.0, -1.0, -1.0, const float x_coord[] = {-1.0, 0.0, 1.0,

// Display the angles made by lines from the origin to the points on the square // as specified above. task main() { const int pts = ArrayLen(y_coord);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.41

ex_atand.nxc

1801

for (int i = 0; i < pts; ++i) { float angle = atan2d(y_coord[i], x_coord[i]); TextOut(0, 56 - 8 * i, FormatNum("%7.2f DEG", angle)); } while (true); }

9.41

ex_atand.nxc

This is an example of how to use the atand function.


// // // // ex_atand.nxc Display values of the atand API call. This program runs indefinitely -- press gray button to exit. Reguires enhanced firmware 1.28 or later. BIG_NEG_VAL -1000.0 NEG_VAL -1.0 POS_VAL 1.0 BIG_POS_VAL 1000.0

#define #define #define #define

inline void show_atan(const float val, const int screen_y) { TextOut(0, screen_y, FormatNum("%6.2f DEG", atand(val))); } task main() { show_atan(BIG_NEG_VAL, LCD_LINE1); show_atan(NEG_VAL, LCD_LINE2); show_atan(0.0, LCD_LINE3); show_atan(POS_VAL, LCD_LINE4); show_atan(BIG_POS_VAL, LCD_LINE5); while (true); }

// // // // //

shows -89.94 DEG shows -45.00 DEG shows 0.00 DEG shows 45.00 DEG shows 89.94 DEG

9.42

ex_atof.nxc

This is an example of how to use the atof function.


task main() { float f = atof("3.14159e2"); NumOut(0, LCD_LINE1, f); Wait(SEC_5); }

9.43

ex_atoi.nxc

This is an example of how to use the atoi function.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.44

ex_atol.nxc

1802

task main() { NumOut(0, LCD_LINE1, atoi("3.14159")); Wait(SEC_5); }

9.44

ex_atol.nxc

This is an example of how to use the atol function.


task main() { NumOut(0, LCD_LINE1, atol("3.142e2")); Wait(SEC_5); }

9.45

ex_BatteryState.nxc

This is an example of how to use the BatteryState function.


x = BatteryState();

9.46

ex_bcd2dec.nxc

This is an example of how to use the bcd2dec function.


// convert binary-coded decimal byte to decimal. byte dec = bcd2dec(0x3a);

9.47

ex_BluetoothState.nxc

This is an example of how to use the BluetoothState function.


x = BluetoothState();

9.48

ex_BluetoothStatus.nxc

This is an example of how to use the BluetoothStatus function.


x = BluetoothStatus(1);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.49

ex_BluetoothWrite.nxc

1803

9.49

ex_BluetoothWrite.nxc

This is an example of how to use the BluetoothWrite function.


x = BluetoothWrite(1, data);

9.50

ex_BrickDataBluecoreVersion.nxc

This is an example of how to use the BrickDataBluecoreVersion function.


int bv = BrickDataBluecoreVersion();

9.51

ex_BrickDataBtHardwareStatus.nxc

This is an example of how to use the BrickDataBtHardwareStatus function.


int x = BrickDataBtHardwareStatus();

9.52

ex_BrickDataBtStateStatus.nxc

This is an example of how to use the BrickDataBtStateStatus function.


int x = BrickDataBtStateStatus();

9.53

ex_BrickDataName.nxc

This is an example of how to use the BrickDataName function.


string name = BrickDataName();

9.54

ex_BrickDataTimeoutValue.nxc

This is an example of how to use the BrickDataTimeoutValue function.


int x = BrickDataTimeoutValue();

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.55

ex_BTConnectionClass.nxc

1804

9.55

ex_BTConnectionClass.nxc

This is an example of how to use the BTConnectionClass function.


long class = BTConnectionClass(1);

9.56

ex_BTConnectionHandleNum.nxc

This is an example of how to use the BTConnectionHandleNum function.


byte handlenum = BTConnectionHandleNum(idx);

9.57

ex_BTConnectionLinkQuality.nxc

This is an example of how to use the BTConnectionLinkQuality function.


byte linkquality = BTConnectionLinkQuality(1);

9.58

ex_BTConnectionName.nxc

This is an example of how to use the BTConnectionName function.


string name = BTConnectionName(0);

9.59

ex_BTConnectionPinCode.nxc

This is an example of how to use the BTConnectionPinCode function.


string pincode = BTConnectionPinCode(0);

9.60

ex_BTConnectionStreamStatus.nxc

This is an example of how to use the BTConnectionStreamStatus function.


byte streamstatus = BTConnectionStreamStatus(1);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.61

ex_BTDeviceClass.nxc

1805

9.61

ex_BTDeviceClass.nxc

This is an example of how to use the BTDeviceClass function.


long class = BTDeviceClass(1);

9.62

ex_BTDeviceCount.nxc

This is an example of how to use the BTDeviceCount function.


byte x = BTDeviceCount();

9.63

ex_BTDeviceName.nxc

This is an example of how to use the BTDeviceName function.


string name = BTDeviceName(0);

9.64

ex_BTDeviceNameCount.nxc

This is an example of how to use the BTDeviceNameCount function.


byte x = BTDeviceNameCount();

9.65

ex_BTDeviceStatus.nxc

This is an example of how to use the BTDeviceStatus function.


byte status = BTDeviceStatus(1);

9.66

ex_BTInputBufferInPtr.nxc

This is an example of how to use the BTInputBufferInPtr function.


byte x = BTInputBufferInPtr();

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.67

ex_BTInputBufferOutPtr.nxc

1806

9.67

ex_BTInputBufferOutPtr.nxc

This is an example of how to use the BTInputBufferOutPtr function.


byte x = BTInputBufferOutPtr();

9.68

ex_BTOutputBufferInPtr.nxc

This is an example of how to use the BTOutputBufferInPtr function.


byte x = BTOutputBufferInPtr();

9.69

ex_BTOutputBufferOutPtr.nxc

This is an example of how to use the BTOutputBufferOutPtr function.


byte x = BTOutputBufferOutPtr();

9.70

ex_ButtonCount.nxc

This is an example of how to use the ButtonCount function.


value = ButtonCount(BTN1, true);

9.71

ex_ButtonLongPressCount.nxc

This is an example of how to use the ButtonLongPressCount function.


value = ButtonLongPressCount(BTN1);

9.72

ex_ButtonLongReleaseCount.nxc

This is an example of how to use the ButtonLongReleaseCount function.


value = ButtonLongReleaseCount(BTN1);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.73

ex_ButtonPressCount.nxc

1807

9.73

ex_ButtonPressCount.nxc

This is an example of how to use the ButtonPressCount function.


value = ButtonPressCount(BTN1);

9.74

ex_buttonpressed.nxc

This is an example of how to use the ButtonPressed function.


task main() { #ifdef __ENHANCED_FIRMWARE SetLongAbort(true); #endif while(true) { #ifdef __ENHANCED_FIRMWARE NumOut(0, LCD_LINE1, ButtonPressed(BTNEXIT, false)); #endif NumOut(0, LCD_LINE2, ButtonPressed(BTNRIGHT, false)); NumOut(0, LCD_LINE3, ButtonPressed(BTNLEFT, false)); NumOut(0, LCD_LINE4, ButtonPressed(BTNCENTER, false)); } }

9.75

ex_ButtonReleaseCount.nxc

This is an example of how to use the ButtonReleaseCount function.


value = ButtonReleaseCount(BTN1);

9.76

ex_ButtonShortReleaseCount.nxc

This is an example of how to use the ButtonShortReleaseCount function.


value = ButtonShortReleaseCount(BTN1);

9.77

ex_ButtonState.nxc

This is an example of how to use the ButtonState function.


value = ButtonState(BTN1);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.78

ex_ByteArrayToStr.nxc

1808

9.78

ex_ByteArrayToStr.nxc

This is an example of how to use the ByteArrayToStr function.


myStr = ByteArrayToStr(myArray);

9.79

ex_ByteArrayToStrEx.nxc

This is an example of how to use the ByteArrayToStrEx function.


ByteArrayToStrEx(myArray, myStr);

9.80

ex_ceil.nxc

This is an example of how to use the ceil function.


float a // a == float b // b == float c // c == float d // d == = ceil(3.01); 4.0 = ceil(3.14); 4.0 = ceil(3.99); 4.0 = ceil(4.0); 4.0

9.81

ex_CircleOut.nxc

This is an example of how to use the CircleOut, Random, and Wait functions.
task main() { for (int i=0; i < 50; i++) { int x = Random(10)+50; int y = Random(10)+32; int r = Random(20); CircleOut(x, y, r, DRAW_OPT_NORMAL+DRAW_OPT_LOGICAL_XOR+DRAW_OPT_FILL_SHAPE); Wait(MS_50); } CircleOut(20, 50, 20); Wait(SEC_2); }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.82

ex_clearline.nxc

1809

9.82

ex_clearline.nxc

This is an example of how to use the TextOut, ClearLine, and Wait functions.
task main() { TextOut(0, LCD_LINE1, "testing 1234567890"); Wait(SEC_5); ClearLine(LCD_LINE1); Wait(SEC_5); TextOut(0, LCD_LINE1, "testing 1234567890"); Wait(SEC_5); }

9.83

ex_ClearScreen.nxc

This is an example of how to use the ClearScreen and Wait functions.


task main() { ClearScreen(); Wait(SEC_10); }

9.84

ex_ClearSensor.nxc

This is an example of how to use the ClearSensor function.


ClearSensor(S1);

9.85

ex_CloseFile.nxc

This is an example of how to use the CloseFile function.


result = CloseFile(handle);

9.86

ex_coast.nxc

This is an example of how to use the Coast function.


Coast(OUT_A); // coast output A

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.87

ex_coastex.nxc

1810

9.87

ex_coastex.nxc

This is an example of how to use the CoastEx function.


CoastEx(OUT_A, RESET_NONE); // coast output A

9.88

ex_ColorADRaw.nxc

This is an example of how to use the ColorADRaw function.


unsigned int rawRed = ColorADRaw(S1, INPUT_RED);

9.89

ex_ColorBoolean.nxc

This is an example of how to use the ColorBoolean function.


bool bRed = ColorBoolean(S1, INPUT_RED);

9.90

ex_ColorCalibration.nxc

This is an example of how to use the ColorCalibration function.


long value = ColorCalibration(S1, INPUT_CAL_POINT_0, INPUT_RED);

9.91

ex_ColorCalibrationState.nxc

This is an example of how to use the ColorCalibrationState function.


byte value = ColorCalibrationState(S1);

9.92

ex_ColorCalLimits.nxc

This is an example of how to use the ColorCalLimits function.


unsigned int limit = ColorCalLimits(S1, INPUT_CAL_POINT_0);

9.93

ex_ColorSensorRaw.nxc

This is an example of how to use the ColorSensorRaw function.


unsigned int rawRed = ColorSensorRaw(S1, INPUT_RED);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.94

ex_ColorSensorValue.nxc

1811

9.94

ex_ColorSensorValue.nxc

This is an example of how to use the ColorSensorValue function.


unsigned int valRed = ColorSensorValue(S1, INPUT_RED);

9.95

ex_CommandFlags.nxc

This is an example of how to use the CommandFlags function.


x = CommandFlags();

9.96

ex_CongureTemperatureSensor.nxc

This is an example of how to use the CongureTemperatureSensor function.


byte config = TEMP_RES_12BIT; char result = ConfigureTemperatureSensor(S1, config);

9.97

ex_contrast.nxc

This is an example of how to use the DisplayContrast and SetDisplayContrast functions.


task main() { for (byte contrast = 0; contrast < DISPLAY_CONTRAST_MAX; contrast++) { SetDisplayContrast(contrast); NumOut(0, LCD_LINE1, DisplayContrast()); Wait(100); } for (byte contrast = DISPLAY_CONTRAST_MAX; contrast > 0; contrast--) { SetDisplayContrast(contrast); NumOut(0, LCD_LINE1, DisplayContrast()); Wait(100); } SetDisplayContrast(DISPLAY_CONTRAST_DEFAULT); NumOut(0, LCD_LINE1, DisplayContrast()); while(true); }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.98

ex_copy.nxc

1812

9.98

ex_copy.nxc

This is an example of how to use the Copy function.


task main() { string s = "Now is the winter of our discontent"; TextOut(0, LCD_LINE1, Copy(s, 12, 5)); Wait(SEC_4); }

9.99

ex_cosh.nxc

This is an example of how to use the cosh function.


x = cosh(y);

9.100

ex_CreateFile.nxc

This is an example of how to use the CreateFile function.


result = CreateFile("data.txt", 1024, handle);

9.101

ex_CreateFileLinear.nxc

This is an example of how to use the CreateFileLinear function.


result = CreateFileLinear("data.txt", 1024, handle);

9.102

ex_CreateFileNonLinear.nxc

This is an example of how to use the CreateFileNonLinear function.


result = CreateFileNonLinear("data.txt", 1024, handle);

9.103

ex_cstdio.nxc

This is an example of how to use the cstdio API functions: fopen, fprintf, fputc, fputs, fseek, ftell, fclose, feof, fush, fgetc, fgets, getc, putc, rewind, printf, sprintf, rename, and remove.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.104

ex_cstring.nxc

1813

task main() { /* fclose(byte handle) feof(byte handle) fflush(byte handle) fgetc(byte handle) fgets(string & str, int num, byte handle) fopen(string filename, const string mode) fprintf(byte handle, const string & format, variant value) fputc(char ch, byte handle) fputs(string str, byte handle) fseek(byte handle, long offset, int origin) ftell(byte handle) getc(byte handle) putc(char ch, byte handle) remove(string fname) rename(string oldname, string newname) rewind(byte handle)

*/ }

9.104

ex_cstring.nxc

This is an example of how to use the cstring API functions: strcat, strcmp, strcpy, strlen, strncat, strncmp, strncpy, memcpy, memmove, and memcmp.
task main() { /* inline variant StrToNum(string str); inline unsigned int StrLen(string str); inline byte StrIndex(string str, unsigned int idx); inline string NumToStr(variant num); inline string StrCat(string str1, string str2, string str3, string strN); inline string SubStr(string str, unsigned int idx, unsigned int len); inline string Flatten(variant num); inline string StrReplace(string str, unsigned int idx, string strnew); inline string FormatNum(string fmt, variant number); inline inline inline inline inline string FlattenVar(variant x); int UnflattenVar(string str, variant & variable); string ByteArrayToStr(byte data[]); void ByteArrayToStrEx(byte data[], string & str); void StrToByteArray(string str, byte & data[]);

strcat(string & dest, const string & src) strcmp(const string & str1, const string & str2) strcpy(string & dest, const string & src) strlen(const string & str) strncat(string & dest, const string & src, const int num)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.105

ex_ctype.nxc

1814

strncmp(const string & str1, const string & str2, unsigned int num) strncpy(string & dest, const string & src, const int num) */ }

9.105

ex_ctype.nxc

This is an example of how to use the ctype API functions: isupper, islower, isalpha, isdigit, isalnum, isspace, iscntrl, isprint, isgraph, ispunct, isxdigit, toupper, and tolower.
task main() { string tmp = "a1B2.G% "; TextOut(0, LCD_LINE1, tmp); NumOut(0, LCD_LINE2, isalnum(tmp[0])); NumOut(0, LCD_LINE3, isalpha(tmp[1])); NumOut(0, LCD_LINE4, iscntrl(tmp[2])); NumOut(0, LCD_LINE5, isdigit(tmp[3])); NumOut(0, LCD_LINE6, isgraph(tmp[4])); NumOut(0, LCD_LINE7, islower(tmp[5])); NumOut(0, LCD_LINE8, isprint(tmp[6])); NumOut(40, NumOut(40, NumOut(40, NumOut(40, NumOut(40, NumOut(40, LCD_LINE2, LCD_LINE3, LCD_LINE4, LCD_LINE5, LCD_LINE6, LCD_LINE7,

// // // // // // //

1 0 0 1 1 0 1

ispunct(tmp[0])); // 0 isspace(tmp[1])); // 0 isupper(tmp[2])); // 1 isxdigit(tmp[3])); // 1 tolower(tmp[4])); // 46 toupper(tmp[5])); // 71

Wait(SEC_5); }

9.106

ex_CurrentTick.nxc

This is an example of how to use the CurrentTick function.


unsigned int x = CurrentTick();

9.107

ex_CustomSensorActiveStatus.nxc

This is an example of how to use the CustomSensorActiveStatus function.


x = CustomSensorActiveStatus(S1);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.108

ex_CustomSensorPercentFullScale.nxc

1815

9.108

ex_CustomSensorPercentFullScale.nxc

This is an example of how to use the CustomSensorPercentFullScale function.


x = CustomSensorPercentFullScale(S1);

9.109

ex_CustomSensorZeroOffset.nxc

This is an example of how to use the CustomSensorZeroOffset function.


x = CustomSensorZeroOffset(S1);

9.110

ex_DataMode.nxc

This is an example of how to use the HSDataMode, BTDataMode, SetHSDataMode, SetBTDataMode, TextOut, and Wait functions.
task main() { string DataModeNames[3] = {"NXT", "GPS", "RAW"}; byte dm; // hi-speed data mode dm = HSDataMode(); TextOut( 0, LCD_LINE1, "HSDataMode: "); TextOut(80, LCD_LINE1, DataModeNames[dm]); // bluetooth data mode dm = BTDataMode(); TextOut( 0, LCD_LINE2, "BTDataMode: "); TextOut(80, LCD_LINE2, DataModeNames[dm]); // change hi-speed port to NXT mode SetHSDataMode(DATA_MODE_NXT); // change Bluetooth to GPS mode SetBTDataMode(DATA_MODE_GPS); dm = HSDataMode(); TextOut( 0, LCD_LINE4, "HSDataMode: "); TextOut(80, LCD_LINE4, DataModeNames[dm]); dm = BTDataMode(); TextOut( 0, LCD_LINE5, "BTDataMode: "); TextOut(80, LCD_LINE5, DataModeNames[dm]); Wait(SEC_5); }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.111

ex_delete_data_le.nxc

1816

9.111

ex_delete_data_le.nxc

This is an example of how to use the DeleteFile, TextOut, FormatNum, and Wait functions. It is useful for deleting the circles.dat le created by the program described in the ex_le_system::nxc example.
// // // // ex_delete_data_file.nxc Demonstates the use of the DeleteFile API call. Useful for deleting the circles.dat file created by the program described in the ex_file_system.nxc example.

#define FILE_NAME "circles.dat" // Display a return code from a file sytem API call on the NXT screen. // The codes most likely to be displayed are are: // LDR_SUCCESS 0x0000 // LDR_FILENOTFOUND 0x8700 // See "Loader module error codes" to interpret any other code that appears. void rtn_code_out(const unsigned int code) { TextOut(0, LCD_LINE1, "code "); TextOut(50, LCD_LINE1, FormatNum("%04x", code)); } task main() { unsigned int rtn_code = DeleteFile(FILE_NAME); rtn_code_out(rtn_code); Wait(SEC_5); }

9.112

ex_DeleteFile.nxc

This is an example of how to use the DeleteFile function.


result = DeleteFile("data.txt");

9.113

ex_dispfnout.nxc

This is an example of how to use the FontNumOut function.


#download "PropTiny.ric" task main() { FontNumOut(0, 40, "PropTiny.RIC", PI); while( 1 ) ; }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.114

ex_dispftout.nxc

1817

9.114

ex_dispftout.nxc

This is an example of how to use the FontTextOut, SysDrawFont, Wait, and ClearScreen functions.
#download "PropTiny.ric" task main() { DrawFontType dfArgs; dfArgs.Location.X = 10; dfArgs.Location.Y = 59; dfArgs.Filename = "PropTiny.ric" ; dfArgs.Text = "Hello" ; dfArgs.Options = DRAW_OPT_NORMAL|DRAW_OPT_FONT_DIR_L2RT; SysDrawFont(dfArgs); FontTextOut( 35,59, "PropTiny.RIC", "World", DRAW_OPT_INVERT| DRAW_OPT_FONT_DIR_T2BL ); FontTextOut( 10,20, "PropTiny.RIC", "Now is the winter of our discontent made g lorious summer by this son of York. And all the clouds that lowered upon our hou se in the deep bosom of the ocean buried.", DRAW_OPT_NORMAL| DRAW_OPT_FONT_DIR_L2RB|DRAW_OPT_FONT_WRAP ); FontTextOut( 50,56,"PropTiny.RIC", "WiWiWiWiWiWi", DRAW_OPT_NORMAL| DRAW_OPT_FONT_DIR_L2RB ); FontTextOut( 50,48,"PropTiny.RIC", "WiWiWiWiWiWi", DRAW_OPT_INVERT| DRAW_OPT_FONT_DIR_L2RB ); FontTextOut( 50,40,"PropTiny.RIC", "WiWiWiWiWiWi", DRAW_OPT_LOGICAL_OR| DRAW_OPT_FONT_DIR_L2RB ); FontTextOut( 50,32,"PropTiny.RIC", "WiWiWiWiWiWi", DRAW_OPT_INVERT| DRAW_OPT_LOGICAL_AND|DRAW_OPT_FONT_DIR_L2RB ); Wait(SEC_5); ClearScreen(); Wait(SEC_4); }

9.115

ex_dispfunc.nxc

This is an example of how to use the SysDisplayExecuteFunction and Wait functions along with the DisplayExecuteFunctionType structure.
task main() { DisplayExecuteFunctionType defArgs; defArgs.Cmd = DISPLAY_HORIZONTAL_LINE; defArgs.On = DRAW_OPT_NORMAL; defArgs.X1 = 20; defArgs.Y1 = 20; defArgs.X2 = 40; SysDisplayExecuteFunction(defArgs); Wait(SEC_15); }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.116

ex_dispgaout.nxc

1818

9.116

ex_dispgaout.nxc

This is an example of how to use the GraphicArrayOut, NumOut, and Wait function. It also demonstrates how to use the RICOpSprite, RICSpriteData, RICOpCopyBits, RICImgRect, and RICImgPoint macros.
byte ric_data[] = { RICOpSprite(1, 64, 2, RICSpriteData(0xFF, 0xFF, 0x80, 0x80, 0x21, 0x80, 0x80, 0x05, 0x80, 0x80, 0x21, 0x80, 0x81, 0x01, 0x82, 0x88, 0x01, 0x90, 0x90, 0x01, 0x88, 0x82, 0x01, 0x81, 0x80, 0x41, 0x80, 0x80, 0x09, 0x80, 0x80, 0x11, 0x80, 0x80, 0x81, 0x81, 0x84, 0x01, 0x88, 0xA0, 0x01, 0x90, 0x84, 0x01, 0x82, 0x80, 0x81, 0x80, 0x80, 0x11, 0x80, 0x80, 0x09, 0x80, 0x80, 0x41, 0x80, 0x82, 0x01, 0x84, 0x90, 0x01, 0xA0, 0xFF, 0xFF)), RICOpCopyBits(0, 1, RICImgRect( RICImgPoint(0, 0), 16, 64), RICImgPoint(0, 0)) }; void Animate() { int i; byte a; byte b; a = ric_data[12]; b = ric_data[13]; for( i=12; i<132; i++ ) ric_data[i] = ric_data[i+2]; ric_data[ 132 ] = a; ric_data[ 133 ] = b; } task main() { int counter = 0;

0x01, 0x11, 0x09, 0x41, 0x01, 0x01, 0x01, 0x01, 0x21, 0x05, 0x21, 0x01, 0x01, 0x01, 0x01, 0x41, 0x09, 0x11, 0x81, 0x01, 0x01,

0x80, 0x80, 0x80, 0x80, 0x84, 0xA0, 0x84, 0x80, 0x80, 0x80, 0x80, 0x82, 0x90, 0x88, 0x81, 0x80, 0x80, 0x80, 0x81, 0x88, 0x80,

0x41, 0x09, 0x11, 0x81, 0x01, 0x01, 0x01, 0x81, 0x11, 0x09, 0x41, 0x01, 0x01, 0x01, 0x01, 0x21, 0x05, 0x21, 0x01, 0x01, 0x01,

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.117

ex_dispgaoutex.nxc

1819

while( 1 ) { Animate(); GraphicArrayOut(0, 0, ric_data); NumOut( 50,LCD_LINE1,++counter ); Wait(MS_20); } }

9.117

ex_dispgaoutex.nxc

This is an example of how to use the GraphicArrayOutEx and Wait functions. It also demonstrates how to use the RICOpDescription, RICOpSprite, RICSpriteData, RICOpCopyBits, RICImgRect, and RICImgPoint macros.
// Draw the Chessboard byte Chess1_data[] = { RICOpDescription(0, 104, 20), RICOpSprite(1, 14, 13, RICSpriteData(0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xBE, 0xBE, 0xEE, 0xFE, 0xFE, 0xFE, 0x82, 0xBA, 0x86, 0xC6, 0x86, 0x86, 0xC2, 0xBE, 0xBA, 0xC6, 0xEE, 0xFE, 0xD6, 0xEE, 0xB6, 0xBA, 0xBA, 0xBA, 0xBA, 0xBA, 0x86, 0xB6, 0xEE, 0xC6, 0xFE, 0xEE, 0xEE, 0x8E, 0x86, 0xAA, 0x86, 0xBE, 0xC2, 0xBA, 0x8E, 0xEE, 0xEE, 0xFE, 0xD6, 0xEE, 0xB6, 0xBA, 0xB6, 0xB6, 0xBE, 0xFA, 0x86, 0xB6, 0xF6, 0xFE, 0xFE, 0xFE, 0xEE, 0xBA, 0x86, 0xCA, 0xBA, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x10, 0x00, 0x00, 0x00, 0x7C, 0x44, 0x78, 0x38, 0x78, 0x78, 0x3C, 0x40, 0x44, 0x38, 0x10, 0x00, 0x28, 0x10, 0x48, 0x44, 0x44, 0x44, 0x44, 0x44, 0x78, 0x48, 0x10, 0x38, 0x00, 0x10, 0x10, 0x70, 0x78, 0x54, 0x78, 0x40, 0x3C, 0x44, 0x70, 0x10, 0x10, 0x00, 0x28, 0x10, 0x48, 0x44, 0x48, 0x48, 0x40, 0x04, 0x78, 0x48, 0x08, 0x00, 0x00, 0x00, 0x10, 0x44, 0x78, 0x34, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00)), RICOpCopyBits(0, 1, RICImgRect(RICImgPoint(RICArg(0), 7), )), RICOpCopyBits(0, 1, RICImgRect(RICImgPoint(RICArg(1), 0), )), RICOpCopyBits(0, 1, RICImgRect(RICImgPoint(RICArg(2), 7), 0)), RICOpCopyBits(0, 1, RICImgRect(RICImgPoint(RICArg(3), 0), 0)), RICOpCopyBits(0, 1, RICImgRect(RICImgPoint(RICArg(4), 7),

0xFE, 0xFE,

7, 7), RICImgPoint(0, 0 7, 7), RICImgPoint(7, 0 7, 7), RICImgPoint(14, 7, 7), RICImgPoint(21, 7, 7), RICImgPoint(28,

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.117

ex_dispgaoutex.nxc

1820

0)), RICOpCopyBits(0, 0)), RICOpCopyBits(0, 0)), RICOpCopyBits(0, 0)), RICOpCopyBits(0, )), RICOpCopyBits(0, )), RICOpCopyBits(0, 7)), RICOpCopyBits(0, 7)), RICOpCopyBits(0, 7)), RICOpCopyBits(0, 7)), RICOpCopyBits(0, 7)), RICOpCopyBits(0, 7)), RICOpCopyBits(0, 14)), RICOpCopyBits(0, 14)), RICOpCopyBits(0, 14)), RICOpCopyBits(0, 14)), RICOpCopyBits(0, 14)), RICOpCopyBits(0, 14)), RICOpCopyBits(0, 14)), RICOpCopyBits(0, 14)), RICOpCopyBits(0, 21)), RICOpCopyBits(0, 21)), RICOpCopyBits(0, 21)), RICOpCopyBits(0, 21)), RICOpCopyBits(0, 21)), RICOpCopyBits(0, 21)), RICOpCopyBits(0, 21)), RICOpCopyBits(0, 21)), RICOpCopyBits(0, 28)),

1, RICImgRect(RICImgPoint(RICArg(5), 0), 7, 7), RICImgPoint(35, 1, RICImgRect(RICImgPoint(RICArg(6), 7), 7, 7), RICImgPoint(42, 1, RICImgRect(RICImgPoint(RICArg(7), 0), 7, 7), RICImgPoint(49, 1, RICImgRect(RICImgPoint(RICArg(8), 0), 7, 7), RICImgPoint(0, 7 1, RICImgRect(RICImgPoint(RICArg(9), 7), 7, 7), RICImgPoint(7, 7 1, RICImgRect(RICImgPoint(RICArg(10), 0), 7, 7), RICImgPoint(14, 1, RICImgRect(RICImgPoint(RICArg(11), 7), 7, 7), RICImgPoint(21, 1, RICImgRect(RICImgPoint(RICArg(12), 0), 7, 7), RICImgPoint(28, 1, RICImgRect(RICImgPoint(RICArg(13), 7), 7, 7), RICImgPoint(35, 1, RICImgRect(RICImgPoint(RICArg(14), 0), 7, 7), RICImgPoint(42, 1, RICImgRect(RICImgPoint(RICArg(15), 7), 7, 7), RICImgPoint(49, 1, RICImgRect(RICImgPoint(RICArg(16), 7), 7, 7), RICImgPoint(0, 1, RICImgRect(RICImgPoint(RICArg(17), 0), 7, 7), RICImgPoint(7, 1, RICImgRect(RICImgPoint(RICArg(18), 7), 7, 7), RICImgPoint(14, 1, RICImgRect(RICImgPoint(RICArg(19), 0), 7, 7), RICImgPoint(21, 1, RICImgRect(RICImgPoint(RICArg(20), 7), 7, 7), RICImgPoint(28, 1, RICImgRect(RICImgPoint(RICArg(21), 0), 7, 7), RICImgPoint(35, 1, RICImgRect(RICImgPoint(RICArg(22), 7), 7, 7), RICImgPoint(42, 1, RICImgRect(RICImgPoint(RICArg(23), 0), 7, 7), RICImgPoint(49, 1, RICImgRect(RICImgPoint(RICArg(24), 0), 7, 7), RICImgPoint(0, 1, RICImgRect(RICImgPoint(RICArg(25), 7), 7, 7), RICImgPoint(7, 1, RICImgRect(RICImgPoint(RICArg(26), 0), 7, 7), RICImgPoint(14, 1, RICImgRect(RICImgPoint(RICArg(27), 7), 7, 7), RICImgPoint(21, 1, RICImgRect(RICImgPoint(RICArg(28), 0), 7, 7), RICImgPoint(28, 1, RICImgRect(RICImgPoint(RICArg(29), 7), 7, 7), RICImgPoint(35, 1, RICImgRect(RICImgPoint(RICArg(30), 0), 7, 7), RICImgPoint(42, 1, RICImgRect(RICImgPoint(RICArg(31), 7), 7, 7), RICImgPoint(49, 1, RICImgRect(RICImgPoint(RICArg(32), 7), 7, 7), RICImgPoint(0,

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.117

ex_dispgaoutex.nxc

1821

RICOpCopyBits(0, 28)), RICOpCopyBits(0, 28)), RICOpCopyBits(0, 28)), RICOpCopyBits(0, 28)), RICOpCopyBits(0, 28)), RICOpCopyBits(0, 28)), RICOpCopyBits(0, 28)), RICOpCopyBits(0, 35)), RICOpCopyBits(0, 35)), RICOpCopyBits(0, 35)), RICOpCopyBits(0, 35)), RICOpCopyBits(0, 35)), RICOpCopyBits(0, 35)), RICOpCopyBits(0, 35)), RICOpCopyBits(0, 35)), RICOpCopyBits(0, 42)), RICOpCopyBits(0, 42)), RICOpCopyBits(0, 42)), RICOpCopyBits(0, 42)), RICOpCopyBits(0, 42)), RICOpCopyBits(0, 42)), RICOpCopyBits(0, 42)), RICOpCopyBits(0, 42)), RICOpCopyBits(0, 49)), RICOpCopyBits(0, 49)), RICOpCopyBits(0, 49)), RICOpCopyBits(0, 49)), RICOpCopyBits(0, 49)), RICOpCopyBits(0,

1, RICImgRect(RICImgPoint(RICArg(33), 0), 7, 7), RICImgPoint(7, 1, RICImgRect(RICImgPoint(RICArg(34), 7), 7, 7), RICImgPoint(14, 1, RICImgRect(RICImgPoint(RICArg(35), 0), 7, 7), RICImgPoint(21, 1, RICImgRect(RICImgPoint(RICArg(36), 7), 7, 7), RICImgPoint(28, 1, RICImgRect(RICImgPoint(RICArg(37), 0), 7, 7), RICImgPoint(35, 1, RICImgRect(RICImgPoint(RICArg(38), 7), 7, 7), RICImgPoint(42, 1, RICImgRect(RICImgPoint(RICArg(39), 0), 7, 7), RICImgPoint(49, 1, RICImgRect(RICImgPoint(RICArg(40), 0), 7, 7), RICImgPoint(0, 1, RICImgRect(RICImgPoint(RICArg(41), 7), 7, 7), RICImgPoint(7, 1, RICImgRect(RICImgPoint(RICArg(42), 0), 7, 7), RICImgPoint(14, 1, RICImgRect(RICImgPoint(RICArg(43), 7), 7, 7), RICImgPoint(21, 1, RICImgRect(RICImgPoint(RICArg(44), 0), 7, 7), RICImgPoint(28, 1, RICImgRect(RICImgPoint(RICArg(45), 7), 7, 7), RICImgPoint(35, 1, RICImgRect(RICImgPoint(RICArg(46), 0), 7, 7), RICImgPoint(42, 1, RICImgRect(RICImgPoint(RICArg(47), 7), 7, 7), RICImgPoint(49, 1, RICImgRect(RICImgPoint(RICArg(48), 7), 7, 7), RICImgPoint(0, 1, RICImgRect(RICImgPoint(RICArg(49), 0), 7, 7), RICImgPoint(7, 1, RICImgRect(RICImgPoint(RICArg(50), 7), 7, 7), RICImgPoint(14, 1, RICImgRect(RICImgPoint(RICArg(51), 0), 7, 7), RICImgPoint(21, 1, RICImgRect(RICImgPoint(RICArg(52), 7), 7, 7), RICImgPoint(28, 1, RICImgRect(RICImgPoint(RICArg(53), 0), 7, 7), RICImgPoint(35, 1, RICImgRect(RICImgPoint(RICArg(54), 7), 7, 7), RICImgPoint(42, 1, RICImgRect(RICImgPoint(RICArg(55), 0), 7, 7), RICImgPoint(49, 1, RICImgRect(RICImgPoint(RICArg(56), 0), 7, 7), RICImgPoint(0, 1, RICImgRect(RICImgPoint(RICArg(57), 7), 7, 7), RICImgPoint(7, 1, RICImgRect(RICImgPoint(RICArg(58), 0), 7, 7), RICImgPoint(14, 1, RICImgRect(RICImgPoint(RICArg(59), 7), 7, 7), RICImgPoint(21, 1, RICImgRect(RICImgPoint(RICArg(60), 0), 7, 7), RICImgPoint(28, 1, RICImgRect(RICImgPoint(RICArg(61), 7), 7, 7), RICImgPoint(35,

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.117

ex_dispgaoutex.nxc

1822

49)), RICOpCopyBits(0, 1, RICImgRect(RICImgPoint(RICArg(62), 0), 7, 7), RICImgPoint(42, 49)), RICOpCopyBits(0, 1, RICImgRect(RICImgPoint(RICArg(63), 7), 7, 7), RICImgPoint(49, 49)) }; #define #define #define #define #define #define #define #define A B C D E F G H 0 1 2 3 4 5 6 8

#define P(_file, _rank) (((_rank)-1)*8)+(_file) #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define A1 A2 A3 A4 A5 A6 A7 A8 B1 B2 B3 B4 B5 B6 B7 B8 C1 C2 C3 C4 C5 C6 C7 C8 D1 D2 D3 D4 D5 D6 D7 D8 P(A, P(A, P(A, P(A, P(A, P(A, P(A, P(A, P(B, P(B, P(B, P(B, P(B, P(B, P(B, P(B, P(C, P(C, P(C, P(C, P(C, P(C, P(C, P(C, P(D, P(D, P(D, P(D, P(D, P(D, P(D, P(D, 1) 2) 3) 4) 5) 6) 7) 8) 1) 2) 3) 4) 5) 6) 7) 8) 1) 2) 3) 4) 5) 6) 7) 8) 1) 2) 3) 4) 5) 6) 7) 8)

#define E1 P(E, 1) #define E2 P(E, 2) #define E3 P(E, 3)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.117

ex_dispgaoutex.nxc

1823

#define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define

E4 E5 E6 E7 E8 F1 F2 F3 F4 F5 F6 F7 F8 G1 G2 G3 G4 G5 G6 G7 G8 H1 H2 H3 H4 H5 H6 H7 H8

P(E, P(E, P(E, P(E, P(E, P(F, P(F, P(F, P(F, P(F, P(F, P(F, P(F, P(G, P(G, P(G, P(G, P(G, P(G, P(G, P(G, P(H, P(H, P(H, P(H, P(H, P(H, P(H, P(H,

4) 5) 6) 7) 8) 1) 2) 3) 4) 5) 6) 7) 8) 1) 2) 3) 4) 5) 6) 7) 8) 1) 2) 3) 4) 5) 6) 7) 8)

int b[] = { 64, 72, 56, 56, 48, 48, 48, 48, 48, 48, 48, 48, 40, 40, 32, 24, }; // A B

80, 56, 48, 48, 48, 48, 40, 16, C

88, 56, 48, 48, 48, 48, 40, 8, D

96, 56, 48, 48, 48, 48, 40, 0, E

80, 56, 48, 48, 48, 48, 40, 16, F

72, 56, 48, 48, 48, 48, 40, 24, G

64, 56, 48, 48, 48, 48, 40, 32 H

// // // // // // // //

1 2 3 4 5 6 7 8

#define Vacant 48 #define Move(_from, _to) \ b[_to] = b[_from]; \ b[_from] = Vacant; \ GraphicArrayOutEx( 8,8,Chess1_data , b, true); \ Wait(SEC_2); task main() { // setup board

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.118

ex_dispgout.nxc

1824

GraphicArrayOutEx( 8,8,Chess1_data, b, true); WaitSEC_2); Move(A2, A3); // Move(B7, B5); // Move(A3, A4); // Move(B5, B4); // Move(A4, A5); // Move(B4, B3); // Move(A5, A6); // while( true ); } white black white black white black white pawn pawn pawn pawn pawn pawn pawn from from from from from from from A2 B7 A3 B5 A4 B4 A5 to to to to to to to A3 B5 A4 B4 A5 B3 A6

9.118

ex_dispgout.nxc

This is an example of how to use the GraphicOut, SysCall, TextOut, CurrentTick, NumOut, Wait, and ClearScreen functions. It also demonstrates how to use the DrawGraphicArrayType structure.
#download "2c.ric" byte tmpData2[] = { 0x0A, 0x00, 0x07, 0x00, 0x00, 0x00, 0x14, 0x00, 0x14, 0x00, 0x0A, 0x00, 0x0A, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x1E, 0x00, 0x0A, 0x00}; DrawGraphicArrayType dgaArgs; string names[] = {"2c.ric" , "2l.ric" }; task main() { long tick; TextOut(0, LCD_LINE1, "testing"); tick = CurrentTick(); GraphicOut(10, 10, names[0]); tick = CurrentTick()-tick; NumOut(0, LCD_LINE8, tick); Wait(SEC_5); ClearScreen(); Wait(MS_500); TextOut(0, LCD_LINE1, "testing"); tick = CurrentTick(); dgaArgs.Location.X = 10; dgaArgs.Location.Y = 10; dgaArgs.Options = 0; dgaArgs.Data = tmpData2; SysCall(DrawGraphicArray, dgaArgs); tick = CurrentTick()-tick; NumOut(0, LCD_LINE8, tick); Wait(SEC_5); }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.119

ex_dispgoutex.nxc

1825

9.119

ex_dispgoutex.nxc

This is an example of how to use the GraphicOutEx and Wait functions.


#download "letters.ric" string fnames[] = {"letters.ric", "letter2.ric" }; int Values[] = {0}; void Display( int n ) { Values[0]=n*10; GraphicOutEx(Values[0], Random(30), fnames[0], Values, DRAW_OPT_CLEAR_WHOLE_SCREEN); Wait(MS_200); } task main() { while( true ) { for( int i=0; i<9; i++ ) Display( i ); } }

9.120

ex_DisplayDisplay.nxc

This is an example of how to use the DisplayDisplay function.


x = DisplayDisplay();

9.121

ex_DisplayEraseMask.nxc

This is an example of how to use the DisplayEraseMask function.


x = DisplayEraseMask();

9.122

ex_DisplayFlags.nxc

This is an example of how to use the DisplayFlags function.


x = DisplayFlags();

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.123

ex_displayfont.nxc

1826

9.123

ex_displayfont.nxc

This is an example of how to use the DisplayFont function.


const byte NewFont[] = { 0x04,0x00, // Graphics Format 0x02,0x40, // Graphics DataSize 0x10, // Graphics Count X 0x06, // Graphics Count Y 0x06, // Graphics Width 0x08, // Graphics Height 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x5F,0x06,0x00,0x00,0x07,0x03,0x00,0x07 ,0x03,0x00,0x24,0x7E,0x24,0x7E,0x24,0x00,0x24,0x2B,0x6A,0x12,0x00,0x00,0x63,0x13, 0x08,0x64,0x63,0x00,0x30,0x4C,0x52,0x22,0x50,0x00,0x00,0x07,0x03,0x00,0x00,0x00,0 x00,0x3E,0x41,0x00,0x00,0x00,0x00,0x41,0x3E,0x00,0x00,0x00,0x08,0x3E,0x1C,0x3E,0x 08,0x00,0x08,0x08,0x3E,0x08,0x08,0x00,0x80,0x60,0x60,0x00,0x00,0x00,0x08,0x08,0x0 8,0x08,0x08,0x00,0x00,0x60,0x60,0x00,0x00,0x00,0x20,0x10,0x08,0x04,0x02,0x00, 0x3E,0x51,0x49,0x45,0x3E,0x00,0x00,0x42,0x7F,0x40,0x00,0x00,0x62,0x51,0x49,0x49 ,0x46,0x00,0x22,0x49,0x49,0x49,0x36,0x00,0x18,0x14,0x12,0x7F,0x10,0x00,0x2F,0x49, 0x49,0x49,0x31,0x00,0x3C,0x4A,0x49,0x49,0x30,0x00,0x01,0x71,0x09,0x05,0x03,0x00,0 x36,0x49,0x49,0x49,0x36,0x00,0x06,0x49,0x49,0x29,0x1E,0x00,0x00,0x6C,0x6C,0x00,0x 00,0x00,0x00,0xEC,0x6C,0x00,0x00,0x00,0x08,0x14,0x22,0x41,0x00,0x00,0x24,0x24,0x2 4,0x24,0x24,0x00,0x00,0x41,0x22,0x14,0x08,0x00,0x02,0x01,0x59,0x09,0x06,0x00, 0x3E,0x41,0x5D,0x55,0x1E,0x00,0x7E,0x11,0x11,0x11,0x7E,0x00,0x7F,0x49,0x49,0x49 ,0x36,0x00,0x3E,0x41,0x41,0x41,0x22,0x00,0x7F,0x41,0x41,0x41,0x3E,0x00,0x7F,0x49, 0x49,0x49,0x41,0x00,0x7F,0x09,0x09,0x09,0x01,0x00,0x3E,0x41,0x49,0x49,0x7A,0x00,0 x7F,0x08,0x08,0x08,0x7F,0x00,0x00,0x41,0x7F,0x41,0x00,0x00,0x30,0x40,0x40,0x40,0x 3F,0x00,0x7F,0x08,0x14,0x22,0x41,0x00,0x7F,0x40,0x40,0x40,0x40,0x00,0x7F,0x02,0x0 4,0x02,0x7F,0x00,0x7F,0x02,0x04,0x08,0x7F,0x00,0x3E,0x41,0x41,0x41,0x3E,0x00, 0x7F,0x09,0x09,0x09,0x06,0x00,0x3E,0x41,0x51,0x21,0x5E,0x00,0x7F,0x09,0x09,0x19 ,0x66,0x00,0x26,0x49,0x49,0x49,0x32,0x00,0x01,0x01,0x7F,0x01,0x01,0x00,0x3F,0x40, 0x40,0x40,0x3F,0x00,0x1F,0x20,0x40,0x20,0x1F,0x00,0x3F,0x40,0x3C,0x40,0x3F,0x00,0 x63,0x14,0x08,0x14,0x63,0x00,0x07,0x08,0x70,0x08,0x07,0x00,0x71,0x49,0x45,0x43,0x 00,0x00,0x00,0x7F,0x41,0x41,0x00,0x00,0x02,0x04,0x08,0x10,0x20,0x00,0x00,0x41,0x4 1,0x7F,0x00,0x00,0x04,0x02,0x01,0x02,0x04,0x00,0x80,0x80,0x80,0x80,0x80,0x00, 0x00,0x02,0x05,0x02,0x00,0x00,0x20,0x54,0x54,0x54,0x78,0x00,0x7F,0x44,0x44,0x44 ,0x38,0x00,0x38,0x44,0x44,0x44,0x28,0x00,0x38,0x44,0x44,0x44,0x7F,0x00,0x38,0x54, 0x54,0x54,0x08,0x00,0x08,0x7E,0x09,0x09,0x00,0x00,0x18,0x24,0xA4,0xA4,0xFC,0x00,0 x7F,0x04,0x04,0x78,0x00,0x00,0x00,0x00,0x7D,0x40,0x00,0x00,0x40,0x80,0x84,0x7D,0x 00,0x00,0x7F,0x10,0x28,0x44,0x00,0x00,0x00,0x00,0x7F,0x40,0x00,0x00,0x7C,0x04,0x1 8,0x04,0x78,0x00,0x7C,0x04,0x04,0x78,0x00,0x00,0x38,0x44,0x44,0x44,0x38,0x00, 0xFC,0x44,0x44,0x44,0x38,0x00,0x38,0x44,0x44,0x44,0xFC,0x00,0x44,0x78,0x44,0x04 ,0x08,0x00,0x08,0x54,0x54,0x54,0x20,0x00,0x04,0x3E,0x44,0x24,0x00,0x00,0x3C,0x40, 0x20,0x7C,0x00,0x00,0x1C,0x20,0x40,0x20,0x1C,0x00,0x3C,0x60,0x30,0x60,0x3C,0x00,0 x6C,0x10,0x10,0x6C,0x00,0x00,0x9C,0xA0,0x60,0x3C,0x00,0x00,0x64,0x54,0x54,0x4C,0x 00,0x00,0x08,0x3E,0x41,0x41,0x00,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0x00,0x41,0x4 1,0x3E,0x08,0x00,0x02,0x01,0x02,0x01,0x00,0x00,0x10,0x20,0x40,0x38,0x07,0x00 }; task main() { unsigned long ptr, pOldFont; byte myData[800]; ptr = addr(NewFont); TextOut(0, LCD_LINE1, FormatNum("%x", ptr)); pOldFont = DisplayFont();

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.124

ex_DisplayTextLinesCenterFlags.nxc

1827

SetDisplayFont(ptr); TextOut(0, LCD_LINE2, "Testing 1, 2, 3"); SetDisplayFont(pOldFont); TextOut(0, LCD_LINE4, "Testing 1, 2, 3"); Wait(SEC_10); }

9.124

ex_DisplayTextLinesCenterFlags.nxc

This is an example of how to use the DisplayTextLinesCenterFlags function.


x = DisplayTextLinesCenterFlags();

9.125

ex_DisplayUpdateMask.nxc

This is an example of how to use the DisplayUpdateMask function.


x = DisplayUpdateMask();

9.126

ex_dispmisc.nxc

This is an example of how to use the DisplayEraseMask, DisplayUpdateMask, DisplayDisplay, DisplayFlags, DisplayTextLinesCenterFlags functions, SetDisplayEraseMask, SetDisplayUpdateMask, SetDisplayDisplay, SetDisplayFlags, and SetDisplayTextLinesCenterFlags functions,
task main() { unsigned long addr = DisplayDisplay(); NumOut(0, LCD_LINE1, DisplayEraseMask()); NumOut(0, LCD_LINE2, DisplayUpdateMask()); NumOut(0, LCD_LINE3, addr); NumOut(0, LCD_LINE4, DisplayFlags()); NumOut(0, LCD_LINE5, DisplayTextLinesCenterFlags()); Wait(SEC_4); // setting the display address function can be ... dangerous SetDisplayDisplay(addr); // fiddling with the display flags is also dangerous unsigned long flags = DisplayFlags(); flags |= DISPLAY_POPUP; SetDisplayFlags(flags); Wait(SEC_2); flags = flags & (~DISPLAY_POPUP); SetDisplayFlags(flags); Wait(SEC_1); SetDisplayEraseMask(DisplayEraseMask()); SetDisplayUpdateMask(DisplayUpdateMask());

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.127

ex_DISTNxDistance.nxc

1828

SetDisplayTextLinesCenterFlags(DisplayTextLinesCenterFlags()); Wait(SEC_2); }

9.127

ex_DISTNxDistance.nxc

This is an example of how to use the DISTNxDistance function.


int dist = DISTNxDistance(S1, MS_ADDR_DISTNX);

9.128

ex_DISTNxGP2D12.nxc

This is an example of how to use the DISTNxGP2D12 function.


char result = DISTNxGP2D12(S1, MS_ADDR_DISTNX);

9.129

ex_DISTNxGP2D120.nxc

This is an example of how to use the DISTNxGP2D120 function.


char result = DISTNxGP2D120(S1, MS_ADDR_DISTNX);

9.130

ex_DISTNxGP2YA02.nxc

This is an example of how to use the DISTNxGP2YA02 function.


char result = DISTNxGP2YA02(S1, MS_ADDR_DISTNX);

9.131

ex_DISTNxGP2YA21.nxc

This is an example of how to use the DISTNxGP2YA21 function.


char result = DISTNxGP2YA21(S1, MS_ADDR_DISTNX);

9.132

ex_DISTNxMaxDistance.nxc

This is an example of how to use the DISTNxMaxDistance function.


int dist = DISTNxMaxDistance(S1, MS_ADDR_DISTNX);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.133

ex_DISTNxMinDistance.nxc

1829

9.133

ex_DISTNxMinDistance.nxc

This is an example of how to use the DISTNxMinDistance function.


int dist = DISTNxMinDistance(S1, MS_ADDR_DISTNX);

9.134

ex_DISTNxModuleType.nxc

This is an example of how to use the DISTNxModuleType function.


int modtype = DISTNxModuleType(S1, MS_ADDR_DISTNX);

9.135

ex_DISTNxNumPoints.nxc

This is an example of how to use the DISTNxNumPoints function.


int numpoints = DISTNxNumPoints(S1, MS_ADDR_DISTNX);

9.136

ex_DISTNxVoltage.nxc

This is an example of how to use the DISTNxVoltage function.


int volt = DISTNxVoltage(S1, MS_ADDR_DISTNX);

9.137

ex_div.nxc

This is an example of how to use the div function.


task main() { long x, y; x = 31464; y = 33; div_t r; r = div(x, y); NumOut(0, LCD_LINE1, r.quot); NumOut(0, LCD_LINE2, r.rem); Wait(SEC_3); }

9.138

ex_EllipseOut.nxc

This is an example of how to use the EllipseOut and Random functions.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.139

ex_exp.nxc

1830

task main() { repeat (10) EllipseOut(50, 32, 20+Random(15), 20+Random(10), DRAW_OPT_FILL_SHAPE| DRAW_OPT_LOGICAL_XOR); while(true); }

9.139

ex_exp.nxc

This is an example of how to use the exp function.


y = exp(x);

9.140

ex_fclose.nxc

This is an example of how to use the fclose function.


result = fclose(handle);

9.141

ex_feof.nxc

This is an example of how to use the feof function.


int i = feof(handle);

9.142

ex_fush.nxc

This is an example of how to use the fush function.


int i = fflush(handle);

9.143

ex_fgetc.nxc

This is an example of how to use the fgetc function.


char val = fgetc(handle);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.144

ex_fgets.nxc

1831

9.144

ex_fgets.nxc

This is an example of how to use the fgets function.


fgets(msg, 10, handle);

9.145

ex_le_system.nxc

This is an example of how to use the PlayTone, Wait, Stop, TextOut, OpenFileAppend, CloseFile, OpenFileRead, FormatNum, Write, Read, and CircleOut functions. This program is intended to serve as an introduction to data les on the NXT. It focuses on handling the codes returned by the le systems API calls, which is an important aspect of the API that is all too often neglected by programmers. The program deals with a data le describing circles. On each run, it adds a new circle record to the data le. Then it reads in the whole data le and displays all the circles on NXT screen. It creates the data le if doesnt already exist. If you run it several times in seccession, you will ll the data le and get a le-is-full exception. The data ie created by this program is not visible on the NXT. To delete the le, circles.dat, you can use the NeXT Explorer or the example program ex_delete_data_le::nxc.
// // // // // // // // // // // // // // // ex_file_system.nxc This program is intended to serve as an introduction to data files on the NXT. It focuses on handling the codes returned by the file systems API calls, which is an important aspect of the API that is all too often neglected by programmers. The program deals with a data file describing circles. On each run, it adds a new circle record to the data file. Then it reads in the whole data file and displays all the circles on NXT screen. It creates the data file if doesnt already exist. If you run it several times in seccession, you will fill the data file and get a file-is-full exception. The data flie created by this program is not visible on the NXT. To delete the file, circles.dat, you can use the NeXT Explorer or the example program ex_delete_data_file.nxc. MIN_R MAX_R MIN_X MAX_X MIN_Y MAX_Y 10 30 20 80 10 54

#define #define #define #define #define #define

byte handle = 0; // file handle #define FILE_NAME "circles.dat" // The file size is made small so it will fill up quickly. #define RECORDS 4 #define RECORD_SIZE 3 #define FILE_SIZE (RECORD_SIZE * RECORDS)

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.145

ex_le_system.nxc

1832

// This struct defines the data records. struct circle { byte r; // radius byte cx; // center x-coordiate byte cy; // center y-coordiate }; // Initialize a circle with random radius r and center (cx, cy). void init_circle(circle & c) { c.r = MIN_R + Random(MAX_R - MIN_R); c.cx = MIN_X + Random(MAX_X - MIN_X); c.cy = MIN_Y + Random(MAX_Y - MIN_Y); } // Make sure file is closed whether or not file operations succeed or fail. void shutdown(const int delay) { if (handle) CloseFile(handle); // Get users attention. PlayTone(TONE_C5, SEC_1); // Give the user time to read screen messages. Wait(delay); Stop(true); } // Display a return code from a file sytem API call on the NXT screen. void rtn_code_out(const unsigned int code) { TextOut(0, LCD_LINE2, "code "); TextOut(50, LCD_LINE2, FormatNum("%04x", code)); } // Open the data file for writing. void open_for_write() { unsigned int file_size = FILE_SIZE; handle = 0; // Start with the assumptions the file doesnt exist and needs to be created. unsigned int rtn_code = CreateFile(FILE_NAME, file_size, handle); // If the file already exists, open it with the intent of adding to the data // that is already there. if (rtn_code == LDR_FILEEXISTS) rtn_code = OpenFileAppend(FILE_NAME, file_size, handle); // Return code handling switch (rtn_code) { case LDR_SUCCESS: return; case LDR_FILEISFULL: TextOut(0, LCD_LINE1, "file is full "); break; default: // Unanticipated exception. TextOut(0, LCD_LINE1, "write open ");

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.145

ex_le_system.nxc

1833

rtn_code_out(rtn_code); break; } shutdown(SEC_8); } // Open the data file for reading. void open_for_read() { unsigned int file_size = FILE_SIZE; handle = 0; unsigned int rtn_code = OpenFileRead(FILE_NAME, file_size, handle); // Return code handling if (rtn_code != LDR_SUCCESS) { // Unanticipated exception. TextOut(0, LCD_LINE1, "read open "); rtn_code_out(rtn_code); shutdown(SEC_8); } } // Write one circle record to the data file. void write_recd(const circle recd) { unsigned int rtn_code = Write(handle, recd); // Return code handling if (rtn_code != LDR_SUCCESS) { switch (rtn_code) { case LDR_EOFEXPECTED: TextOut(0, LCD_LINE1, "no more space "); break; default: // Unanticipated exception. TextOut(0, LCD_LINE1, "write failed "); rtn_code_out(rtn_code); break; } shutdown(SEC_8); } } // Read all the circle records from the data file. Display each circle as it is // read. void read_all(circle & recd) { while (true) { unsigned int rtn_code = Read(handle, recd); // rtn_code_out(rtn_code); // Return code handling switch (rtn_code) { case LDR_SUCCESS: // Record has been read. Display circle described by it.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.146

ex_ndrstle.nxc

1834

CircleOut(recd.cx, recd.cy, recd.r); Wait(SEC_2); break; case LDR_ENDOFFILE: // No more data to read. return; default: // Unanticipated exception. TextOut(0, LCD_LINE1, "read failed rtn_code_out(rtn_code); shutdown(SEC_8); } } } task main() { circle c; open_for_write(); init_circle(c); write_recd(c); CloseFile(handle); open_for_read(); read_all(c); shutdown(SEC_8); }

");

9.146

ex_ndrstle.nxc

This is an example of how to use the FindFirstFile function.


task main() { byte handle; unsigned int result, fsize; string fname = "*.ric"; result = FindFirstFile(fname, handle); NumOut(0, LCD_LINE1, result, true); int i=1; while (result == LDR_SUCCESS) { NumOut(0, LCD_LINE2, i, false); TextOut(0, LCD_LINE3, fname, false); Wait(1500); // fname = ""; result = FindNextFile(fname, handle); NumOut(0, LCD_LINE1, result, true); i++; } CloseFile(handle); Wait(3000); }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.147

ex_ndnextle.nxc

1835

9.147

ex_ndnextle.nxc

This is an example of how to use the FindNextFile function.


task main() { byte handle; unsigned int result, fsize; string fname = "*.ric"; result = FindFirstFile(fname, handle); NumOut(0, LCD_LINE1, result, true); int i=1; while (result == LDR_SUCCESS) { NumOut(0, LCD_LINE2, i, false); TextOut(0, LCD_LINE3, fname, false); Wait(1500); // fname = ""; result = FindNextFile(fname, handle); NumOut(0, LCD_LINE1, result, true); i++; } CloseFile(handle); Wait(3000); }

9.148

ex_FirstTick.nxc

This is an example of how to use the FirstTick function.


unsigned int x = FirstTick();

9.149

ex_Flatten.nxc

This is an example of how to use the Flatten function.


msg = Flatten(48); // returns "0" since 48 == ascii("0")

9.150

ex_FlattenVar.nxc

This is an example of how to use the FlattenVar function.


task main() { long data[] = {-50123, 68142, 128176, -45123}; long data2[4]; float fdata[] = {12.123, 3.14159, 2.68}; float fdata2[3];

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.151

ex_oat.nxc

1836

NumOut(0, LCD_LINE1, data[0]); NumOut(0, LCD_LINE2, fdata[1]); string sdata = FlattenVar(data); string tmp; // transfer the string to another NXT tmp = sdata; UnflattenVar(tmp, data2); NumOut(0, LCD_LINE3, data2[0]); sdata = FlattenVar(fdata); // transfer the string to another NXT tmp = sdata; UnflattenVar(tmp, fdata2); NumOut(0, LCD_LINE4, fdata2[1]); Wait(SEC_5); }

9.151

ex_oat.nxc

This is an example of how to use the Float function.


Float(OUT_A); // float output A

9.152

ex_oor.nxc

This is an example of how to use the oor function.


y = floor(x);

9.153

ex_Follows.nxc

This is an example of how to use the Follows statement.


Follows(main);

9.154

ex_fopen.nxc

This is an example of how to use the fopen function.


byte handle = fopen("test.txt", "r");

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.155

ex_ForceOff.nxc

1837

9.155

ex_ForceOff.nxc

This is an example of how to use the ForceOff function.


ForceOff(true);

9.156

ex_FormatNum.nxc

This is an example of how to use the FormatNum function.


msg = FormatNum("value = %d", x);

9.157

ex_fprintf.nxc

This is an example of how to use the fprintf function.


fprintf(handle, "value = %d", value);

9.158

ex_fputc.nxc

This is an example of how to use the fputc function.


fputc(ch, handle);

9.159

ex_fputs.nxc

This is an example of how to use the fputs function.


fputs(msg, handle);

9.160

ex_frac.nxc

This is an example of how to use the frac function.


y = frac(x);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.161

ex_FreeMemory.nxc

1838

9.161

ex_FreeMemory.nxc

This is an example of how to use the FreeMemory function.


x = FreeMemory();

9.162

ex_fseek.nxc

This is an example of how to use the fseek function.


fseek(handle, 10, SEEK_CUR);

9.163

ex_ftell.nxc

This is an example of how to use the ftell function.


long i = ftell(handle);

9.164

ex_GetBrickDataAddress.nxc

This is an example of how to use the GetBrickDataAddress function.


task main() { byte data[]; GetBrickDataAddress(data); // 6 bytes plus null TextOut(0, LCD_LINE1, StrCat( FormatNum("%2.2x", data[0]), FormatNum("%2.2x", data[1]), FormatNum("%2.2x", data[2]), FormatNum("%2.2x", data[3]), FormatNum("%2.2x", data[4]), FormatNum("%2.2x", data[5]))); while (true); }

9.165

ex_GetBTConnectionAddress.nxc

This is an example of how to use the GetBTConnectionAddress function.


GetBTConnectionAddress(0, buffer);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.166

ex_GetBTDeviceAddress.nxc

1839

9.166

ex_GetBTDeviceAddress.nxc

This is an example of how to use the GetBTDeviceAddress function.


GetBTDeviceAddress(0, buffer);

9.167

ex_GetBTInputBuffer.nxc

This is an example of how to use the GetBTInputBuffer function.


GetBTInputBuffer(0, 10, buffer);

9.168

ex_GetBTOutputBuffer.nxc

This is an example of how to use the GetBTOutputBuffer function.


GetBTOutputBuffer(0, 10, buffer);

9.169

ex_getc.nxc

This is an example of how to use the getc function.


char val = getc(handle);

9.170

ex_getchar.nxc

This is an example of how to use the getchar function.


task main() { SetLongAbort(true); while (true) { NumOut(0, LCD_LINE1, getchar(), true); Wait(MS_5); } }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.171

ex_GetDisplayNormal.nxc

1840

9.171

ex_GetDisplayNormal.nxc

This is an example of how to use the GetDisplayNormal function.


GetDisplayNormal(0, TEXTLINE_1, 8, ScreenMem);

9.172

ex_GetDisplayPopup.nxc

This is an example of how to use the GetDisplayPopup function.


GetDisplayPopup(0, TEXTLINE_1, 8, PopupMem);

9.173

ex_GetHSInputBuffer.nxc

This is an example of how to use the GetHSInputBuffer function.


GetHSInputBuffer(0, 10, buffer);

9.174

ex_GetHSOutputBuffer.nxc

This is an example of how to use the GetHSOutputBuffer function.


GetHSOutputBuffer(0, 10, buffer);

9.175

ex_GetInput.nxc

This is an example of how to use the GetInput function.


x = GetInput(S1, Type);

9.176

ex_GetLastResponseInfo.nxc

This is an example of how to use the GetLastResponseInfo function.


byte len; byte cmd; byte buf[]; char result = GetLastResponseInfo(true, len, cmd, buf);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.177

ex_GetLSInputBuffer.nxc

1841

9.177

ex_GetLSInputBuffer.nxc

This is an example of how to use the GetLSInputBuffer function.


GetLSInputBuffer(S1, 0, 8, buffer);

9.178

ex_GetLSOutputBuffer.nxc

This is an example of how to use the GetLSOutputBuffer function.


GetLSOutputBuffer(S1, 0, 8, outbuffer);

9.179

ex_getmemoryinfo.nxc

This is an example of how to use the GetMemoryInfo function.


task main() { byte data[]; byte data2[]; int data3[]; int ps, ds; char result = GetMemoryInfo(false, ps, ds); NumOut(0, LCD_LINE1, ps); NumOut(0, LCD_LINE2, ds); Wait(SEC_5); ClearScreen(); Wait(SEC_1); /* result = GetMemoryInfo(true, ps, ds); NumOut(0, LCD_LINE1, ps); NumOut(0, LCD_LINE2, ds); Wait(SEC_5); ClearScreen(); Wait(SEC_1); */ ArrayInit(data, 10, 1000); data[10]++; ps = data[10]; result = GetMemoryInfo(false, ps, ds); NumOut(0, LCD_LINE1, ps); NumOut(0, LCD_LINE2, ds); NumOut(0, LCD_LINE8, data[10]); Wait(SEC_5); ClearScreen(); Wait(SEC_1); data2 = data; result = GetMemoryInfo(false, ps, ds); NumOut(0, LCD_LINE1, ps); NumOut(0, LCD_LINE2, ds);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.180

ex_getoutput.nxc

1842

NumOut(0, LCD_LINE8, data2[10]); Wait(SEC_5); ClearScreen(); Wait(SEC_1); ArrayBuild(data3, ps, ds, ps, ds, ps, ds, ps, ds); result = GetMemoryInfo(false, ps, ds); NumOut(0, LCD_LINE1, ps); NumOut(0, LCD_LINE2, ds); NumOut(0, LCD_LINE8, data3[3]); Wait(SEC_5); ClearScreen(); Wait(SEC_1); ArrayInit(data2, 5, 1); result = GetMemoryInfo(false, ps, ds); NumOut(0, LCD_LINE1, ps); NumOut(0, LCD_LINE2, ds); NumOut(0, LCD_LINE8, data2[0]); Wait(SEC_5); ClearScreen(); Wait(SEC_1); result = GetMemoryInfo(true, ps, ds); NumOut(0, LCD_LINE1, ps); NumOut(0, LCD_LINE2, ds); Wait(SEC_5); ClearScreen(); Wait(SEC_1); while(true); }

9.180

ex_getoutput.nxc

This is an example of how to use the GetOutput function.


x = GetOutput(OUT_A, TachoLimit);

9.181

ex_GetUSBInputBuffer.nxc

This is an example of how to use the GetUSBInputBuffer function.


GetUSBInputBuffer(0, 10, buffer);

9.182

ex_GetUSBOutputBuffer.nxc

This is an example of how to use the GetUSBOutputBuffer function.


GetUSBOutputBuffer(0, 10, buffer);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.183

ex_GetUSBPollBuffer.nxc

1843

9.183

ex_GetUSBPollBuffer.nxc

This is an example of how to use the GetUSBPollBuffer function.


GetUSBPollBuffer(0, 10, buffer);

9.184

ex_GraphicOut.nxc

This is an example of how to use the GraphicOut function.


GraphicOut(40, 40, "image.ric");

9.185

ex_GraphicOutEx.nxc

This is an example of how to use the GraphicOutEx function.


GraphicOutEx(40, 40, "image.ric", variables);

9.186

ex_HSFlags.nxc

This is an example of how to use the HSFlags function.


byte x = HSFlags();

9.187

ex_HSInputBufferInPtr.nxc

This is an example of how to use the HSInputBufferInPtr function.


byte x = HSInputBufferInPtr();

9.188

ex_HSInputBufferOutPtr.nxc

This is an example of how to use the HSInputBufferOutPtr function.


byte x = HSInputBufferOutPtr();

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.189

ex_HSMode.nxc

1844

9.189

ex_HSMode.nxc

This is an example of how to use the HSMode function.


int mode = HSMode();

9.190

ex_HSOutputBufferInPtr.nxc

This is an example of how to use the HSOutputBufferInPtr function.


byte x = HSOutputBufferInPtr();

9.191

ex_HSOutputBufferOutPtr.nxc

This is an example of how to use the HSOutputBufferOutPtr function.


byte x = HSOutputBufferOutPtr();

9.192

ex_HSSpeed.nxc

This is an example of how to use the HSSpeed function.


byte x = HSSpeed();

9.193

ex_HSState.nxc

This is an example of how to use the HSState function.


byte x = HSState();

9.194

ex_HTGyroTest.nxc

This is an example of how to use the SetSensorHTGyro, SensorHTGyro, Wait, TextOut, NumOut, and ButtonPressed functions.
//============================================================================= // HiTechnic Gyro Test //

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.194

ex_HTGyroTest.nxc

1845

#define GYRO

IN_1

#define SAMPLESIZE 100 task main() { int i, y, d; int v, offset; float gyroAvg, gyroSum = 0; int data[SAMPLESIZE]; int cSet[7]; SetSensorHTGyro(GYRO); // Let user get finger off start button before starting sampling Wait(1000); for (i=0; i<SAMPLESIZE; i++) { v = SensorHTGyro(GYRO); data[i] = v; gyroSum += v; Wait(4); } // Display floating point gyro average gyroAvg = gyroSum/SAMPLESIZE; TextOut(0, LCD_LINE1, "Avg: "); NumOut(6*4, LCD_LINE1, gyroAvg); // Round to nearest int offset = gyroAvg+0.5; // Go through sample set and see how many are // offset-3, offset-2, offset-1, offset, offset+1, offset+2, offset+3 for (i=0; i<SAMPLESIZE; i++) { d = data[i] - offset; if (d < -3) d = -3; if (d > 3) d = 3; d += 3; cSet[d]++; } // Display on the screen now many of each value was in the sample y = LCD_LINE2; for (i=0; i<7; i++) { if (i==0) TextOut(0, y, "<= :"); else if (i==6) TextOut(0, y, ">= :" ); else TextOut(0, y, "== :"); NumOut(6*2, y, offset+i-3); NumOut(6*6, y, cSet[i]); y-= 8;

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.195

ex_HTIRTrain.nxc

1846

} // Keep display on screen until button pressed until(ButtonPressed(BTNCENTER, false)) Wait(100); }

9.195

ex_HTIRTrain.nxc

This is an example of how to use the HTIRTrain function.


HTIRTrain(S1, TRAIN_CHANNEL_1, TRAIN_FUNC_INCR_SPEED);

9.196

ex_HTPFComboDirect.nxc

This is an example of how to use the HTPFComboDirect function.


HTPFComboDirect(S1, PF_CHANNEL_1, PF_CMD_STOP, PF_CMD_FWD);

9.197

ex_HTPFComboPWM.nxc

This is an example of how to use the HTPFComboPWM function.


HTPFComboPWM(S1, PF_CHANNEL_1, PF_PWM_REV4, PF_PWM_FWD5);

9.198

ex_HTPFRawOutput.nxc

This is an example of how to use the HTPFRawOutput function.


HTPFRawOutput(S1, 0x0a, 0x01, 0x02);

9.199

ex_HTPFRepeat.nxc

This is an example of how to use the HTPFRepeat function.


HTPFRepeat(S1, 5, 100);

9.200

ex_HTPFSingleOutputCST.nxc

This is an example of how to use the HTPFSingleOutputCST function.


HTPFSingleOutputCST(S1, PF_CHANNEL_1, PF_OUT_A, PF_CST_SET1_SET2);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.201

ex_HTPFSingleOutputPWM.nxc

1847

9.201

ex_HTPFSingleOutputPWM.nxc

This is an example of how to use the HTPFSingleOutputPWM function.


HTPFSingleOutputPWM(S1, PF_CHANNEL_1, PF_OUT_A, PF_PWM_FWD5);

9.202

ex_HTPFSinglePin.nxc

This is an example of how to use the HTPFSinglePin function.


HTPFSinglePin(S1, PF_CHANNEL_1, PF_OUT_A, PF_PIN_C1, PF_FUNC_SET, true);

9.203

ex_HTPFTrain.nxc

This is an example of how to use the HTPFTrain function.


HTPFTrain(S1, PF_CHANNEL_1, TRAIN_FUNC_INCR_SPEED);

9.204

ex_HTRCXAddToDatalog.nxc

This is an example of how to use the HTRCXAddToDatalog function.


HTRCXAddToDatalog(RCX_InputValueSrc, S1);

9.205

ex_HTRCXBatteryLevel.nxc

This is an example of how to use the HTRCXBatteryLevel function.


x = HTRCXBatteryLevel();

9.206

ex_HTRCXClearAllEvents.nxc

This is an example of how to use the HTRCXClearAllEvents function.


HTRCXClearAllEvents();

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.207

ex_HTRCXClearCounter.nxc

1848

9.207

ex_HTRCXClearCounter.nxc

This is an example of how to use the HTRCXClearCounter function.


HTRCXClearCounter(0);

9.208

ex_HTRCXClearMsg.nxc

This is an example of how to use the HTRCXClearMsg function.


HTRCXClearMsg();

9.209

ex_HTRCXClearSensor.nxc

This is an example of how to use the HTRCXClearSensor function.


HTRCXClearSensor(S1);

9.210

ex_HTRCXClearSound.nxc

This is an example of how to use the HTRCXClearSound function.


HTRCXClearSound();

9.211

ex_HTRCXClearTimer.nxc

This is an example of how to use the HTRCXClearTimer function.


HTRCXClearTimer(0);

9.212

ex_HTRCXCreateDatalog.nxc

This is an example of how to use the HTRCXCreateDatalog function.


HTRCXCreateDatalog(50);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.213

ex_HTRCXDecCounter.nxc

1849

9.213

ex_HTRCXDecCounter.nxc

This is an example of how to use the HTRCXDecCounter function.


HTRCXDecCounter(0);

9.214

ex_HTRCXDeleteSub.nxc

This is an example of how to use the HTRCXDeleteSub function.


HTRCXDeleteSub(2);

9.215

ex_HTRCXDeleteSubs.nxc

This is an example of how to use the HTRCXDeleteSubs function.


HTRCXDeleteSubs();

9.216

ex_HTRCXDeleteTask.nxc

This is an example of how to use the HTRCXDeleteTask function.


HTRCXDeleteTask(3);

9.217

ex_HTRCXDeleteTasks.nxc

This is an example of how to use the HTRCXDeleteTasks function.


HTRCXDeleteTasks();

9.218

ex_HTRCXDisableOutput.nxc

This is an example of how to use the HTRCXDisableOutput function.


HTRCXDisableOutput(RCX_OUT_A);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.219

ex_HTRCXEnableOutput.nxc

1850

9.219

ex_HTRCXEnableOutput.nxc

This is an example of how to use the HTRCXEnableOutput function.


HTRCXEnableOutput(RCX_OUT_A);

9.220

ex_HTRCXEvent.nxc

This is an example of how to use the HTRCXEvent function.


HTRCXEvent(RCX_ConstantSrc, 2);

9.221

ex_HTRCXFloat.nxc

This is an example of how to use the HTRCXFloat function.


HTRCXFloat(RCX_OUT_A);

9.222

ex_HTRCXFwd.nxc

This is an example of how to use the HTRCXFwd function.


HTRCXFwd(RCX_OUT_A);

9.223

ex_HTRCXIncCounter.nxc

This is an example of how to use the HTRCXIncCounter function.


HTRCXIncCounter(0);

9.224

ex_HTRCXInvertOutput.nxc

This is an example of how to use the HTRCXInvertOutput function.


HTRCXInvertOutput(RCX_OUT_A);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.225

ex_HTRCXMuteSound.nxc

1851

9.225

ex_HTRCXMuteSound.nxc

This is an example of how to use the HTRCXMuteSound function.


HTRCXMuteSound();

9.226

ex_HTRCXObvertOutput.nxc

This is an example of how to use the HTRCXObvertOutput function.


HTRCXObvertOutput(RCX_OUT_A);

9.227

ex_HTRCXOff.nxc

This is an example of how to use the HTRCXOff function.


HTRCXOff(RCX_OUT_A);

9.228

ex_HTRCXOn.nxc

This is an example of how to use the HTRCXOn function.


HTRCXOn(RCX_OUT_A);

9.229

ex_HTRCXOnFor.nxc

This is an example of how to use the HTRCXOnFor function.


HTRCXOnFor(RCX_OUT_A, 100);

9.230

ex_HTRCXOnFwd.nxc

This is an example of how to use the HTRCXOnFwd function.


HTRCXOnFwd(RCX_OUT_A);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.231

ex_HTRCXOnRev.nxc

1852

9.231

ex_HTRCXOnRev.nxc

This is an example of how to use the HTRCXOnRev function.


HTRCXOnRev(RCX_OUT_A);

9.232

ex_HTRCXPBTurnOff.nxc

This is an example of how to use the HTRCXPBTurnOff function.


HTRCXPBTurnOff();

9.233

ex_HTRCXPing.nxc

This is an example of how to use the HTRCXPing function.


HTRCXPing();

9.234

ex_HTRCXPlaySound.nxc

This is an example of how to use the HTRCXPlaySound function.


HTRCXPlaySound(RCX_SOUND_UP);

9.235

ex_HTRCXPlayTone.nxc

This is an example of how to use the HTRCXPlayTone function.


HTRCXPlayTone(440, 100);

9.236

ex_HTRCXPlayToneVar.nxc

This is an example of how to use the HTRCXPlayToneVar function.


HTRCXPlayToneVar(0, 50);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.237

ex_HTRCXPoll.nxc

1853

9.237

ex_HTRCXPoll.nxc

This is an example of how to use the HTRCXPoll function.


x = HTRCXPoll(RCX_VariableSrc, 0);

9.238

ex_HTRCXPollMemory.nxc

This is an example of how to use the HTRCXPollMemory function.


HTRCXPollMemory(0, 10);

9.239

ex_HTRCXRemote.nxc

This is an example of how to use the HTRCXRemote function.


HTRCXRemote(RCX_RemotePlayASound);

9.240

ex_HTRCXRev.nxc

This is an example of how to use the HTRCXRev function.


HTRCXRev(RCX_OUT_A);

9.241

ex_HTRCXSelectDisplay.nxc

This is an example of how to use the HTRCXSelectDisplay function.


HTRCXSelectDisplay(RCX_VariableSrc, 2);

9.242

ex_HTRCXSelectProgram.nxc

This is an example of how to use the HTRCXSelectProgram function.


HTRCXSelectProgram(3);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.243

ex_HTRCXSendSerial.nxc

1854

9.243

ex_HTRCXSendSerial.nxc

This is an example of how to use the HTRCXSendSerial function.


HTRCXSendSerial(0, 10);

9.244

ex_HTRCXSetDirection.nxc

This is an example of how to use the HTRCXSetDirection function.


HTRCXSetDirection(RCX_OUT_A, RCX_OUT_FWD);

9.245

ex_HTRCXSetEvent.nxc

This is an example of how to use the HTRCXSetEvent function.


HTRCXSetEvent(0, RCX_ConstantSrc, 5);

9.246

ex_HTRCXSetGlobalDirection.nxc

This is an example of how to use the HTRCXSetGlobalDirection function.


HTRCXSetGlobalDirection(RCX_OUT_A, RCX_OUT_FWD);

9.247

ex_HTRCXSetGlobalOutput.nxc

This is an example of how to use the HTRCXSetGlobalOutput function.


HTRCXSetGlobalOutput(RCX_OUT_A, RCX_OUT_ON);

9.248

ex_HTRCXSetIRLinkPort.nxc

This is an example of how to use the HTRCXSetIRLinkPort function.


SetSensorLowspeed(S1);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.249

ex_HTRCXSetMaxPower.nxc

1855

9.249

ex_HTRCXSetMaxPower.nxc

This is an example of how to use the HTRCXSetMaxPower function.


HTRCXSetMaxPower(RCX_OUT_A, RCX_ConstantSrc, 5);

9.250

ex_HTRCXSetMessage.nxc

This is an example of how to use the HTRCXSetMessage function.


HTRCXSetMessage(20);

9.251

ex_HTRCXSetOutput.nxc

This is an example of how to use the HTRCXSetOutput function.


HTRCXSetOutput(RCX_OUT_A, RCX_OUT_ON);

9.252

ex_HTRCXSetPower.nxc

This is an example of how to use the HTRCXSetPower function.


HTRCXSetPower(RCX_OUT_A, RCX_ConstantSrc, RCX_OUT_FULL);

9.253

ex_HTRCXSetPriority.nxc

This is an example of how to use the HTRCXSetPriority function.


HTRCXSetPriority(2);

9.254

ex_HTRCXSetSensorMode.nxc

This is an example of how to use the HTRCXSetSensorMode function.


HTRCXSetSensorMode(S1, SENSOR_MODE_BOOL);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.255

ex_HTRCXSetSensorType.nxc

1856

9.255

ex_HTRCXSetSensorType.nxc

This is an example of how to use the HTRCXSetSensorType function.


HTRCXSetSensorType(S1, SENSOR_TYPE_TOUCH);

9.256

ex_HTRCXSetSleepTime.nxc

This is an example of how to use the HTRCXSetSleepTime function.


HTRCXSetSleepTime(4);

9.257

ex_HTRCXSetTxPower.nxc

This is an example of how to use the HTRCXSetTxPower function.


HTRCXSetTxPower(0);

9.258

ex_HTRCXSetWatch.nxc

This is an example of how to use the HTRCXSetWatch function.


HTRCXSetWatch(3, 30);

9.259

ex_HTRCXStartTask.nxc

This is an example of how to use the HTRCXStartTask function.


HTRCXStartTask(2);

9.260

ex_HTRCXStopAllTasks.nxc

This is an example of how to use the HTRCXStopAllTasks function.


HTRCXStopAllTasks();

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.261

ex_HTRCXStopTask.nxc

1857

9.261

ex_HTRCXStopTask.nxc

This is an example of how to use the HTRCXStopTask function.


HTRCXStopTask(1);

9.262

ex_HTRCXToggle.nxc

This is an example of how to use the HTRCXToggle function.


HTRCXToggle(RCX_OUT_A);

9.263

ex_HTRCXUnmuteSound.nxc

This is an example of how to use the HTRCXUnmuteSound function.


HTRCXUnmuteSound();

9.264

ex_HTScoutCalibrateSensor.nxc

This is an example of how to use the HTScoutCalibrateSensor function.


HTScoutCalibrateSensor();

9.265

ex_HTScoutMuteSound.nxc

This is an example of how to use the HTScoutMuteSound function.


HTScoutMuteSound();

9.266

ex_HTScoutSelectSounds.nxc

This is an example of how to use the HTScoutSelectSounds function.


HTScoutSelectSounds(0);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.267

ex_HTScoutSendVLL.nxc

1858

9.267

ex_HTScoutSendVLL.nxc

This is an example of how to use the HTScoutSendVLL function.


HTScoutSendVLL(RCX_ConstantSrc, 0x30);

9.268

ex_HTScoutSetEventFeedback.nxc

This is an example of how to use the HTScoutSetEventFeedback function.


HTScoutSetEventFeedback(RCX_ConstantSrc, 10);

9.269

ex_HTScoutSetLight.nxc

This is an example of how to use the HTScoutSetLight function.


HTScoutSetLight(SCOUT_LIGHT_ON);

9.270

ex_HTScoutSetScoutMode.nxc

This is an example of how to use the HTScoutSetScoutMode function.


HTScoutSetScoutMode(SCOUT_MODE_POWER);

9.271

ex_HTScoutSetSensorClickTime.nxc

This is an example of how to use the HTScoutSetSensorClickTime function.


HTScoutSetSensorClickTime(RCX_ConstantSrc, 200);

9.272

ex_HTScoutSetSensorHysteresis.nxc

This is an example of how to use the HTScoutSetSensorHysteresis function.


HTScoutSetSensorHysteresis(RCX_ConstantSrc, 50);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.273

ex_HTScoutSetSensorLowerLimit.nxc

1859

9.273

ex_HTScoutSetSensorLowerLimit.nxc

This is an example of how to use the HTScoutSetSensorLowerLimit function.


HTScoutSetSensorLowerLimit(RCX_VariableSrc, 0);

9.274

ex_HTScoutSetSensorUpperLimit.nxc

This is an example of how to use the HTScoutSetSensorUpperLimit function.


HTScoutSetSensorUpperLimit(RCX_VariableSrc, 0);

9.275

ex_HTScoutUnmuteSound.nxc

This is an example of how to use the HTScoutUnmuteSound function.


HTScoutUnmuteSound();

9.276

ex_I2CBytes.nxc

This is an example of how to use the I2CBytes function.


x = I2CBytes(S4, writebuf, cnt, readbuf);

9.277

ex_I2CBytesReady.nxc

This is an example of how to use the I2CBytesReady function.


x = I2CBytesReady(S1);

9.278

ex_I2CCheckStatus.nxc

This is an example of how to use the I2CCheckStatus function.


x = I2CCheckStatus(S1);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.279

ex_i2cdeviceid.nxc

1860

9.279

ex_i2cdeviceid.nxc

This is an example of how to use the I2CDeviceId function.


task main() { SetSensorLowspeed(S1); while (true) { TextOut(0, LCD_LINE1, I2CVendorId(S1, I2C_ADDR_DEFAULT)); TextOut(0, LCD_LINE2, I2CDeviceId(S1, I2C_ADDR_DEFAULT)); TextOut(0, LCD_LINE3, I2CVersion(S1, I2C_ADDR_DEFAULT)); } }

9.280

ex_i2cdeviceinfo.nxc

This is an example of how to use the I2CDeviceInfo function.


task main() { SetSensorLowspeed(S1); TextOut(0, LCD_LINE1, I2CDeviceInfo(S1, I2C_ADDR_DEFAULT, I2C_REG_DEVICE_ID)); TextOut(0, LCD_LINE2, I2CDeviceInfo(S1, I2C_ADDR_DEFAULT, I2C_REG_VENDOR_ID)); TextOut(0, LCD_LINE3, I2CDeviceInfo(S1, I2C_ADDR_DEFAULT, I2C_REG_VERSION)); Wait(SEC_10); }

9.281

ex_I2CRead.nxc

This is an example of how to use the I2CRead function.


x = I2CRead(S1, 1, outbuffer);

9.282

ex_I2CSendCommand.nxc

This is an example of how to use the I2CSendCommand function.


long result = I2CSendCommand(S1, I2C_ADDR_DEFAULT, HT_CMD_COLOR2_ACTIVE);

9.283

ex_I2CStatus.nxc

This is an example of how to use the I2CStatus function.


x = I2CStatus(S1, nRead);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.284

ex_i2cvendorid.nxc

1861

9.284

ex_i2cvendorid.nxc

This is an example of how to use the I2CVendorId function.


task main() { SetSensorLowspeed(S1); while (true) { TextOut(0, LCD_LINE1, I2CVendorId(S1, I2C_ADDR_DEFAULT)); TextOut(0, LCD_LINE2, I2CDeviceId(S1, I2C_ADDR_DEFAULT)); TextOut(0, LCD_LINE3, I2CVersion(S1, I2C_ADDR_DEFAULT)); } }

9.285

ex_i2cversion.nxc

This is an example of how to use the I2CVersion function.


task main() { SetSensorLowspeed(S1); while (true) { TextOut(0, LCD_LINE1, I2CVendorId(S1, I2C_ADDR_DEFAULT)); TextOut(0, LCD_LINE2, I2CDeviceId(S1, I2C_ADDR_DEFAULT)); TextOut(0, LCD_LINE3, I2CVersion(S1, I2C_ADDR_DEFAULT)); } }

9.286

ex_I2CWrite.nxc

This is an example of how to use the I2CWrite function.


x = I2CWrite(S1, 1, inbuffer);

9.287

ex_isalnum.nxc

This is an example of how to use the isalnum function.


i = isalnum(x);

9.288

ex_isalpha.nxc

This is an example of how to use the isalpha function.


i = isalpha(x);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.289

ex_iscntrl.nxc

1862

9.289

ex_iscntrl.nxc

This is an example of how to use the iscntrl function.


i = iscntrl(x);

9.290

ex_isdigit.nxc

This is an example of how to use the isdigit function.


i = isdigit(x);

9.291

ex_isgraph.nxc

This is an example of how to use the isgraph function.


i = isgraph(x);

9.292

ex_islower.nxc

This is an example of how to use the islower function.


i = islower(x);

9.293

ex_isnan.nxc

This is an example of how to use the isNAN function.


task main() { float j = -1; float f = sqrt(j); if (isNAN(f)) TextOut(0, LCD_LINE1, "not a number"); else NumOut(0, LCD_LINE1, f); NumOut(0, LCD_LINE2, f); Wait(SEC_5); }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.294

ex_isprint.nxc

1863

9.294

ex_isprint.nxc

This is an example of how to use the isprint function.


i = isprint(x);

9.295

ex_ispunct.nxc

This is an example of how to use the ispunct function.


i = ispunct(x);

9.296

ex_isspace.nxc

This is an example of how to use the isspace function.


i = isspace(x);

9.297

ex_isupper.nxc

This is an example of how to use the isupper function.


i = isupper(x);

9.298

ex_isxdigit.nxc

This is an example of how to use the isxdigit function.


i = isxdigit(x);

9.299

ex_labs.nxc

This is an example of how to use the labs function.


task main() { float j = -1; float f = sqrt(j);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.300

ex_ldiv.nxc

1864

if (isNAN(f)) TextOut(0, LCD_LINE1, "not a number"); else NumOut(0, LCD_LINE1, f); NumOut(0, LCD_LINE2, f); Wait(SEC_5); }

9.300

ex_ldiv.nxc

This is an example of how to use the ldiv function.


task main() { long x, y; x = 314564; y = 33; ldiv_t r; r = ldiv(x, y); NumOut(0, LCD_LINE1, r.quot); NumOut(0, LCD_LINE2, r.rem); Wait(SEC_3); }

9.301

ex_leftstr.nxc

This is an example of how to use the LeftStr function.


task main() { string s = "Now is the winter of our discontent"; TextOut(0, LCD_LINE1, LeftStr(s, 12)); Wait(SEC_4); }

9.302

ex_LineOut.nxc

This is an example of how to use the LineOut function.


task main() { repeat(10) { LineOut(0, 0, DISPLAY_WIDTH, DISPLAY_HEIGHT, DRAW_OPT_LOGICAL_XOR); Wait(SEC_2); } }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.303

ex_log.nxc

1865

9.303

ex_log.nxc

This is an example of how to use the log function.


y = log(x);

9.304

ex_log10.nxc

This is an example of how to use the log10 function.


y = log10(x);

9.305

ex_LongAbort.nxc

This is an example of how to use the LongAbort function.


x = LongAbort();

9.306

ex_LowLevelModuleRoutines.nxc

This is an example of how to use the SetIOMapBytes, SetIOMapValue, GetIOMapBytes, GetIOMapValue, GetLowSpeedModuleBytes, GetDisplayModuleBytes, GetCommModuleBytes, GetCommandModuleBytes, SetLowSpeedModuleBytes, SetDisplayModuleBytes, SetCommModuleBytes, SetCommandModuleBytes, ref SetIOMapBytesByID, SetIOMapValueByID, GetIOMapBytesByID, GetIOMapValueByID, SetCommandModuleValue, SetIOCtrlModuleValue, SetLoaderModuleValue, SetUIModuleValue, SetSoundModuleValue, SetButtonModuleValue, SetInputModuleValue, SetOutputModuleValue, SetLowSpeedModuleValue, SetDisplayModuleValue, SetCommModuleValue, GetCommandModuleValue, GetLoaderModuleValue, GetUIModuleValue, GetSoundModuleValue, GetButtonModuleValue, GetInputModuleValue, GetOutputModuleValue, GetLowSpeedModuleValue, GetDisplayModuleValue, GetCommModuleValue,
task main() { /* * * * *

\example ex_LowLevelModuleRoutines.nxc This is an example of how to use the \ref SetIOMapBytes, \ref SetIOMapValue, \ref GetIOMapBytes, \ref GetIOMapValue, \ref GetLowSpeedModuleBytes, \ref GetDisplayModuleBytes, \ref GetCommModuleBytes, \ref GetCommandModuleByte s,

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.307

ex_LowspeedBytesReady.nxc

1866

* \ref SetLowSpeedModuleBytes, \ref SetDisplayModuleBytes, \ref SetCommModuleByt es, * \ref SetCommandModuleBytes, ref SetIOMapBytesByID, \ref SetIOMapValueByID, * \ref GetIOMapBytesByID, \ref GetIOMapValueByID, \ref SetCommandModuleValue, * \ref SetIOCtrlModuleValue, \ref SetLoaderModuleValue, \ref SetUIModuleValue, * \ref SetSoundModuleValue, \ref SetButtonModuleValue, \ref SetInputModuleValue, * \ref SetOutputModuleValue, \ref SetLowSpeedModuleValue, \ref SetDisplayModuleV alue, * \ref SetCommModuleValue, \ref GetCommandModuleValue, \ref GetIOCtrlModuleValue , * \ref GetLoaderModuleValue, \ref GetUIModuleValue, \ref GetSoundModuleValue, * \ref GetButtonModuleValue, \ref GetInputModuleValue, \ref GetOutputModuleValue , * \ref GetLowSpeedModuleValue, \ref GetDisplayModuleValue, \ref GetCommModuleVal ue, */ }

9.307

ex_LowspeedBytesReady.nxc

This is an example of how to use the LowspeedBytesReady function.


x = LowspeedBytesReady(S1);

9.308

ex_LowspeedCheckStatus.nxc

This is an example of how to use the LowspeedCheckStatus function.


x = LowspeedCheckStatus(S1);

9.309

ex_LowspeedRead.nxc

This is an example of how to use the LowspeedRead function.


x = LowspeedRead(S1, 1, outbuffer);

9.310

ex_LowspeedStatus.nxc

This is an example of how to use the LowspeedStatus function.


x = LowspeedStatus(S1, nRead);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.311

ex_LowspeedWrite.nxc

1867

9.311

ex_LowspeedWrite.nxc

This is an example of how to use the LowspeedWrite function.


x = LowspeedWrite(S1, 1, inbuffer);

9.312

ex_LSChannelState.nxc

This is an example of how to use the LSChannelState function.


x = LSChannelState(S1);

9.313

ex_LSErrorType.nxc

This is an example of how to use the LSErrorType function.


x = LSErrorType(S1);

9.314

ex_LSInputBufferBytesToRx.nxc

This is an example of how to use the LSInputBufferBytesToRx function.


x = LSInputBufferBytesToRx(S1);

9.315

ex_LSInputBufferInPtr.nxc

This is an example of how to use the LSInputBufferInPtr function.


x = LSInputBufferInPtr(S1);

9.316

ex_LSInputBufferOutPtr.nxc

This is an example of how to use the LSInputBufferOutPtr function.


x = LSInputBufferOutPtr(S1);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.317

ex_LSMode.nxc

1868

9.317

ex_LSMode.nxc

This is an example of how to use the LSMode function.


x = LSMode(S1);

9.318

ex_LSNoRestartOnRead.nxc

This is an example of how to use the LSNoRestartOnRead function.


byte val = LSNoRestartOnRead();

9.319

ex_LSOutputBufferBytesToRx.nxc

This is an example of how to use the LSOutputBufferBytesToRx function.


x = LSOutputBufferBytesToRx(S1);

9.320

ex_LSOutputBufferInPtr.nxc

This is an example of how to use the LSOutputBufferInPtr function.


x = LSOutputBufferInPtr(S1);

9.321

ex_LSOutputBufferOutPtr.nxc

This is an example of how to use the LSOutputBufferOutPtr function.


x = LSOutputBufferOutPtr(S1);

9.322

ex_LSSpeed.nxc

This is an example of how to use the LSSpeed function.


x = LSSpeed();

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.323

ex_LSState.nxc

1869

9.323

ex_LSState.nxc

This is an example of how to use the LSState function.


x = LSState();

9.324

ex_memcmp.nxc

This is an example of how to use the memcmp function.


task main() { byte myArray[] = {1, 2, 3, 4}; byte x[] = {1, 2, 3, 5}; int i = 5; int j; j = memcmp(myArray, x, 1); // returns -1, 0, or 1 NumOut(0, LCD_LINE1, i); NumOut(0, LCD_LINE2, j); NumOut(0, LCD_LINE3, memcmp(i, j, 1)); Wait(SEC_15); }

9.325

ex_memcpy.nxc

This is an example of how to use the memcpy function.


memcpy(myArray, anotherArray, 1);

9.326

ex_memmove.nxc

This is an example of how to use the memmove function.


memmove(myArray, anotherArray, 1);

9.327

ex_midstr.nxc

This is an example of how to use the MidStr function.


task main() {

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.328

ex_motoractualspeed.nxc

1870

string s = "Now is the winter of our discontent"; TextOut(0, LCD_LINE1, MidStr(s, 12, 5)); Wait(SEC_4); }

9.328

ex_motoractualspeed.nxc

This is an example of how to use the MotorActualSpeed function.


x = MotorActualSpeed(OUT_A);

9.329

ex_motorblocktachocount.nxc

This is an example of how to use the MotorBlockTachoCount function.


x = MotorBlockTachoCount(OUT_A);

9.330

ex_motormode.nxc

This is an example of how to use the MotorMode function.


x = MotorMode(OUT_A);

9.331

ex_motoroutputoptions.nxc

This is an example of how to use the MotorOutputOptions function.


task main() { NumOut(0, LCD_LINE1, MotorOutputOptions(OUT_A)); while(true); }

9.332

ex_motoroverload.nxc

This is an example of how to use the MotorOverload function.


x = MotorOverload(OUT_A);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.333

ex_motorpower.nxc

1871

9.333

ex_motorpower.nxc

This is an example of how to use the MotorPower function.


x = MotorPower(OUT_A);

9.334

ex_motorpwnfreq.nxc

This is an example of how to use the MotorPwnFreq function.


x = MotorPwnFreq();

9.335

ex_motorregdvalue.nxc

This is an example of how to use the MotorRegDValue function.


x = MotorRegDValue(OUT_A);

9.336

ex_motorregivalue.nxc

This is an example of how to use the MotorRegIValue function.


x = MotorRegIValue(OUT_A);

9.337

ex_motorregpvalue.nxc

This is an example of how to use the MotorRegPValue function.


x = MotorRegPValue(OUT_A);

9.338

ex_motorregulation.nxc

This is an example of how to use the MotorRegulation function.


x = MotorRegulation(OUT_A);

9.339

ex_motorrotationcount.nxc

This is an example of how to use the MotorRotationCount function.


x = MotorRotationCount(OUT_A);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.340

ex_motorrunstate.nxc

1872

9.340

ex_motorrunstate.nxc

This is an example of how to use the MotorRunState function.


x = MotorRunState(OUT_A);

9.341

ex_motortachocount.nxc

This is an example of how to use the MotorTachoCount function.


x = MotorTachoCount(OUT_A);

9.342

ex_motortacholimit.nxc

This is an example of how to use the MotorTachoLimit function.


x = MotorTachoLimit(OUT_A);

9.343

ex_motorturnratio.nxc

This is an example of how to use the MotorTurnRatio function.


x = MotorTurnRatio(OUT_A);

9.344

ex_MSADPAOff.nxc

This is an example of how to use the MSADPAOff function.


char result = MSADPAOff(S1, MS_ADDR_DISTNX);

9.345

ex_MSADPAOn.nxc

This is an example of how to use the MSADPAOn function.


char result = MSADPAOn(S1, MS_ADDR_DISTNX);

9.346

ex_MSDeenergize.nxc

This is an example of how to use the MSDeenergize function.


char result = MSDeenergize(S1, I2C_ADDR_DEFAULT);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.347

ex_MSEnergize.nxc

1873

9.347

ex_MSEnergize.nxc

This is an example of how to use the MSEnergize function.


char result = MSEnergize(S1, I2C_ADDR_DEFAULT);

9.348

ex_MSIRTrain.nxc

This is an example of how to use the MSIRTrain function.


char result = MSIRTrain(S1, I2C_ADDR_DEFAULT, TRAIN_CHANNEL_1, TRAIN_FUNC_INCR_SPEED);

9.349

ex_MSPFComboDirect.nxc

This is an example of how to use the MSPFComboDirect function.


char result = MSPFComboDirect(S1, I2C_ADDR_DEFAULT, PF_CHANNEL_1, PF_CMD_STOP, PF_CMD_FWD);

9.350

ex_MSPFComboPWM.nxc

This is an example of how to use the MSPFComboPWM function.


char result = MSPFComboPWM(S1, I2C_ADDR_DEFAULT, PF_CHANNEL_1, PF_PWM_REV4, PF_PWM_FWD5);

9.351

ex_MSPFRawOutput.nxc

This is an example of how to use the MSPFRawOutput function.


char result = MSPFRawOutput(S1, I2C_ADDR_DEFAULT, 0x0a, 0x01, 0x02);

9.352

ex_MSPFRepeat.nxc

This is an example of how to use the MSPFRepeat function.


char result = MSPFRepeat(S1, I2C_ADDR_DEFAULT, 5, 100);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.353

ex_MSPFSingleOutputCST.nxc

1874

9.353

ex_MSPFSingleOutputCST.nxc

This is an example of how to use the MSPFSingleOutputCST function.


char result = MSPFSingleOutputCST(S1, I2C_ADDR_DEFAULT, PF_CHANNEL_1, PF_OUT_A, PF_CST_SET1_SET2);

9.354

ex_MSPFSingleOutputPWM.nxc

This is an example of how to use the MSPFSingleOutputPWM function.


char result = MSPFSingleOutputPWM(S1, I2C_ADDR_DEFAULT, PF_CHANNEL_1, PF_OUT_A, PF_PWM_FWD5);

9.355

ex_MSPFSinglePin.nxc

This is an example of how to use the MSPFSinglePin function.


char result = MSPFSinglePin(S1, I2C_ADDR_DEFAULT, PF_CHANNEL_1, PF_OUT_A, PF_PIN_C1, PF_FUNC_SET, true);

9.356

ex_MSPFTrain.nxc

This is an example of how to use the MSPFTrain function.


char result = MSPFTrain(S1, I2C_ADDR_DEFAULT, PF_CHANNEL_1, TRAIN_FUNC_INCR_SPEED);

9.357

ex_MSRCXAbsVar.nxc

This is an example of how to use the MSRCXAbsVar function.


MSRCXAbsVar(0, RCX_VariableSrc, 0);

9.358

ex_MSRCXAddToDatalog.nxc

This is an example of how to use the MSRCXAddToDatalog function.


MSRCXAddToDatalog(RCX_InputValueSrc, S1);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.359

ex_MSRCXAndVar.nxc

1875

9.359

ex_MSRCXAndVar.nxc

This is an example of how to use the MSRCXAndVar function.


MSRCXAndVar(0, RCX_ConstantSrc, 0x7f);

9.360

ex_MSRCXBatteryLevel.nxc

This is an example of how to use the MSRCXBatteryLevel function.


x = MSRCXBatteryLevel();

9.361

ex_MSRCXBoot.nxc

This is an example of how to use the MSRCXBoot function.


MSRCXBoot();

9.362

ex_MSRCXCalibrateEvent.nxc

This is an example of how to use the MSRCXCalibrateEvent function.


MSRCXCalibrateEvent(0, 200, 500, 50);

9.363

ex_MSRCXClearAllEvents.nxc

This is an example of how to use the MSRCXClearAllEvents function.


MSRCXClearAllEvents();

9.364

ex_MSRCXClearCounter.nxc

This is an example of how to use the MSRCXClearCounter function.


MSRCXClearCounter(0);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.365

ex_MSRCXClearMsg.nxc

1876

9.365

ex_MSRCXClearMsg.nxc

This is an example of how to use the MSRCXClearMsg function.


MSRCXClearMsg();

9.366

ex_MSRCXClearSensor.nxc

This is an example of how to use the MSRCXClearSensor function.


MSRCXClearSensor(S1);

9.367

ex_MSRCXClearSound.nxc

This is an example of how to use the MSRCXClearSound function.


MSRCXClearSound();

9.368

ex_MSRCXClearTimer.nxc

This is an example of how to use the MSRCXClearTimer function.


MSRCXClearTimer(0);

9.369

ex_MSRCXCreateDatalog.nxc

This is an example of how to use the MSRCXCreateDatalog function.


MSRCXCreateDatalog(50);

9.370

ex_MSRCXDecCounter.nxc

This is an example of how to use the MSRCXDecCounter function.


MSRCXDecCounter(0);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.371

ex_MSRCXDeleteSub.nxc

1877

9.371

ex_MSRCXDeleteSub.nxc

This is an example of how to use the MSRCXDeleteSub function.


MSRCXDeleteSub(2);

9.372

ex_MSRCXDeleteSubs.nxc

This is an example of how to use the MSRCXDeleteSubs function.


MSRCXDeleteSubs();

9.373

ex_MSRCXDeleteTask.nxc

This is an example of how to use the MSRCXDeleteTask function.


MSRCXDeleteTask(3);

9.374

ex_MSRCXDeleteTasks.nxc

This is an example of how to use the MSRCXDeleteTasks function.


MSRCXDeleteTasks();

9.375

ex_MSRCXDisableOutput.nxc

This is an example of how to use the MSRCXDisableOutput function.


MSRCXDisableOutput(RCX_OUT_A);

9.376

ex_MSRCXDivVar.nxc

This is an example of how to use the MSRCXDivVar function.


MSRCXDivVar(0, RCX_ConstantSrc, 2);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.377

ex_MSRCXEnableOutput.nxc

1878

9.377

ex_MSRCXEnableOutput.nxc

This is an example of how to use the MSRCXEnableOutput function.


MSRCXEnableOutput(RCX_OUT_A);

9.378

ex_MSRCXEvent.nxc

This is an example of how to use the MSRCXEvent function.


MSRCXEvent(RCX_ConstantSrc, 2);

9.379

ex_MSRCXFloat.nxc

This is an example of how to use the MSRCXFloat function.


MSRCXFloat(RCX_OUT_A);

9.380

ex_MSRCXFwd.nxc

This is an example of how to use the MSRCXFwd function.


MSRCXFwd(RCX_OUT_A);

9.381

ex_MSRCXIncCounter.nxc

This is an example of how to use the MSRCXIncCounter function.


MSRCXIncCounter(0);

9.382

ex_MSRCXInvertOutput.nxc

This is an example of how to use the MSRCXInvertOutput function.


MSRCXInvertOutput(RCX_OUT_A);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.383

ex_MSRCXMulVar.nxc

1879

9.383

ex_MSRCXMulVar.nxc

This is an example of how to use the MSRCXMulVar function.


MSRCXMulVar(0, RCX_VariableSrc, 4);

9.384

ex_MSRCXMuteSound.nxc

This is an example of how to use the MSRCXMuteSound function.


MSRCXMuteSound();

9.385

ex_MSRCXObvertOutput.nxc

This is an example of how to use the MSRCXObvertOutput function.


MSRCXObvertOutput(RCX_OUT_A);

9.386

ex_MSRCXOff.nxc

This is an example of how to use the MSRCXOff function.


MSRCXOff(RCX_OUT_A);

9.387

ex_MSRCXOn.nxc

This is an example of how to use the MSRCXOn function.


MSRCXOn(RCX_OUT_A);

9.388

ex_MSRCXOnFor.nxc

This is an example of how to use the MSRCXOnFor function.


MSRCXOnFor(RCX_OUT_A, 100);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.389

ex_MSRCXOnFwd.nxc

1880

9.389

ex_MSRCXOnFwd.nxc

This is an example of how to use the MSRCXOnFwd function.


MSRCXOnFwd(RCX_OUT_A);

9.390

ex_MSRCXOnRev.nxc

This is an example of how to use the MSRCXOnRev function.


MSRCXOnRev(RCX_OUT_A);

9.391

ex_MSRCXOrVar.nxc

This is an example of how to use the MSRCXOrVar function.


MSRCXOrVar(0, RCX_ConstantSrc, 0xCC);

9.392

ex_MSRCXPBTurnOff.nxc

This is an example of how to use the MSRCXPBTurnOff function.


MSRCXPBTurnOff();

9.393

ex_MSRCXPing.nxc

This is an example of how to use the MSRCXPing function.


MSRCXPing();

9.394

ex_MSRCXPlaySound.nxc

This is an example of how to use the MSRCXPlaySound function.


MSRCXPlaySound(RCX_SOUND_UP);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.395

ex_MSRCXPlayTone.nxc

1881

9.395

ex_MSRCXPlayTone.nxc

This is an example of how to use the MSRCXPlayTone function.


MSRCXPlayTone(440, 100);

9.396

ex_MSRCXPlayToneVar.nxc

This is an example of how to use the MSRCXPlayToneVar function.


MSRCXPlayToneVar(0, 50);

9.397

ex_MSRCXPoll.nxc

This is an example of how to use the MSRCXPoll function.


x = MSRCXPoll(RCX_VariableSrc, 0);

9.398

ex_MSRCXPollMemory.nxc

This is an example of how to use the MSRCXPollMemory function.


MSRCXPollMemory(0, 10);

9.399

ex_MSRCXRemote.nxc

This is an example of how to use the MSRCXRemote function.


MSRCXRemote(RCX_RemotePlayASound);

9.400

ex_MSRCXReset.nxc

This is an example of how to use the MSRCXReset function.


MSRCXReset();

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.401

ex_MSRCXRev.nxc

1882

9.401

ex_MSRCXRev.nxc

This is an example of how to use the MSRCXRev function.


MSRCXRev(RCX_OUT_A);

9.402

ex_MSRCXSelectDisplay.nxc

This is an example of how to use the MSRCXSelectDisplay function.


MSRCXSelectDisplay(RCX_VariableSrc, 2);

9.403

ex_MSRCXSelectProgram.nxc

This is an example of how to use the MSRCXSelectProgram function.


MSRCXSelectProgram(3);

9.404

ex_MSRCXSendSerial.nxc

This is an example of how to use the MSRCXSendSerial function.


MSRCXSendSerial(0, 10);

9.405

ex_MSRCXSet.nxc

This is an example of how to use the MSRCXSet function.


MSRCXSet(RCX_VariableSrc, 0, RCX_RandomSrc, 10000);

9.406

ex_MSRCXSetDirection.nxc

This is an example of how to use the MSRCXSetDirection function.


MSRCXSetDirection(RCX_OUT_A, RCX_OUT_FWD);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.407

ex_MSRCXSetEvent.nxc

1883

9.407

ex_MSRCXSetEvent.nxc

This is an example of how to use the MSRCXSetEvent function.


MSRCXSetEvent(0, RCX_ConstantSrc, 5);

9.408

ex_MSRCXSetGlobalDirection.nxc

This is an example of how to use the MSRCXSetGlobalDirection function.


MSRCXSetGlobalDirection(RCX_OUT_A, RCX_OUT_FWD);

9.409

ex_MSRCXSetGlobalOutput.nxc

This is an example of how to use the MSRCXSetGlobalOutput function.


MSRCXSetGlobalOutput(RCX_OUT_A, RCX_OUT_ON);

9.410

ex_MSRCXSetMaxPower.nxc

This is an example of how to use the MSRCXSetMaxPower function.


MSRCXSetMaxPower(RCX_OUT_A, RCX_ConstantSrc, 5);

9.411

ex_MSRCXSetMessage.nxc

This is an example of how to use the MSRCXSetMessage function.


MSRCXSetMessage(20);

9.412

ex_MSRCXSetNRLinkPort.nxc

This is an example of how to use the MSRCXSetNRLinkPort function.


MSRCXSetNRLinkPort(S1, MS_ADDR_NRLINK);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.413

ex_MSRCXSetOutput.nxc

1884

9.413

ex_MSRCXSetOutput.nxc

This is an example of how to use the MSRCXSetOutput function.


MSRCXSetOutput(RCX_OUT_A, RCX_OUT_ON);

9.414

ex_MSRCXSetPower.nxc

This is an example of how to use the MSRCXSetPower function.


MSRCXSetPower(RCX_OUT_A, RCX_ConstantSrc, RCX_OUT_FULL);

9.415

ex_MSRCXSetPriority.nxc

This is an example of how to use the MSRCXSetPriority function.


MSRCXSetPriority(2);

9.416

ex_MSRCXSetSensorMode.nxc

This is an example of how to use the MSRCXSetSensorMode function.


MSRCXSetSensorMode(S1, SENSOR_MODE_BOOL);

9.417

ex_MSRCXSetSensorType.nxc

This is an example of how to use the MSRCXSetSensorType function.


MSRCXSetSensorType(S1, SENSOR_TYPE_TOUCH);

9.418

ex_MSRCXSetSleepTime.nxc

This is an example of how to use the MSRCXSetSleepTime function.


MSRCXSetSleepTime(4);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.419

ex_MSRCXSetTxPower.nxc

1885

9.419

ex_MSRCXSetTxPower.nxc

This is an example of how to use the MSRCXSetTxPower function.


MSRCXSetTxPower(0);

9.420

ex_MSRCXSetUserDisplay.nxc

This is an example of how to use the MSRCXSetUserDisplay function.


MSRCXSetUserDisplay(RCX_VariableSrc, 0, 2);

9.421

ex_MSRCXSetVar.nxc

This is an example of how to use the MSRCXSetVar function.


MSRCXSetVar(0, RCX_VariableSrc, 1);

9.422

ex_MSRCXSetWatch.nxc

This is an example of how to use the MSRCXSetWatch function.


MSRCXSetWatch(3, 30);

9.423

ex_MSRCXSgnVar.nxc

This is an example of how to use the MSRCXSgnVar function.


MSRCXSgnVar(0, RCX_VariableSrc, 0);

9.424

ex_MSRCXStartTask.nxc

This is an example of how to use the MSRCXStartTask function.


MSRCXStartTask(2);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.425

ex_MSRCXStopAllTasks.nxc

1886

9.425

ex_MSRCXStopAllTasks.nxc

This is an example of how to use the MSRCXStopAllTasks function.


MSRCXStopAllTasks();

9.426

ex_MSRCXStopTask.nxc

This is an example of how to use the MSRCXStopTask function.


MSRCXStopTask(1);

9.427

ex_MSRCXSubVar.nxc

This is an example of how to use the MSRCXSubVar function.


MSRCXSubVar(0, RCX_RandomSrc, 10);

9.428

ex_MSRCXSumVar.nxc

This is an example of how to use the MSRCXSumVar function.


MSRCXSumVar(0, RCX_InputValueSrc, S1);

9.429

ex_MSRCXToggle.nxc

This is an example of how to use the MSRCXToggle function.


MSRCXToggle(RCX_OUT_A);

9.430

ex_MSRCXUnlock.nxc

This is an example of how to use the MSRCXUnlock function.


MSRCXUnlock();

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.431

ex_MSRCXUnmuteSound.nxc

1887

9.431

ex_MSRCXUnmuteSound.nxc

This is an example of how to use the MSRCXUnmuteSound function.


MSRCXUnmuteSound();

9.432

ex_MSReadValue.nxc

This is an example of how to use the MSReadValue function.


byte value = MSReadValue(S1, I2C_ADDR_DEFAULT, I2C_REG_CMD, 1);

9.433

ex_MSScoutCalibrateSensor.nxc

This is an example of how to use the MSScoutCalibrateSensor function.


MSScoutCalibrateSensor();

9.434

ex_MSScoutMuteSound.nxc

This is an example of how to use the MSScoutMuteSound function.


MSScoutMuteSound();

9.435

ex_MSScoutSelectSounds.nxc

This is an example of how to use the MSScoutSelectSounds function.


MSScoutSelectSounds(0);

9.436

ex_MSScoutSendVLL.nxc

This is an example of how to use the MSScoutSendVLL function.


MSScoutSendVLL(RCX_ConstantSrc, 0x30);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.437

ex_MSScoutSetCounterLimit.nxc

1888

9.437

ex_MSScoutSetCounterLimit.nxc

This is an example of how to use the MSScoutSetCounterLimit function.


MSScoutSetCounterLimit(0, RCX_ConstantSrc, 2000);

9.438

ex_MSScoutSetEventFeedback.nxc

This is an example of how to use the MSScoutSetEventFeedback function.


MSScoutSetEventFeedback(RCX_ConstantSrc, 10);

9.439

ex_MSScoutSetLight.nxc

This is an example of how to use the MSScoutSetLight function.


MSScoutSetLight(SCOUT_LIGMS_ON);

9.440

ex_MSScoutSetScoutMode.nxc

This is an example of how to use the MSScoutSetScoutMode function.


MSScoutSetScoutMode(SCOUT_MODE_POWER);

9.441

ex_MSScoutSetScoutRules.nxc

This is an example of how to use the MSScoutSetScoutRules function.


MSScoutSetScoutRules(SCOUT_MR_FORWARD, SCOUT_TR_REVERSE, SCOUT_LR_IGNORE, SCOUT_TGS_SHORT, SCOUT_FXR_BUG);

9.442

ex_MSScoutSetSensorClickTime.nxc

This is an example of how to use the MSScoutSetSensorClickTime function.


MSScoutSetSensorClickTime(RCX_ConstantSrc, 200);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.443

ex_MSScoutSetSensorHysteresis.nxc

1889

9.443

ex_MSScoutSetSensorHysteresis.nxc

This is an example of how to use the MSScoutSetSensorHysteresis function.


MSScoutSetSensorHysteresis(RCX_ConstantSrc, 50);

9.444

ex_MSScoutSetSensorLowerLimit.nxc

This is an example of how to use the MSScoutSetSensorLowerLimit function.


MSScoutSetSensorLowerLimit(RCX_VariableSrc, 0);

9.445

ex_MSScoutSetSensorUpperLimit.nxc

This is an example of how to use the MSScoutSetSensorUpperLimit function.


MSScoutSetSensorUpperLimit(RCX_VariableSrc, 0);

9.446

ex_MSScoutSetTimerLimit.nxc

This is an example of how to use the MSScoutSetTimerLimit function.


MSScoutSetTimerLimit(0, RCX_ConstantSrc, 10000);

9.447

ex_MSScoutUnmuteSound.nxc

This is an example of how to use the MSScoutUnmuteSound function.


MSScoutUnmuteSound();

9.448

ex_muldiv32.nxc

This is an example of how to use the muldiv32 function.


y = muldiv32(a, b, c);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.449

ex_NRLink2400.nxc

1890

9.449

ex_NRLink2400.nxc

This is an example of how to use the NRLink2400 function.


char result = NRLink2400(S1, MS_ADDR_NRLINK);

9.450

ex_NRLink4800.nxc

This is an example of how to use the NRLink4800 function.


char result = NRLink4800(S1, MS_ADDR_NRLINK);

9.451

ex_NRLinkFlush.nxc

This is an example of how to use the NRLinkFlush function.


char result = NRLinkFlush(S1, MS_ADDR_NRLINK);

9.452

ex_NRLinkIRLong.nxc

This is an example of how to use the NRLinkIRLong function.


char result = NRLinkIRLong(S1, MS_ADDR_NRLINK);

9.453

ex_NRLinkIRShort.nxc

This is an example of how to use the NRLinkIRShort function.


char result = NRLinkIRShort(S1, MS_ADDR_NRLINK);

9.454

ex_NRLinkSetPF.nxc

This is an example of how to use the NRLinkSetPF function.


char result = NRLinkSetPF(S1, MS_ADDR_NRLINK);

9.455

ex_NRLinkSetRCX.nxc

This is an example of how to use the NRLinkSetRCX function.


char result = NRLinkSetRCX(S1, MS_ADDR_NRLINK);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.456

ex_NRLinkSetTrain.nxc

1891

9.456

ex_NRLinkSetTrain.nxc

This is an example of how to use the NRLinkSetTrain function.


char result = NRLinkSetTrain(S1, MS_ADDR_NRLINK);

9.457

ex_NRLinkStatus.nxc

This is an example of how to use the NRLinkStatus function.


byte result = NRLinkStatus(S1, MS_ADDR_NRLINK);

9.458

ex_NRLinkTxRaw.nxc

This is an example of how to use the NRLinkTxRaw function.


byte result = NRLinkTxRaw(S1, MS_ADDR_NRLINK);

9.459

ex_NumOut.nxc

This is an example of how to use the NumOut function.


NumOut(0, LCD_LINE1, x);

9.460

ex_NumToStr.nxc

This is an example of how to use the NumToStr function.


msg = NumToStr(-2); // returns "-2" in a string

9.461

ex_NXTHID.nxc

This is an example of how to use the NXTHIDAsciiMode, NXTHIDDirectMode, NXTHIDTransmit, NXTHIDLoadCharacter, SetSensorLowspeed, and Wait functions.
task main() { SetSensorLowspeed(S1); // NXTHID is an i2c device char result;

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.462

ex_NXTLineLeader.nxc

1892

// configure device in ASCII mode result = NXTHIDAsciiMode(S1, MS_ADDR_NXTHID); // load a character result = NXTHIDLoadCharacter(S1, MS_ADDR_NXTHID, NXTHID_MOD_NONE, A); // transmit the character result = NXTHIDTransmit(S1, MS_ADDR_NXTSERVO); Wait(SEC_5); // configure device in Direct mode result = NXTHIDDirectMode(S1, MS_ADDR_NXTHID); // load a character result = NXTHIDLoadCharacter(S1, MS_ADDR_NXTHID, NXTHID_MOD_LEFT_CTRL, d); // ctrl+d // transmit the character result = NXTHIDTransmit(S1, MS_ADDR_NXTSERVO); Wait(SEC_5); }

9.462

ex_NXTLineLeader.nxc

This is an example of how to use the NXTLineLeaderSteering, NXTLineLeaderAverage, NXTLineLeaderResult, NXTLineLeaderPowerDown, NXTLineLeaderPowerUp, NXTLineLeaderInvert, NXTLineLeaderReset, NXTLineLeaderSnapshot, NXTLineLeaderCalibrateWhite, NXTLineLeaderCalibrateBlack, SetNXTLineLeaderSetpoint, SetNXTLineLeaderKpValue, SetNXTLineLeaderKiValue, SetNXTLineLeaderKpValue, SetNXTLineLeaderKpFactor, SetNXTLineLeaderKiFactor, SetNXTLineLeaderKdFactor, SetSensorLowspeed, NumOut, and Wait functions.
task main() { SetSensorLowspeed(S1); // NXTLineLeader is an i2c device char val; // position sensor over white surface for 1 second val = NXTLineLeaderCalibrateWhite(S1, MS_ADDR_LINELDR); Wait(SEC_1); // position sensor over black surface for 1 second val = NXTLineLeaderCalibrateBlack(S1, MS_ADDR_LINELDR); Wait(SEC_1); // position sensor over line byte steering, average, result; steering = NXTLineLeaderSteering(S1, MS_ADDR_LINELDR);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.463

ex_NXTPowerMeter.nxc

1893

average = NXTLineLeaderAverage(S1, MS_ADDR_LINELDR); result = NXTLineLeaderResult(S1, MS_ADDR_LINELDR); NumOut(0, LCD_LINE1, steering); NumOut(0, LCD_LINE2, average); NumOut(0, LCD_LINE3, result); Wait(SEC_5); // put the device to sleep val = NXTLineLeaderPowerDown(S1, MS_ADDR_LINELDR); Wait(SEC_5); // wake up the device val = NXTLineLeaderPowerUp(S1, MS_ADDR_LINELDR); // invert colors (white line on black surface) val = NXTLineLeaderInvert(S1, MS_ADDR_LINELDR); Wait(SEC_5); // reset back to default colors val = NXTLineLeaderReset(S1, MS_ADDR_LINELDR); Wait(SEC_5); // take a snapshot of the surface below the device val = NXTLineLeaderSnapshot(S1, MS_ADDR_LINELDR); // set sensor configuration values to non-defaults val = SetNXTLineLeaderSetpoint(S1, MS_ADDR_LINELDR, 10); // default is 45 // set PID values val = SetNXTLineLeaderKpValue(S1, MS_ADDR_LINELDR, 100); // default is 25 val = SetNXTLineLeaderKiValue(S1, MS_ADDR_LINELDR, 10); // default is 0 val = SetNXTLineLeaderKdValue(S1, MS_ADDR_LINELDR, 50); // default is 8 // set PID factors val = SetNXTLineLeaderKpFactor(S1, MS_ADDR_LINELDR, 40); // default is 32 val = SetNXTLineLeaderKiFactor(S1, MS_ADDR_LINELDR, 40); // default is 32 val = SetNXTLineLeaderKdFactor(S1, MS_ADDR_LINELDR, 40); // default is 32 Wait(SEC_5); }

9.463

ex_NXTPowerMeter.nxc

This is an example of how to use the NXTPowerMeterResetCounters, NXTPowerMeterPresentCurrent, NXTPowerMeterPresentVoltage, NXTPowerMeterCapacityUsed, NXTPowerMeterPresentPower, NXTPowerMeterTotalPowerConsumed, NXTPowerMeterMaxCurrent, NXTPowerMeterMinCurrent, NXTPowerMeterMaxVoltage, NXTPowerMeterMinVoltage, NXTPowerMeterElapsedTime, NXTPowerMeterErrorCount, SetSensorLowspeed, NumOut, and Wait functions.
task main()

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.464

ex_NXTServo.nxc

1894

{ SetSensorLowspeed(S1); // NXTPowerMeter is an i2c device char result; // reset the counters result = NXTPowerMeterResetCounters(S1, MS_ADDR_IVSENS); // wait 10 seconds Wait(SEC_10); // output values NumOut(0, LCD_LINE1, NumOut(0, LCD_LINE2, NumOut(0, LCD_LINE3, NumOut(0, LCD_LINE4, NumOut(0, LCD_LINE5, NumOut(0, LCD_LINE6, NumOut(0, LCD_LINE7, Wait(SEC_5); NumOut(0, LCD_LINE1, NumOut(0, LCD_LINE2, NumOut(0, LCD_LINE3, NumOut(0, LCD_LINE4, Wait(SEC_5); } NXTPowerMeterPresentCurrent(S1, MS_ADDR_IVSENS)); NXTPowerMeterPresentVoltage(S1, MS_ADDR_IVSENS)); NXTPowerMeterCapacityUsed(S1, MS_ADDR_IVSENS)); NXTPowerMeterPresentPower(S1, MS_ADDR_IVSENS)); NXTPowerMeterTotalPowerConsumed(S1, MS_ADDR_IVSENS)); NXTPowerMeterMaxCurrent(S1, MS_ADDR_IVSENS)); NXTPowerMeterMinCurrent(S1, MS_ADDR_IVSENS)); NXTPowerMeterMaxVoltage(S1, MS_ADDR_IVSENS)); NXTPowerMeterMinVoltage(S1, MS_ADDR_IVSENS)); NXTPowerMeterElapsedTime(S1, MS_ADDR_IVSENS)); NXTPowerMeterErrorCount(S1, MS_ADDR_IVSENS));

9.464

ex_NXTServo.nxc

This is an example of how to use the NXTServoPosition, NXTServoSpeed, NXTServoBatteryVoltage, SetNXTServoSpeed, SetNXTServoQuickPosition, SetNXTServoPosition, NXTServoReset, NXTServoHaltMacro, NXTServoResumeMacro, NXTServoPauseMacro, NXTServoInit, NXTServoGotoMacroAddress, NXTServoEditMacro, NXTServoQuitEdit, SetSensorLowspeed, NumOut, and Wait functions.
task main() { SetSensorLowspeed(S1); // NXTServo is an i2c device // edit a macro char result; result = NXTServoEditMacro(S1, MS_ADDR_NXTSERVO); // TODO: write bytes of macro data to the device result = NXTServoQuitEdit(S1); // run a macro at address 0x30 result = NXTServoGotoMacroAddress(S1, MS_ADDR_NXTSERVO, 0x30); Wait(SEC_1); // pause the macro result = NXTServoPauseMacro(S1, MS_ADDR_NXTSERVO);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.465

ex_NXTSumoEyes.nxc

1895

Wait(SEC_1); // resume the macro result = NXTServoResumeMacro(S1, MS_ADDR_NXTSERVO); Wait(SEC_1); // halt the macro result = NXTServoHaltMacro(S1, MS_ADDR_NXTSERVO); // set a non-default speed value for a servo (0 = full speed) result = SetNXTServoSpeed(S1, MS_ADDR_NXTSERVO, NXTSERVO_SERVO_1, 10); // set a non-default quick position value for a servo result = SetNXTServoQuickPosition(S1, MS_ADDR_NXTSERVO, NXTSERVO_SERVO_1, NXTSERVO_QPOS_MIN); // Wait a bit for the servo to reach its new position Wait(SEC_5); // set a non-default position value for a servo result = SetNXTServoPosition(S1, MS_ADDR_NXTSERVO, NXTSERVO_SERVO_1, NXTSERVO_POS_CENTER); // store these non-default values as the initial position for this servo result = NXTServoInit(S1, MS_ADDR_NXTSERVO, NXTSERVO_SERVO_1); // output the battery voltage NumOut(0, LCD_LINE1, NXTServoBatteryVoltage(S1, MS_ADDR_NXTSERVO)); // output the current position NumOut(0, LCD_LINE2, NXTServoPosition(S1, MS_ADDR_NXTSERVO, NXTSERVO_SERVO_1));

// output the current speed NumOut(0, LCD_LINE3, NXTServoSpeed(S1, MS_ADDR_NXTSERVO, NXTSERVO_SERVO_1)); Wait(SEC_5); // reset the device back to default speed/position (0/1500) settings for all se rvos result = NXTServoReset(S1, MS_ADDR_NXTSERVO); Wait(SEC_5); }

9.465

ex_NXTSumoEyes.nxc

This is an example of how to use the SetSensorNXTSumoEyes, SensorNXTSumoEyes, SensorNXTSumoEyesRaw, NumOut, and Wait functions.
inline inline inline inline void void void void TurnLeft() { } TurnRight() { } GoStraight() { } SearchForObstacle() { }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.466

ex_off.nxc

1896

task main() { SetSensorNXTSumoEyes(S1, true); // long range while(true) { char zone = SensorNXTSumoEyes(S1); switch (zone) { case NXTSE_ZONE_LEFT: TurnLeft(); break; case NXTSE_ZONE_RIGHT: TurnRight(); break; case NXTSE_ZONE_FRONT: GoStraight(); break; default: SearchForObstacle(); break; } NumOut(0, LCD_LINE1, SensorNXTSumoEyesRaw(S1)); Wait(MS_500); } }

9.466

ex_off.nxc

This is an example of how to use the Off function.


Off(OUT_A); // turn off output A

9.467

ex_offex.nxc

This is an example of how to use the OffEx function.


OffEx(OUT_A, RESET_NONE); // turn off output A

9.468

ex_OnBrickProgramPointer.nxc

This is an example of how to use the OnBrickProgramPointer function.


x = OnBrickProgramPointer();

9.469

ex_onfwd.nxc

This is an example of how to use the OnFwd function.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.470

ex_onfwdex.nxc

1897

OnFwd(OUT_A, 75);

9.470

ex_onfwdex.nxc

This is an example of how to use the OnFwdEx function.


OnFwdEx(OUT_A, 75, RESET_NONE);

9.471

ex_onfwdreg.nxc

This is an example of how to use the OnFwdReg function.


OnFwdReg(OUT_A, 75, OUT_REGMODE_SPEED); // regulate speed

9.472

ex_onfwdregex.nxc

This is an example of how to use the OnFwdRegEx function.


OnFwdRegEx(OUT_A, 75, OUT_REGMODE_SPEED, RESET_NONE);

9.473

ex_onfwdregexpid.nxc

This is an example of how to use the OnFwdRegExPID function.


OnFwdRegExPID(OUT_A, 75, OUT_REGMODE_SPEED, RESET_NONE, 30, 50, 90);

9.474

ex_onfwdregpid.nxc

This is an example of how to use the OnFwdRegPID function.


OnFwdRegPID(OUT_A, 75, OUT_REGMODE_SPEED, 30, 50, 90); // regulate speed

9.475

ex_onfwdsync.nxc

This is an example of how to use the OnFwdSync function.


OnFwdSync(OUT_AB, 75, -100); // spin right

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.476

ex_onfwdsyncex.nxc

1898

9.476

ex_onfwdsyncex.nxc

This is an example of how to use the OnFwdSyncEx function.


OnFwdSyncEx(OUT_AB, 75, 0, RESET_NONE);

9.477

ex_onfwdsyncexpid.nxc

This is an example of how to use the OnFwdSyncExPID function.


OnFwdSyncExPID(OUT_AB, 75, 0, RESET_NONE, 30, 50, 90);

9.478

ex_onfwdsyncpid.nxc

This is an example of how to use the OnFwdSyncPID function.


OnFwdSyncPID(OUT_AB, 75, -100, 30, 50, 90); // spin right

9.479

ex_onrev.nxc

This is an example of how to use the OnRev function.


OnRev(OUT_A, 75);

9.480

ex_onrevex.nxc

This is an example of how to use the OnRevEx function.


OnRevEx(OUT_A, 75, RESET_NONE);

9.481

ex_onrevreg.nxc

This is an example of how to use the OnRevReg function.


OnRevReg(OUT_A, 75, OUT_REGMODE_SPEED); // regulate speed

9.482

ex_onrevregex.nxc

This is an example of how to use the OnRevRegEx function.


OnRevRegEx(OUT_A, 75, OUT_REGMODE_SPEED, RESET_NONE);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.483

ex_onrevregexpid.nxc

1899

9.483

ex_onrevregexpid.nxc

This is an example of how to use the OnRevRegExPID function.


OnRevRegExPID(OUT_A, 75, OUT_REGMODE_SPEED, RESET_NONE, 30, 50, 90);

9.484

ex_onrevregpid.nxc

This is an example of how to use the OnRevRegPID function.


OnRevRegPID(OUT_A, 75, OUT_REGMODE_SPEED, 30, 50, 90); // regulate speed

9.485

ex_onrevsync.nxc

This is an example of how to use the OnRevSync function.


OnRevSync(OUT_AB, 75, -100); // spin left

9.486

ex_onrevsyncex.nxc

This is an example of how to use the OnRevSyncEx function.


OnRevSyncEx(OUT_AB, 75, -100, RESET_NONE); // spin left

9.487

ex_onrevsyncexpid.nxc

This is an example of how to use the OnRevSyncExPID function.


OnRevSyncExPID(OUT_AB, 75, -100, RESET_NONE, 30, 50, 90); // spin left

9.488

ex_onrevsyncpid.nxc

This is an example of how to use the OnRevSyncPID function.


OnRevSyncPID(OUT_AB, 75, -100, 30, 50, 90); // spin left

9.489

ex_OpenFileAppend.nxc

This is an example of how to use the OpenFileAppend function.


result = OpenFileAppend("data.txt", fsize, handle);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.490

ex_OpenFileRead.nxc

1900

9.490

ex_OpenFileRead.nxc

This is an example of how to use the OpenFileRead function.


result = OpenFileRead("data.txt", fsize, handle);

9.491

ex_OpenFileReadLinear.nxc

This is an example of how to use the OpenFileReadLinear function.


result = OpenFileReadLinear("data.txt", fsize, handle);

9.492

ex_PFMate.nxc

This is an example of how to use the PFMateSend, PFMateSendRaw, SetSensorLowspeed, and Wait functions.
task main() { SetSensorLowspeed(S1); // PFMate is an i2c device // motor a forward full speed, motor b reverse full speed bool result = PFMateSend(S1, MS_ADDR_PFMATE, PFMATE_CHANNEL_1, PFMATE_MOTORS_BOTH, PF_CMD_FWD, 7, PF_CMD_REV, 7); Wait(SEC_5); byte b1, b2; b1 = 0xFF; b2 = 0x00; result = PFMateSendRaw(S1, MS_ADDR_PFMATE, PFMATE_CHANNEL_1, b1, b2); Wait(SEC_5); }

9.493

ex_PlayFile.nxc

This is an example of how to use the PlayFile function.


PlayFile("startup.rso");

9.494

ex_PlayFileEx.nxc

This is an example of how to use the PlayFileEx function.


PlayFileEx("startup.rso", 3, true);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.495

ex_playsound.nxc

1901

9.495

ex_playsound.nxc

This is an example of how to use the PlaySound function.


task main() { PlaySound(SOUND_UP); PlaySound(SOUND_DOWN); Wait(SEC_1); PlaySound(SOUND_LOW_BEEP); Wait(MS_500); PlaySound(SOUND_FAST_UP); }

9.496

ex_PlayTone.nxc

This is an example of how to use the PlayTone function.


PlayTone(440, 500); // Play A for one half second

9.497

ex_PlayToneEx.nxc

This is an example of how to use the PlayToneEx function.


PlayToneEx(440, 500, 2, false);

9.498

ex_playtones.nxc

This is an example of how to use the PlayTones function along with the Tone structure.
Tone sweepUp[] = { TONE_C4, MS_50, TONE_E4, MS_50, TONE_G4, MS_50, TONE_C5, MS_50, TONE_E5, MS_50, TONE_G5, MS_50, TONE_C6, MS_200 }; task main() { PlayTones(sweepUp); Wait(SEC_1); }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.499

ex_PointOut.nxc

1902

9.499

ex_PointOut.nxc

This is an example of how to use the PointOut function.


PointOut(40, 40);

9.500

ex_PolyOut.nxc

This is an example of how to use the PolyOut function.


LocationType myPoints[] = {16,16, 8,40, 32,52, 20,36, 52,36, 56,52, 64,32, 44,20, 24,20}; task main() { PolyOut(myPoints, false); Wait(SEC_2); ClearScreen(); for(int i=0;i<10;i++) { PolyOut(myPoints, DRAW_OPT_LOGICAL_XOR|DRAW_OPT_FILL_SHAPE); Wait(SEC_1); } PolyOut(myPoints, true|DRAW_OPT_FILL_SHAPE); Wait(SEC_2); ClearScreen(); for (int i=0;i<100;i++) { PolyOut(myPoints, DRAW_OPT_LOGICAL_XOR|DRAW_OPT_FILL_SHAPE); Wait(MS_100); } Wait(SEC_1); }

9.501

ex_Pos.nxc

This is an example of how to use the Pos and NumOut functions.


task main() { string s1 = "hi there"; string s2 = "the"; NumOut(0, LCD_LINE1, Pos(s2, s1)); while(true); }

9.502

ex_PosReg.nxc

This is an example of how to use the PosRegEnable, PosRegSetAngle, PosRegAddAngle, PosRegSetMax, SetMotorRegulationTime, SetMotorRegulationOptions, MoGenerated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.503

ex_pow.nxc

1903

torRegulationTime, MotorRegulationOptions, MotorMaxSpeed, and MotorMaxAcceleration functions.


task main() { byte rt = MotorRegulationTime(); SetMotorRegulationTime(MS_10); byte ro = MotorRegulationOptions(); SetMotorRegulationOptions(OUT_REGOPTION_NO_SATURATION); PosRegSetMax(OUT_A, 75, 15); byte ms = MotorMaxSpeed(OUT_A); byte ma = MotorMaxAcceleration(OUT_A); PosRegEnable(OUT_A); PosRegSetAngle(OUT_A, 360); Wait(5000); PosRegAddAngle(OUT_A, 360); Wait(5000); }

9.503

ex_pow.nxc

This is an example of how to use the pow function.


y = pow(x, 3);

9.504

ex_PowerDown.nxc

This is an example of how to use the PowerDown functions.


PowerDown();

9.505

ex_Precedes.nxc

This is an example of how to use the Precedes statement.


Precedes(moving, drawing, playing);

9.506

ex_printf.nxc

This is an example of how to use the printf function.


printf("value = %d", value);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.507

ex_PSPNxAnalog.nxc

1904

9.507

ex_PSPNxAnalog.nxc

This is an example of how to use the PSPNxAnalog function.


char result = PSPNxAnalog(S1, MS_ADDR_PSPNX);

9.508

ex_PSPNxDigital.nxc

This is an example of how to use the PSPNxDigital function.


char result = PSPNxDigital(S1, MS_ADDR_PSPNX);

9.509

ex_putc.nxc

This is an example of how to use the putc function.


putc(ch, handle);

9.510

ex_rand.nxc

This is an example of how to use the rand function.


unsigned int x = rand(); // 0..RAND_MAX-1

9.511

ex_Random.nxc

This is an example of how to use the Random function.


int x = Random(); // signed int between -32767..32767 unsigned i = Random(100); // 0..99 int ending = 4000, starting = 1000; unsigned int j = Random(ending-starting)+starting; // 1000..3999

9.512

ex_Read.nxc

This is an example of how to use the Read function.


result = Read(handle, value);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.513

ex_ReadButtonEx.nxc

1905

9.513

ex_ReadButtonEx.nxc

This is an example of how to use the ReadButtonEx function.


ReadButtonEx(BTN1, true, pressed, count);

9.514

ex_ReadBytes.nxc

This is an example of how to use the ReadBytes function.


result = ReadBytes(handle, len, buffer);

9.515

ex_readi2cregister.nxc

This is an example of how to use the ReadI2CRegister function.


char result = ReadI2CRegister(S1, I2C_ADDR_DEFAULT, I2C_REG_CMD, out);

9.516

ex_ReadLn.nxc

This is an example of how to use the ReadLn function.


result = ReadLn(handle, value);

9.517

ex_ReadNRLinkBytes.nxc

This is an example of how to use the ReadNRLinkBytes function.


bool result = ReadNRLinkBytes(S1, MS_ADDR_NRLINK, data);

9.518

ex_ReadSensorColorEx.nxc

This is an example of how to use the ReadSensorColorEx function.


unsigned int rawData[], normData[]; int scaledData[]; int cval; int result = ReadSensorColorEx(S1, cval, rawData, normData, scaledData);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.519

ex_ReadSensorColorRaw.nxc

1906

9.519

ex_ReadSensorColorRaw.nxc

This is an example of how to use the ReadSensorColorRaw function.


unsigned int rawData[]; int result = ReadSensorColorRaw(S1, rawData);

9.520

ex_ReadSensorEMeter.nxc

This is an example of how to use the ReadSensorEMeter function.


float vIn, aIn, vOut, aOut, wIn, wOut; int joules; char result = ReadSensorEMeter(S1, vIn, aIn, vOut, aOut, joules, wIn, wOut);

9.521

ex_ReadSensorHTAccel.nxc

This is an example of how to use the ReadSensorHTAccel function.


bVal = ReadSensorHTAccel(S1, x, y, z);

9.522

ex_ReadSensorHTAngle.nxc

This is an example of how to use the ReadSensorHTAngle function.


task main() { int angle, rpm; long accangle; SetSensorLowspeed(S4); while (true) { ClearScreen(); ReadSensorHTAngle(S4, angle, accangle, rpm); NumOut(0, LCD_LINE1, angle); NumOut(0, LCD_LINE2, accangle); NumOut(0, LCD_LINE3, rpm); Wait(MS_500); } }

9.523

ex_ReadSensorHTColor.nxc

This is an example of how to use the ReadSensorHTColor function.


bVal = ReadSensorHTColor(S1, c, r, g, b);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.524

ex_ReadSensorHTColor2Active.nxc

1907

9.524

ex_ReadSensorHTColor2Active.nxc

This is an example of how to use the ReadSensorHTColor2Active function.


byte cnum, red, green, blue, white; bool result = ReadSensorHTColor2Active(S1, cnum, red, green, blue, white);

9.525

ex_ReadSensorHTIRReceiver.nxc

This is an example of how to use the ReadSensorHTIRReceiver function.


char pfdata[]; bool result = ReadSensorHTIRReceiver(S1, pfdata);

9.526

ex_ReadSensorHTIRReceiverEx.nxc

This is an example of how to use the ReadSensorHTIRReceiverEx function.


char pfchar; bool result = ReadSensorHTIRReceiverEx(S1, HT_CH1_A, pfchar);

9.527

ex_ReadSensorHTIRSeeker.nxc

This is an example of how to use the ReadSensorHTIRSeeker function.


bVal = ReadSensorHTIRSeeker(port, dir, s1, s3, s5, s7, s9);

9.528

ex_ReadSensorHTIRSeeker2AC.nxc

This is an example of how to use the ReadSensorHTIRSeeker2AC function.


byte s1, s3, s5, s7, s9; bool result = ReadSensorHTIRSeeker2AC(S1, dir, s1, s3, s5, s7, s9);

9.529

ex_ReadSensorHTIRSeeker2DC.nxc

This is an example of how to use the ReadSensorHTIRSeeker2DC function.


byte s1, s3, s5, s7, s9, avg; bool result = ReadSensorHTIRSeeker2DC(S1, dir, s1, s3, s5, s7, s9, avg);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.530

ex_ReadSensorHTNormalizedColor.nxc

1908

9.530

ex_ReadSensorHTNormalizedColor.nxc

This is an example of how to use the ReadSensorHTNormalizedColor function.


bVal = ReadSensorHTNormalizedColor(S1, c, r, g, b);

9.531

ex_ReadSensorHTNormalizedColor2Active.nxc

This is an example of how to use the ReadSensorHTNormalizedColor2Active function.


byte cidx, red, green, blue; bool result = ReadSensorHTNormalizedColor2Active(S1, cidx, red, green, blue);

9.532

ex_ReadSensorHTRawColor.nxc

This is an example of how to use the ReadSensorHTRawColor function.


bVal = ReadSensorHTRawColor(S1, r, g, b);

9.533

ex_ReadSensorHTRawColor2.nxc

This is an example of how to use the ReadSensorHTRawColor2 function.


unsigned int red, green, blue, white; bool result = ReadSensorHTRawColor2(S1, red, green, blue, white);

9.534

ex_ReadSensorHTTouchMultiplexer.nxc

This is an example of how to use the ReadSensorHTTouchMultiplexer function.


task main() { byte t1, t2, t3, t4; SetSensorTouch(S1); while (true) { ReadSensorHTTouchMultiplexer(S1, t1, t2, t3, t4); if (t1) TextOut(0, LCD_LINE1, "1 pressed" ); else TextOut(0, LCD_LINE1, " " ); if (t2) TextOut(0, LCD_LINE2, "2 pressed" ); else

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.535

ex_ReadSensorMSAccel.nxc

1909

TextOut(0, if (t3) TextOut(0, else TextOut(0, if (t4) TextOut(0, else TextOut(0, } }

LCD_LINE2, "

" );

LCD_LINE3, "3 pressed" ); LCD_LINE3, " " );

LCD_LINE4, "4 pressed" ); LCD_LINE4, " " );

9.535

ex_ReadSensorMSAccel.nxc

This is an example of how to use the ReadSensorMSAccel function.


int x, y, z; bool result = ReadSensorMSAccel(S1, MS_ADDR_ACCLNX, x, y, z);

9.536

ex_ReadSensorMSPlayStation.nxc

This is an example of how to use the ReadSensorMSPlayStation function.


byte btnset1, btnset2, xleft, yleft, xright, yright; bool result = ReadSensorMSPlayStation(S1, MS_ADDR_PSPNX, btnset1, btnset2, xleft, yleft, xright, yright);

9.537

ex_ReadSensorMSRTClock.nxc

This is an example of how to use the ReadSensorMSRTClock function.


ReadSensorMSRTClock(S1, ss, mm, hh, dow, dd, mon, yy);

9.538

ex_ReadSensorMSTilt.nxc

This is an example of how to use the ReadSensorMSTilt function.


byte x, y, z; bool result = ReadSensorMSTilt(S1, MS_ADDR_ACCLNX, x, y, z);

9.539

ex_ReadSensorUSEx.nxc

This is an example of how to use the ReadSensorUSEx function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.540

ex_RebootInFirmwareMode.nxc

1910

byte values[]; char result = ReadSensorUSEx(S1, values);

9.540

ex_RebootInFirmwareMode.nxc

This is an example of how to use the RebootInFirmwareMode functions.


RebootInFirmwareMode();

9.541

ex_ReceiveMessage.nxc

This is an example of how to use the ReceiveMessage function.


x = RecieveMessage(MAILBOX1, true, buffer);

9.542

ex_ReceiveRemoteBool.nxc

This is an example of how to use the ReceiveRemoteBool function.


x = ReceiveRemoteBool(MAILBOX1, true, bvalue);

9.543

ex_ReceiveRemoteMessageEx.nxc

This is an example of how to use the ReceiveRemoteMessageEx function.


x = ReceiveRemoteMessageEx(MAILBOX1, true, strval, val, bval);

9.544

ex_ReceiveRemoteNumber.nxc

This is an example of how to use the ReceiveRemoteNumber function.


x = ReceiveRemoteBool(MAILBOX1, true, value);

9.545

ex_ReceiveRemoteString.nxc

This is an example of how to use the ReceiveRemoteString function.


x = ReceiveRemoteString(queue, true, strval);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.546

ex_RechargeableBattery.nxc

1911

9.546

ex_RechargeableBattery.nxc

This is an example of how to use the RechargeableBattery function.


x = RechargeableBattery();

9.547

ex_RectOut.nxc

This is an example of how to use the RectOut function.


RectOut(40, 40, 30, 10);

9.548

ex_reladdressof.nxc

This is an example of how to use the reladdressOf function.


task main() { char x[]={1, 2, 3, 4, 5, 6, 7, 8, 9, 0}; unsigned long ptr = reladdressOf(x); TextOut(0, LCD_LINE1, FormatNum("%x", ptr)); IOMapReadByIDType args; args.ModuleID = CommandModuleID; args.Offset = CommandOffsetMemoryPool+ptr; args.Count = 10; SysIOMapReadByID(args); NumOut( 0, LCD_LINE2, x[0]); NumOut(20, LCD_LINE2, x[1]); NumOut(40, LCD_LINE2, x[2]); NumOut(60, LCD_LINE2, x[3]); NumOut(80, LCD_LINE2, x[4]); NumOut( 0, LCD_LINE3, args.Buffer[0]); NumOut(20, LCD_LINE3, args.Buffer[1]); NumOut(40, LCD_LINE3, args.Buffer[2]); NumOut(60, LCD_LINE3, args.Buffer[3]); NumOut(80, LCD_LINE3, args.Buffer[4]); args.Buffer++; args.Buffer *= 3; IOMapWriteByIDType a2; a2.ModuleID = CommandModuleID; a2.Offset = CommandOffsetMemoryPool+ptr; a2.Buffer = args.Buffer; SysIOMapWriteByID(a2); NumOut( 0, LCD_LINE4, x[0]); NumOut(20, LCD_LINE4, x[1]); NumOut(40, LCD_LINE4, x[2]); NumOut(60, LCD_LINE4, x[3]); NumOut(80, LCD_LINE4, x[4]); Wait(SEC_10); }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.549

ex_Release.nxc

1912

9.549

ex_Release.nxc

This is an example of how to use the Release function.


Acquire(motorMutex); // make sure we have exclusive access // use the motors Release(motorMutex); // release mutex for other tasks

9.550

ex_RemoteBluetoothFactoryReset.nxc

This is an example of how to use the RemoteBluetoothFactoryReset function.


char result = RemoteBluetoothFactoryReset(CONN_HS1); // cannot be used over a blu eooth connection

9.551

ex_RemoteCloseFile.nxc

This is an example of how to use the RemoteCloseFile function.


char result = RemoteCloseFile(CONN_BT1, handle);

9.552

ex_RemoteConnectionIdle.nxc

This is an example of how to use the RemoteConnectionIdle function.


bool result = RemoteConnectionIdle(CONN_BT1);

9.553

ex_RemoteConnectionWrite.nxc

This is an example of how to use the RemoteConnectionWrite function.


char result = RemoteConnectionWrite(CONN_BT1, dataBuf);

9.554

ex_RemoteDatalogRead.nxc

This is an example of how to use the RemoteDatalogRead function.


byte count; byte data[]; char result = RemoteDatalogRead(CONN_BT1, true, count, data);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.555

ex_RemoteDatalogSetTimes.nxc

1913

9.555

ex_RemoteDatalogSetTimes.nxc

This is an example of how to use the RemoteDatalogSetTimes function.


char result = RemoteDatalogSetTimes(CONN_BT1, 1000);

9.556

ex_RemoteDeleteFile.nxc

This is an example of how to use the RemoteDeleteFile function.


char result = RemoteDeleteFile(CONN_BT1, "test.dat");

9.557

ex_RemoteDeleteUserFlash.nxc

This is an example of how to use the RemoteDeleteUserFlash function.


char result = RemoteDeleteUserFlash(CONN_BT1);

9.558

ex_RemoteFindFirstFile.nxc

This is an example of how to use the RemoteFindFirstFile function.


long size; string name; byte handle; char result = RemoteFindFirstFile(CONN_BT1, "*.rxe", handle, name, size);

9.559

ex_RemoteFindNextFile.nxc

This is an example of how to use the RemoteFindNextFile function.


byte handle; string name; long size; char result = RemoteFindNextFile(CONN_BT1, handle, name, size);

9.560

ex_RemoteGetBatteryLevel.nxc

This is an example of how to use the RemoteGetBatteryLevel function.


int blevel; char result = RemoteGetBatteryLevel(CONN_BT1, blevel);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.561

ex_RemoteGetBluetoothAddress.nxc

1914

9.561

ex_RemoteGetBluetoothAddress.nxc

This is an example of how to use the RemoteGetBluetoothAddress function.


byte btaddr[]; char result = RemoteGetBluetoothAddress(CONN_BT1, btaddr);

9.562

ex_RemoteGetConnectionCount.nxc

This is an example of how to use the RemoteGetConnectionCount function.


byte cnt; char result = RemoteGetConnectionCount(CONN_BT1, cnt);

9.563

ex_RemoteGetConnectionName.nxc

This is an example of how to use the RemoteGetConnectionName function.


string name; byte idx = 1; char result = RemoteGetConnectionName(CONN_BT1, idx, name);

9.564

ex_RemoteGetContactCount.nxc

This is an example of how to use the RemoteGetContactCount function.


byte cnt; char result = RemoteGetContactCount(CONN_BT1, cnt);

9.565

ex_RemoteGetContactName.nxc

This is an example of how to use the RemoteGetContactName function.


string name; byte idx = 1; char result = RemoteGetContactName(CONN_BT1, idx, name);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.566

ex_RemoteGetCurrentProgramName.nxc

1915

9.566

ex_RemoteGetCurrentProgramName.nxc

This is an example of how to use the RemoteGetCurrentProgramName function.


string name; char result = RemoteGetCurrentProgramName(CONN_BT1, name);

9.567

ex_RemoteGetDeviceInfo.nxc

This is an example of how to use the RemoteGetDeviceInfo function.


string name; byte btaddr[], btsignal[]; long freemem; char result = RemoteGetDeviceInfo(CONN_BT1, name, btaddr, btsignal, freemem);

9.568

ex_RemoteGetFirmwareVersion.nxc

This is an example of how to use the RemoteGetFirmwareVersion function.


byte pmin, pmaj, fmin, fmaj; char result = RemoteGetFirmwareVersion(CONN_BT1, pmin, pmaj, fmin, fmaj);

9.569

ex_RemoteGetInputValues.nxc

This is an example of how to use the RemoteGetInputValues function.


InputValuesType params; char result = RemoteGetInputValues(CONN_BT1, params);

9.570

ex_RemoteGetOutputState.nxc

This is an example of how to use the RemoteGetOutputState function.


OutputStateType params; char result = RemoteGetOutputState(CONN_BT1, params);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.571

ex_RemoteGetProperty.nxc

1916

9.571

ex_RemoteGetProperty.nxc

This is an example of how to use the RemoteGetProperty function.


byte value; char result = RemoteGetProperty(CONN_BT1, RC_PROP_SOUND_LEVEL, value);

9.572

ex_RemoteIOMapRead.nxc

This is an example of how to use the RemoteIOMapRead function.


int numbytes = 1; byte data[]; char result = RemoteIOMapRead(CONN_BT1, CommandModuleID, CommandOffsetProgStatus, numbytes, data);

9.573

ex_RemoteIOMapWriteBytes.nxc

This is an example of how to use the RemoteIOMapWriteBytes function.


byte data[] = {1}; char result = RemoteIOMapWriteBytes(CONN_BT1, CommandModuleID, CommandOffsetProgStatus, data);

9.574

ex_RemoteIOMapWriteValue.nxc

This is an example of how to use the RemoteIOMapWriteValue function.


byte value; char result = RemoteIOMapWriteValue(CONN_BT1, CommandModuleID, CommandOffsetProgStatus, value);

9.575

ex_RemoteKeepAlive.nxc

This is an example of how to use the RemoteKeepAlive function.


x = RemoteKeepAlive(1);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.576

ex_RemoteLowspeedGetStatus.nxc

1917

9.576

ex_RemoteLowspeedGetStatus.nxc

This is an example of how to use the RemoteLowspeedGetStatus function.


byte value; char result = RemoteLowspeedGetStatus(CONN_BT1, value);

9.577

ex_RemoteLowspeedRead.nxc

This is an example of how to use the RemoteLowspeedRead function.


byte port = S1; byte bread; byte data[]; char result = RemoteLowspeedRead(CONN_BT1, port, bread, data);

9.578

ex_RemoteLowspeedWrite.nxc

This is an example of how to use the RemoteLowspeedWrite function.


byte byte byte byte port = S1; txlen = 2; rxlen = 8; data[] = {0x02, 0x00};

char result = RemoteLowspeedWrite(CONN_BT1, port, txlen, rxlen, data);

9.579

ex_RemoteMessageRead.nxc

This is an example of how to use the RemoteMessageRead function.


x = RemoteMessageRead(1, 5);

9.580

ex_RemoteMessageWrite.nxc

This is an example of how to use the RemoteMessageWrite function.


x = RemoteMessageWrite(1, 5, "test");

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.581

ex_RemoteOpenAppendData.nxc

1918

9.581

ex_RemoteOpenAppendData.nxc

This is an example of how to use the RemoteOpenAppendData function.


byte handle; long size; char result = RemoteOpenAppendData(CONN_BT1, "test.dat", handle, size);

9.582

ex_RemoteOpenRead.nxc

This is an example of how to use the RemoteOpenRead function.


byte handle; long size; char result = RemoteOpenRead(CONN_BT1, "test.dat", handle, size);

9.583

ex_RemoteOpenWrite.nxc

This is an example of how to use the RemoteOpenWrite function.


byte handle; long size = 1024; char result = RemoteOpenWrite(CONN_BT1, "test.dat", size, handle);

9.584

ex_RemoteOpenWriteData.nxc

This is an example of how to use the RemoteOpenWriteData function.


byte handle; long size = 1024; char result = RemoteOpenWriteData(CONN_BT1, "test.dat", size, handle);

9.585

ex_RemoteOpenWriteLinear.nxc

This is an example of how to use the RemoteOpenWriteLinear function.


byte handle; long size = 1024; char result = RemoteOpenWriteLinear(CONN_BT1, "test.rxe", size, handle);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.586

ex_RemotePlaySoundFile.nxc

1919

9.586

ex_RemotePlaySoundFile.nxc

This is an example of how to use the RemotePlaySoundFile function.


x = RemotePlaySoundFile(1, "click.rso", false);

9.587

ex_RemotePlayTone.nxc

This is an example of how to use the RemotePlayTone function.


x = RemotePlayTone(1, 440, 1000);

9.588

ex_RemotePollCommand.nxc

This is an example of how to use the RemotePollCommand function.


byte len; byte data[]; char result = RemotePollCommand(CONN_BT1, 0, len, data);

9.589

ex_RemotePollCommandLength.nxc

This is an example of how to use the RemotePollCommandLength function.


byte len; char result = RemotePollCommandLength(CONN_BT1, 0, len);

9.590

ex_RemoteRead.nxc

This is an example of how to use the RemoteRead function.


byte handle; int numbytes = 10; byte data[]; char result = RemoteRead(CONN_BT1, handle, numbytes, data);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.591

ex_RemoteRenameFile.nxc

1920

9.591

ex_RemoteRenameFile.nxc

This is an example of how to use the RemoteRenameFile function.


char result = RemoteRenameFile(CONN_BT1, "test.dat", "test2.dat");

9.592

ex_RemoteResetMotorPosition.nxc

This is an example of how to use the RemoteResetMotorPosition function.


x = RemoteResetMotorPosition(1, OUT_A, true);

9.593

ex_RemoteResetScaledValue.nxc

This is an example of how to use the RemoteResetScaledValue function.


x = RemoteResetScaledValue(1, S1);

9.594

ex_RemoteResetTachoCount.nxc

This is an example of how to use the RemoteResetTachoCount function.


char result = RemoteResetTachoCount(CONN_BT1, OUT_A);

9.595

ex_RemoteSetBrickName.nxc

This is an example of how to use the RemoteSetBrickName function.


char result = RemoteSetBrickName(CONN_HS1, "NEWNAME");

9.596

ex_RemoteSetInputMode.nxc

This is an example of how to use the RemoteSetInputMode function.


x = RemoteSetInputMode(1, S1, SENSOR_TYPE_LOWSPEED, SENSOR_MODE_RAW);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.597

ex_RemoteSetOutputState.nxc

1921

9.597

ex_RemoteSetOutputState.nxc

This is an example of how to use the RemoteSetOutputState function.


x = RemoteSetOutputState(1, OUT_A, 75, OUT_MODE_MOTORON, OUT_REGMODE_IDLE, 0, OUT_RUNSTATE_RUNNING, 0);

9.598

ex_RemoteSetProperty.nxc

This is an example of how to use the RemoteSetProperty function.


byte value = 3; char result = RemoteSetProperty(CONN_BT1, RC_PROP_SOUND_LEVEL, value);

9.599

ex_RemoteStartProgram.nxc

This is an example of how to use the RemoteStartProgram function.


x = RemoteStartProgram(1, "myprog.rxe");

9.600

ex_RemoteStopProgram.nxc

This is an example of how to use the RemoteStopProgram function.


x = RemoteStopProgram(1);

9.601

ex_RemoteStopSound.nxc

This is an example of how to use the RemoteStopSound function.


x = RemoteStopSound(1);

9.602

ex_RemoteWrite.nxc

This is an example of how to use the RemoteWrite function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.603

ex_remove.nxc

1922

byte handle; int numbytes = 10; byte data[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0}; char result = RemoteWrite(CONN_BT1, handle, numbytes, data);

9.603

ex_remove.nxc

This is an example of how to use the remove function.


result = remove("data.txt");

9.604

ex_rename.nxc

This is an example of how to use the rename function.


result = rename("data.txt", "mydata.txt");

9.605

ex_RenameFile.nxc

This is an example of how to use the RenameFile function.


result = RenameFile("data.txt", "mydata.txt");

9.606

ex_resetalltachocounts.nxc

This is an example of how to use the ResetAllTachoCounts function.


ResetAllTachoCounts(OUT_AB);

9.607

ex_resetblocktachocount.nxc

This is an example of how to use the ResetBlockTachoCount function.


ResetBlockTachoCount(OUT_AB);

9.608

ex_resetrotationcount.nxc

This is an example of how to use the ResetRotationCount function.


ResetRotationCount(OUT_AB);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.609

ex_ResetScreen.nxc

1923

9.609

ex_ResetScreen.nxc

This is an example of how to use the ResetScreen function.


ResetScreen();

9.610

ex_ResetSensor.nxc

This is an example of how to use the ResetSensor function.


ResetSensor(x); // x = S1

9.611

ex_ResetSensorHTAngle.nxc

This is an example of how to use the ResetSensorHTAngle function.


task main () { SetSensorLowspeed(S4); ResetSensorHTAngle(S4, HTANGLE_MODE_RESET); Wait(50); }

9.612

ex_ResetSleepTimer.nxc

This is an example of how to use the ResetSleepTimer function.


ResetSleepTimer();

9.613

ex_resettachocount.nxc

This is an example of how to use the ResetTachoCount function.


ResetTachoCount(OUT_AB);

9.614

ex_resizele.nxc

This is an example of how to use the ResizeFile function.


result = ResizeFile("data.txt", 2048);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.615

ex_ResolveHandle.nxc

1924

9.615

ex_ResolveHandle.nxc

This is an example of how to use the ResolveHandle function.


result = ResolveHandle("data.txt", handle, bCanWrite);

9.616

ex_rewind.nxc

This is an example of how to use the rewind function.


rewind(handle);

9.617

ex_RFIDInit.nxc

This is an example of how to use the RFIDInit function.


bool result = RFIDInit(S1);

9.618

ex_RFIDMode.nxc

This is an example of how to use the RFIDMode function.


bool result = RFIDMode(S1, RFID_MODE_CONTINUOUS);

9.619

ex_RFIDRead.nxc

This is an example of how to use the RFIDRead function.


byte output[]; bool result = RFIDRead(S1, output);

9.620

ex_RFIDReadContinuous.nxc

This is an example of how to use the RFIDReadContinuous function.


byte output[]; bool result = RFIDReadContinuous(S1, output);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.621

ex_RFIDReadSingle.nxc

1925

9.621

ex_RFIDReadSingle.nxc

This is an example of how to use the RFIDReadSingle function.


byte output[]; bool result = RFIDReadSingle(S1, output);

9.622

ex_RFIDStatus.nxc

This is an example of how to use the RFIDStatus function.


byte result = RFIDStatus(S1);

9.623

ex_RFIDStop.nxc

This is an example of how to use the RFIDStop function.


bool result = RFIDStop(S1);

9.624

ex_rightstr.nxc

This is an example of how to use the RightStr function.


task main() { string s = "Now is the winter of our discontent"; TextOut(0, LCD_LINE1, RightStr(s, 12)); Wait(SEC_4); }

9.625

ex_rotatemotor.nxc

This is an example of how to use the RotateMotor function.


RotateMotor(OUT_A, 75, 45); // forward 45 degrees RotateMotor(OUT_A, -75, 45); // reverse 45 degrees

9.626

ex_rotatemotorex.nxc

This is an example of how to use the RotateMotorEx function.


RotateMotorEx(OUT_AB, 75, 360, 50, true, true);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.627

ex_rotatemotorexpid.nxc

1926

9.627

ex_rotatemotorexpid.nxc

This is an example of how to use the RotateMotorExPID function.


RotateMotorExPID(OUT_AB, 75, 360, 50, true, true, 30, 50, 90);

9.628

ex_rotatemotorpid.nxc

This is an example of how to use the RotateMotorPID function.


RotateMotorPID(OUT_A, 75, 45, 20, 40, 100);

9.629

ex_RS485Receive.nxc

This is an example of how to use the RS485Control, RS485DataAvailable, RS485Disable, RS485Initialize, RS485Enable, UseRS485, RS485Uart, RS485Status, RS485Read, TextOut, and Wait functions.
// RS-485 receiver program task main() { byte mlen; string buffer; // configure the S4 port as RS485 UseRS485(); // make sure the RS485 system is turned on RS485Enable(); // initialize the UART to default values RS485Initialize(); Wait(MS_10); while (true) { // wait for a message to arrive. until(RS485DataAvailable()); RS485Read(buffer); // display message TextOut(0, LCD_LINE1, buffer); } // shut down the RS485 system RS485Disable(); bool sendingData, dataAvail; // check RS485 status RS485Status(sendingData, dataAvail); // turn the system back on (this is equivalent to RS485Enable) RS485Control(HS_CTRL_INIT, HS_BAUD_DEFAULT, HS_MODE_DEFAULT); // configure the UART (this is equivalent to RS485Initialize) RS485Uart(HS_BAUD_DEFAULT, HS_MODE_DEFAULT); }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.630

ex_RS485Send.nxc

1927

9.630

ex_RS485Send.nxc

This is an example of how to use the RS485Control, RS485Disable, RS485Initialize, RS485Enable, UseRS485, RS485Uart, RS485Status, RS485Write, RS485SendingData, SendRS485String, SendRS485Bool, SendRS485Number, TextOut, and Wait functions.
// RS-485 sender program inline void WaitForMessageToBeSent() { #if 0 // using low level functions to wait for RS485 message to be sent bool sending, avail; RS485Status(sending, avail); while (sending) { Wait(MS_1); RS485Status(sending, avail); } #else // use hi level API functions (preferred) while (RS485SendingData()) Wait(MS_1); #endif } task main() { // configure the S4 port as RS485 UseRS485(); // make sure the RS485 system is turned on #if 0 // low level API function call RS485Control(HS_CTRL_INIT, HS_BAUD_DEFAULT, HS_MODE_DEFAULT); #else // hi level API function call RS485Enable(); #endif // initialize the UART to default values #if 0 // low level API function call (allows changing UART settings) RS485Uart(HS_BAUD_DEFAULT, HS_MODE_DEFAULT); #else // hi level API function call RS485Initialize(); #endif Wait(MS_10); int i; while (true) { string msg; msg = "goofy "; msg += NumToStr(i); TextOut(0, LCD_LINE1, msg); SendRS485String(msg); WaitForMessageToBeSent();

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.631

ex_RunNRLinkMacro.nxc

1928

#if 0 // the RS485 receiver sample program is not written // in a way to handle these additional messages // so do not send them (yet) RS485Write(msg); WaitForMessageToBeSent(); SendRS485Bool(true); WaitForMessageToBeSent(); SendRS485Number(i); WaitForMessageToBeSent(); #endif i++; } // disable RS485 (not usually needed) RS485Disable(); }

9.631

ex_RunNRLinkMacro.nxc

This is an example of how to use the RunNRLinkMacro function.


char result = RunNRLinkMacro(S1, MS_ADDR_NRLINK, macro);

9.632

ex_SendMessage.nxc

This is an example of how to use the SendMessage function.


x = SendMessage(MAILBOX1, data);

9.633

ex_SendRemoteBool.nxc

This is an example of how to use the SendRemoteBool function.


x = SendRemoteBool(1, MAILBOX1, false);

9.634

ex_SendRemoteNumber.nxc

This is an example of how to use the SendRemoteNumber function.


x = SendRemoteNumber(1, MAILBOX1, 123);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.635

ex_SendRemoteString.nxc

1929

9.635

ex_SendRemoteString.nxc

This is an example of how to use the SendRemoteString function.


x = SendRemoteString(1, MAILBOX1, "hello world");

9.636

ex_SendResponseBool.nxc

This is an example of how to use the SendResponseBool function.


x = SendResponseBool(MAILBOX1, false);

9.637

ex_SendResponseNumber.nxc

This is an example of how to use the SendResponseNumber function.


x = SendResponseNumber(MAILBOX1, 123);

9.638

ex_SendResponseString.nxc

This is an example of how to use the SendResponseString function.


x = SendResponseString(MAILBOX1, "hello world");

9.639

ex_Sensor.nxc

This is an example of how to use the Sensor function.


x = Sensor(S1); // read sensor 1

9.640

ex_SensorBoolean.nxc

This is an example of how to use the SensorBoolean function.


x = SensorBoolean(S1);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.641

ex_SensorDigiPinsDirection.nxc

1930

9.641

ex_SensorDigiPinsDirection.nxc

This is an example of how to use the SensorDigiPinsDirection function.


x = SensorDigiPinsDirection(S1);

9.642

ex_SensorDigiPinsOutputLevel.nxc

This is an example of how to use the SensorDigiPinsOutputLevel function.


x = SensorDigiPinsOutputLevel(S1);

9.643

ex_SensorDigiPinsStatus.nxc

This is an example of how to use the SensorDigiPinsStatus function.


x = SensorDigiPinsStatus(S1);

9.644

ex_SensorHTColorNum.nxc

This is an example of how to use the SensorHTColorNum function.


x = SensorHTColorNum(S1);

9.645

ex_SensorHTCompass.nxc

This is an example of how to use the SensorHTCompass function.


x = SensorHTCompass(S1);

9.646

ex_SensorHTEOPD.nxc

This is an example of how to use the SensorHTEOPD function.


int val = SensorHTEOPD(S1);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.647

ex_SensorHTGyro.nxc

1931

9.647

ex_SensorHTGyro.nxc

This is an example of how to use the SensorHTGyro function.


task main() { int offset = 400; SetSensorHTGyro(S1); NumOut(0, LCD_LINE1, SensorHTGyro(S1, offset+5)); Wait(SEC_9); }

9.648

ex_SensorHTIRSeeker2ACDir.nxc

This is an example of how to use the SensorHTIRSeeker2ACDir function.


int val = SensorHTIRSeeker2ACDir(S1);

9.649

ex_SensorHTIRSeeker2Addr.nxc

This is an example of how to use the SensorHTIRSeeker2Addr function.


int val = SensorHTIRSeeker2Addr(S1, HTIR2_REG_DCAVG);

9.650

ex_SensorHTIRSeeker2DCDir.nxc

This is an example of how to use the SensorHTIRSeeker2DCDir function.


int val = SensorHTIRSeeker2DCDir(S1);

9.651

ex_SensorHTIRSeekerDir.nxc

This is an example of how to use the SensorHTIRSeekerDir function.


x = SensorHTIRSeekerDir(S1);

9.652

ex_SensorHTMagnet.nxc

This is an example of how to use the SensorHTMagnet function.


int value = SensorHTMagnet(S1);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.653

ex_SensorInvalid.nxc

1932

9.653

ex_SensorInvalid.nxc

This is an example of how to use the SensorInvalid function.


x = SensorInvalid(S1);

9.654

ex_SensorMode.nxc

This is an example of how to use the SensorMode function.


x = SensorMode(S1);

9.655

ex_SensorMSCompass.nxc

This is an example of how to use the SensorMSCompass function.


x = SensorMSCompass(S1, MS_ADDR_CMPSNX);

9.656

ex_SensorMSDROD.nxc

This is an example of how to use the SensorMSDROD function.


x = SensorMSDROD(S1);

9.657

ex_SensorMSPressure.nxc

This is an example of how to use the SensorMSPressure function.


int val = SensorMSPressure(S1);

9.658

ex_SensorMSPressureRaw.nxc

This is an example of how to use the SensorMSPressureRaw function.


int val = SensorMSPressureRaw(S1);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.659

ex_SensorNormalized.nxc

1933

9.659

ex_SensorNormalized.nxc

This is an example of how to use the SensorNormalized function.


x = SensorNormalized(S1);

9.660

ex_SensorRaw.nxc

This is an example of how to use the SensorRaw function.


x = SensorRaw(S1);

9.661

ex_SensorScaled.nxc

This is an example of how to use the SensorScaled function.


x = SensorScaled(S1);

9.662

ex_SensorTemperature.nxc

This is an example of how to use the SensorTemperature function.


float temp = SensorTemperature(S1);

9.663

ex_SensorType.nxc

This is an example of how to use the SensorType function.


x = SensorType(S1);

9.664

ex_SensorUS.nxc

This is an example of how to use the SensorUS function.


x = SensorUS(S4); // read sensor 4

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.665

ex_SensorValue.nxc

1934

9.665

ex_SensorValue.nxc

This is an example of how to use the SensorValue function.


unsigned int val = SensorValue(S1);

9.666

ex_SensorValueBool.nxc

This is an example of how to use the SensorValueBool function.


bool val = SensorValueBool(S1);

9.667

ex_SensorValueRaw.nxc

This is an example of how to use the SensorValueRaw function.


unsigned int val = SensorValueRaw(S1);

9.668

ex_SetAbortFlag.nxc

This is an example of how to use the SetAbortFlag function.


task main() { // Set exit button to end program only if it is pressed for longer than 2 seco nds #ifdef __ENHANCED_FIRMWARE SetLongAbort(true); // is equivalent to SetAbortFlag(BTNSTATE_LONG_PRESSED_EV); #endif while(true) { ClearScreen(); // Display on NXT Screen: "Press the exit button longer (for 2 seconds) to exit" TextOut(0, LCD_LINE1, "Press the exit", 0); TextOut(0, LCD_LINE2, "button longer", 0); TextOut(0, LCD_LINE3, "(for 2 seconds)", 0); TextOut(0, LCD_LINE4, "to exit.", 0);

// Display number of times the user has pressed the exit button (for less t han 2 seconds) NumOut(0, LCD_LINE8, ButtonPressCount(BTNEXIT), 0);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.669

ex_SetACCLNxSensitivity.nxc

1935

// Wait until user presses and releases exit button before continuing loop while(!(ButtonPressed(BTNEXIT, 0))); while(ButtonPressed(BTNEXIT, 0)); } }

9.669

ex_SetACCLNxSensitivity.nxc

This is an example of how to use the SetACCLNxSensitivity function.


result = SetACCLNxSensitivity(S1, MS_ADDR_ACCLNX, ACCL_SENSITIVITY_LEVEL_1);

9.670

ex_SetBatteryState.nxc

This is an example of how to use the SetBatteryState function.


SetBatteryState(4);

9.671

ex_SetBluetoothState.nxc

This is an example of how to use the SetBluetoothState function.


SetBluetoothState(UI_BT_STATE_OFF);

9.672

ex_SetBTInputBuffer.nxc

This is an example of how to use the SetBTInputBuffer function.


SetBTInputBuffer(0, 10, buffer);

9.673

ex_SetBTInputBufferInPtr.nxc

This is an example of how to use the SetBTInputBufferInPtr function.


SetBTInputBufferInPtr(0);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.674

ex_SetBTInputBufferOutPtr.nxc

1936

9.674

ex_SetBTInputBufferOutPtr.nxc

This is an example of how to use the SetBTInputBufferOutPtr function.


SetBTInputBufferOutPtr(0);

9.675

ex_SetBTOutputBuffer.nxc

This is an example of how to use the SetBTOutputBuffer function.


SetBTOutputBuffer(0, 10, buffer);

9.676

ex_SetBTOutputBufferInPtr.nxc

This is an example of how to use the SetBTOutputBufferInPtr function.


SetBTOutputBufferInPtr(0);

9.677

ex_SetBTOutputBufferOutPtr.nxc

This is an example of how to use the SetBTOutputBufferOutPtr function.


SetBTOutputBufferOutPtr(0);

9.678

ex_SetButtonLongPressCount.nxc

This is an example of how to use the SetButtonLongPressCount function.


SetButtonLongPressCount(BTN1, value);

9.679

ex_SetButtonLongReleaseCount.nxc

This is an example of how to use the SetButtonLongReleaseCount function.


SetButtonLongReleaseCount(BTN1, value);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.680

ex_SetButtonPressCount.nxc

1937

9.680

ex_SetButtonPressCount.nxc

This is an example of how to use the SetButtonPressCount function.


SetButtonPressCount(BTN1, value);

9.681

ex_SetButtonReleaseCount.nxc

This is an example of how to use the SetButtonReleaseCount function.


SetButtonReleaseCount(BTN1, value);

9.682

ex_SetButtonShortReleaseCount.nxc

This is an example of how to use the SetButtonShortReleaseCount function.


SetButtonShortReleaseCount(BTN1, value);

9.683

ex_SetButtonState.nxc

This is an example of how to use the SetButtonState function.


SetButtonState(BTN1, BTNSTATE_PRESSED_EV);

9.684

ex_SetCommandFlags.nxc

This is an example of how to use the SetCommandFlags function.


SetCommandFlags(UI_FLAGS_REDRAW_STATUS);

9.685

ex_SetCustomSensorActiveStatus.nxc

This is an example of how to use the SetCustomSensorActiveStatus function.


SetCustomSensorActiveStatus(S1, true);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.686

ex_SetCustomSensorPercentFullScale.nxc

1938

9.686

ex_SetCustomSensorPercentFullScale.nxc

This is an example of how to use the SetCustomSensorPercentFullScale function.


SetCustomSensorPercentFullScale(S1, 100);

9.687

ex_SetCustomSensorZeroOffset.nxc

This is an example of how to use the SetCustomSensorZeroOffset function.


SetCustomSensorZeroOffset(S1, 12);

9.688

ex_setdisplaycontrast.nxc

This is an example of how to use the SetDisplayContrast function.


SetDisplayContrast(DISPLAY_CONTRAST_DEFAULT);

9.689

ex_SetDisplayDisplay.nxc

This is an example of how to use the SetDisplayDisplay function.


SetDisplayDisplay(x);

9.690

ex_SetDisplayEraseMask.nxc

This is an example of how to use the SetDisplayEraseMask function.


SetDisplayEraseMask(x);

9.691

ex_SetDisplayFlags.nxc

This is an example of how to use the SetDisplayFlags function.


SetDisplayFlags(x);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.692

ex_setdisplayfont.nxc

1939

9.692

ex_setdisplayfont.nxc

This is an example of how to use the SetDisplayFont function.


const byte NewFont[] = { 0x04,0x00, // Graphics Format 0x02,0x40, // Graphics DataSize 0x10, // Graphics Count X 0x06, // Graphics Count Y 0x06, // Graphics Width 0x08, // Graphics Height 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x5F,0x06,0x00,0x00,0x07,0x03,0x00,0x07 ,0x03,0x00,0x24,0x7E,0x24,0x7E,0x24,0x00,0x24,0x2B,0x6A,0x12,0x00,0x00,0x63,0x13, 0x08,0x64,0x63,0x00,0x30,0x4C,0x52,0x22,0x50,0x00,0x00,0x07,0x03,0x00,0x00,0x00,0 x00,0x3E,0x41,0x00,0x00,0x00,0x00,0x41,0x3E,0x00,0x00,0x00,0x08,0x3E,0x1C,0x3E,0x 08,0x00,0x08,0x08,0x3E,0x08,0x08,0x00,0x80,0x60,0x60,0x00,0x00,0x00,0x08,0x08,0x0 8,0x08,0x08,0x00,0x00,0x60,0x60,0x00,0x00,0x00,0x20,0x10,0x08,0x04,0x02,0x00, 0x3E,0x51,0x49,0x45,0x3E,0x00,0x00,0x42,0x7F,0x40,0x00,0x00,0x62,0x51,0x49,0x49 ,0x46,0x00,0x22,0x49,0x49,0x49,0x36,0x00,0x18,0x14,0x12,0x7F,0x10,0x00,0x2F,0x49, 0x49,0x49,0x31,0x00,0x3C,0x4A,0x49,0x49,0x30,0x00,0x01,0x71,0x09,0x05,0x03,0x00,0 x36,0x49,0x49,0x49,0x36,0x00,0x06,0x49,0x49,0x29,0x1E,0x00,0x00,0x6C,0x6C,0x00,0x 00,0x00,0x00,0xEC,0x6C,0x00,0x00,0x00,0x08,0x14,0x22,0x41,0x00,0x00,0x24,0x24,0x2 4,0x24,0x24,0x00,0x00,0x41,0x22,0x14,0x08,0x00,0x02,0x01,0x59,0x09,0x06,0x00, 0x3E,0x41,0x5D,0x55,0x1E,0x00,0x7E,0x11,0x11,0x11,0x7E,0x00,0x7F,0x49,0x49,0x49 ,0x36,0x00,0x3E,0x41,0x41,0x41,0x22,0x00,0x7F,0x41,0x41,0x41,0x3E,0x00,0x7F,0x49, 0x49,0x49,0x41,0x00,0x7F,0x09,0x09,0x09,0x01,0x00,0x3E,0x41,0x49,0x49,0x7A,0x00,0 x7F,0x08,0x08,0x08,0x7F,0x00,0x00,0x41,0x7F,0x41,0x00,0x00,0x30,0x40,0x40,0x40,0x 3F,0x00,0x7F,0x08,0x14,0x22,0x41,0x00,0x7F,0x40,0x40,0x40,0x40,0x00,0x7F,0x02,0x0 4,0x02,0x7F,0x00,0x7F,0x02,0x04,0x08,0x7F,0x00,0x3E,0x41,0x41,0x41,0x3E,0x00, 0x7F,0x09,0x09,0x09,0x06,0x00,0x3E,0x41,0x51,0x21,0x5E,0x00,0x7F,0x09,0x09,0x19 ,0x66,0x00,0x26,0x49,0x49,0x49,0x32,0x00,0x01,0x01,0x7F,0x01,0x01,0x00,0x3F,0x40, 0x40,0x40,0x3F,0x00,0x1F,0x20,0x40,0x20,0x1F,0x00,0x3F,0x40,0x3C,0x40,0x3F,0x00,0 x63,0x14,0x08,0x14,0x63,0x00,0x07,0x08,0x70,0x08,0x07,0x00,0x71,0x49,0x45,0x43,0x 00,0x00,0x00,0x7F,0x41,0x41,0x00,0x00,0x02,0x04,0x08,0x10,0x20,0x00,0x00,0x41,0x4 1,0x7F,0x00,0x00,0x04,0x02,0x01,0x02,0x04,0x00,0x80,0x80,0x80,0x80,0x80,0x00, 0x00,0x02,0x05,0x02,0x00,0x00,0x20,0x54,0x54,0x54,0x78,0x00,0x7F,0x44,0x44,0x44 ,0x38,0x00,0x38,0x44,0x44,0x44,0x28,0x00,0x38,0x44,0x44,0x44,0x7F,0x00,0x38,0x54, 0x54,0x54,0x08,0x00,0x08,0x7E,0x09,0x09,0x00,0x00,0x18,0x24,0xA4,0xA4,0xFC,0x00,0 x7F,0x04,0x04,0x78,0x00,0x00,0x00,0x00,0x7D,0x40,0x00,0x00,0x40,0x80,0x84,0x7D,0x 00,0x00,0x7F,0x10,0x28,0x44,0x00,0x00,0x00,0x00,0x7F,0x40,0x00,0x00,0x7C,0x04,0x1 8,0x04,0x78,0x00,0x7C,0x04,0x04,0x78,0x00,0x00,0x38,0x44,0x44,0x44,0x38,0x00, 0xFC,0x44,0x44,0x44,0x38,0x00,0x38,0x44,0x44,0x44,0xFC,0x00,0x44,0x78,0x44,0x04 ,0x08,0x00,0x08,0x54,0x54,0x54,0x20,0x00,0x04,0x3E,0x44,0x24,0x00,0x00,0x3C,0x40, 0x20,0x7C,0x00,0x00,0x1C,0x20,0x40,0x20,0x1C,0x00,0x3C,0x60,0x30,0x60,0x3C,0x00,0 x6C,0x10,0x10,0x6C,0x00,0x00,0x9C,0xA0,0x60,0x3C,0x00,0x00,0x64,0x54,0x54,0x4C,0x 00,0x00,0x08,0x3E,0x41,0x41,0x00,0x00,0x00,0x00,0x77,0x00,0x00,0x00,0x00,0x41,0x4 1,0x3E,0x08,0x00,0x02,0x01,0x02,0x01,0x00,0x00,0x10,0x20,0x40,0x38,0x07,0x00 }; task main() { unsigned long ptr, pOldFont; byte myData[800]; ptr = addr(NewFont); TextOut(0, LCD_LINE1, FormatNum("%x", ptr)); pOldFont = DisplayFont();

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.693

ex_SetDisplayNormal.nxc

1940

SetDisplayFont(ptr); TextOut(0, LCD_LINE2, "Testing 1, 2, 3"); SetDisplayFont(pOldFont); TextOut(0, LCD_LINE4, "Testing 1, 2, 3"); Wait(SEC_10); }

9.693

ex_SetDisplayNormal.nxc

This is an example of how to use the SetDisplayNormal function.


SetDisplayNormal(0, TEXTLINE_1, 8, ScreenMem);

9.694

ex_SetDisplayPopup.nxc

This is an example of how to use the SetDisplayPopup function.


SetDisplayPopup(0, TEXTLINE_1, 8, PopupMem);

9.695

ex_SetDisplayTextLinesCenterFlags.nxc

This is an example of how to use the SetDisplayTextLinesCenterFlags function.


SetDisplayTextLinesCenterFlags(x);

9.696

ex_SetDisplayUpdateMask.nxc

This is an example of how to use the SetDisplayUpdateMask function.


SetDisplayUpdateMask(x);

9.697

ex_SetHSFlags.nxc

This is an example of how to use the SetHSFlags function.


SetHSFlags(0);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.698

ex_SetHSInputBuffer.nxc

1941

9.698

ex_SetHSInputBuffer.nxc

This is an example of how to use the SetHSInputBuffer function.


SetHSInputBuffer(0, 10, buffer);

9.699

ex_SetHSInputBufferInPtr.nxc

This is an example of how to use the SetHSInputBufferInPtr function.


SetHSInputBufferInPtr(0);

9.700

ex_SetHSInputBufferOutPtr.nxc

This is an example of how to use the SetHSInputBufferOutPtr function.


SetHSInputBufferOutPtr(0);

9.701

ex_sethsmode.nxc

This is an example of how to use the SetHSMode function.


SetHSMode(HS_MODE_8N1);

9.702

ex_SetHSOutputBuffer.nxc

This is an example of how to use the SetHSOutputBuffer function.


SetHSOutputBuffer(0, 10, buffer);

9.703

ex_SetHSOutputBufferInPtr.nxc

This is an example of how to use the SetHSOutputBufferInPtr function.


SetHSOutputBufferInPtr(0);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.704

ex_SetHSOutputBufferOutPtr.nxc

1942

9.704

ex_SetHSOutputBufferOutPtr.nxc

This is an example of how to use the SetHSOutputBufferOutPtr function.


SetHSOutputBufferOutPtr(0);

9.705

ex_SetHSSpeed.nxc

This is an example of how to use the SetHSSpeed function.


SetHSSpeed(1);

9.706

ex_SetHSState.nxc

This is an example of how to use the SetHSState function.


SetHSState(1);

9.707

ex_sethtcolor2mode.nxc

This is an example of how to use the SetHTColor2Mode function.


SetHTColor2Mode(S1, HT_CMD_COLOR2_ACTIVE);

9.708

ex_sethtirseeker2mode.nxc

This is an example of how to use the SetHTIRSeeker2Mode function.


SetHTIRSeeker2Mode(S1, HTIR2_MODE_1200);

9.709

ex_SetInput.nxc

This is an example of how to use the SetInput function.


SetInput(S1, Type, SENSOR_TYPE_SOUND_DB);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.710

ex_SetLongAbort.nxc

1943

9.710

ex_SetLongAbort.nxc

This is an example of how to use the SetLongAbort function.


task main() { // Set exit button to end program only if it is pressed for longer than 2 seco nds #ifdef __ENHANCED_FIRMWARE SetLongAbort(true); // is equivalent to SetAbortFlag(BTNSTATE_LONG_PRESSED_EV); #endif while(true) { ClearScreen(); // Display on NXT Screen: "Press the exit button longer (for 2 seconds) to exit" TextOut(0, LCD_LINE1, "Press the exit", 0); TextOut(0, LCD_LINE2, "button longer", 0); TextOut(0, LCD_LINE3, "(for 2 seconds)", 0); TextOut(0, LCD_LINE4, "to exit.", 0);

// Display number of times the user has pressed the exit button (for less t han 2 seconds) NumOut(0, LCD_LINE8, ButtonPressCount(BTNEXIT), 0);

// Wait until user presses and releases exit button before continuing loop while(!(ButtonPressed(BTNEXIT, 0))); while(ButtonPressed(BTNEXIT, 0)); } }

9.711

ex_SetMotorPwnFreq.nxc

This is an example of how to use the SetMotorPwnFreq function.


SetMotorPwnFreq(x);

9.712

ex_SetOnBrickProgramPointer.nxc

This is an example of how to use the SetOnBrickProgramPointer function.


SetOnBrickProgramPointer(2);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.713

ex_setoutput.nxc

1944

9.713

ex_setoutput.nxc

This is an example of how to use the SetOutput function.


SetOutput(OUT_AB, TachoLimit, 720); // set tacho limit

9.714

ex_SetSensor.nxc

This is an example of how to use the SetSensor function.


SetSensor(S1, SENSOR_TOUCH);

9.715

ex_setsensorboolean.nxc

This is an example of how to use the SetSensorBoolean function.


SetHTIRSeeker2Mode(S1, HTIR2_MODE_1200);

9.716

ex_setsensorcolorblue.nxc

This is an example of how to use the SetSensorColorBlue function.


SetSensorColorBlue(S1);

9.717

ex_setsensorcolorfull.nxc

This is an example of how to use the SetSensorColorFull function.


SetSensorColorFull(S1);

9.718

ex_setsensorcolorgreen.nxc

This is an example of how to use the SetSensorColorGreen function.


SetSensorColorGreen(S1);

9.719

ex_setsensorcolornone.nxc

This is an example of how to use the SetSensorColorNone function.


SetSensorColorNone(S1);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.720

ex_setsensorcolorred.nxc

1945

9.720

ex_setsensorcolorred.nxc

This is an example of how to use the SetSensorColorRed function.


SetSensorColorRed(S1);

9.721

ex_SetSensorDigiPinsDirection.nxc

This is an example of how to use the SetSensorDigiPinsDirection function.


SetSensorDigiPinsDirection(S1, 1);

9.722

ex_SetSensorDigiPinsOutputLevel.nxc

This is an example of how to use the SetSensorDigiPinsOutputLevel function.


SetSensorDigiPinsOutputLevel(S1, 100);

9.723

ex_SetSensorDigiPinsStatus.nxc

This is an example of how to use the SetSensorDigiPinsStatus function.


SetSensorDigiPinsStatus(S1, false);

9.724

ex_SetSensorEMeter.nxc

This is an example of how to use the SetSensorEMeter function.


SetSensorEMeter(S1);

9.725

ex_setsensorhteopd.nxc

This is an example of how to use the SetSensorHTEOPD function.


SetSensorHTEOPD(S1);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.726

ex_SetSensorHTGyro.nxc

1946

9.726

ex_SetSensorHTGyro.nxc

This is an example of how to use the SetSensorHTGyro function.


SetSensorHTGyro(S1);

9.727

ex_SetSensorHTMagnet.nxc

This is an example of how to use the SetSensorHTMagnet function.


SetSensorHTMagnet(S1);

9.728

ex_SetSensorLight.nxc

This is an example of how to use the SetSensorLight function.


SetSensorLight(S1);

9.729

ex_SetSensorLowspeed.nxc

This is an example of how to use the SetSensorLowspeed function.


SetSensorLowspeed(S1);

9.730

ex_SetSensorMode.nxc

This is an example of how to use the SetSensorMode function.


SetSensorMode(S1, SENSOR_MODE_RAW); // raw mode

9.731

ex_setsensormsdrod.nxc

This is an example of how to use the SetSensorMSDROD function.


SetSensorMSDROD(S1);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.732

ex_setsensormspressure.nxc

1947

9.732

ex_setsensormspressure.nxc

This is an example of how to use the SetSensorMSPressure function.


SetSensorMSPressure(S1);

9.733

ex_SetSensorSound.nxc

This is an example of how to use the SetSensorSound function.


SetSensorSound(S1);

9.734

ex_SetSensorTemperature.nxc

This is an example of how to use the SetSensorTemperature function.


SetSensorTemperature(S1);

9.735

ex_SetSensorTouch.nxc

This is an example of how to use the SetSensorTouch function.


SetSensorTouch(S1);

9.736

ex_SetSensorType.nxc

This is an example of how to use the SetSensorType function.


SetSensorType(S1, SENSOR_TYPE_TOUCH);

9.737

ex_SetSensorUltrasonic.nxc

This is an example of how to use the SetSensorUltrasonic function.


SetSensorUltrasonic(S1);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.738

ex_setsleeptime.nxc

1948

9.738

ex_setsleeptime.nxc

This is an example of how to use the SetSleepTime function.


SetSleepTime(5); // sleep in 5 minutes

9.739

ex_SetSleepTimeout.nxc

This is an example of how to use the SetSleepTimeout function.


SetSleepTimeout(8);

9.740

ex_SetSleepTimer.nxc

This is an example of how to use the SetSleepTimer function.


SetSleepTimer(3);

9.741

ex_SetSoundDuration.nxc

This is an example of how to use the SetSoundDuration function.


SetSoundDuration(500);

9.742

ex_SetSoundFlags.nxc

This is an example of how to use the SetSoundFlags function.


SetSoundFlags(SOUND_FLAGS_UPDATE);

9.743

ex_SetSoundFrequency.nxc

This is an example of how to use the SetSoundFrequency function.


SetSoundFrequency(440);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.744

ex_SetSoundMode.nxc

1949

9.744

ex_SetSoundMode.nxc

This is an example of how to use the SetSoundMode function.


SetSoundMode(SOUND_MODE_ONCE);

9.745

ex_SetSoundModuleState.nxc

This is an example of how to use the SetSoundModuleState function.


SetSoundModuleState(SOUND_STATE_STOP);

9.746

ex_SetSoundSampleRate.nxc

This is an example of how to use the SetSoundSampleRate function.


SetSoundSampleRate(4000);

9.747

ex_SetSoundVolume.nxc

This is an example of how to use the SetSoundVolume function.


SetSoundVolume(3);

9.748

ex_SetUIButton.nxc

This is an example of how to use the SetUIButton function.


SetUIButton(UI_BUTTON_ENTER);

9.749

ex_SetUIState.nxc

This is an example of how to use the SetUIState function.


SetUIState(UI_STATE_LOW_BATTERY);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.750

ex_SetUSBInputBuffer.nxc

1950

9.750

ex_SetUSBInputBuffer.nxc

This is an example of how to use the SetUSBInputBuffer function.


SetUSBInputBuffer(0, 10, buffer);

9.751

ex_SetUSBInputBufferInPtr.nxc

This is an example of how to use the SetUSBInputBufferInPtr function.


SetUSBInputBufferInPtr(0);

9.752

ex_SetUSBInputBufferOutPtr.nxc

This is an example of how to use the SetUSBInputBufferOutPtr function.


SetUSBInputBufferOutPtr(0);

9.753

ex_SetUSBOutputBuffer.nxc

This is an example of how to use the SetUSBOutputBuffer function.


SetUSBOutputBuffer(0, 10, buffer);

9.754

ex_SetUSBOutputBufferInPtr.nxc

This is an example of how to use the SetUSBOutputBufferInPtr function.


SetUSBOutputBufferInPtr(0);

9.755

ex_SetUSBOutputBufferOutPtr.nxc

This is an example of how to use the SetUSBOutputBufferOutPtr function.


SetUSBOutputBufferOutPtr(0);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.756

ex_SetUSBPollBuffer.nxc

1951

9.756

ex_SetUSBPollBuffer.nxc

This is an example of how to use the SetUSBPollBuffer function.


SetUSBPollBuffer(0, 10, buffer);

9.757

ex_SetUSBPollBufferInPtr.nxc

This is an example of how to use the SetUSBPollBufferInPtr function.


SetUSBPollBufferInPtr(0);

9.758

ex_SetUSBPollBufferOutPtr.nxc

This is an example of how to use the SetUSBPollBufferOutPtr function.


SetUSBPollBufferOutPtr(0);

9.759

ex_SetUsbState.nxc

This is an example of how to use the SetUSBState function.


SetUSBState(0);

9.760

ex_SetVMRunState.nxc

This is an example of how to use the SetVMRunState function.


SetVMRunState(VM_RUN_PAUSE); // pause the virtual machine. ke a breakpoint This could be used li

9.761

ex_SetVolume.nxc

This is an example of how to use the SetVolume function.


SetVolume(3);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.762

ex_sign.nxc

1952

9.762

ex_sign.nxc

This is an example of how to use the sign function.


char val = sign(x); // return -1, 0, or 1

9.763

ex_sin_cos.nxc

This is an example of how to use the cos and the sin functions.
// // // // // // ex_sin_cos.nxc Run this program and you will see a circle appear on the NXT screen in a strange random way. No two runs will produce the circle in exactly the same way. This program runs indefinitely -- press gray button to exit. Reguires enhanced firmware 1.28 or later. SCREEN_WIDH 100 SCREEN_HEIGHT 64 X_ZERO (SCREEN_WIDH / 2) Y_ZERO (SCREEN_HEIGHT / 2) R (Y_ZERO - 2) MAX_DEG 360

#define #define #define #define #define #define

// Convert a float to its nearest integer value. inline int integer(float x) { return trunc(x + 0.5); } task main() { while(true) { float angle = RADIANS_PER_DEGREE * Random(MAX_DEG); float x = X_ZERO + R * cos(angle); float y = Y_ZERO + R * sin(angle); PointOut(integer(x), integer(y)); // Without the Wait, the program runs too fast! Wait(MS_20); } }

9.764

ex_sind_cosd.nxc

This is an example of how to use the cosd and sind functions.


// ex_sind_cosd.nxc // Run this program and you will see a circle appear on the NXT screen in a

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.765

ex_sinh.nxc

1953

// // // //

strange random way. No two runs will produce the circle in exactly the same way. This program runs indefinitely -- press gray button to exit. Reguires enhanced firmware 1.28 or later. SCREEN_WIDH 100 SCREEN_HEIGHT 64 X_ZERO (SCREEN_WIDH / 2) Y_ZERO (SCREEN_HEIGHT / 2) R (Y_ZERO - 2) MAX_DEG 360

#define #define #define #define #define #define

// Convert a float to its nearest integer value. inline int integer(float x) { return trunc(x + 0.5); } task main() { while(true) { float angle = Random(MAX_DEG); float x = X_ZERO + R * cosd(angle); float y = Y_ZERO + R * sind(angle); PointOut(integer(x), integer(y)); // Without the Wait, the program runs too fast! Wait(MS_20); } }

9.765

ex_sinh.nxc

This is an example of how to use the sinh function.


x = sinh(y);

9.766

ex_SizeOf.nxc

This is an example of how to use the SizeOf and NumOut functions.


task main() { int x; float f; byte b; byte data[] = {1, 2, 3, 4, 5, 6}; NumOut(0, LCD_LINE1, SizeOf(x)); NumOut(0, LCD_LINE2, SizeOf(f)); NumOut(0, LCD_LINE3, SizeOf(b));

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.767

ex_SleepNow.nxc

1954

NumOut(0, LCD_LINE4, SizeOf(data)); while(true); }

9.767

ex_SleepNow.nxc

This is an example of how to use the SleepNow functions.


SleepNow();

9.768

ex_sleeptime.nxc

This is an example of how to use the SleepTime function.


x = SleepTime(); // read sleep time

9.769

ex_SleepTimeout.nxc

This is an example of how to use the SleepTimeout function.


byte x = SleepTimeout();

9.770

ex_SleepTimer.nxc

This is an example of how to use the SleepTimer function.


byte x = SleepTimer();

9.771

ex_SoundDuration.nxc

This is an example of how to use the SoundDuration function.


x = SoundDuration();

9.772

ex_SoundFlags.nxc

This is an example of how to use the SoundFlags function.


x = SoundFlags();

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.773

ex_SoundFrequency.nxc

1955

9.773

ex_SoundFrequency.nxc

This is an example of how to use the SoundFrequency function.


x = SoundFrequency();

9.774

ex_SoundMode.nxc

This is an example of how to use the SoundMode function.


x = SoundMode();

9.775

ex_SoundSampleRate.nxc

This is an example of how to use the SoundSampleRate function.


x = SoundSampleRate();

9.776

ex_SoundState.nxc

This is an example of how to use the SoundState function.


x = SoundState();

9.777

ex_SoundVolume.nxc

This is an example of how to use the SoundVolume function.


x = SoundVolume();

9.778

ex_sprintf.nxc

This is an example of how to use the sprintf function.


sprintf(msg, "value = %d", value);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.779

ex_sqrt.nxc

1956

9.779

ex_sqrt.nxc

This is an example of how to use the sqrt function.


x = sqrt(x);

9.780

ex_StartTask.nxc

This is an example of how to use the StartTask function.


StartTask(sound); // start the sound task

9.781

ex_Stop.nxc

This is an example of how to use the Stop function.


Stop(x == 24); // stop the program if x==24

9.782

ex_StopAllTasks.nxc

This is an example of how to use the StopAllTasks function.


StopAllTasks(); // stop the program

9.783

ex_StopSound.nxc

This is an example of how to use the StopSound function.


StopSound();

9.784

ex_StopTask.nxc

This is an example of how to use the StopTask function.


StopTask(sound); // stop the sound task

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.785

ex_StrCat.nxc

1957

9.785

ex_StrCat.nxc

This is an example of how to use the strcat function.


strcat(msg, "foo"); // msg = msg+"foo"

9.786

ex_StrCatOld.nxc

This is an example of how to use the StrCat function.


task main() { string msgs[] = {"please work", "testing, 1, 2, 3"}; string tmp = "123456"; string a = "AA", b = "BB", c = "CC"; TextOut(0, LCD_LINE3, StrCat(a, SubStr(tmp, 2, 3), msgs[0])); Wait(SEC_5); }

9.787

ex_strcmp.nxc

This is an example of how to use the strcmp function.


int i = strcmp(msg, "foo"); // returns -1, 0, or 1

9.788

ex_strcpy.nxc

This is an example of how to use the strcpy function.


strcpy(msg, "foo"); // msg = "foo"

9.789

ex_StrIndex.nxc

This is an example of how to use the StrIndex function.


task main() { string msgs[] = {"please work", "testing, 1, 2, 3"}; NumOut(0, LCD_LINE5, StrIndex(msgs[0], 0)); string msg = "hi there"; byte x = StrIndex(msg, 2); // return the value of msg[2] Wait(SEC_5); }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.790

ex_string.nxc

1958

9.790

ex_string.nxc

This is an example of how to use the string API functions: StrToNum, StrLen, StrIndex, NumToStr, StrCat, SubStr, Flatten, StrReplace, FormatNum, FlattenVar, UnattenVar, ByteArrayToStr, ByteArrayToStrEx, and StrToByteArray.
task main() { string msgs[] = {"please work", "testing, 1, 2, 3"}; string fmts[] = {"x = %4.4d", "0x%x"}; string tmp = "123456"; string s = SubStr(tmp, 2, 3); string a = "AA", b = "BB", c = "CC"; TextOut(0, LCD_LINE1, s); TextOut(0, LCD_LINE2, SubStr(msgs[0], 2, 3)); TextOut(0, LCD_LINE3, StrCat(a, SubStr(tmp, 2, 3), msgs[0])); TextOut(0, LCD_LINE4, StrReplace(msgs[0], 2, StrCat(a, b))); NumOut(0, LCD_LINE5, StrIndex(msgs[0], 0)); NumOut(0, LCD_LINE6, StrLen(msgs[0])); TextOut(0, LCD_LINE7, FormatNum(fmts[0], Random(34))); float val = StrToNum("10.5abc123"); NumOut(0, LCD_LINE8, val); Wait(SEC_5); ClearScreen(); TextOut(0, LCD_LINE1, NumToStr(PI)); int x = 0x7172; string foo = FlattenVar(x); TextOut(0, LCD_LINE2, foo); TextOut(0, LCD_LINE3, Flatten(0x7374)); NumOut(0, LCD_LINE4, strlen(foo)); NumOut(40, LCD_LINE4, UnflattenVar(foo, x)); TextOut(0, LCD_LINE5, FormatNum(fmts[1], x)); string bats = tmp; // "123456" TextOut(0, LCD_LINE6, bats); byte data[]; StrToByteArray(bats, data); TextOut(0, LCD_LINE7, ByteArrayToStr(data)); ByteArrayToStrEx(data, tmp); TextOut(0, LCD_LINE8, tmp); Wait(SEC_10); }

9.791

ex_StrLen.nxc

This is an example of how to use the strlen function.


task main() { string msg = "hi there"; byte x = strlen(msg); // return the length of msg }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.792

ex_StrLenOld.nxc

1959

9.792

ex_StrLenOld.nxc

This is an example of how to use the StrLen function.


task main() { string msgs[] = {"please work", "testing, 1, 2, 3"}; string msg = "hi there"; byte x = StrLen(msg); // return the length of msg NumOut(0, LCD_LINE6, StrLen(msgs[0])); Wait(SEC_5); }

9.793

ex_strncat.nxc

This is an example of how to use the strncat function.


strncat(msg, "foo", 2); // msg = msg+"fo"

9.794

ex_strncmp.nxc

This is an example of how to use the strncmp function.


int i = strncmp(msg, "foo", 2); // returns -1, 0, or 1

9.795

ex_strncpy.nxc

This is an example of how to use the strncpy function.


strncpy(msg, "foo", 2); // msg = "fo"

9.796

ex_StrReplace.nxc

This is an example of how to use the StrReplace function.


task main() { string msgs[] = {"please work", "testing, 1, 2, 3"}; string a = "AA", b = "BB", c = "CC"; TextOut(0, LCD_LINE4, StrReplace(msgs[0], 2, StrCat(a, b))); string msg = StrReplace("testing", 3, "xx"); // returns "tesxxng" Wait(SEC_5); }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.797

ex_StrToByteArray.nxc

1960

9.797

ex_StrToByteArray.nxc

This is an example of how to use the StrToByteArray function.


StrToByteArray(myStr, myArray);

9.798

ex_strtod.nxc

This is an example of how to use the strtod function.


task main() { string str, endptr; str = "3.1415926e2abcdefg"; float f = strtod(str, endptr); NumOut(0, LCD_LINE1, f); TextOut(0, LCD_LINE2, str); TextOut(0, LCD_LINE3, endptr); Wait(SEC_6); }

9.799

ex_strtol.nxc

This is an example of how to use the strtol function.


task main() { string str, endptr; str = "3.1415926e2abcdefg"; long l = strtol(str, endptr); NumOut(0, LCD_LINE1, l); TextOut(0, LCD_LINE2, str); TextOut(0, LCD_LINE3, endptr); Wait(SEC_6); }

9.800

ex_StrToNum.nxc

This is an example of how to use the StrToNum function.


x = StrToNum(strVal);

9.801

ex_strtoul.nxc

This is an example of how to use the strtoul function.


Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.802

ex_SubStr.nxc

1961

task main() { string str, endptr; str = "3.1415926e2abcdefg"; unsigned long l = strtoul(str, endptr); NumOut(0, LCD_LINE1, l); TextOut(0, LCD_LINE2, str); TextOut(0, LCD_LINE3, endptr); Wait(SEC_6); }

9.802

ex_SubStr.nxc

This is an example of how to use the SubStr function.


task main() { string msgs[] = {"please work", "testing, 1, 2, 3"}; TextOut(0, LCD_LINE2, SubStr(msgs[0], 2, 3)); string msg = SubStr("test", 1, 2); // returns "es" Wait(SEC_5); }

9.803

ex_syscall.nxc

This is an example of how to use the SysCall function.


task main() { DrawTextType dtArgs; dtArgs.Location.X = 0; dtArgs.Location.Y = LCD_LINE1; dtArgs.Text = "Please Work"; SysCall(DrawText, dtArgs); }

9.804

ex_SysColorSensorRead.nxc

This is an example of how to use the SysColorSensorRead function.


task main() { SetSensorColorFull(S1); ColorSensorReadType csr; csr.Port = S1; SysColorSensorRead(csr); if (csr.Result == NO_ERR) { NumOut(0, LCD_LINE1, csr.ColorValue); } }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.805

ex_syscommbtcheckstatus.nxc

1962

9.805

ex_syscommbtcheckstatus.nxc

This is an example of how to use the SysCommBTCheckStatus function along with the CommBTCheckStatusType structure.
task main() { CommBTCheckStatusType args; args.Connection = 1; SysCommBTCheckStatus(args); if (args.Result == LDR_SUCCESS) { /* do something */ } }

9.806

ex_syscommbtconnection.nxc

This is an example of how to use the SysCommBTConnection function along with the CommBTConnectionType structure.
#define CONNECTION 1 task main() { CommBTConnectionType args; args.Name = "NXT2"; // whatever the slave NXTs name is args.ConnectionSlot = CONNECTION; // this is the desired connection slot (the a bove code uses 1) args.Action = TRUE; // could use some #define with a non-zero value to connect. 0 == disconnect if(!BluetoothStatus(CONNECTION)==NO_ERR) { SysCommBTConnection(args); // try to connect. for (int i = 0; i < 2000; i++) { NumOut(0, LCD_LINE3, args.Result); Wait(1); } // Wait(5000); // let the connection get created if (args.Result == LDR_SUCCESS) { // we are connected TextOut(0, LCD_LINE1, "success"); } else { TextOut(0, LCD_LINE1, "failure"); NumOut(0, LCD_LINE2, args.Result); } } Wait(SEC_10); }

9.807

ex_SysCommBTOnOff.nxc

This is an example of how to use the SysCommBTOnOff function along with the CommBTOnOffType structure.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.808

ex_syscommbtwrite.nxc

1963

task main() { CommBTOnOffType bt; bt.PowerState = false; SysCommBTOnOff(bt); if (bt.Result == NO_ERR) TextOut(0, LCD_LINE1, "BT is off"); }

9.808

ex_syscommbtwrite.nxc

This is an example of how to use the SysCommBTWrite function along with the CommBTWriteType structure.
task main() { CommBTWriteType args; args.Connection = 1; args.Buffer = myData; SysCommBTWrite(args); }

9.809

ex_syscommexecutefunction.nxc

This is an example of how to use the SysCommExecuteFunction function along with the CommExecuteFunctionType structure.
task main() { CommExecuteFunctionType args; args.Cmd = INTF_BTOFF; SysCommExecuteFunction(args); }

9.810

ex_SysCommHSCheckStatus.nxc

This is an example of how to use the SysCommHSCheckStatus function along with the CommHSCheckStatusType structure.
task main() { CommHSCheckStatusType hsc; SysCommHSCheckStatus(hsc); if (hsc.SendingData) TextOut(0, LCD_LINE1, "sending data"); else if (hsc.DataAvailable) TextOut(0, LCD_LINE1, "data available"); }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.811

ex_SysCommHSControl.nxc

1964

9.811

ex_SysCommHSControl.nxc

This is an example of how to use the SysCommHSControl function along with the CommHSControlType structure.
task main() { CommHSControlType hsc; hsc.Command = HS_CTRL_INIT; SysCommHSControl(hsc); if (hsc.Result) TextOut(0, LCD_LINE1, "hi-speed initialized"); Wait(SEC_10); }

9.812

ex_SysCommHSRead.nxc

This is an example of how to use the SysCommHSRead function along with the CommHSReadWriteType structure.
task main() { CommHSReadWriteType hsr; SysCommHSRead(hsr); if (hsr.Status == NO_ERR) TextOut(0, LCD_LINE1, hsr.Buffer); Wait(SEC_1); }

9.813

ex_SysCommHSWrite.nxc

This is an example of how to use the SysCommHSWrite function along with the CommHSReadWriteType structure.
task main() { // configure the hi-speed port and turn it on // ... // no write to the port CommHSReadWriteType rwt; ArrayBuild(rwt.Buffer, 0x01, 0x02, 0x03, 0x04); // four bytes SysCommHSWrite(rwt); if (rwt.Status = NO_ERR) { // do something } }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.814

ex_syscommlscheckstatus.nxc

1965

9.814

ex_syscommlscheckstatus.nxc

This is an example of how to use the SysCommLSCheckStatus function along with the CommLSCheckStatusType structure.
task main() { CommLSCheckStatusType args; args.Port = S1; SysCommLSCheckStatus(args); // is the status (Result) IDLE? if (args.Result == LOWSPEED_IDLE) { /* proceed */ } }

9.815

ex_syscommlsread.nxc

This is an example of how to use the SysCommLSRead function along with the CommLSReadType structure.
task main() { CommLSReadType args; args.Port = S1; args.Buffer = myBuf; args.BufferLen = 8; SysCommLSRead(args); // check Result for error status & use Buffer contents }

9.816

ex_syscommlswrite.nxc

This is an example of how to use the SysCommLSWrite function along with the CommLSWriteType structure.
task main() { CommLSWriteType args; args.Port = S1; args.Buffer = myBuf; args.ReturnLen = 8; SysCommLSWrite(args); // check Result for error status }

9.817

ex_syscommlswriteex.nxc

This is an example of how to use the SysCommLSWriteEx function along with the CommLSWriteExType structure.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.818

ex_SysComputeCalibValue.nxc

1966

task main() { CommLSWriteExType args; args.Port = S1; args.Buffer = myBuf; args.ReturnLen = 8; args.NoRestartOnRead = true; SysCommLSWriteEx(args); if (args.Result == NO_ERR) { // do something } }

9.818

ex_SysComputeCalibValue.nxc

This is an example of how to use the SysComputeCalibValue function along with the ComputeCalibValueType structure.
task main() { ComputeCalibValueType args; args.Name = "light"; args.RawVal = Sensor(S1); SysComputeCalibValue(args); if (args.Result == NO_ERR) TextOut(0, LCD_LINE1, "calib computed"); }

9.819

ex_sysdataloggettimes.nxc

This is an example of how to use the SysDatalogGetTimes function along with the DatalogGetTimesType structure.
task main() { DatalogGetTimesType args; SysDatalogGetTimes(args); NumOut(0, LCD_LINE4, args.SyncTime); NumOut(0, LCD_LINE5, args.SyncTick); Wait(SEC_5); }

9.820

ex_SysDatalogWrite.nxc

This is an example of how to use the SysDatalogWrite function along with the DatalogWriteType structure.
task main()

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.821

ex_sysdisplayexecutefunction.nxc

1967

{ DatalogWriteType args; ArrayBuild(args.Message, 0x01, 0x02); SysDatalogWrite(args); if (args.Result == NO_ERR) TextOut(0, LCD_LINE1, "success"); }

9.821

ex_sysdisplayexecutefunction.nxc

This is an example of how to use the SysDisplayExecuteFunction function along with the DisplayExecuteFunctionType structure.
task main() { DisplayExecuteFunctionType args; args.Cmd = DISPLAY_ERASE_ALL; SysDisplayExecuteFunction(args); }

9.822

ex_sysdrawcircle.nxc

This is an example of how to use the SysDrawCircle function along with the DrawCircleType structure.
task main() { DrawCircleType dcArgs; dcArgs.Center.X = 20; dcArgs.Center.Y = 20; dcArgs.Size = 10; // radius dcArgs.Options = 0x01; // clear before drawing SysDrawCircle(dcArgs); }

9.823

ex_SysDrawEllipse.nxc

This is an example of how to use the SysDrawEllipse function along with the DrawEllipseType structure.
task main() { DrawEllipseType args; args.Center.X = 50; args.Center.Y = 32; repeat (10) { args.SizeX = 20+Random(15); args.SizeY = 20+Random(10); args.Options = DRAW_OPT_FILL_SHAPE|DRAW_OPT_LOGICAL_XOR;

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.824

ex_sysdrawfont.nxc

1968

SysDrawEllipse(args); } while(true); }

9.824

ex_sysdrawfont.nxc

This is an example of how to use the SysDrawFont function along with the DrawFontType structure.
#download "PropTiny.ric" task main() { DrawFontType dfArgs; dfArgs.Location.X = 10; dfArgs.Location.Y = 59; dfArgs.Filename = "PropTiny.ric" ; dfArgs.Text = "Hello" ; dfArgs.Options = DRAW_OPT_NORMAL|DRAW_OPT_FONT_DIR_L2RT; SysDrawFont(dfArgs); Wait(SEC_4); }

9.825

ex_sysdrawgraphic.nxc

This is an example of how to use the SysDrawGraphic function along with the DrawGraphicType structure.
task main() { DrawGraphicType dgArgs; dgArgs.Location.X = 20; dgArgs.Location.Y = 20; dgArgs.Filename = "image.ric"; ArrayInit(dgArgs.Variables, 0, 10); // 10 zeros dgArgs.Variables[0] = 12; dgArgs.Variables[1] = 14; // etc... dgArgs.Options = 0x00; // do not clear before drawing SysDrawGraphic(dgArgs); }

9.826

ex_sysdrawgraphicarray.nxc

This is an example of how to use the SysDrawGraphicArray function along with the DrawGraphicArrayType structure.
byte ric_data[] = { RICOpSprite(1, 64, 2,

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.827

ex_sysdrawline.nxc

1969

RICSpriteData(0xFF, 0xFF, 0x80, 0x80, 0x21, 0x80, 0x80, 0x05, 0x80, 0x80, 0x21, 0x80, 0x81, 0x01, 0x82, 0x88, 0x01, 0x90, 0x90, 0x01, 0x88, 0x82, 0x01, 0x81, 0x80, 0x41, 0x80, 0x80, 0x09, 0x80, 0x80, 0x11, 0x80, 0x80, 0x81, 0x81, 0x84, 0x01, 0x88, 0xA0, 0x01, 0x90, 0x84, 0x01, 0x82, 0x80, 0x81, 0x80, 0x80, 0x11, 0x80, 0x80, 0x09, 0x80, 0x80, 0x41, 0x80, 0x82, 0x01, 0x84, 0x90, 0x01, 0xA0, 0xFF, 0xFF)), RICOpCopyBits(0, 1, RICImgRect( RICImgPoint(0, 0), 16, 64), RICImgPoint(0, 0)) }; task main() { DrawGraphicArrayType args; args.Location.X = 0; args.Location.Y = 0; args.Data = ric_data; SysDrawGraphicArray(args); Wait(SEC_5); }

0x01, 0x11, 0x09, 0x41, 0x01, 0x01, 0x01, 0x01, 0x21, 0x05, 0x21, 0x01, 0x01, 0x01, 0x01, 0x41, 0x09, 0x11, 0x81, 0x01, 0x01,

0x80, 0x80, 0x80, 0x80, 0x84, 0xA0, 0x84, 0x80, 0x80, 0x80, 0x80, 0x82, 0x90, 0x88, 0x81, 0x80, 0x80, 0x80, 0x81, 0x88, 0x80,

0x41, 0x09, 0x11, 0x81, 0x01, 0x01, 0x01, 0x81, 0x11, 0x09, 0x41, 0x01, 0x01, 0x01, 0x01, 0x21, 0x05, 0x21, 0x01, 0x01, 0x01,

9.827

ex_sysdrawline.nxc

This is an example of how to use the SysDrawLine function along with the DrawLineType structure.
task main() { DrawLineType dlArgs; dlArgs.StartLoc.X = 20; dlArgs.StartLoc.Y = 20; dlArgs.EndLoc.X = 60; dlArgs.EndLoc.Y = 60; dlArgs.Options = 0x01; // clear before drawing SysDrawLine(dlArgs); }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.828

ex_sysdrawpoint.nxc

1970

9.828

ex_sysdrawpoint.nxc

This is an example of how to use the SysDrawPoint function along with the DrawPointType structure.
task main() { DrawPointType dpArgs; dpArgs.Location.X = 20; dpArgs.Location.Y = 20; dpArgs.Options = 0x04; // clear this pixel SysDrawPoint(dpArgs); }

9.829

ex_sysdrawpolygon.nxc

This is an example of how to use the SysDrawPolygon function along with the DrawPolygonType structure.
LocationType myPoints[] = {16,16, 8,40, 32,52, 20,36, 52,36, 56,52, 64,32, 44,20, 24,20}; task main() { DrawPolygonType args; args.Points = myPoints; args.Options = 0x00; SysDrawPolygon(args); Wait(SEC_2); ClearScreen(); args.Options = DRAW_OPT_LOGICAL_XOR|DRAW_OPT_FILL_SHAPE; for(int i=0;i<10;i++) { SysDrawPolygon(args); Wait(SEC_1); } args.Options = true|DRAW_OPT_FILL_SHAPE; SysDrawPolygon(args); Wait(SEC_2); ClearScreen(); args.Options = DRAW_OPT_LOGICAL_XOR|DRAW_OPT_FILL_SHAPE; for (int i=0;i<100;i++) { SysDrawPolygon(args); Wait(MS_100); } Wait(SEC_1); }

9.830

ex_sysdrawrect.nxc

This is an example of how to use the SysDrawRect function along with the DrawRectType structure.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.831

ex_sysdrawtext.nxc

1971

task main() { DrawRectType drArgs; drArgs.Location.X = 20; drArgs.Location.Y = 20; drArgs.Size.Width = 20; drArgs.Size.Height = 10; drArgs.Options = 0x00; // do not clear before drawing SysDrawRect(drArgs); }

9.831

ex_sysdrawtext.nxc

This is an example of how to use the SysDrawText function along with the DrawTextType structure.
task main() { DrawTextType dtArgs; dtArgs.Location.X = 0; dtArgs.Location.Y = LCD_LINE1; dtArgs.Text = "Please Work"; dtArgs.Options = 0x01; // clear before drawing SysDrawText(dtArgs); }

9.832

ex_sysleclose.nxc

This is an example of how to use the SysFileClose function along with the FileCloseType structure.
task main() { FileCloseType fcArgs; fcArgs.FileHandle = foArgs.FileHandle; SysFileClose(fcArgs); }

9.833

ex_sysledelete.nxc

This is an example of how to use the SysFileDelete function along with the FileDeleteType structure.
task main() { FileDeleteType fdArgs; fdArgs.Filename = "myfile.txt"; SysFileDelete(fdArgs); // delete the file }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.834

ex_syslendrst.nxc

1972

9.834

ex_syslendrst.nxc

This is an example of how to use the SysFileFindFirst function along with the FileFindType structure.
task main() { FileFindType args; args.Filename = "*.*"; SysFileFindFirst(args); TextOut(0, LCD_LINE1, args.Filename); }

9.835

ex_syslendnext.nxc

This is an example of how to use the SysFileFindNext function along with the FileFindType structure.
task main() { FileFindType args; args.FileHandle = prev.FileHandle; SysFileFindNext(args); TextOut(0, LCD_LINE1, args.Filename); }

9.836

ex_sysleopenappend.nxc

This is an example of how to use the SysFileOpenAppend function along with the FileOpenType structure.
task main() { FileOpenType foArgs; foArgs.Filename = "myfile.txt"; SysFileOpenAppend(foArgs); // open the file if (foArgs.Result == NO_ERR) { // write to the file using FileHandle // up to the remaining available length in Length } }

9.837

ex_sysleopenread.nxc

This is an example of how to use the SysFileOpenRead function along with the FileOpenType structure.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.838

ex_sysleopenreadlinear.nxc

1973

task main() { FileOpenType foArgs; foArgs.Filename = "myfile.txt"; SysFileOpenRead(foArgs); // open the file for reading if (foArgs.Result == NO_ERR) { // read data from the file using FileHandle } }

9.838

ex_sysleopenreadlinear.nxc

This is an example of how to use the SysFileOpenReadLinear function along with the FileOpenType structure.
task main() { FileOpenType foArgs; foArgs.Filename = "myfile.rxe"; SysFileOpenReadLinear(foArgs); // open the file for reading if (foArgs.Result == NO_ERR) { // read data from the file using FileHandle } }

9.839

ex_sysleopenwrite.nxc

This is an example of how to use the SysFileOpenWrite function along with the FileOpenType structure.
task main() { FileOpenType foArgs; foArgs.Filename = "myfile.txt"; foArgs.Length = 256; // create with capacity for 256 bytes SysFileOpenWrite(foArgs); // create the file if (foArgs.Result == NO_ERR) { // write to the file using FileHandle } }

9.840

ex_sysleopenwritelinear.nxc

This is an example of how to use the SysFileOpenWriteLinear function along with the FileOpenType structure.
task main() {

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.841

ex_sysleopenwritenonlinear.nxc

1974

FileOpenType foArgs; foArgs.Filename = "myfile.txt"; foArgs.Length = 256; // create with capacity for 256 bytes SysFileOpenWriteLinear(foArgs); // create the file if (foArgs.Result == NO_ERR) { // write to the file using FileHandle } }

9.841

ex_sysleopenwritenonlinear.nxc

This is an example of how to use the SysFileOpenWriteNonLinear function along with the FileOpenType structure.
task main() { FileOpenType foArgs; foArgs.Filename = "myfile.txt"; foArgs.Length = 256; // create with capacity for 256 bytes SysFileOpenWriteNonLinear(foArgs); // create the file if (foArgs.Result == NO_ERR) { // write to the file using FileHandle } }

9.842

ex_sysleread.nxc

This is an example of how to use the SysFileRead function along with the FileReadWriteType structure.
task main() { FileReadWriteType frArgs; frArgs.FileHandle = foArgs.FileHandle; frArgs.Length = 12; // number of bytes to read SysFileRead(frArgs); if (frArgs.Result == NO_ERR) { TextOut(0, LCD_LINE1, frArgs.Buffer); // show how many bytes were actually read NumOut(0, LCD_LINE2, frArgs.Length); } }

9.843

ex_syslerename.nxc

This is an example of how to use the SysFileRename function along with the FileRenameType structure.
task main()

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.844

ex_sysleresize.nxc

1975

{ FileRenameType frArgs; frArgs.OldFilename = "myfile.txt"; frArgs.NewFilename = "myfile2.txt"; SysFileRename(frArgs); if (frArgs.Result == LDR_SUCCESS) { /* do something */ } }

9.844

ex_sysleresize.nxc

This is an example of how to use the SysFileResize function along with the FileResizeType structure.
task main() { byte handle; // get a file handle // ... // resize the file FileResizeType args; args.FileHandle = handle; args.NewSize = 2048; SysFileResize(args); if (args.Result == NO_ERR) { // do something } }

9.845

ex_sysleresolvehandle.nxc

This is an example of how to use the SysFileResolveHandle function along with the FileResolveHandleType structure.
task main() { FileResolveHandleType frhArgs; frhArgs.Filename = "myfile.txt"; SysFileResolveHandle(frhArgs); if (frhArgs.Result == LDR_SUCCESS) { // use the FileHandle as needed if (frhArgs.WriteHandle) { // file is open for writing } else { // file is open for reading } } }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.846

ex_sysleseek.nxc

1976

9.846

ex_sysleseek.nxc

This is an example of how to use the SysFileSeek function along with the FileSeekType structure.
task main() { byte handle; // get a file handle // ... FileSeekType args; args.FileHandle = handle; args.Origin = SEEK_SET; args.Length = 65; SysFileSeek(args); if (args.Result == NO_ERR) { // do something } }

9.847

ex_syslewrite.nxc

This is an example of how to use the SysFileWrite function along with the FileReadWriteType structure.
task main() { FileReadWriteType fwArgs; fwArgs.FileHandle = foArgs.FileHandle; fwArgs.Buffer = "data to write"; SysFileWrite(fwArgs); if (fwArgs.Result == NO_ERR) { // display number of bytes written NumOut(0, LCD_LINE1, fwArgs.Length); } }

9.848

ex_sysgetstarttick.nxc

This is an example of how to use the SysGetStartTick function along with the GetStartTickType structure.
task main() { GetStartTickType gstArgs; SysGetStartTick(gstArgs); unsigned long myStart = gstArgs.Result; }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.849

ex_sysiomapread.nxc

1977

9.849

ex_sysiomapread.nxc

This is an example of how to use the SysIOMapRead function along with the IOMapReadType structure.
task main() { IOMapReadType args; args.ModuleName = CommandModuleName; args.Offset = CommandOffsetTick; args.Count = 4; // this value happens to be 4 bytes long SysIOMapRead(args); if (args.Result == NO_ERR) { /* do something with data */ } }

9.850

ex_sysiomapreadbyid.nxc

This is an example of how to use the SysIOMapReadByID function along with the IOMapReadByIDType structure.
task main() { IOMapReadByIDType args; args.ModuleID = CommandModuleID; args.Offset = CommandOffsetTick; args.Count = 4; // this value happens to be 4 bytes long SysIOMapReadByID(args); if (args.Result == NO_ERR) { /* do something with data */ } }

9.851

ex_sysiomapwrite.nxc

This is an example of how to use the SysIOMapWrite function along with the IOMapWriteType structure.
task main() { IOMapWriteType args; args.ModuleName = SoundModuleName; args.Offset = SoundOffsetSampleRate; args.Buffer = theData; SysIOMapWrite(args); }

9.852

ex_sysiomapwritebyid.nxc

This is an example of how to use the SysIOMapWriteByID function along with the IOMapWriteByIDType structure.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.853

ex_syskeepalive.nxc

1978

task main() { IOMapWriteByIDType args; args.ModuleID = SoundModuleID; args.Offset = SoundOffsetSampleRate; args.Buffer = theData; SysIOMapWriteByID(args); }

9.853

ex_syskeepalive.nxc

This is an example of how to use the SysKeepAlive function along with the KeepAliveType structure.
task main() { KeepAliveType kaArgs; SysKeepAlive(kaArgs); // reset sleep timer }

9.854

ex_syslistles.nxc

This is an example of how to use the SysListFiles function along with the ListFilesType structure.
task main() { ListFilesType args; args.Pattern = "*.rxe"; SysListFiles(args); if (args.Result == NO_ERR && ArrayLen(args.FileList) > 0) { TextOut(0, LCD_LINE6, args.FileList[0]); } Wait(SEC_4); }

9.855

ex_sysloaderexecutefunction.nxc

This is an example of how to use the SysLoaderExecuteFunction function along with the LoaderExecuteFunctionType structure.
task main() { LoaderExecuteFunctionType args; args.Cmd = 0xA0; // delete user flash SysLoaderExecuteFunction(args); }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.856

ex_sysmemorymanager.nxc

1979

9.856

ex_sysmemorymanager.nxc

This is an example of how to use the SysMemoryManager function along with the MemoryManagerType structure.
task main() { byte data[]; byte data2[]; int data3[]; int ps, ds; MemoryManagerType args; args.Compact = false; SysMemoryManager(args); NumOut(0, LCD_LINE1, args.PoolSize); NumOut(0, LCD_LINE2, args.DataspaceSize); Wait(SEC_5); ClearScreen(); Wait(SEC_1); ArrayInit(data, 10, 3000); data[10]++; ps = data[10]; data2 = data; ArrayBuild(data3, ps, ds, ps, ds, ps, ds, ps, ds); SysMemoryManager(args); NumOut(0, LCD_LINE1, args.PoolSize); NumOut(0, LCD_LINE2, args.DataspaceSize); NumOut(0, LCD_LINE8, data[10]); Wait(SEC_5); ClearScreen(); Wait(SEC_1); SysMemoryManager(args); NumOut(0, LCD_LINE1, args.PoolSize); NumOut(0, LCD_LINE2, args.DataspaceSize); NumOut(0, LCD_LINE8, data2[10]); Wait(SEC_5); ClearScreen(); Wait(SEC_1); // while(true); }

9.857

ex_sysmessageread.nxc

This is an example of how to use the SysMessageRead function along with the MessageReadType structure.
task main() { MessageReadType args; args.QueueID = MAILBOX1; // 0 args.Remove = true; SysMessageRead(args); if (args.Result == NO_ERR) { TextOut(0, LCD_LINE1, args.Message);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.858

ex_sysmessagewrite.nxc

1980

} }

9.858

ex_sysmessagewrite.nxc

This is an example of how to use the SysMessageWrite function along with the MessageWriteType structure.
task main() { MessageWriteType args; args.QueueID = MAILBOX1; // 0 args.Message = "testing"; SysMessageWrite(args); // check Result for error status }

9.859

ex_sysrandomnumber.nxc

This is an example of how to use the SysRandomNumber function along with the RandomNumberType structure.
task main() { RandomNumberType rnArgs; SysRandomNumber(rnArgs); int myRandomValue = rnArgs.Result; }

9.860

ex_sysreadbutton.nxc

This is an example of how to use the SysReadButton function along with the ReadButtonType structure.
task main() { ReadButtonType rbArgs; rbArgs.Index = BTNRIGHT; SysReadButton(rbArgs); if (rbArgs.Pressed) {/* do something */} }

9.861

ex_SysReadLastResponse.nxc

This is an example of how to use the SysReadLastResponse function.

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.862

ex_SysReadSemData.nxc

1981

ReadLastResponseType args; args.Clear = true; SysReadLastResponse(args); if (args.Result == NO_ERR) { NumOut(0, LCD_LINE1, args.Length); NumOut(0, LCD_LINE2, args.Command); // also could output args.Buffer[i] }

9.862

ex_SysReadSemData.nxc

This is an example of how to use the SysReadSemData function along with the ReadSemDataType structure.
task main() { ReadSemDataType args; args.Request = true; SysReadSemData(args); NumOut(0, LCD_LINE1, args.SemData); }

9.863

ex_syssetscreenmode.nxc

This is an example of how to use the SysSetScreenMode function along with the SetScreenModeType structure.
task main() { SetScreenModeType ssmArgs; ssmArgs.ScreenMode = 0x00; // restore default NXT screen SysSetScreenMode(ssmArgs); }

9.864

ex_SysSetSleepTimeout.nxc

This is an example of how to use the SysSetSleepTimeout function.


task main() { SetSleepTimeoutType args; args.TheSleepTimeoutMS = MIN_1*5; SysSetSleepTimeout(args); }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.865

ex_syssoundgetstate.nxc

1982

9.865

ex_syssoundgetstate.nxc

This is an example of how to use the SysSoundGetState function along with the SoundGetStateType structure.
task main() { SoundGetStateType sgsArgs; SysSoundGetState(sgsArgs); if (sgsArgs.State == SOUND_STATE_IDLE) {/* do stuff */} }

9.866

ex_syssoundplayle.nxc

This is an example of how to use the SysSoundPlayFile function along with the SoundPlayFileType structure.
task main() { SoundPlayFileType spfArgs; spfArgs.Filename = "hello.rso"; spfArgs.Loop = false; spfArgs.SoundLevel = 3; SysSoundPlayFile(spfArgs); }

9.867

ex_syssoundplaytone.nxc

This is an example of how to use the SysSoundPlayTone function along with the SoundPlayToneType structure.
task main() { SoundPlayToneType sptArgs; sptArgs.Frequency = 440; sptArgs.Duration = 1000; // 1 second sptArgs.Loop = false; sptArgs.SoundLevel = 3; SysSoundPlayTone(sptArgs); }

9.868

ex_syssoundsetstate.nxc

This is an example of how to use the SysSoundSetState function along with the SoundSetStateType structure.
task main()

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.869

ex_SysUpdateCalibCacheInfo.nxc

1983

{ SoundSetStateType sssArgs; sssArgs.State = SOUND_STATE_STOP; SysSoundSetState(sssArgs); }

9.869

ex_SysUpdateCalibCacheInfo.nxc

This is an example of how to use the SysUpdateCalibCacheInfo function along with the UpdateCalibCacheInfoType structure.
task main() { UpdateCalibCacheInfoType args; args.Name = "light"; args.MinVal = 0; args.MaxVal = 1023; SysUpdateCalibCacheInfo(args); NumOut(0, LCD_LINE1, args.Result); }

9.870

ex_SysWriteSemData.nxc

This is an example of how to use the SysWriteSemData function along with the WriteSemDataType structure.
task main() { WriteSemDataType args; args.NewVal = 0x4; args.Request = true; args.ClearBits = false; SysWriteSemData(args); NumOut(0, LCD_LINE1, args.SemData); }

9.871

ex_tan.nxc

This is an example of how to use the tan function.


// // // // ex_tan.nxc Display values generated by the tan API call. This program runs indefinitely -- press gray button to exit. Reguires enhanced firmware 1.28 or later.

#define DELTA PI / 8 // Angles from -3/8 PI radians to almost P1/2 radians stepped by PI/8 radians. const float data[] =

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.872

ex_tand.nxc

1984

{ -3 * DELTA, -2 * DELTA, -DELTA, 0.0, DELTA, 2 * DELTA, 3 * DELTA, 4 * DELTA - 0.01 }; // Display a table of angles and their tangents. The angles are the ones // specified above. task main() { const int items = ArrayLen(data); for (int i = 0; i < items; ++i) { int screen_y = 56 - 8 * i; float angle = data[i]; TextOut(0, screen_y, FormatNum("%7.4f", angle)); TextOut(45, screen_y, FormatNum("%8.4f", tan(angle))); } while (true); }

9.872

ex_tand.nxc

This is an example of how to use the tand function.


// // // // ex_tand.nxc Display values generated by the tand API call. This program runs indefinitely -- press gray button to exit. Reguires enhanced firmware 1.28 or later.

#define DELTA 22.5 // Angles from -67.5 degrees to almost 90.0 degres stepped by 22.5 degrees. const float data[] = { -3 * DELTA, -2 * DELTA, -DELTA, 0.0, DELTA, 2 * DELTA, 3 * DELTA, 4 * DELTA - 0.01 }; // Display a table of angles and their tangents. The angles are the ones // specified above. task main() { const int items = ArrayLen(data);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.873

ex_tanh.nxc

1985

for (int i = 0; i < items; ++i) { int screen_y = 56 - 8 * i; float angle = data[i]; TextOut(0, screen_y, FormatNum("%5.1f", angle)); TextOut(40, screen_y, FormatNum("%8.4f", tand(angle))); } while (true); }

9.873

ex_tanh.nxc

This is an example of how to use the tanh function.


x = tanh(y);

9.874

ex_TextOut.nxc

This is an example of how to use the TextOut function.


TextOut(0, LCD_LINE3, "Hello World!");

9.875

ex_tolower.nxc

This is an example of how to use the tolower function.


i = tolower(x);

9.876

ex_toupper.nxc

This is an example of how to use the toupper function.


i = toupper(x);

9.877

ex_trunc.nxc

This is an example of how to use the trunc function.


y = trunc(x);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.878

ex_UIButton.nxc

1986

9.878

ex_UIButton.nxc

This is an example of how to use the UIButton function.


x = UIButton();

9.879

ex_UIState.nxc

This is an example of how to use the UIState function.


x = UIState();

9.880

ex_UiUsbState.nxc

This is an example of how to use the UsbState function.


value = UsbState();

9.881

ex_UnattenVar.nxc

This is an example of how to use the UnattenVar function.


task main() { long data[] = {-50123, 68142, 128176, -45123}; long data2[4]; float fdata[] = {12.123, 3.14159, 2.68}; float fdata2[3]; NumOut(0, LCD_LINE1, data[0]); NumOut(0, LCD_LINE2, fdata[1]); string sdata = FlattenVar(data); string tmp; // transfer the string to another NXT tmp = sdata; UnflattenVar(tmp, data2); NumOut(0, LCD_LINE3, data2[0]); sdata = FlattenVar(fdata); // transfer the string to another NXT tmp = sdata; UnflattenVar(tmp, fdata2); NumOut(0, LCD_LINE4, fdata2[1]); Wait(SEC_5); }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.882

ex_USBInputBufferInPtr.nxc

1987

9.882

ex_USBInputBufferInPtr.nxc

This is an example of how to use the USBInputBufferInPtr function.


byte x = USBInputBufferInPtr();

9.883

ex_USBInputBufferOutPtr.nxc

This is an example of how to use the USBInputBufferOutPtr function.


byte x = USBInputBufferOutPtr();

9.884

ex_USBOutputBufferInPtr.nxc

This is an example of how to use the USBOutputBufferInPtr function.


byte x = USBOutputBufferInPtr();

9.885

ex_USBOutputBufferOutPtr.nxc

This is an example of how to use the USBOutputBufferOutPtr function.


byte x = USBOutputBufferOutPtr();

9.886

ex_USBPollBufferInPtr.nxc

This is an example of how to use the USBPollBufferInPtr function.


byte x = USBPollBufferInPtr();

9.887

ex_USBPollBufferOutPtr.nxc

This is an example of how to use the USBPollBufferOutPtr function.


byte x = USBPollBufferOutPtr();

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.888

ex_UsbState.nxc

1988

9.888

ex_UsbState.nxc

This is an example of how to use the USBState function.


byte x = USBPollBufferOutPtr();

9.889

ex_VMRunState.nxc

This is an example of how to use the VMRunState function.


x = VMRunState();

9.890

ex_Volume.nxc

This is an example of how to use the Volume function.


x = Volume();

9.891

ex_wait.nxc

This is an example of how to use the Wait function.


task main() { Wait(SEC_5); // wait 5 seconds Wait(Random(SEC_1)); // wait random time up to 1 second }

9.892

ex_Write.nxc

This is an example of how to use the Write function.


result = Write(handle, value);

9.893

ex_WriteBytes.nxc

This is an example of how to use the WriteBytes function.


result = WriteBytes(handle, buffer, count);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.894

ex_WriteBytesEx.nxc

1989

9.894

ex_WriteBytesEx.nxc

This is an example of how to use the WriteBytesEx function.


result = WriteBytesEx(handle, len, buffer);

9.895

ex_writei2cregister.nxc

This is an example of how to use the WriteI2CRegister function.


char result = WriteI2CRegister(S1, I2C_ADDR_DEFAULT, I2C_REG_CMD, US_CMD_OFF);

9.896

ex_WriteLn.nxc

This is an example of how to use the WriteLn function.


result = WriteLn(handle, value);

9.897

ex_WriteLnString.nxc

This is an example of how to use the WriteLnString function.


result = WriteLnString(handle, "testing", count);

9.898

ex_writenrlinkbytes.nxc

This is an example of how to use the WriteNRLinkBytes function.


byte data[] = {0x01, 0x02, 0x03}; char result = WriteNRLinkBytes(S1, MS_ADDR_NRLINK, data);

9.899

ex_WriteString.nxc

This is an example of how to use the WriteString function.


result = WriteString(handle, "testing", count);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.900

ex_yield.nxc

1990

9.900

ex_yield.nxc

This is an example of how to use the Yield function.


task play() { while (true) { PlayTone(TONE_A4, MS_500); Wait(SEC_1); } } task drive() { while (true) { OnFwd(OUT_A, 50); Yield(); } } task main() { Precedes(drive, play); }

9.901

glBoxDemo.nxc

This is an example of how to use the glInit, glBeginObject, glBegin, glAddVertex, glEnd, glEndObject, glSetAngleX, glBeginRender, glAddToAngleY, glCallObject, and glFinishRender functions.
/*-----------------------------------------------------------------------------; File : glBoxDemo.nbc ; Description : A program demonstrating a 3D box... ; Programmed by : Arno van der Vegt, avandervegt@home.nl ;-----------------------------------------------------------------------------*/ task main() { // Initialize the 3D engine... glInit(); // Create a cube, this is the first object which will be object id 0... glCube(GL_POLYGON, 20); glBox(GL_POLYGON, 20, 30, 40); // Set the main view x-angle... glSetAngleX(45); while (true) { // Rotate the main view.... glAddToAngleY(8); glAddToAngleX(4); // Setup for rendering... glBeginRender(); // translate object 1

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.902

glCircleDemo.nxc

1991

glObjectAction(0, GL_TRANSLATE_X, 20); glObjectAction(1, GL_TRANSLATE_X, -20); // Call the object with id 0... glCallObject(0); glCallObject(1); // Finish, clear the screen, rotate and render the called objects... glFinishRender(); Wait(MS_20); } }

9.902

glCircleDemo.nxc

This is an example of how to use the glInit, glBox, glSetAngleX, glBeginRender, glAddToAngleY, glAddToAngleX glCallObject, glSet, and glFinishRender functions.
/*-----------------------------------------------------------------------------; File : glBoxDemo.nbc ; Description : A program demonstrating a 3D box with circles on the edges... ; Programmed by : Arno van der Vegt, avandervegt@home.nl ;-----------------------------------------------------------------------------*/ task main() { // Initialize the 3D engine... glInit(); // Create a box, this is the first object which will be object id 0... glBox(GL_POLYGON, 30, 30, 30); // Create a box, this is the second object which will be object id 1... glBox(GL_CIRCLE, 30, 30, 30); // Set the main view x-angle... glSetAngleX(45); while (true) { // Rotate the main view.... glAddToAngleY(3); glAddToAngleX(5); // Setup for rendering... glBeginRender(); glSet(GL_CULL_MODE, GL_CULL_NONE); // Call the object with id 0... glCallObject(0); // Call the object with id 1... glCallObject(1); // Finish, clear the screen, rotate and render the called objects... glFinishRender(); } }

9.903

glRotateDemo.nxc

This is an example of how to use the glInit, glBox, glSetAngleX, glBeginRender, glCallObject, glObjectAction, and glFinishRender functions.
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.904

glScaleDemo.nxc

1992

/*-----------------------------------------------------------------------------; File : glRotateDemo.nbc ; Description : A program demonstrating two 3D boxes with rotate actions... ; Programmed by : Arno van der Vegt, avandervegt@home.nl ;-----------------------------------------------------------------------------*/ int angleX, angleY; task main() { // Initialize the 3D engine... glInit(); // Create a box, this is the first object which will be object id 0... glBox(GL_POLYGON, 20, 20, 20); // Create a box, this is the second object which will be object id 1... glBox(GL_POLYGON, 40, 40, 40); glSetAngleX(30); angleX = 0; angleY = 0; while (true) { // Setup for rendering... glBeginRender(); // Call the object with id 0... glCallObject(0); glObjectAction(0, GL_ROTATE_X, angleX); // Call the object with id 1... glCallObject(1); glObjectAction(1, GL_ROTATE_Y, angleY); // Finish, clear the screen, rotate and render the called objects... glFinishRender(); angleX += 3; angleX %= 360; angleY += 5; angleY %= 360; } }

9.904

glScaleDemo.nxc

This is an example of how to use the glInit, glBox, glSetAngleX, glAddToAngleY, glBeginRender, glCallObject, glObjectAction, and glFinishRender functions.
/*----------------------------------------------------------------------------; File : glScaleDemo.nbc ; Description : A program demonstrating a scaling action... ; Programmed by : Arno van der Vegt, avandervegt@home.nl ;-----------------------------------------------------------------------------*/ int scaleX, scaleXStep; task main() { // Initialize the 3D engine... glInit(); // Create a box, this is the first object which will be object id 0...

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.905

glTranslateDemo.nxc

1993

glBox(GL_POLYGON, 20, 20, 20); // Set the main view x-angle... glSetAngleX(45); // Initialize the scaling vars... scaleX = 256; scaleXStep = 16; while (true) { // Rotate the main view.... glAddToAngleY(8); // Setup for rendering... glBeginRender(); // Call the object with id 0... glObjectAction(0, GL_SCALE_X, scaleX); glCallObject(0); // Finish, clear the screen, rotate and render the called objects... glFinishRender(); // Scale between 256..512... scaleX += scaleXStep; if (scaleX >= 512) scaleXStep = -16; else if (scaleX <= 256) scaleXStep = 16; Wait(MS_20); } }

9.905

glTranslateDemo.nxc

This is an example of how to use the glInit, glBox, glSetAngleX, glAddToAngleY, glBeginRender, glSet, glCallObject, glObjectAction, and glFinishRender functions.
/*-----------------------------------------------------------------------------; File : glTranslateDemo.nbc ; Description : A program demonstrating two 3D boxes with translate actions... ; Programmed by : Arno van der Vegt, avandervegt@home.nl ;-----------------------------------------------------------------------------*/ int translateX, translateXStep, translateY, translateYStep, translateZ, translateZStep; task main() { // Initialize the 3D engine... glInit(); // Create a box, this is the first object which will be object id 0... glBox(GL_POLYGON, 20, 20, 20); // Create a box, this is the second object which will be object id 1... glBox(GL_POLYGON, 40, 40, 40); glSetAngleX(30);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.906

util_battery_1.nxc

1994

translateX = 0; translateXStep = 1; translateY = 0; translateYStep = 1; translateZ = 0; translateZStep = 2; while (true) { // Rotate the main view.... glAddToAngleY(2); // Setup for rendering... glBeginRender(); glSet(GL_CULL_MODE, GL_CULL_NONE); // Call the object with id 0... glCallObject(0); glObjectAction(0, GL_TRANSLATE_X, translateX); glObjectAction(0, GL_TRANSLATE_Z, translateZ); glObjectAction(0, GL_TRANSLATE_Y, translateY); // Call the object with id 1... glCallObject(1); // Finish, clear the screen, rotate and render the called objects... glFinishRender(); translateX += translateXStep; if (translateX >= 10) translateXStep = -1; else if (translateX <= -10) translateXStep = 1; translateZ += translateZStep; if (translateZ >= 10) translateZStep = -2; else if (translateZ <= -10) translateZStep = 2; translateY += translateYStep; if (translateY >= 10) translateYStep = -1; else if (translateY <= -10) translateYStep = 1; } }

9.906

util_battery_1.nxc

This is an example of how to use the BatteryLevel function.


// Display battery voltage for four seconds. // This version does not use floats and will work on NXTs with firmware 1.07. // Note: the BatteryLevel API call returns an unsigned integer giving the

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.907

util_battery_2.nxc

1995

// battery level in millivolts. task main() { unsigned int millivolts = BatteryLevel(); unsigned int int_volts = millivolts / 1000; millivolts %= 1000; string left = FormatNum("Battery: %d", int_volts); string right = FormatNum(".%03d", millivolts); TextOut(0, LCD_LINE2, StrCat(left, right), true); Wait(SEC_4); }

9.907

util_battery_2.nxc

This is an example of how to use the BatteryLevel function.


// Display battery voltage for four seconds. // This version uses floats and requires NXTs with firmware 1.28 or later. // Note: the BatteryLevel API call returns an unsigned integer giving the // battery level in millivolts. task main() { float volts = BatteryLevel() / 1000.0; TextOut(0, LCD_LINE2, FormatNum("Battery: %5.3f", volts), true); Wait(SEC_4); }

9.908

util_rpm.nxc

This is an example of how to use the CurrentTick and MotorRotationCount functions.


// Display RPM of motor attached to the port MOTOR while running at full speed. // The program runs continously until stopped by pressing the gray NXT button. // Requires NXT firmware 1.28 or later (uses floating point arithmetic). // CurrentTick returns milliseconds in a long integer. // MotorRotationCount returns degrees in a long integer. #define MOTOR OUT_A #define FULL_SPEED 100 #define DEG_TO_RPM 166.6667 // converts degrees per millisecond to RPM long prev_tick; long prev_deg = 0; string rpm_msg() { long dt = CurrentTick() - prev_tick; long deg = MotorRotationCount(MOTOR) - prev_deg; float rpm = deg * DEG_TO_RPM / dt; prev_deg = MotorRotationCount(MOTOR);

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

9.908

util_rpm.nxc

1996

prev_tick = CurrentTick(); return FormatNum("RPM: %5.1f", rpm); } task main() { prev_tick = CurrentTick(); OnFwd(MOTOR, FULL_SPEED); while (true) { Wait(MS_500); // update display every 0.5 seconds TextOut(0, LCD_LINE2, rpm_msg(), true); } }

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

Index
_SENSOR_CFG NXCDefs.h, 1330 SensorTypeModes, 249 A simple 3D graphics library, 230 abort cstdlibAPI, 601 NXCDefs.h, 1352 AbortFlag NXCDefs.h, 1353 UiModuleFunctions, 520 abs cstdlibAPI, 601 NXCDefs.h, 1353 ACCL_CMD_RESET_CAL MSACCLNx, 884 NBCCommon.h, 1053 ACCL_CMD_X_CAL MSACCLNx, 884 NBCCommon.h, 1053 ACCL_CMD_X_CAL_END MSACCLNx, 884 NBCCommon.h, 1053 ACCL_CMD_Y_CAL MSACCLNx, 885 NBCCommon.h, 1053 ACCL_CMD_Y_CAL_END MSACCLNx, 885 NBCCommon.h, 1053 ACCL_CMD_Z_CAL MSACCLNx, 885 NBCCommon.h, 1053 ACCL_CMD_Z_CAL_END MSACCLNx, 885 NBCCommon.h, 1053 ACCL_REG_SENS_LVL MSACCLNx, 885 NBCCommon.h, 1053 ACCL_REG_X_ACCEL MSACCLNx, 885 NBCCommon.h, 1053 ACCL_REG_X_OFFSET MSACCLNx, 885 NBCCommon.h, 1054 ACCL_REG_X_RANGE MSACCLNx, 885 NBCCommon.h, 1054 ACCL_REG_X_TILT MSACCLNx, 885 NBCCommon.h, 1054 ACCL_REG_Y_ACCEL MSACCLNx, 885 NBCCommon.h, 1054 ACCL_REG_Y_OFFSET MSACCLNx, 886 NBCCommon.h, 1054 ACCL_REG_Y_RANGE MSACCLNx, 886 NBCCommon.h, 1054 ACCL_REG_Y_TILT MSACCLNx, 886 NBCCommon.h, 1054 ACCL_REG_Z_ACCEL MSACCLNx, 886 NBCCommon.h, 1054 ACCL_REG_Z_OFFSET MSACCLNx, 886 NBCCommon.h, 1054 ACCL_REG_Z_RANGE MSACCLNx, 886 NBCCommon.h, 1054 ACCL_REG_Z_TILT MSACCLNx, 886 NBCCommon.h, 1055 ACCL_SENSITIVITY_LEVEL_1 MSACCLNxSLevel, 887 NBCCommon.h, 1055 ACCL_SENSITIVITY_LEVEL_2 MSACCLNxSLevel, 887 NBCCommon.h, 1055 ACCL_SENSITIVITY_LEVEL_3 MSACCLNxSLevel, 887 NBCCommon.h, 1055 ACCL_SENSITIVITY_LEVEL_4 MSACCLNxSLevel, 887

INDEX

1998

NBCCommon.h, 1055 ACCLNxCalibrateX MindSensorsAPI, 124 NXCDefs.h, 1353 ACCLNxCalibrateXEnd MindSensorsAPI, 125 NXCDefs.h, 1354 ACCLNxCalibrateY MindSensorsAPI, 125 NXCDefs.h, 1354 ACCLNxCalibrateYEnd MindSensorsAPI, 126 NXCDefs.h, 1355 ACCLNxCalibrateZ MindSensorsAPI, 126 NXCDefs.h, 1355 ACCLNxCalibrateZEnd MindSensorsAPI, 127 NXCDefs.h, 1356 ACCLNxResetCalibration MindSensorsAPI, 127 NXCDefs.h, 1356 ACCLNxSensitivity MindSensorsAPI, 127 NXCDefs.h, 1356 ACCLNxXOffset MindSensorsAPI, 128 NXCDefs.h, 1357 ACCLNxXRange MindSensorsAPI, 128 NXCDefs.h, 1357 ACCLNxYOffset MindSensorsAPI, 129 NXCDefs.h, 1358 ACCLNxYRange MindSensorsAPI, 129 NXCDefs.h, 1358 ACCLNxZOffset MindSensorsAPI, 130 NXCDefs.h, 1359 ACCLNxZRange MindSensorsAPI, 130 NXCDefs.h, 1359 Acos cmathAPI, 559 NXCDefs.h, 1330

acos cmathAPI, 572 NXCDefs.h, 1359 AcosD cmathAPI, 560 NXCDefs.h, 1330 acosd cmathAPI, 572 NXCDefs.h, 1360 Acquire CommandModuleFunctions, 384 NXCDefs.h, 1360 Action CommBTConnectionType, 925 ActualSpeedField NBCCommon.h, 1055 OutputFieldConstants, 736 addressOf cstringAPI, 612 NXCDefs.h, 1361 addressOfEx cstringAPI, 612 NXCDefs.h, 1361 Array API functions, 411 Array operation constants, 634 ArrayBuild ArrayFunctions, 413 NXCDefs.h, 1362 ArrayFunctions ArrayBuild, 413 ArrayInit, 413 ArrayLen, 413 ArrayMax, 414 ArrayMean, 414 ArrayMin, 415 ArrayOp, 416 ArraySort, 416 ArrayStd, 417 ArraySubset, 417 ArraySum, 418 ArraySumSqr, 418 ArrayInit ArrayFunctions, 413 NXCDefs.h, 1362 ArrayLen ArrayFunctions, 413

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

1999

NXCDefs.h, 1363 ArrayMax ArrayFunctions, 414 NXCDefs.h, 1363 ArrayMean ArrayFunctions, 414 NXCDefs.h, 1364 ArrayMin ArrayFunctions, 415 NXCDefs.h, 1364 ArrayOp ArrayFunctions, 416 NXCDefs.h, 1365 ArrayOpConstants OPARR_MAX, 635 OPARR_MEAN, 635 OPARR_MIN, 635 OPARR_SORT, 635 OPARR_STD, 635 OPARR_SUM, 635 OPARR_SUMSQR, 635 ArraySort ArrayFunctions, 416 NXCDefs.h, 1366 ArrayStd ArrayFunctions, 417 NXCDefs.h, 1366 ArraySubset ArrayFunctions, 417 NXCDefs.h, 1367 ArraySum ArrayFunctions, 418 NXCDefs.h, 1367 ArraySumSqr ArrayFunctions, 418 NXCDefs.h, 1368 Asin cmathAPI, 560 NXCDefs.h, 1330 asin cmathAPI, 573 NXCDefs.h, 1368 AsinD cmathAPI, 561 NXCDefs.h, 1331 asind

cmathAPI, 573 NXCDefs.h, 1369 Atan cmathAPI, 561 NXCDefs.h, 1331 atan cmathAPI, 574 NXCDefs.h, 1369 Atan2 cmathAPI, 561 NXCDefs.h, 1332 atan2 cmathAPI, 574 NXCDefs.h, 1370 Atan2D cmathAPI, 562 NXCDefs.h, 1332 atan2d cmathAPI, 575 NXCDefs.h, 1371 AtanD cmathAPI, 562 NXCDefs.h, 1332 atand cmathAPI, 575 NXCDefs.h, 1371 atof cstdlibAPI, 602 NXCDefs.h, 1372 atoi cstdlibAPI, 602 NXCDefs.h, 1373 atol cstdlibAPI, 603 NXCDefs.h, 1373 Basic analog sensor value names, 278 BasicSensorValues SENSOR_1, 278 SENSOR_2, 278 SENSOR_3, 278 SENSOR_4, 278 BatteryLevel NXCDefs.h, 1374 UiModuleFunctions, 521 BatteryState

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2000

NXCDefs.h, 1374 UiModuleFunctions, 521 BaudRate CommHSControlType, 932 bcd2dec cmathAPI, 576 NXCDefs.h, 1374 BITMAP_1 DisplayModuleConstants, 762 NBCCommon.h, 1055 BITMAP_2 DisplayModuleConstants, 762 NBCCommon.h, 1055 BITMAP_3 DisplayModuleConstants, 763 NBCCommon.h, 1056 BITMAP_4 DisplayModuleConstants, 763 NBCCommon.h, 1056 BITMAPS DisplayModuleConstants, 763 NBCCommon.h, 1056 BlockTachoCount OutputStateType, 994 BlockTachoCountField NBCCommon.h, 1056 OutputFieldConstants, 736 Bluetooth hardware status constants, 789 Bluetooth State constants, 783 Bluetooth state status constants, 785 BluetoothState NXCDefs.h, 1375 UiModuleFunctions, 521 BluetoothState constants, 704 BluetoothStatus CommModuleFunctions, 430 NXCDefs.h, 1375 BluetoothWrite CommModuleFunctions, 431 NXCDefs.h, 1376 BREAKOUT_REQ CommandVMState, 659 NBCCommon.h, 1056 BrickDataBluecoreVersion CommModuleFunctions, 431 NXCDefs.h, 1376

BrickDataBtHardwareStatus CommModuleFunctions, 431 NXCDefs.h, 1376 BrickDataBtStateStatus CommModuleFunctions, 432 NXCDefs.h, 1377 BrickDataName CommModuleFunctions, 432 NXCDefs.h, 1377 BrickDataTimeoutValue CommModuleFunctions, 432 NXCDefs.h, 1377 BT_ARM_CMD_MODE CommBtStateConstants, 784 NBCCommon.h, 1056 BT_ARM_DATA_MODE CommBtStateConstants, 784 NBCCommon.h, 1056 BT_ARM_OFF CommBtStateConstants, 784 NBCCommon.h, 1056 BT_BRICK_PORT_OPEN CommBtStateStatusConstants, 786 NBCCommon.h, 1057 BT_BRICK_VISIBILITY CommBtStateStatusConstants, 786 NBCCommon.h, 1057 BT_CMD_BYTE CommMiscConstants, 782 NBCCommon.h, 1057 BT_CMD_READY CommStatusCodesConstants, 805 NBCCommon.h, 1057 BT_CONNECTION_0_ENABLE CommBtStateStatusConstants, 786 NBCCommon.h, 1057 BT_CONNECTION_1_ENABLE CommBtStateStatusConstants, 786 NBCCommon.h, 1057 BT_CONNECTION_2_ENABLE CommBtStateStatusConstants, 786 NBCCommon.h, 1057 BT_CONNECTION_3_ENABLE CommBtStateStatusConstants, 786 NBCCommon.h, 1057 BT_DEFAULT_INQUIRY_MAX

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2001

CommMiscConstants, 782 NBCCommon.h, 1057 BT_DEFAULT_INQUIRY_TIMEOUT_LO CommMiscConstants, 782 NBCCommon.h, 1057 BT_DEVICE_AWAY CommDeviceStatusConstants, 801 NBCCommon.h, 1058 BT_DEVICE_EMPTY CommDeviceStatusConstants, 801 NBCCommon.h, 1058 BT_DEVICE_KNOWN CommDeviceStatusConstants, 801 NBCCommon.h, 1058 BT_DEVICE_NAME CommDeviceStatusConstants, 801 NBCCommon.h, 1058 BT_DEVICE_UNKNOWN CommDeviceStatusConstants, 801 NBCCommon.h, 1058 BT_DISABLE CommBtHwStatusConstants, 789 NBCCommon.h, 1058 BT_ENABLE CommBtHwStatusConstants, 789 NBCCommon.h, 1058 BTConnectionClass CommModuleFunctions, 433 NXCDefs.h, 1378 BTConnectionHandleNum CommModuleFunctions, 433 NXCDefs.h, 1378 BTConnectionLinkQuality CommModuleFunctions, 434 NXCDefs.h, 1378 BTConnectionName CommModuleFunctions, 434 NXCDefs.h, 1379 BTConnectionPinCode CommModuleFunctions, 434 NXCDefs.h, 1379 BTConnectionStreamStatus CommModuleFunctions, 435 NXCDefs.h, 1380 BTDataMode

CommModuleFunctions, 435 NXCDefs.h, 1380 BTDeviceClass CommModuleFunctions, 436 NXCDefs.h, 1380 BTDeviceCount CommModuleFunctions, 436 NXCDefs.h, 1381 BTDeviceName CommModuleFunctions, 436 NXCDefs.h, 1381 BTDeviceNameCount CommModuleFunctions, 437 NXCDefs.h, 1381 BTDeviceStatus CommModuleFunctions, 437 NXCDefs.h, 1382 BTInputBufferInPtr CommModuleFunctions, 437 NXCDefs.h, 1382 BTInputBufferOutPtr CommModuleFunctions, 438 NXCDefs.h, 1382 BTN1 ButtonNameConstants, 694 NBCCommon.h, 1058 BTN2 ButtonNameConstants, 694 NBCCommon.h, 1059 BTN3 ButtonNameConstants, 694 NBCCommon.h, 1059 BTN4 ButtonNameConstants, 694 NBCCommon.h, 1059 BTNCENTER ButtonNameConstants, 695 NBCCommon.h, 1059 BTNEXIT ButtonNameConstants, 695 NBCCommon.h, 1059 BTNLEFT ButtonNameConstants, 695 NBCCommon.h, 1059 BTNRIGHT ButtonNameConstants, 695

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2002

NBCCommon.h, 1059 BTNSTATE_LONG_PRESSED_EV ButtonStateConstants, 696 NBCCommon.h, 1060 BTNSTATE_LONG_RELEASED_EV ButtonStateConstants, 696 NBCCommon.h, 1060 BTNSTATE_NONE ButtonStateConstants, 696 NBCCommon.h, 1060 BTNSTATE_PRESSED_EV ButtonStateConstants, 696 NBCCommon.h, 1060 BTNSTATE_PRESSED_STATE ButtonStateConstants, 697 NBCCommon.h, 1060 BTNSTATE_SHORT_RELEASED_EV ButtonStateConstants, 697 NBCCommon.h, 1060 BTOutputBufferInPtr CommModuleFunctions, 438 NXCDefs.h, 1383 BTOutputBufferOutPtr CommModuleFunctions, 438 NXCDefs.h, 1383 Buffer CommBTWriteType, 927 CommHSReadWriteType, 933 CommLSReadType, 936 CommLSWriteExType, 937 CommLSWriteType, 939 FileReadWriteType, 966 IOMapReadByIDType, 977 IOMapReadType, 979 IOMapWriteByIDType, 980 IOMapWriteType, 982 LoaderExecuteFunctionType, 988 ReadLastResponseType, 998 BufferLen CommLSReadType, 936 Button module, 52 Button module constants, 693 Button module functions, 510 Button module IOMAP offsets, 697 Button module types, 510 Button name constants, 693

ButtonCount ButtonModuleFunctions, 511 NXCDefs.h, 1383 ButtonIOMAP ButtonOffsetLongPressCnt, 697 ButtonOffsetLongRelCnt, 697 ButtonOffsetPressedCnt, 698 ButtonOffsetRelCnt, 698 ButtonOffsetShortRelCnt, 698 ButtonOffsetState, 698 ButtonLongPressCount ButtonModuleFunctions, 512 NXCDefs.h, 1384 ButtonLongReleaseCount ButtonModuleFunctions, 512 NXCDefs.h, 1384 ButtonModuleFunctions ButtonCount, 511 ButtonLongPressCount, 512 ButtonLongReleaseCount, 512 ButtonPressCount, 512 ButtonPressed, 513 ButtonReleaseCount, 513 ButtonShortReleaseCount, 514 ButtonState, 514 ReadButtonEx, 514 SetButtonLongPressCount, 515 SetButtonLongReleaseCount, 515 SetButtonPressCount, 516 SetButtonReleaseCount, 516 SetButtonShortReleaseCount, 516 SetButtonState, 517 SysReadButton, 517 ButtonModuleID ModuleIDConstants, 226 NBCCommon.h, 1060 ButtonModuleName ModuleNameConstants, 224 NBCCommon.h, 1061 ButtonNameConstants BTN1, 694 BTN2, 694 BTN3, 694 BTN4, 694 BTNCENTER, 695 BTNEXIT, 695

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2003

BTNLEFT, 695 BTNRIGHT, 695 NO_OF_BTNS, 695 ButtonOffsetLongPressCnt ButtonIOMAP, 697 NBCCommon.h, 1061 ButtonOffsetLongRelCnt ButtonIOMAP, 697 NBCCommon.h, 1061 ButtonOffsetPressedCnt ButtonIOMAP, 698 NBCCommon.h, 1061 ButtonOffsetRelCnt ButtonIOMAP, 698 NBCCommon.h, 1061 ButtonOffsetShortRelCnt ButtonIOMAP, 698 NBCCommon.h, 1061 ButtonOffsetState ButtonIOMAP, 698 NBCCommon.h, 1061 ButtonPressCount ButtonModuleFunctions, 512 NXCDefs.h, 1385 ButtonPressed ButtonModuleFunctions, 513 NXCDefs.h, 1385 ButtonReleaseCount ButtonModuleFunctions, 513 NXCDefs.h, 1385 ButtonShortReleaseCount ButtonModuleFunctions, 514 NXCDefs.h, 1386 ButtonState ButtonModuleFunctions, 514 NXCDefs.h, 1386 ButtonState constants, 696 ButtonStateConstants BTNSTATE_LONG_PRESSED_EV, 696 BTNSTATE_LONG_RELEASED_EV, 696 BTNSTATE_NONE, 696 BTNSTATE_PRESSED_EV, 696 BTNSTATE_PRESSED_STATE, 697

BTNSTATE_SHORT_RELEASED_EV, 697 ByteArrayToStr cstringAPI, 612 NXCDefs.h, 1387 ByteArrayToStrEx cstringAPI, 613 NXCDefs.h, 1387 BytesReady CommLSCheckStatusType, 934 Calibrated InputValuesType, 975 CalibratedValue InputValuesType, 975 Ceil cmathAPI, 563 NXCDefs.h, 1333 ceil cmathAPI, 576 NXCDefs.h, 1387 Center DrawCircleType, 947 DrawEllipseType, 949 CHAR_BIT NBCCommon.h, 1061 NXTLimits, 915 CHAR_MAX NBCCommon.h, 1061 NXTLimits, 915 CHAR_MIN NBCCommon.h, 1061 NXTLimits, 915 CircleOut DisplayModuleFunctions, 317 NXCDefs.h, 1388 Clear ReadLastResponseType, 998 ClearBits WriteSemDataType, 1011 ClearLine DisplayModuleFunctions, 318 NXCDefs.h, 1388 ClearScreen DisplayModuleFunctions, 318 NXCDefs.h, 1389

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2004

ClearSensor InputModuleFunctions, 256 NXCDefs.h, 1389 CloseFile LoaderModuleFunctions, 535 NXCDefs.h, 1389 CLUMP_DONE CommandVMState, 659 NBCCommon.h, 1062 CLUMP_SUSPEND CommandVMState, 659 NBCCommon.h, 1062 cmath API, 555 cmathAPI Acos, 559 acos, 572 AcosD, 560 acosd, 572 Asin, 560 asin, 573 AsinD, 561 asind, 573 Atan, 561 atan, 574 Atan2, 561 atan2, 574 Atan2D, 562 atan2d, 575 AtanD, 562 atand, 575 bcd2dec, 576 Ceil, 563 ceil, 576 Cos, 563 cos, 577 CosD, 563 cosd, 577 Cosh, 564 cosh, 578 CoshD, 564 coshd, 578 Exp, 565 exp, 579 Floor, 565 oor, 579 Frac, 565

frac, 580 isNAN, 580 Log, 566 log, 581 Log10, 566 log10, 581 MulDiv32, 567 muldiv32, 582 Pow, 567 pow, 582 sign, 583 Sin, 568 sin, 583 SinD, 568 sind, 584 Sinh, 568 sinh, 584 SinhD, 569 sinhd, 585 Sqrt, 569 sqrt, 585 Tan, 570 tan, 585 TanD, 570 tand, 586 Tanh, 570 tanh, 586 TanhD, 571 tanhd, 587 Trunc, 571 trunc, 587 Cmd CommExecuteFunctionType, 929 DisplayExecuteFunctionType, 944 LoaderExecuteFunctionType, 988 Coast NXCDefs.h, 1390 OutputModuleFunctions, 284 CoastEx NXCDefs.h, 1390 OutputModuleFunctions, 284 Codatex API Functions, 210 Codatex device constants, 912 Codatex RFID sensor constants, 913 Codatex RFID sensor modes, 914 CodatexAPI

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2005

RFIDInit, 211 RFIDMode, 212 RFIDRead, 212 RFIDReadContinuous, 213 RFIDReadSingle, 213 RFIDStatus, 213 RFIDStop, 214 Color calibration constants, 719 Color calibration state constants, 718 Color sensor array indices, 716 Color values, 717 ColorADRaw InputModuleFunctions, 256 NXCDefs.h, 1391 ColorBoolean InputModuleFunctions, 257 NXCDefs.h, 1391 ColorCalibration InputModuleFunctions, 257 NXCDefs.h, 1392 ColorCalibrationState InputModuleFunctions, 258 NXCDefs.h, 1392 ColorCalLimits InputModuleFunctions, 258 NXCDefs.h, 1393 ColorSensorRaw InputModuleFunctions, 259 NXCDefs.h, 1393 ColorSensorRead NBCCommon.h, 1062 SysCallConstants, 637 ColorSensorReadType, 922 ColorValue, 922 Invalid, 922 NormalizedArray, 923 Port, 923 RawArray, 923 Result, 923 ScaledArray, 923 ColorSensorValue InputModuleFunctions, 259 NXCDefs.h, 1394 ColorValue ColorSensorReadType, 922 COM_CHANNEL_FOUR_ACTIVE

LowSpeedStateConstants, 745 NBCCommon.h, 1062 COM_CHANNEL_NONE_ACTIVE LowSpeedStateConstants, 745 NBCCommon.h, 1062 COM_CHANNEL_ONE_ACTIVE LowSpeedStateConstants, 745 NBCCommon.h, 1062 COM_CHANNEL_THREE_ACTIVE LowSpeedStateConstants, 745 NBCCommon.h, 1062 COM_CHANNEL_TWO_ACTIVE LowSpeedStateConstants, 746 NBCCommon.h, 1062 Combined sensor type and mode constants, 248 Comm module, 51 Comm module constants, 780 Comm module functions, 422 Comm module interface function constants, 802 Comm module IOMAP offsets, 806 Comm module status code constants, 805 Comm module types, 421 Command CommHSControlType, 932 ReadLastResponseType, 998 Command module, 49 Command module constants, 49 Command module functions, 378 Command module IOMAP offsets, 665 Command module types, 377 CommandCommErrors ERR_COMM_BUFFER_FULL, 663 ERR_COMM_BUS_ERR, 663 ERR_COMM_CHAN_INVALID, 663 ERR_COMM_CHAN_NOT_READY, 663 CommandFatalErrors ERR_ARG, 660 ERR_BAD_POOL_SIZE, 660 ERR_BAD_PTR, 660 ERR_CLUMP_COUNT, 660 ERR_DEFAULT_OFFSETS, 660

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2006

ERR_FILE, 660 ERR_INSANE_OFFSET, 660 ERR_INSTR, 661 ERR_LOADER_ERR, 661 ERR_MEM, 661 ERR_MEMMGR_FAIL, 661 ERR_NO_ACTIVE_CLUMP, 661 ERR_NO_CODE, 661 ERR_NON_FATAL, 661 ERR_SPOTCHECK_FAIL, 661 ERR_VER, 661 CommandFlags NXCDefs.h, 1394 UiModuleFunctions, 521 CommandFlags constants, 699 CommandGenErrors ERR_INVALID_FIELD, 662 ERR_INVALID_PORT, 662 ERR_INVALID_QUEUE, 662 ERR_INVALID_SIZE, 662 ERR_NO_PROG, 662 CommandIOMAP CommandOffsetActivateFlag, 666 CommandOffsetAwake, 666 CommandOffsetDeactivateFlag, 666 CommandOffsetFileName, 666 CommandOffsetFormatString, 666 CommandOffsetMemoryPool, 666 CommandOffsetOffsetDS, 667 CommandOffsetOffsetDVA, 667 CommandOffsetPRCHandler, 667 CommandOffsetProgStatus, 667 CommandOffsetSyncTick, 667 CommandOffsetSyncTime, 667 CommandOffsetTick, 667 CommandModuleConstants NO_ERR, 50 POOL_MAX_SIZE, 51 STAT_COMM_PENDING, 51 STAT_MSG_EMPTY_MAILBOX, 51 CommandModuleFunctions Acquire, 384 CurrentTick, 384 ExitTo, 385 FirstTick, 385
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

Follows, 385 GetButtonModuleValue, 386 GetCommandModuleBytes, 386 GetCommandModuleValue, 386 GetCommModuleBytes, 387 GetCommModuleValue, 387 GetDisplayModuleBytes, 388 GetDisplayModuleValue, 388 GetInputModuleValue, 388 GetIOMapBytes, 389 GetIOMapBytesByID, 389 GetIOMapValue, 390 GetIOMapValueByID, 390 GetLastResponseInfo, 390 GetLoaderModuleValue, 391 GetLowSpeedModuleBytes, 391 GetLowSpeedModuleValue, 392 GetMemoryInfo, 392 GetOutputModuleValue, 393 GetSoundModuleValue, 393 GetUIModuleValue, 394 Precedes, 394 Release, 394 ResetSleepTimer, 395 SetButtonModuleValue, 395 SetCommandModuleBytes, 395 SetCommandModuleValue, 396 SetCommModuleBytes, 396 SetCommModuleValue, 397 SetDisplayModuleBytes, 397 SetDisplayModuleValue, 397 SetInputModuleValue, 398 SetIOCtrlModuleValue, 398 SetIOMapBytes, 398 SetIOMapBytesByID, 399 SetIOMapValue, 399 SetIOMapValueByID, 400 SetLoaderModuleValue, 400 SetLowSpeedModuleBytes, 401 SetLowSpeedModuleValue, 401 SetOutputModuleValue, 402 SetSoundModuleValue, 402 SetUIModuleValue, 402 StartTask, 403 Stop, 403 StopAllTasks, 403

INDEX

2007

StopTask, 403 SysCall, 404 SysComputeCalibValue, 404 SysDatalogGetTimes, 405 SysDatalogWrite, 405 SysGetStartTick, 406 SysIOMapRead, 406 SysIOMapReadByID, 406 SysIOMapWrite, 407 SysIOMapWriteByID, 407 SysKeepAlive, 408 SysMemoryManager, 408 SysReadLastResponse, 408 SysReadSemData, 409 SysUpdateCalibCacheInfo, 409 SysWriteSemData, 410 Wait, 410 Yield, 411 CommandModuleID ModuleIDConstants, 226 NBCCommon.h, 1062 CommandModuleName ModuleNameConstants, 224 NBCCommon.h, 1063 CommandOffsetActivateFlag CommandIOMAP, 666 NBCCommon.h, 1063 CommandOffsetAwake CommandIOMAP, 666 NBCCommon.h, 1063 CommandOffsetDeactivateFlag CommandIOMAP, 666 NBCCommon.h, 1063 CommandOffsetFileName CommandIOMAP, 666 NBCCommon.h, 1063 CommandOffsetFormatString CommandIOMAP, 666 NBCCommon.h, 1063 CommandOffsetMemoryPool CommandIOMAP, 666 NBCCommon.h, 1063 CommandOffsetOffsetDS CommandIOMAP, 667 NBCCommon.h, 1063 CommandOffsetOffsetDVA

CommandIOMAP, 667 NBCCommon.h, 1064 CommandOffsetPRCHandler CommandIOMAP, 667 NBCCommon.h, 1064 CommandOffsetProgStatus CommandIOMAP, 667 NBCCommon.h, 1064 CommandOffsetSyncTick CommandIOMAP, 667 NBCCommon.h, 1064 CommandOffsetSyncTime CommandIOMAP, 667 NBCCommon.h, 1064 CommandOffsetTick CommandIOMAP, 667 NBCCommon.h, 1064 CommandProgStatus PROG_ABORT, 665 PROG_ERROR, 665 PROG_IDLE, 665 PROG_OK, 665 PROG_RESET, 665 PROG_RUNNING, 665 CommandRCErrors ERR_RC_BAD_PACKET, 664 ERR_RC_FAILED, 664 ERR_RC_ILLEGAL_VAL, 664 ERR_RC_UNKNOWN_CMD, 664 CommandVMState BREAKOUT_REQ, 659 CLUMP_DONE, 659 CLUMP_SUSPEND, 659 ROTATE_QUEUE, 659 STOP_REQ, 659 TIMES_UP, 659 CommBTCheckStatus NBCCommon.h, 1064 SysCallConstants, 637 CommBTCheckStatusType, 923 Connection, 924 Result, 924 CommBTConnection NBCCommon.h, 1064 SysCallConstants, 637 CommBTConnectionType, 924

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2008

Action, 925 ConnectionSlot, 925 Name, 925 Result, 925 CommBtHwStatusConstants BT_DISABLE, 789 BT_ENABLE, 789 CommBTOnOff NBCCommon.h, 1065 SysCallConstants, 638 CommBTOnOffType, 926 PowerState, 926 Result, 926 CommBTRead NBCCommon.h, 1065 SysCallConstants, 638 CommBtStateConstants BT_ARM_CMD_MODE, 784 BT_ARM_DATA_MODE, 784 BT_ARM_OFF, 784 CommBtStateStatusConstants BT_BRICK_PORT_OPEN, 786 BT_BRICK_VISIBILITY, 786 BT_CONNECTION_0_ENABLE, 786 BT_CONNECTION_1_ENABLE, 786 BT_CONNECTION_2_ENABLE, 786 BT_CONNECTION_3_ENABLE, 786 CommBTWrite NBCCommon.h, 1065 SysCallConstants, 638 CommBTWriteType, 927 Buffer, 927 Connection, 927 Result, 928 CommConnectionConstants CONN_BT0, 787 CONN_BT1, 787 CONN_BT2, 788 CONN_BT3, 788 CONN_HS4, 788 CONN_HS_1, 788 CONN_HS_2, 788

CONN_HS_3, 788 CONN_HS_4, 788 CONN_HS_5, 788 CONN_HS_6, 788 CONN_HS_7, 789 CONN_HS_8, 789 CONN_HS_ALL, 789 CommDataModeConstants DATA_MODE_GPS, 785 DATA_MODE_MASK, 785 DATA_MODE_NXT, 785 DATA_MODE_RAW, 785 DATA_MODE_UPDATE, 785 CommDeviceStatusConstants BT_DEVICE_AWAY, 801 BT_DEVICE_EMPTY, 801 BT_DEVICE_KNOWN, 801 BT_DEVICE_NAME, 801 BT_DEVICE_UNKNOWN, 801 CommExecuteFunction NBCCommon.h, 1065 SysCallConstants, 638 CommExecuteFunctionType, 928 Cmd, 929 Name, 930 Param1, 930 Param2, 930 Param3, 930 Result, 930 RetVal, 930 CommHiSpeedAddressConstants HS_ADDRESS_1, 800 HS_ADDRESS_2, 800 HS_ADDRESS_3, 800 HS_ADDRESS_4, 800 HS_ADDRESS_5, 800 HS_ADDRESS_6, 800 HS_ADDRESS_7, 800 HS_ADDRESS_8, 800 HS_ADDRESS_ALL, 800 CommHiSpeedBaudConstants HS_BAUD_115200, 793 HS_BAUD_1200, 793 HS_BAUD_14400, 793 HS_BAUD_19200, 793 HS_BAUD_230400, 794

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2009

HS_BAUD_2400, 794 HS_BAUD_28800, 794 HS_BAUD_3600, 794 HS_BAUD_38400, 794 HS_BAUD_460800, 794 HS_BAUD_4800, 794 HS_BAUD_57600, 794 HS_BAUD_7200, 794 HS_BAUD_76800, 794 HS_BAUD_921600, 795 HS_BAUD_9600, 795 HS_BAUD_DEFAULT, 795 CommHiSpeedCombinedConstants HS_MODE_7E1, 799 HS_MODE_8N1, 799 CommHiSpeedCtrlConstants HS_CTRL_EXIT, 792 HS_CTRL_INIT, 792 HS_CTRL_UART, 792 CommHiSpeedDataBitsConstants HS_MODE_5_DATA, 796 HS_MODE_6_DATA, 796 HS_MODE_7_DATA, 796 HS_MODE_8_DATA, 797 CommHiSpeedFlagsConstants HS_UPDATE, 791 CommHiSpeedModeConstants HS_MODE_DEFAULT, 796 CommHiSpeedParityConstants HS_MODE_E_PARITY, 798 HS_MODE_M_PARITY, 798 HS_MODE_N_PARITY, 798 HS_MODE_O_PARITY, 798 HS_MODE_S_PARITY, 798 CommHiSpeedStateConstants HS_DISABLE, 791 HS_ENABLE, 791 HS_INIT_RECEIVER, 791 HS_INITIALISE, 791 HS_SEND_DATA, 791 CommHiSpeedStopBitsConstants HS_MODE_10_STOP, 797 HS_MODE_15_STOP, 797 HS_MODE_20_STOP, 797 CommHSCheckStatus NBCCommon.h, 1065

SysCallConstants, 638 CommHSCheckStatusType, 930 DataAvailable, 931 SendingData, 931 CommHSControl NBCCommon.h, 1065 SysCallConstants, 638 CommHSControlType, 931 BaudRate, 932 Command, 932 Mode, 932 Result, 932 CommHSRead NBCCommon.h, 1065 SysCallConstants, 638 CommHSReadWriteType, 933 Buffer, 933 Status, 933 CommHSWrite NBCCommon.h, 1065 SysCallConstants, 638 CommInterfaceConstants INTF_BTOFF, 803 INTF_BTON, 803 INTF_CONNECT, 803 INTF_CONNECTBYNAME, 803 INTF_CONNECTREQ, 803 INTF_DISCONNECT, 803 INTF_DISCONNECTALL, 803 INTF_EXTREAD, 803 INTF_FACTORYRESET, 803 INTF_OPENSTREAM, 803 INTF_PINREQ, 804 INTF_REMOVEDEVICE, 804 INTF_SEARCH, 804 INTF_SENDDATA, 804 INTF_SENDFILE, 804 INTF_SETBTNAME, 804 INTF_SETCMDMODE, 804 INTF_STOPSEARCH, 804 INTF_VISIBILITY, 804 CommIOMAP CommOffsetBrickDataBdAddr, 807 CommOffsetBrickDataBluecoreVersion, 807

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2010

CommOffsetBrickDataBtHwStatus, 807 CommOffsetBrickDataBtStateStatus, 808 CommOffsetBrickDataName, 808 CommOffsetBrickDataTimeOutValue, 808 CommOffsetBtConnectTableBdAddr, 808 CommOffsetBtConnectTableClassOfDevice, 808 CommOffsetBtConnectTableHandleNr, 808 CommOffsetBtConnectTableLinkQuality, 808 CommOffsetBtConnectTableName, 808 CommOffsetBtConnectTablePinCode, 808 CommOffsetBtConnectTableStreamStatus, 808 CommOffsetBtDataMode, 809 CommOffsetBtDeviceCnt, 809 CommOffsetBtDeviceNameCnt, 809 CommOffsetBtDeviceTableBdAddr, 809 CommOffsetBtDeviceTableClassOfDevice, 809 CommOffsetBtDeviceTableDeviceStatus, 809 CommOffsetBtDeviceTableName, 809 CommOffsetBtInBufBuf, 809 CommOffsetBtInBufInPtr, 809 CommOffsetBtInBufOutPtr, 809 CommOffsetBtOutBufBuf, 810 CommOffsetBtOutBufInPtr, 810 CommOffsetBtOutBufOutPtr, 810 CommOffsetHsDataMode, 810 CommOffsetHsFlags, 810 CommOffsetHsInBufBuf, 810 CommOffsetHsInBufInPtr, 810 CommOffsetHsInBufOutPtr, 810 CommOffsetHsMode, 810 CommOffsetHsOutBufBuf, 810 CommOffsetHsOutBufInPtr, 811

CommOffsetHsOutBufOutPtr, 811 CommOffsetHsSpeed, 811 CommOffsetHsState, 811 CommOffsetPFunc, 811 CommOffsetPFuncTwo, 811 CommOffsetUsbInBufBuf, 811 CommOffsetUsbInBufInPtr, 811 CommOffsetUsbInBufOutPtr, 811 CommOffsetUsbOutBufBuf, 811 CommOffsetUsbOutBufInPtr, 812 CommOffsetUsbOutBufOutPtr, 812 CommOffsetUsbPollBufBuf, 812 CommOffsetUsbPollBufInPtr, 812 CommOffsetUsbPollBufOutPtr, 812 CommOffsetUsbState, 812 CommLSCheckStatus NBCCommon.h, 1065 SysCallConstants, 638 CommLSCheckStatusType, 934 BytesReady, 934 Port, 934 Result, 935 CommLSRead NBCCommon.h, 1065 SysCallConstants, 638 CommLSReadType, 935 Buffer, 936 BufferLen, 936 Port, 936 Result, 936 CommLSWrite NBCCommon.h, 1066 SysCallConstants, 639 CommLSWriteEx NBCCommon.h, 1066 SysCallConstants, 639 CommLSWriteExType, 937 Buffer, 937 NoRestartOnRead, 937 Port, 937 Result, 938 ReturnLen, 938 CommLSWriteType, 938 Buffer, 939 Port, 939 Result, 939

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2011

ReturnLen, 939 CommMiscConstants BT_CMD_BYTE, 782 BT_DEFAULT_INQUIRY_MAX, 782 BT_DEFAULT_INQUIRY_TIMEOUT_LO, 782 MAX_BT_MSG_SIZE, 782 SIZE_OF_BDADDR, 782 SIZE_OF_BRICK_NAME, 782 SIZE_OF_BT_CONNECT_TABLE, 782 SIZE_OF_BT_DEVICE_TABLE, 782 SIZE_OF_BT_NAME, 782 SIZE_OF_BT_PINCODE, 783 SIZE_OF_BTBUF, 783 SIZE_OF_CLASS_OF_DEVICE, 783 SIZE_OF_HSBUF, 783 SIZE_OF_USBBUF, 783 SIZE_OF_USBDATA, 783 USB_PROTOCOL_OVERHEAD, 783 CommModuleDCFunctions RemoteDatalogRead, 478 RemoteDatalogSetTimes, 478 RemoteGetBatteryLevel, 479 RemoteGetConnectionCount, 479 RemoteGetConnectionName, 480 RemoteGetContactCount, 480 RemoteGetContactName, 481 RemoteGetCurrentProgramName, 482 RemoteGetInputValues, 482 RemoteGetOutputState, 483 RemoteGetProperty, 483 RemoteKeepAlive, 484 RemoteLowspeedGetStatus, 484 RemoteLowspeedRead, 485 RemoteLowspeedWrite, 486 RemoteMessageRead, 486 RemoteMessageWrite, 487 RemotePlaySoundFile, 487 RemotePlayTone, 488 RemoteResetMotorPosition, 488

RemoteResetScaledValue, 489 RemoteResetTachoCount, 489 RemoteSetInputMode, 490 RemoteSetOutputState, 490 RemoteSetProperty, 491 RemoteStartProgram, 492 RemoteStopProgram, 492 RemoteStopSound, 493 CommModuleFunctions BluetoothStatus, 430 BluetoothWrite, 431 BrickDataBluecoreVersion, 431 BrickDataBtHardwareStatus, 431 BrickDataBtStateStatus, 432 BrickDataName, 432 BrickDataTimeoutValue, 432 BTConnectionClass, 433 BTConnectionHandleNum, 433 BTConnectionLinkQuality, 434 BTConnectionName, 434 BTConnectionPinCode, 434 BTConnectionStreamStatus, 435 BTDataMode, 435 BTDeviceClass, 436 BTDeviceCount, 436 BTDeviceName, 436 BTDeviceNameCount, 437 BTDeviceStatus, 437 BTInputBufferInPtr, 437 BTInputBufferOutPtr, 438 BTOutputBufferInPtr, 438 BTOutputBufferOutPtr, 438 GetBrickDataAddress, 439 GetBTConnectionAddress, 439 GetBTDeviceAddress, 439 GetBTInputBuffer, 440 GetBTOutputBuffer, 440 GetHSInputBuffer, 441 GetHSOutputBuffer, 441 GetUSBInputBuffer, 442 GetUSBOutputBuffer, 442 GetUSBPollBuffer, 442 HSDataMode, 443 HSFlags, 443 HSInputBufferInPtr, 444 HSInputBufferOutPtr, 444

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2012

HSMode, 444 HSOutputBufferInPtr, 445 HSOutputBufferOutPtr, 445 HSSpeed, 445 HSState, 446 ReceiveMessage, 446 ReceiveRemoteBool, 446 ReceiveRemoteMessageEx, 447 ReceiveRemoteNumber, 448 ReceiveRemoteString, 448 RemoteConnectionIdle, 449 RemoteConnectionWrite, 449 RS485Control, 450 RS485DataAvailable, 450 RS485Disable, 451 RS485Enable, 451 RS485Initialize, 452 RS485Read, 452 RS485SendingData, 452 RS485Status, 453 RS485Uart, 453 RS485Write, 454 SendMessage, 454 SendRemoteBool, 455 SendRemoteNumber, 455 SendRemoteString, 456 SendResponseBool, 456 SendResponseNumber, 457 SendResponseString, 457 SendRS485Bool, 458 SendRS485Number, 458 SendRS485String, 459 SetBTDataMode, 459 SetBTInputBuffer, 459 SetBTInputBufferInPtr, 460 SetBTInputBufferOutPtr, 460 SetBTOutputBuffer, 460 SetBTOutputBufferInPtr, 461 SetBTOutputBufferOutPtr, 461 SetHSDataMode, 461 SetHSFlags, 462 SetHSInputBuffer, 462 SetHSInputBufferInPtr, 463 SetHSInputBufferOutPtr, 463 SetHSMode, 463 SetHSOutputBuffer, 464

SetHSOutputBufferInPtr, 464 SetHSOutputBufferOutPtr, 464 SetHSSpeed, 465 SetHSState, 465 SetUSBInputBuffer, 465 SetUSBInputBufferInPtr, 466 SetUSBInputBufferOutPtr, 466 SetUSBOutputBuffer, 466 SetUSBOutputBufferInPtr, 467 SetUSBOutputBufferOutPtr, 467 SetUSBPollBuffer, 467 SetUSBPollBufferInPtr, 468 SetUSBPollBufferOutPtr, 468 SetUSBState, 468 SysCommBTCheckStatus, 468 SysCommBTConnection, 469 SysCommBTOnOff, 469 SysCommBTWrite, 470 SysCommExecuteFunction, 470 SysCommHSCheckStatus, 470 SysCommHSControl, 471 SysCommHSRead, 471 SysCommHSWrite, 472 SysMessageRead, 472 SysMessageWrite, 472 USBInputBufferInPtr, 473 USBInputBufferOutPtr, 473 USBOutputBufferInPtr, 473 USBOutputBufferOutPtr, 474 USBPollBufferInPtr, 474 USBPollBufferOutPtr, 474 USBState, 475 UseRS485, 475 CommModuleID ModuleIDConstants, 226 NBCCommon.h, 1066 CommModuleName ModuleNameConstants, 224 NBCCommon.h, 1066 CommModuleSCFunctions RemoteBluetoothFactoryReset, 495 RemoteCloseFile, 496 RemoteDeleteFile, 496 RemoteDeleteUserFlash, 497 RemoteFindFirstFile, 497 RemoteFindNextFile, 498

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2013

RemoteGetBluetoothAddress, 499 NBCCommon.h, 1067 RemoteGetDeviceInfo, 499 CommOffsetBtConnectTableName RemoteGetFirmwareVersion, 500 CommIOMAP, 808 RemoteIOMapRead, 501 NBCCommon.h, 1067 RemoteIOMapWriteBytes, 501 CommOffsetBtConnectTablePinCode RemoteIOMapWriteValue, 502 CommIOMAP, 808 RemoteOpenAppendData, 502 NBCCommon.h, 1067 RemoteOpenRead, 503 CommOffsetBtConnectTableStreamStatus RemoteOpenWrite, 504 CommIOMAP, 808 RemoteOpenWriteData, 504 NBCCommon.h, 1067 RemoteOpenWriteLinear, 505 CommOffsetBtDataMode RemotePollCommand, 506 CommIOMAP, 809 RemotePollCommandLength, 506 NBCCommon.h, 1067 RemoteRead, 507 CommOffsetBtDeviceCnt RemoteRenameFile, 508 CommIOMAP, 809 RemoteSetBrickName, 508 NBCCommon.h, 1067 RemoteWrite, 509 CommOffsetBtDeviceNameCnt CommOffsetBrickDataBdAddr CommIOMAP, 809 CommIOMAP, 807 NBCCommon.h, 1067 NBCCommon.h, 1066 CommOffsetBtDeviceTableBdAddr CommOffsetBrickDataBluecoreVersion CommIOMAP, 809 CommIOMAP, 807 NBCCommon.h, 1068 NBCCommon.h, 1066 CommOffsetBtDeviceTableClassOfDevice CommOffsetBrickDataBtHwStatus CommIOMAP, 809 CommIOMAP, 807 NBCCommon.h, 1068 NBCCommon.h, 1066 CommOffsetBtDeviceTableDeviceStatus CommOffsetBrickDataBtStateStatus CommIOMAP, 809 CommIOMAP, 808 NBCCommon.h, 1068 NBCCommon.h, 1066 CommOffsetBtDeviceTableName CommOffsetBrickDataName CommIOMAP, 809 CommIOMAP, 808 NBCCommon.h, 1068 NBCCommon.h, 1066 CommOffsetBtInBufBuf CommOffsetBrickDataTimeOutValue CommIOMAP, 809 CommIOMAP, 808 NBCCommon.h, 1068 NBCCommon.h, 1066 CommOffsetBtInBufInPtr CommOffsetBtConnectTableBdAddr CommIOMAP, 809 CommIOMAP, 808 NBCCommon.h, 1068 NBCCommon.h, 1067 CommOffsetBtInBufOutPtr CommOffsetBtConnectTableClassOfDevice CommIOMAP, 809 CommIOMAP, 808 NBCCommon.h, 1068 NBCCommon.h, 1067 CommOffsetBtOutBufBuf CommOffsetBtConnectTableHandleNr CommIOMAP, 810 CommIOMAP, 808 NBCCommon.h, 1068 NBCCommon.h, 1067 CommOffsetBtOutBufInPtr CommOffsetBtConnectTableLinkQuality CommIOMAP, 810 CommIOMAP, 808 NBCCommon.h, 1068
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2014

CommOffsetBtOutBufOutPtr CommIOMAP, 810 NBCCommon.h, 1068 CommOffsetHsDataMode CommIOMAP, 810 NBCCommon.h, 1069 CommOffsetHsFlags CommIOMAP, 810 NBCCommon.h, 1069 CommOffsetHsInBufBuf CommIOMAP, 810 NBCCommon.h, 1069 CommOffsetHsInBufInPtr CommIOMAP, 810 NBCCommon.h, 1069 CommOffsetHsInBufOutPtr CommIOMAP, 810 NBCCommon.h, 1069 CommOffsetHsMode CommIOMAP, 810 NBCCommon.h, 1069 CommOffsetHsOutBufBuf CommIOMAP, 810 NBCCommon.h, 1069 CommOffsetHsOutBufInPtr CommIOMAP, 811 NBCCommon.h, 1069 CommOffsetHsOutBufOutPtr CommIOMAP, 811 NBCCommon.h, 1069 CommOffsetHsSpeed CommIOMAP, 811 NBCCommon.h, 1069 CommOffsetHsState CommIOMAP, 811 NBCCommon.h, 1070 CommOffsetPFunc CommIOMAP, 811 NBCCommon.h, 1070 CommOffsetPFuncTwo CommIOMAP, 811 NBCCommon.h, 1070 CommOffsetUsbInBufBuf CommIOMAP, 811 NBCCommon.h, 1070 CommOffsetUsbInBufInPtr

CommIOMAP, 811 NBCCommon.h, 1070 CommOffsetUsbInBufOutPtr CommIOMAP, 811 NBCCommon.h, 1070 CommOffsetUsbOutBufBuf CommIOMAP, 811 NBCCommon.h, 1070 CommOffsetUsbOutBufInPtr CommIOMAP, 812 NBCCommon.h, 1070 CommOffsetUsbOutBufOutPtr CommIOMAP, 812 NBCCommon.h, 1070 CommOffsetUsbPollBufBuf CommIOMAP, 812 NBCCommon.h, 1070 CommOffsetUsbPollBufInPtr CommIOMAP, 812 NBCCommon.h, 1071 CommOffsetUsbPollBufOutPtr CommIOMAP, 812 NBCCommon.h, 1071 CommOffsetUsbState CommIOMAP, 812 NBCCommon.h, 1071 CommStatusCodesConstants BT_CMD_READY, 805 HS_CMD_READY, 805 LR_COULD_NOT_SAVE, 805 LR_ENTRY_REMOVED, 805 LR_STORE_IS_FULL, 805 LR_SUCCESS, 805 LR_UNKNOWN_ADDR, 806 USB_CMD_READY, 806 Communications specic errors, 663 Compact MemoryManagerType, 990 ComputeCalibValue NBCCommon.h, 1071 SysCallConstants, 639 ComputeCalibValueType, 940 Name, 940 RawVal, 940 Result, 941 CongureTemperatureSensor

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2015

LowSpeedModuleFunctions, 354 NXCDefs.h, 1395 CONN_BT0 CommConnectionConstants, 787 NBCCommon.h, 1071 CONN_BT1 CommConnectionConstants, 787 NBCCommon.h, 1071 CONN_BT2 CommConnectionConstants, 788 NBCCommon.h, 1072 CONN_BT3 CommConnectionConstants, 788 NBCCommon.h, 1072 CONN_HS4 CommConnectionConstants, 788 NBCCommon.h, 1072 CONN_HS_1 CommConnectionConstants, 788 NBCCommon.h, 1072 CONN_HS_2 CommConnectionConstants, 788 NBCCommon.h, 1072 CONN_HS_3 CommConnectionConstants, 788 NBCCommon.h, 1072 CONN_HS_4 CommConnectionConstants, 788 NBCCommon.h, 1072 CONN_HS_5 CommConnectionConstants, 788 NBCCommon.h, 1072 CONN_HS_6 CommConnectionConstants, 788 NBCCommon.h, 1072 CONN_HS_7 CommConnectionConstants, 789 NBCCommon.h, 1073 CONN_HS_8 CommConnectionConstants, 789 NBCCommon.h, 1073 CONN_HS_ALL CommConnectionConstants, 789 NBCCommon.h, 1073 Connection CommBTCheckStatusType, 924

CommBTWriteType, 927 ConnectionSlot CommBTConnectionType, 925 Copy cstringAPI, 613 NXCDefs.h, 1395 Cos cmathAPI, 563 NXCDefs.h, 1333 cos cmathAPI, 577 NXCDefs.h, 1396 CosD cmathAPI, 563 NXCDefs.h, 1334 cosd cmathAPI, 577 NXCDefs.h, 1396 Cosh cmathAPI, 564 NXCDefs.h, 1334 cosh cmathAPI, 578 NXCDefs.h, 1397 CoshD cmathAPI, 564 NXCDefs.h, 1334 coshd cmathAPI, 578 NXCDefs.h, 1397 Count IOMapReadByIDType, 977 IOMapReadType, 979 ReadButtonType, 997 CreateFile LoaderModuleFunctions, 535 NXCDefs.h, 1397 CreateFileLinear LoaderModuleFunctions, 536 NXCDefs.h, 1398 CreateFileNonLinear LoaderModuleFunctions, 537 NXCDefs.h, 1399 cstdio API, 588 cstdioAPI fclose, 591

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2016

feof, 591 fush, 592 fgetc, 592 fgets, 592 fopen, 593 fprintf, 593 fputc, 594 fputs, 594 fseek, 595 ftell, 595 getc, 590 getchar, 596 printf, 596 putc, 590 remove, 597 rename, 597 rewind, 597 set_fopen_size, 598 sprintf, 598 cstdlib API, 600 cstdlib API types, 609 cstdlibAPI abort, 601 abs, 601 atof, 602 atoi, 602 atol, 603 div, 604 labs, 604 ldiv, 604 rand, 605 Random, 605 strtod, 606 strtol, 607 strtoul, 607 SysRandomNumber, 608 cstring API, 609 cstringAPI addressOf, 612 addressOfEx, 612 ByteArrayToStr, 612 ByteArrayToStrEx, 613 Copy, 613 Flatten, 614 FlattenVar, 614 FormatNum, 615

LeftStr, 615 memcmp, 616 memcpy, 616 memmove, 617 MidStr, 617 NumToStr, 617 Pos, 618 reladdressOf, 618 RightStr, 619 StrCat, 620 strcat, 619 strcmp, 620 strcpy, 621 StrIndex, 621 StrLen, 622 strlen, 622 strncat, 622 strncmp, 623 strncpy, 623 StrReplace, 624 StrToByteArray, 624 StrToNum, 625 SubStr, 625 UnattenVar, 626 CT_ADDR_RFID CTRFIDConstants, 913 NBCCommon.h, 1073 CT_REG_DATA CTRFIDConstants, 913 NBCCommon.h, 1073 CT_REG_MODE CTRFIDConstants, 913 NBCCommon.h, 1073 CT_REG_STATUS CTRFIDConstants, 913 NBCCommon.h, 1073 CTRFIDConstants CT_ADDR_RFID, 913 CT_REG_DATA, 913 CT_REG_MODE, 913 CT_REG_STATUS, 913 CTRFIDModeConstants RFID_MODE_CONTINUOUS, 914 RFID_MODE_SINGLE, 914 RFID_MODE_STOP, 914 ctype API, 627

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2017

ctypeAPI isalnum, 628 isalpha, 628 iscntrl, 629 isdigit, 629 isgraph, 629 islower, 630 isprint, 630 ispunct, 631 isspace, 631 isupper, 631 isxdigit, 632 tolower, 632 toupper, 633 CurrentTick CommandModuleFunctions, 384 NXCDefs.h, 1399 CustomSensorActiveStatus InputModuleFunctions, 260 NXCDefs.h, 1400 CustomSensorPercentFullScale InputModuleFunctions, 260 NXCDefs.h, 1400 CustomSensorZeroOffset InputModuleFunctions, 260 NXCDefs.h, 1400 Data DrawGraphicArrayType, 952 Data mode constants, 784 Data type limits, 914 DATA_MODE_GPS CommDataModeConstants, 785 NBCCommon.h, 1073 DATA_MODE_MASK CommDataModeConstants, 785 NBCCommon.h, 1073 DATA_MODE_NXT CommDataModeConstants, 785 NBCCommon.h, 1074 DATA_MODE_RAW CommDataModeConstants, 785 NBCCommon.h, 1074 DATA_MODE_UPDATE CommDataModeConstants, 785 NBCCommon.h, 1074

DataAvailable CommHSCheckStatusType, 931 DatalogGetTimes NBCCommon.h, 1074 SysCallConstants, 639 DatalogGetTimesType, 941 SyncTick, 942 SyncTime, 942 DatalogWrite NBCCommon.h, 1074 SysCallConstants, 639 DatalogWriteType, 942 Message, 943 Result, 943 DataspaceSize MemoryManagerType, 990 DEGREES_PER_RADIAN MiscConstants, 228 NBCCommon.h, 1074 DeleteFile LoaderModuleFunctions, 537 NXCDefs.h, 1401 Device status constants, 801 Direct Command functions, 475 Display contrast constants, 775 Display ags, 774 Display module, 57 Display module constants, 761 Display module functions, 313 Display module IOMAP offsets, 777 Display module types, 312 DISPLAY_BUSY DisplayFlagsGroup, 774 NBCCommon.h, 1074 DISPLAY_CHAR DisplayExecuteFunctionConstants, 767 NBCCommon.h, 1074 DISPLAY_CONTRAST_DEFAULT DisplayContrastConstants, 775 NBCCommon.h, 1074 DISPLAY_CONTRAST_MAX DisplayContrastConstants, 775 NBCCommon.h, 1075 DISPLAY_ERASE_ALL

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2018

DisplayExecuteFunctionConstants, 767 NBCCommon.h, 1075 DISPLAY_ERASE_LINE DisplayExecuteFunctionConstants, 767 NBCCommon.h, 1075 DISPLAY_FILL_REGION DisplayExecuteFunctionConstants, 767 NBCCommon.h, 1075 DISPLAY_FRAME DisplayExecuteFunctionConstants, 768 NBCCommon.h, 1075 DISPLAY_HEIGHT DisplayModuleConstants, 763 NBCCommon.h, 1075 DISPLAY_HORIZONTAL_LINE DisplayExecuteFunctionConstants, 768 NBCCommon.h, 1075 DISPLAY_MENUICONS_X_DIFF DisplayModuleConstants, 763 NBCCommon.h, 1076 DISPLAY_MENUICONS_X_OFFS DisplayModuleConstants, 763 NBCCommon.h, 1076 DISPLAY_MENUICONS_Y DisplayModuleConstants, 763 NBCCommon.h, 1076 DISPLAY_ON DisplayFlagsGroup, 774 NBCCommon.h, 1076 DISPLAY_PIXEL DisplayExecuteFunctionConstants, 768 NBCCommon.h, 1076 DISPLAY_POPUP DisplayFlagsGroup, 774 NBCCommon.h, 1076 DISPLAY_REFRESH DisplayFlagsGroup, 774 NBCCommon.h, 1076 DISPLAY_REFRESH_DISABLED DisplayFlagsGroup, 774

NBCCommon.h, 1076 DISPLAY_VERTICAL_LINE DisplayExecuteFunctionConstants, 768 NBCCommon.h, 1077 DISPLAY_WIDTH DisplayModuleConstants, 763 NBCCommon.h, 1077 DisplayContrast DisplayModuleFunctions, 319 NXCDefs.h, 1401 DisplayContrastConstants DISPLAY_CONTRAST_DEFAULT, 775 DISPLAY_CONTRAST_MAX, 775 DisplayDisplay DisplayModuleFunctions, 319 NXCDefs.h, 1401 DisplayDrawOptionConstants DRAW_OPT_CLEAR, 769 DRAW_OPT_CLEAR_EXCEPT_STATUS_SCREEN, 769 DRAW_OPT_CLEAR_PIXELS, 769 DRAW_OPT_CLEAR_SCREEN_MODES, 770 DRAW_OPT_CLEAR_WHOLE_SCREEN, 770 DRAW_OPT_FILL_SHAPE, 770 DRAW_OPT_INVERT, 770 DRAW_OPT_LOGICAL_AND, 770 DRAW_OPT_LOGICAL_COPY, 770 DRAW_OPT_LOGICAL_OPERATIONS, 771 DRAW_OPT_LOGICAL_OR, 771 DRAW_OPT_LOGICAL_XOR, 771 DRAW_OPT_NORMAL, 771 DRAW_OPT_POLYGON_POLYLINE, 771 DisplayEraseMask DisplayModuleFunctions, 319 NXCDefs.h, 1402 DisplayExecuteFunction

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2019

NBCCommon.h, 1077 SysCallConstants, 639 DisplayExecuteFunction constants, 767 DisplayExecuteFunctionConstants DISPLAY_CHAR, 767 DISPLAY_ERASE_ALL, 767 DISPLAY_ERASE_LINE, 767 DISPLAY_FILL_REGION, 767 DISPLAY_FRAME, 768 DISPLAY_HORIZONTAL_LINE, 768 DISPLAY_PIXEL, 768 DISPLAY_VERTICAL_LINE, 768 DisplayExecuteFunctionType, 943 Cmd, 944 On, 944 Status, 945 X1, 945 X2, 945 Y1, 945 Y2, 945 DisplayFlags DisplayModuleFunctions, 320 NXCDefs.h, 1402 DisplayFlagsGroup DISPLAY_BUSY, 774 DISPLAY_ON, 774 DISPLAY_POPUP, 774 DISPLAY_REFRESH, 774 DISPLAY_REFRESH_DISABLED, 774 DisplayFont DisplayModuleFunctions, 320 NXCDefs.h, 1402 DisplayFontDrawOptionConstants DRAW_OPT_FONT_DIR_B2TL, 772 DRAW_OPT_FONT_DIR_B2TR, 772 DRAW_OPT_FONT_DIR_L2RB, 772 DRAW_OPT_FONT_DIR_L2RT, 772 DRAW_OPT_FONT_DIR_R2LB, 773

DRAW_OPT_FONT_DIR_R2LT, 773 DRAW_OPT_FONT_DIR_T2BL, 773 DRAW_OPT_FONT_DIR_T2BR, 773 DRAW_OPT_FONT_DIRECTIONS, 773 DRAW_OPT_FONT_WRAP, 773 DisplayIOMAP DisplayOffsetContrast, 778 DisplayOffsetDisplay, 778 DisplayOffsetEraseMask, 778 DisplayOffsetFlags, 778 DisplayOffsetNormal, 778 DisplayOffsetPBitmaps, 778 DisplayOffsetPFont, 778 DisplayOffsetPFunc, 778 DisplayOffsetPMenuIcons, 779 DisplayOffsetPMenuText, 779 DisplayOffsetPopup, 779 DisplayOffsetPScreens, 779 DisplayOffsetPStatusIcons, 779 DisplayOffsetPStatusText, 779 DisplayOffsetPStepIcons, 779 DisplayOffsetPTextLines, 779 DisplayOffsetStatusIcons, 779 DisplayOffsetStepIcons, 779 DisplayOffsetTextLinesCenterFlags, 780 DisplayOffsetUpdateMask, 780 DisplayModuleConstants BITMAP_1, 762 BITMAP_2, 762 BITMAP_3, 763 BITMAP_4, 763 BITMAPS, 763 DISPLAY_HEIGHT, 763 DISPLAY_MENUICONS_X_DIFF, 763 DISPLAY_MENUICONS_X_OFFS, 763 DISPLAY_MENUICONS_Y, 763 DISPLAY_WIDTH, 763 FRAME_SELECT, 764 MENUICON_CENTER, 764

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2020

MENUICON_LEFT, 764 MENUICON_RIGHT, 764 MENUICONS, 764 MENUTEXT, 764 SCREEN_BACKGROUND, 764 SCREEN_LARGE, 764 SCREEN_MODE_CLEAR, 764 SCREEN_MODE_RESTORE, 765 SCREEN_SMALL, 765 SCREENS, 765 SPECIALS, 765 STATUSICON_BATTERY, 765 STATUSICON_BLUETOOTH, 765 STATUSICON_USB, 765 STATUSICON_VM, 765 STATUSICONS, 766 STATUSTEXT, 766 STEPICON_1, 766 STEPICON_2, 766 STEPICON_3, 766 STEPICON_4, 766 STEPICON_5, 766 STEPICONS, 766 STEPLINE, 766 TOPLINE, 766 DisplayModuleFunctions CircleOut, 317 ClearLine, 318 ClearScreen, 318 DisplayContrast, 319 DisplayDisplay, 319 DisplayEraseMask, 319 DisplayFlags, 320 DisplayFont, 320 DisplayTextLinesCenterFlags, 320 DisplayUpdateMask, 321 EllipseOut, 321 FontNumOut, 322 FontTextOut, 322 GetDisplayNormal, 323 GetDisplayPopup, 324 GraphicArrayOut, 324 GraphicArrayOutEx, 325 GraphicOut, 326 GraphicOutEx, 326 LineOut, 327

NumOut, 327 PointOut, 328 PolyOut, 329 RectOut, 330 ResetScreen, 330 SetDisplayContrast, 331 SetDisplayDisplay, 331 SetDisplayEraseMask, 331 SetDisplayFlags, 332 SetDisplayFont, 332 SetDisplayNormal, 332 SetDisplayPopup, 333 SetDisplayTextLinesCenterFlags, 333 SetDisplayUpdateMask, 333 SysDisplayExecuteFunction, 334 SysDrawCircle, 334 SysDrawEllipse, 334 SysDrawFont, 335 SysDrawGraphic, 335 SysDrawGraphicArray, 336 SysDrawLine, 336 SysDrawPoint, 336 SysDrawPolygon, 337 SysDrawRect, 337 SysDrawText, 337 SysSetScreenMode, 338 TextOut, 338 DisplayModuleID ModuleIDConstants, 226 NBCCommon.h, 1077 DisplayModuleName ModuleNameConstants, 224 NBCCommon.h, 1077 DisplayOffsetContrast DisplayIOMAP, 778 NBCCommon.h, 1077 DisplayOffsetDisplay DisplayIOMAP, 778 NBCCommon.h, 1077 DisplayOffsetEraseMask DisplayIOMAP, 778 NBCCommon.h, 1077 DisplayOffsetFlags DisplayIOMAP, 778 NBCCommon.h, 1077

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2021

DisplayOffsetNormal DisplayIOMAP, 778 NBCCommon.h, 1078 DisplayOffsetPBitmaps DisplayIOMAP, 778 NBCCommon.h, 1078 DisplayOffsetPFont DisplayIOMAP, 778 NBCCommon.h, 1078 DisplayOffsetPFunc DisplayIOMAP, 778 NBCCommon.h, 1078 DisplayOffsetPMenuIcons DisplayIOMAP, 779 NBCCommon.h, 1078 DisplayOffsetPMenuText DisplayIOMAP, 779 NBCCommon.h, 1078 DisplayOffsetPopup DisplayIOMAP, 779 NBCCommon.h, 1078 DisplayOffsetPScreens DisplayIOMAP, 779 NBCCommon.h, 1078 DisplayOffsetPStatusIcons DisplayIOMAP, 779 NBCCommon.h, 1078 DisplayOffsetPStatusText DisplayIOMAP, 779 NBCCommon.h, 1078 DisplayOffsetPStepIcons DisplayIOMAP, 779 NBCCommon.h, 1079 DisplayOffsetPTextLines DisplayIOMAP, 779 NBCCommon.h, 1079 DisplayOffsetStatusIcons DisplayIOMAP, 779 NBCCommon.h, 1079 DisplayOffsetStepIcons DisplayIOMAP, 779 NBCCommon.h, 1079 DisplayOffsetTextLinesCenterFlags DisplayIOMAP, 780 NBCCommon.h, 1079 DisplayOffsetUpdateMask

DisplayIOMAP, 780 NBCCommon.h, 1079 DisplayTextLineConstants TEXTLINE_1, 776 TEXTLINE_2, 776 TEXTLINE_3, 776 TEXTLINE_4, 776 TEXTLINE_5, 776 TEXTLINE_6, 777 TEXTLINE_7, 777 TEXTLINE_8, 777 TEXTLINES, 777 DisplayTextLinesCenterFlags DisplayModuleFunctions, 320 NXCDefs.h, 1403 DisplayUpdateMask DisplayModuleFunctions, 321 NXCDefs.h, 1403 DIST_CMD_CUSTOM MSDistNX, 876 NBCCommon.h, 1079 DIST_CMD_GP2D12 MSDistNX, 876 NBCCommon.h, 1079 DIST_CMD_GP2D120 MSDistNX, 876 NBCCommon.h, 1079 DIST_CMD_GP2YA02 MSDistNX, 876 NBCCommon.h, 1079 DIST_CMD_GP2YA21 MSDistNX, 876 NBCCommon.h, 1080 DIST_REG_DIST MSDistNX, 877 NBCCommon.h, 1080 DIST_REG_DIST1 MSDistNX, 877 NBCCommon.h, 1080 DIST_REG_DIST_MAX MSDistNX, 877 NBCCommon.h, 1080 DIST_REG_DIST_MIN MSDistNX, 877 NBCCommon.h, 1080 DIST_REG_MODULE_TYPE

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2022

MSDistNX, 877 NBCCommon.h, 1080 DIST_REG_NUM_POINTS MSDistNX, 877 NBCCommon.h, 1080 DIST_REG_VOLT MSDistNX, 877 NBCCommon.h, 1080 DIST_REG_VOLT1 MSDistNX, 877 NBCCommon.h, 1080 DISTNxDistance MindSensorsAPI, 130 NXCDefs.h, 1403 DISTNxGP2D12 MindSensorsAPI, 131 NXCDefs.h, 1404 DISTNxGP2D120 MindSensorsAPI, 131 NXCDefs.h, 1404 DISTNxGP2YA02 MindSensorsAPI, 132 NXCDefs.h, 1405 DISTNxGP2YA21 MindSensorsAPI, 132 NXCDefs.h, 1405 DISTNxMaxDistance MindSensorsAPI, 133 NXCDefs.h, 1406 DISTNxMinDistance MindSensorsAPI, 133 NXCDefs.h, 1406 DISTNxModuleType MindSensorsAPI, 134 NXCDefs.h, 1407 DISTNxNumPoints MindSensorsAPI, 134 NXCDefs.h, 1407 DISTNxVoltage MindSensorsAPI, 134 NXCDefs.h, 1407 div cstdlibAPI, 604 NXCDefs.h, 1408 div_t, 946 quot, 946

rem, 946 DRAW_OPT_CLEAR DisplayDrawOptionConstants, 769 NBCCommon.h, 1080 DRAW_OPT_CLEAR_EXCEPT_STATUS_SCREEN DisplayDrawOptionConstants, 769 NBCCommon.h, 1081 DRAW_OPT_CLEAR_PIXELS DisplayDrawOptionConstants, 769 NBCCommon.h, 1081 DRAW_OPT_CLEAR_SCREEN_MODES DisplayDrawOptionConstants, 770 NBCCommon.h, 1081 DRAW_OPT_CLEAR_WHOLE_SCREEN DisplayDrawOptionConstants, 770 NBCCommon.h, 1081 DRAW_OPT_FILL_SHAPE DisplayDrawOptionConstants, 770 NBCCommon.h, 1081 DRAW_OPT_FONT_DIR_B2TL DisplayFontDrawOptionConstants, 772 NBCCommon.h, 1081 DRAW_OPT_FONT_DIR_B2TR DisplayFontDrawOptionConstants, 772 NBCCommon.h, 1081 DRAW_OPT_FONT_DIR_L2RB DisplayFontDrawOptionConstants, 772 NBCCommon.h, 1081 DRAW_OPT_FONT_DIR_L2RT DisplayFontDrawOptionConstants, 772 NBCCommon.h, 1082 DRAW_OPT_FONT_DIR_R2LB DisplayFontDrawOptionConstants, 773 NBCCommon.h, 1082 DRAW_OPT_FONT_DIR_R2LT DisplayFontDrawOptionConstants, 773 NBCCommon.h, 1082

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2023

DRAW_OPT_FONT_DIR_T2BL DisplayFontDrawOptionConstants, 773 NBCCommon.h, 1082 DRAW_OPT_FONT_DIR_T2BR DisplayFontDrawOptionConstants, 773 NBCCommon.h, 1082 DRAW_OPT_FONT_DIRECTIONS DisplayFontDrawOptionConstants, 773 NBCCommon.h, 1082 DRAW_OPT_FONT_WRAP DisplayFontDrawOptionConstants, 773 NBCCommon.h, 1082 DRAW_OPT_INVERT DisplayDrawOptionConstants, 770 NBCCommon.h, 1083 DRAW_OPT_LOGICAL_AND DisplayDrawOptionConstants, 770 NBCCommon.h, 1083 DRAW_OPT_LOGICAL_COPY DisplayDrawOptionConstants, 770 NBCCommon.h, 1083 DRAW_OPT_LOGICAL_OPERATIONS DisplayDrawOptionConstants, 771 NBCCommon.h, 1083 DRAW_OPT_LOGICAL_OR DisplayDrawOptionConstants, 771 NBCCommon.h, 1083 DRAW_OPT_LOGICAL_XOR DisplayDrawOptionConstants, 771 NBCCommon.h, 1083 DRAW_OPT_NORMAL DisplayDrawOptionConstants, 771 NBCCommon.h, 1084 DRAW_OPT_POLYGON_POLYLINE DisplayDrawOptionConstants, 771 NBCCommon.h, 1084 DrawCircle NBCCommon.h, 1084 SysCallConstants, 639 DrawCircleType, 947 Center, 947

Options, 947 Result, 948 Size, 948 DrawEllipse NBCCommon.h, 1084 SysCallConstants, 639 DrawEllipseType, 948 Center, 949 Options, 949 Result, 949 SizeX, 949 SizeY, 949 DrawFont NBCCommon.h, 1084 SysCallConstants, 639 DrawFontType, 950 Filename, 950 Location, 950 Options, 951 Result, 951 Text, 951 DrawGraphic NBCCommon.h, 1084 SysCallConstants, 639 DrawGraphicArray NBCCommon.h, 1084 SysCallConstants, 640 DrawGraphicArrayType, 951 Data, 952 Location, 952 Options, 952 Result, 952 Variables, 952 DrawGraphicType, 953 Filename, 953 Location, 954 Options, 954 Result, 954 Variables, 954 Drawing option constants, 768 DrawLine NBCCommon.h, 1085 SysCallConstants, 640 DrawLineType, 954 EndLoc, 955 Options, 955

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2024

Result, 955 StartLoc, 955 DrawPoint NBCCommon.h, 1085 SysCallConstants, 640 DrawPointType, 956 Location, 956 Options, 957 Result, 957 DrawPolygon NBCCommon.h, 1085 SysCallConstants, 640 DrawPolygonType, 957 Options, 958 Points, 958 Result, 958 DrawRect NBCCommon.h, 1085 SysCallConstants, 640 DrawRectType, 958 Location, 959 Options, 959 Result, 959 Size, 959 DrawText NBCCommon.h, 1085 SysCallConstants, 640 DrawTextType, 960 Location, 960 Options, 960 Result, 961 Text, 961 Duration SoundPlayToneType, 1006 Tone, 1009 E-Meter sensor constants, 759 EllipseOut DisplayModuleFunctions, 321 NXCDefs.h, 1408 EMETER_REG_AIN EMeterI2CConstants, 760 NBCCommon.h, 1085 EMETER_REG_AOUT EMeterI2CConstants, 760 NBCCommon.h, 1085

EMETER_REG_JOULES EMeterI2CConstants, 760 NBCCommon.h, 1085 EMETER_REG_VIN EMeterI2CConstants, 760 NBCCommon.h, 1085 EMETER_REG_VOUT EMeterI2CConstants, 760 NBCCommon.h, 1086 EMETER_REG_WIN EMeterI2CConstants, 760 NBCCommon.h, 1086 EMETER_REG_WOUT EMeterI2CConstants, 760 NBCCommon.h, 1086 EMeterI2CConstants EMETER_REG_AIN, 760 EMETER_REG_AOUT, 760 EMETER_REG_JOULES, 760 EMETER_REG_VIN, 760 EMETER_REG_VOUT, 760 EMETER_REG_WIN, 760 EMETER_REG_WOUT, 760 EndLoc DrawLineType, 955 EOF LoaderModuleConstants, 670 NBCCommon.h, 1086 ERR_ARG CommandFatalErrors, 660 NBCCommon.h, 1086 ERR_BAD_POOL_SIZE CommandFatalErrors, 660 NBCCommon.h, 1086 ERR_BAD_PTR CommandFatalErrors, 660 NBCCommon.h, 1086 ERR_CLUMP_COUNT CommandFatalErrors, 660 NBCCommon.h, 1086 ERR_COMM_BUFFER_FULL CommandCommErrors, 663 NBCCommon.h, 1086 ERR_COMM_BUS_ERR CommandCommErrors, 663 NBCCommon.h, 1086

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2025

ERR_COMM_CHAN_INVALID CommandCommErrors, 663 NBCCommon.h, 1087 ERR_COMM_CHAN_NOT_READY CommandCommErrors, 663 NBCCommon.h, 1087 ERR_DEFAULT_OFFSETS CommandFatalErrors, 660 NBCCommon.h, 1087 ERR_FILE CommandFatalErrors, 660 NBCCommon.h, 1087 ERR_INSANE_OFFSET CommandFatalErrors, 660 NBCCommon.h, 1087 ERR_INSTR CommandFatalErrors, 661 NBCCommon.h, 1087 ERR_INVALID_FIELD CommandGenErrors, 662 NBCCommon.h, 1087 ERR_INVALID_PORT CommandGenErrors, 662 NBCCommon.h, 1087 ERR_INVALID_QUEUE CommandGenErrors, 662 NBCCommon.h, 1087 ERR_INVALID_SIZE CommandGenErrors, 662 NBCCommon.h, 1087 ERR_LOADER_ERR CommandFatalErrors, 661 NBCCommon.h, 1088 ERR_MEM CommandFatalErrors, 661 NBCCommon.h, 1088 ERR_MEMMGR_FAIL CommandFatalErrors, 661 NBCCommon.h, 1088 ERR_NO_ACTIVE_CLUMP CommandFatalErrors, 661 NBCCommon.h, 1088 ERR_NO_CODE CommandFatalErrors, 661 NBCCommon.h, 1088 ERR_NO_PROG

CommandGenErrors, 662 NBCCommon.h, 1088 ERR_NON_FATAL CommandFatalErrors, 661 NBCCommon.h, 1088 ERR_RC_BAD_PACKET CommandRCErrors, 664 NBCCommon.h, 1088 ERR_RC_FAILED CommandRCErrors, 664 NBCCommon.h, 1088 ERR_RC_ILLEGAL_VAL CommandRCErrors, 664 NBCCommon.h, 1088 ERR_RC_UNKNOWN_CMD CommandRCErrors, 664 NBCCommon.h, 1089 ERR_SPOTCHECK_FAIL CommandFatalErrors, 661 NBCCommon.h, 1089 ERR_VER CommandFatalErrors, 661 NBCCommon.h, 1089 ExitTo CommandModuleFunctions, 385 NXCDefs.h, 1409 Exp cmathAPI, 565 NXCDefs.h, 1335 exp cmathAPI, 579 NXCDefs.h, 1409 FALSE MiscConstants, 228 NBCCommon.h, 1089 Fatal errors, 659 fclose cstdioAPI, 591 NXCDefs.h, 1410 feof cstdioAPI, 591 NXCDefs.h, 1410 fush cstdioAPI, 592 NXCDefs.h, 1411

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2026

fgetc cstdioAPI, 592 NXCDefs.h, 1411 fgets cstdioAPI, 592 NXCDefs.h, 1411 FileClose NBCCommon.h, 1089 SysCallConstants, 640 FileCloseType, 961 FileHandle, 962 Result, 962 FileDelete NBCCommon.h, 1089 SysCallConstants, 640 FileDeleteType, 962 Filename, 963 Result, 963 FileFindFirst NBCCommon.h, 1089 SysCallConstants, 641 FileFindNext NBCCommon.h, 1089 SysCallConstants, 641 FileFindType, 963 FileHandle, 964 Filename, 964 Length, 964 Result, 964 FileHandle FileCloseType, 962 FileFindType, 964 FileOpenType, 965 FileReadWriteType, 967 FileResizeType, 969 FileResolveHandleType, 970 FileSeekType, 972 FileTellType, 973 FileList ListFilesType, 985 Filename DrawFontType, 950 DrawGraphicType, 953 FileDeleteType, 963 FileFindType, 964 FileOpenType, 965

FileResolveHandleType, 970 LoaderExecuteFunctionType, 988 SoundPlayFileType, 1005 FileOpenAppend NBCCommon.h, 1089 SysCallConstants, 641 FileOpenRead NBCCommon.h, 1089 SysCallConstants, 641 FileOpenReadLinear NBCCommon.h, 1090 SysCallConstants, 641 FileOpenType, 964 FileHandle, 965 Filename, 965 Length, 965 Result, 965 FileOpenWrite NBCCommon.h, 1090 SysCallConstants, 641 FileOpenWriteLinear NBCCommon.h, 1090 SysCallConstants, 641 FileOpenWriteNonLinear NBCCommon.h, 1090 SysCallConstants, 641 FileRead NBCCommon.h, 1090 SysCallConstants, 641 FileReadWriteType, 966 Buffer, 966 FileHandle, 967 Length, 967 Result, 967 FileRename NBCCommon.h, 1090 SysCallConstants, 641 FileRenameType, 967 NewFilename, 968 OldFilename, 968 Result, 968 FileResize NBCCommon.h, 1090 SysCallConstants, 642 FileResizeType, 969 FileHandle, 969

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2027

NewSize, 969 Result, 969 FileResolveHandle NBCCommon.h, 1090 SysCallConstants, 642 FileResolveHandleType, 970 FileHandle, 970 Filename, 970 Result, 971 WriteHandle, 971 FileSeek NBCCommon.h, 1090 SysCallConstants, 642 FileSeekType, 971 FileHandle, 972 Length, 972 Origin, 972 Result, 972 FileTell NBCCommon.h, 1090 SysCallConstants, 642 FileTellType, 973 FileHandle, 973 Position, 973 Result, 973 FileWrite NBCCommon.h, 1091 SysCallConstants, 642 FindFirstFile LoaderModuleFunctions, 538 NXCDefs.h, 1412 FindNextFile LoaderModuleFunctions, 538 NXCDefs.h, 1412 FirstTick CommandModuleFunctions, 385 NXCDefs.h, 1413 Flags SoundGetStateType, 1004 SoundSetStateType, 1008 Flatten cstringAPI, 614 NXCDefs.h, 1413 FlattenVar cstringAPI, 614 NXCDefs.h, 1414

Float NXCDefs.h, 1414 OutputModuleFunctions, 285 Floor cmathAPI, 565 NXCDefs.h, 1335 oor cmathAPI, 579 NXCDefs.h, 1414 Follows CommandModuleFunctions, 385 NXCDefs.h, 1415 Font drawing option constants, 771 FontNumOut DisplayModuleFunctions, 322 NXCDefs.h, 1415 FontTextOut DisplayModuleFunctions, 322 NXCDefs.h, 1416 fopen cstdioAPI, 593 NXCDefs.h, 1417 ForceOff NXCDefs.h, 1417 UiModuleFunctions, 522 FormatNum cstringAPI, 615 NXCDefs.h, 1418 fprintf cstdioAPI, 593 NXCDefs.h, 1418 fputc cstdioAPI, 594 NXCDefs.h, 1419 fputs cstdioAPI, 594 NXCDefs.h, 1419 Frac cmathAPI, 565 NXCDefs.h, 1336 frac cmathAPI, 580 NXCDefs.h, 1420 FRAME_SELECT DisplayModuleConstants, 764 NBCCommon.h, 1091

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2028

FreeMemory LoaderModuleFunctions, 539 NXCDefs.h, 1420 Frequency SoundPlayToneType, 1006 Tone, 1009 FREQUENCY_MAX NBCCommon.h, 1091 SoundMisc, 685 FREQUENCY_MIN NBCCommon.h, 1091 SoundMisc, 685 fseek cstdioAPI, 595 NXCDefs.h, 1421 fseek origin constants, 599 fseekConstants SEEK_CUR, 599 SEEK_END, 599 SEEK_SET, 599 ftell cstdioAPI, 595 NXCDefs.h, 1421 General errors, 662 GenericI2CConstants I2C_ADDR_DEFAULT, 753 I2C_REG_CMD, 753 I2C_REG_DEVICE_ID, 753 I2C_REG_VENDOR_ID, 753 I2C_REG_VERSION, 753 GetBrickDataAddress CommModuleFunctions, 439 NXCDefs.h, 1422 GetBTConnectionAddress CommModuleFunctions, 439 NXCDefs.h, 1422 GetBTDeviceAddress CommModuleFunctions, 439 NXCDefs.h, 1422 GetBTInputBuffer CommModuleFunctions, 440 NXCDefs.h, 1423 GetBTOutputBuffer CommModuleFunctions, 440 NXCDefs.h, 1423

GetButtonModuleValue CommandModuleFunctions, 386 NXCDefs.h, 1424 getc cstdioAPI, 590 NXCDefs.h, 1336 getchar cstdioAPI, 596 NXCDefs.h, 1424 GetCommandModuleBytes CommandModuleFunctions, 386 NXCDefs.h, 1424 GetCommandModuleValue CommandModuleFunctions, 386 NXCDefs.h, 1425 GetCommModuleBytes CommandModuleFunctions, 387 NXCDefs.h, 1425 GetCommModuleValue CommandModuleFunctions, 387 NXCDefs.h, 1426 GetDisplayModuleBytes CommandModuleFunctions, 388 NXCDefs.h, 1426 GetDisplayModuleValue CommandModuleFunctions, 388 NXCDefs.h, 1426 GetDisplayNormal DisplayModuleFunctions, 323 NXCDefs.h, 1427 GetDisplayPopup DisplayModuleFunctions, 324 NXCDefs.h, 1427 GetHSInputBuffer CommModuleFunctions, 441 NXCDefs.h, 1428 GetHSOutputBuffer CommModuleFunctions, 441 NXCDefs.h, 1428 GetInput InputModuleFunctions, 261 NXCDefs.h, 1429 GetInputModuleValue CommandModuleFunctions, 388 NXCDefs.h, 1429 GetIOMapBytes

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2029

CommandModuleFunctions, 389 NXCDefs.h, 1429 GetIOMapBytesByID CommandModuleFunctions, 389 NXCDefs.h, 1430 GetIOMapValue CommandModuleFunctions, 390 NXCDefs.h, 1430 GetIOMapValueByID CommandModuleFunctions, 390 NXCDefs.h, 1431 GetLastResponseInfo CommandModuleFunctions, 390 NXCDefs.h, 1431 GetLoaderModuleValue CommandModuleFunctions, 391 NXCDefs.h, 1432 GetLowSpeedModuleBytes CommandModuleFunctions, 391 NXCDefs.h, 1432 GetLowSpeedModuleValue CommandModuleFunctions, 392 NXCDefs.h, 1433 GetLSInputBuffer LowLevelLowSpeedModuleFunctions, 370 NXCDefs.h, 1433 GetLSOutputBuffer LowLevelLowSpeedModuleFunctions, 370 NXCDefs.h, 1433 GetMemoryInfo CommandModuleFunctions, 392 NXCDefs.h, 1434 GetOutput NXCDefs.h, 1434 OutputModuleFunctions, 285 GetOutputModuleValue CommandModuleFunctions, 393 NXCDefs.h, 1435 GetSoundModuleValue CommandModuleFunctions, 393 NXCDefs.h, 1435 GetStartTick NBCCommon.h, 1091 SysCallConstants, 642

GetStartTickType, 974 Result, 974 GetUIModuleValue CommandModuleFunctions, 394 NXCDefs.h, 1436 GetUSBInputBuffer CommModuleFunctions, 442 NXCDefs.h, 1436 GetUSBOutputBuffer CommModuleFunctions, 442 NXCDefs.h, 1436 GetUSBPollBuffer CommModuleFunctions, 442 NXCDefs.h, 1437 GL_CAMERA_DEPTH GLConstantsSettings, 920 NBCCommon.h, 1091 GL_CIRCLE GLConstantsBeginModes, 917 NBCCommon.h, 1091 GL_CIRCLE_SIZE GLConstantsSettings, 920 NBCCommon.h, 1091 GL_CULL_BACK GLConstantsCullMode, 921 NBCCommon.h, 1091 GL_CULL_FRONT GLConstantsCullMode, 921 NBCCommon.h, 1092 GL_CULL_MODE GLConstantsSettings, 920 NBCCommon.h, 1092 GL_CULL_NONE GLConstantsCullMode, 921 NBCCommon.h, 1092 GL_LINE GLConstantsBeginModes, 917 NBCCommon.h, 1092 GL_POINT GLConstantsBeginModes, 917 NBCCommon.h, 1092 GL_POLYGON GLConstantsBeginModes, 917 NBCCommon.h, 1092 GL_ROTATE_X GLConstantsActions, 918

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2030

NBCCommon.h, 1092 GL_ROTATE_Y GLConstantsActions, 918 NBCCommon.h, 1093 GL_ROTATE_Z GLConstantsActions, 919 NBCCommon.h, 1093 GL_SCALE_X GLConstantsActions, 919 NBCCommon.h, 1093 GL_SCALE_Y GLConstantsActions, 919 NBCCommon.h, 1093 GL_SCALE_Z GLConstantsActions, 919 NBCCommon.h, 1093 GL_TRANSLATE_X GLConstantsActions, 919 NBCCommon.h, 1093 GL_TRANSLATE_Y GLConstantsActions, 919 NBCCommon.h, 1093 GL_TRANSLATE_Z GLConstantsActions, 919 NBCCommon.h, 1094 GL_ZOOM_FACTOR GLConstantsSettings, 920 NBCCommon.h, 1094 glAddToAngleX GraphicsLibrary, 233 NXCDefs.h, 1437 glAddToAngleY GraphicsLibrary, 233 NXCDefs.h, 1438 glAddToAngleZ GraphicsLibrary, 233 NXCDefs.h, 1438 glAddVertex GraphicsLibrary, 233 NXCDefs.h, 1438 glBegin GraphicsLibrary, 234 NXCDefs.h, 1438 glBeginObject GraphicsLibrary, 234 NXCDefs.h, 1439

glBeginRender GraphicsLibrary, 234 NXCDefs.h, 1439 glBox GraphicsLibrary, 234 NXCDefs.h, 1439 glCallObject GraphicsLibrary, 235 NXCDefs.h, 1440 GLConstantsActions GL_ROTATE_X, 918 GL_ROTATE_Y, 918 GL_ROTATE_Z, 919 GL_SCALE_X, 919 GL_SCALE_Y, 919 GL_SCALE_Z, 919 GL_TRANSLATE_X, 919 GL_TRANSLATE_Y, 919 GL_TRANSLATE_Z, 919 GLConstantsBeginModes GL_CIRCLE, 917 GL_LINE, 917 GL_POINT, 917 GL_POLYGON, 917 GLConstantsCullMode GL_CULL_BACK, 921 GL_CULL_FRONT, 921 GL_CULL_NONE, 921 GLConstantsSettings GL_CAMERA_DEPTH, 920 GL_CIRCLE_SIZE, 920 GL_CULL_MODE, 920 GL_ZOOM_FACTOR, 920 glCos32768 GraphicsLibrary, 235 NXCDefs.h, 1440 glCube GraphicsLibrary, 236 NXCDefs.h, 1440 glEnd GraphicsLibrary, 236 NXCDefs.h, 1441 glEndObject GraphicsLibrary, 236 NXCDefs.h, 1441 glFinishRender

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2031

GraphicsLibrary, 236 NXCDefs.h, 1441 glInit GraphicsLibrary, 237 NXCDefs.h, 1441 glObjectAction GraphicsLibrary, 237 NXCDefs.h, 1442 glPyramid GraphicsLibrary, 237 NXCDefs.h, 1442 glSet GraphicsLibrary, 238 NXCDefs.h, 1442 glSetAngleX GraphicsLibrary, 238 NXCDefs.h, 1443 glSetAngleY GraphicsLibrary, 238 NXCDefs.h, 1443 glSetAngleZ GraphicsLibrary, 238 NXCDefs.h, 1443 glSin32768 GraphicsLibrary, 239 NXCDefs.h, 1444 GraphicArrayOut DisplayModuleFunctions, 324 NXCDefs.h, 1444 GraphicArrayOutEx DisplayModuleFunctions, 325 NXCDefs.h, 1444 GraphicOut DisplayModuleFunctions, 326 NXCDefs.h, 1445 GraphicOutEx DisplayModuleFunctions, 326 NXCDefs.h, 1446 Graphics library actions, 918 Graphics library begin modes, 917 Graphics library cull mode, 921 Graphics library settings, 920 GraphicsLibrary glAddToAngleX, 233 glAddToAngleY, 233 glAddToAngleZ, 233

glAddVertex, 233 glBegin, 234 glBeginObject, 234 glBeginRender, 234 glBox, 234 glCallObject, 235 glCos32768, 235 glCube, 236 glEnd, 236 glEndObject, 236 glFinishRender, 236 glInit, 237 glObjectAction, 237 glPyramid, 237 glSet, 238 glSetAngleX, 238 glSetAngleY, 238 glSetAngleZ, 238 glSin32768, 239 Height SizeType, 1003 Hi-speed port address constants, 799 Hi-speed port baud rate constants, 793 Hi-speed port combined UART constants, 798 Hi-speed port constants, 790 Hi-speed port data bits constants, 796 Hi-speed port ags constants, 790 Hi-speed port parity constants, 797 Hi-speed port state constants, 791 Hi-speed port stop bits constants, 797 Hi-speed port SysCommHSControl constants, 792 Hi-speed port UART mode constants, 795 HiTechnic Angle sensor constants, 869 HiTechnic API Functions, 58 HiTechnic Color2 constants, 867 HiTechnic device constants, 861 HiTechnic IRReceiver constants, 866 HiTechnic IRSeeker2 constants, 863 HiTechnic/mindsensors Power Function/IR Train constants, 849 HiTechnicAPI HTIRTrain, 66 HTPFComboDirect, 67

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2032

HTPFComboPWM, 67 HTPFRawOutput, 68 HTPFRepeat, 69 HTPFSingleOutputCST, 69 HTPFSingleOutputPWM, 70 HTPFSinglePin, 70 HTPFTrain, 71 HTRCXAddToDatalog, 72 HTRCXBatteryLevel, 72 HTRCXClearAllEvents, 72 HTRCXClearCounter, 73 HTRCXClearMsg, 73 HTRCXClearSensor, 73 HTRCXClearSound, 73 HTRCXClearTimer, 74 HTRCXCreateDatalog, 74 HTRCXDecCounter, 74 HTRCXDeleteSub, 75 HTRCXDeleteSubs, 75 HTRCXDeleteTask, 75 HTRCXDeleteTasks, 75 HTRCXDisableOutput, 76 HTRCXEnableOutput, 76 HTRCXEvent, 76 HTRCXFloat, 77 HTRCXFwd, 77 HTRCXIncCounter, 77 HTRCXInvertOutput, 78 HTRCXMuteSound, 78 HTRCXObvertOutput, 78 HTRCXOff, 78 HTRCXOn, 79 HTRCXOnFor, 79 HTRCXOnFwd, 79 HTRCXOnRev, 80 HTRCXPBTurnOff, 80 HTRCXPing, 80 HTRCXPlaySound, 81 HTRCXPlayTone, 81 HTRCXPlayToneVar, 81 HTRCXPoll, 82 HTRCXPollMemory, 82 HTRCXRemote, 82 HTRCXRev, 83 HTRCXSelectDisplay, 83 HTRCXSelectProgram, 83
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

HTRCXSendSerial, 84 HTRCXSetDirection, 84 HTRCXSetEvent, 84 HTRCXSetGlobalDirection, 85 HTRCXSetGlobalOutput, 85 HTRCXSetIRLinkPort, 86 HTRCXSetMaxPower, 86 HTRCXSetMessage, 86 HTRCXSetOutput, 86 HTRCXSetPower, 87 HTRCXSetPriority, 87 HTRCXSetSensorMode, 87 HTRCXSetSensorType, 88 HTRCXSetSleepTime, 88 HTRCXSetTxPower, 88 HTRCXSetWatch, 89 HTRCXStartTask, 89 HTRCXStopAllTasks, 89 HTRCXStopTask, 90 HTRCXToggle, 90 HTRCXUnmuteSound, 90 HTScoutCalibrateSensor, 90 HTScoutMuteSound, 91 HTScoutSelectSounds, 91 HTScoutSendVLL, 91 HTScoutSetEventFeedback, 91 HTScoutSetLight, 92 HTScoutSetScoutMode, 92 HTScoutSetSensorClickTime, 92 HTScoutSetSensorHysteresis, 93 HTScoutSetSensorLowerLimit, 93 HTScoutSetSensorUpperLimit, 94 HTScoutUnmuteSound, 94 ReadSensorHTAccel, 94 ReadSensorHTAngle, 95 ReadSensorHTColor, 95 ReadSensorHTColor2Active, 96 ReadSensorHTIRReceiver, 96 ReadSensorHTIRReceiverEx, 97 ReadSensorHTIRSeeker, 97 ReadSensorHTIRSeeker2AC, 98 ReadSensorHTIRSeeker2DC, 99 ReadSensorHTNormalizedColor, 99 ReadSensorHTNormalizedColor2Active, 100 ReadSensorHTRawColor, 101

INDEX

2033

ReadSensorHTRawColor2, 101 ReadSensorHTTouchMultiplexer, 102 ResetSensorHTAngle, 102 SensorHTColorNum, 103 SensorHTCompass, 103 SensorHTEOPD, 103 SensorHTGyro, 104 SensorHTIRSeeker2ACDir, 104 SensorHTIRSeeker2Addr, 105 SensorHTIRSeeker2DCDir, 105 SensorHTIRSeekerDir, 106 SensorHTMagnet, 106 SetHTColor2Mode, 106 SetHTIRSeeker2Mode, 107 SetSensorHTEOPD, 107 SetSensorHTGyro, 108 SetSensorHTMagnet, 108 HiTechnicConstants HT_ADDR_ACCEL, 862 HT_ADDR_ANGLE, 862 HT_ADDR_COLOR, 862 HT_ADDR_COLOR2, 863 HT_ADDR_COMPASS, 863 HT_ADDR_IRLINK, 863 HT_ADDR_IRRECEIVER, 863 HT_ADDR_IRSEEKER, 863 HT_ADDR_IRSEEKER2, 863 HS_ADDRESS_1 CommHiSpeedAddressConstants, 800 NBCCommon.h, 1094 HS_ADDRESS_2 CommHiSpeedAddressConstants, 800 NBCCommon.h, 1094 HS_ADDRESS_3 CommHiSpeedAddressConstants, 800 NBCCommon.h, 1094 HS_ADDRESS_4 CommHiSpeedAddressConstants, 800 NBCCommon.h, 1094 HS_ADDRESS_5

CommHiSpeedAddressConstants, 800 NBCCommon.h, 1094 HS_ADDRESS_6 CommHiSpeedAddressConstants, 800 NBCCommon.h, 1094 HS_ADDRESS_7 CommHiSpeedAddressConstants, 800 NBCCommon.h, 1095 HS_ADDRESS_8 CommHiSpeedAddressConstants, 800 NBCCommon.h, 1095 HS_ADDRESS_ALL CommHiSpeedAddressConstants, 800 NBCCommon.h, 1095 HS_BAUD_115200 CommHiSpeedBaudConstants, 793 NBCCommon.h, 1095 HS_BAUD_1200 CommHiSpeedBaudConstants, 793 NBCCommon.h, 1095 HS_BAUD_14400 CommHiSpeedBaudConstants, 793 NBCCommon.h, 1095 HS_BAUD_19200 CommHiSpeedBaudConstants, 793 NBCCommon.h, 1095 HS_BAUD_230400 CommHiSpeedBaudConstants, 794 NBCCommon.h, 1095 HS_BAUD_2400 CommHiSpeedBaudConstants, 794 NBCCommon.h, 1095 HS_BAUD_28800 CommHiSpeedBaudConstants, 794 NBCCommon.h, 1095 HS_BAUD_3600 CommHiSpeedBaudConstants, 794 NBCCommon.h, 1096 HS_BAUD_38400 CommHiSpeedBaudConstants, 794 NBCCommon.h, 1096

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2034

HS_BAUD_460800 CommHiSpeedBaudConstants, 794 NBCCommon.h, 1096 HS_BAUD_4800 CommHiSpeedBaudConstants, 794 NBCCommon.h, 1096 HS_BAUD_57600 CommHiSpeedBaudConstants, 794 NBCCommon.h, 1096 HS_BAUD_7200 CommHiSpeedBaudConstants, 794 NBCCommon.h, 1096 HS_BAUD_76800 CommHiSpeedBaudConstants, 794 NBCCommon.h, 1096 HS_BAUD_921600 CommHiSpeedBaudConstants, 795 NBCCommon.h, 1096 HS_BAUD_9600 CommHiSpeedBaudConstants, 795 NBCCommon.h, 1096 HS_BAUD_DEFAULT CommHiSpeedBaudConstants, 795 NBCCommon.h, 1096 HS_CMD_READY CommStatusCodesConstants, 805 NBCCommon.h, 1097 HS_CTRL_EXIT CommHiSpeedCtrlConstants, 792 NBCCommon.h, 1097 HS_CTRL_INIT CommHiSpeedCtrlConstants, 792 NBCCommon.h, 1097 HS_CTRL_UART CommHiSpeedCtrlConstants, 792 NBCCommon.h, 1097 HS_DISABLE CommHiSpeedStateConstants, 791 NBCCommon.h, 1097 HS_ENABLE CommHiSpeedStateConstants, 791 NBCCommon.h, 1097 HS_INIT_RECEIVER CommHiSpeedStateConstants, 791 NBCCommon.h, 1097 HS_INITIALISE

CommHiSpeedStateConstants, 791 NBCCommon.h, 1097 HS_MODE_10_STOP CommHiSpeedStopBitsConstants, 797 NBCCommon.h, 1098 HS_MODE_15_STOP CommHiSpeedStopBitsConstants, 797 NBCCommon.h, 1098 HS_MODE_20_STOP CommHiSpeedStopBitsConstants, 797 NBCCommon.h, 1098 HS_MODE_5_DATA CommHiSpeedDataBitsConstants, 796 NBCCommon.h, 1098 HS_MODE_6_DATA CommHiSpeedDataBitsConstants, 796 NBCCommon.h, 1098 HS_MODE_7_DATA CommHiSpeedDataBitsConstants, 796 NBCCommon.h, 1098 HS_MODE_7E1 CommHiSpeedCombinedConstants, 799 NBCCommon.h, 1098 HS_MODE_8_DATA CommHiSpeedDataBitsConstants, 797 NBCCommon.h, 1098 HS_MODE_8N1 CommHiSpeedCombinedConstants, 799 NBCCommon.h, 1098 HS_MODE_DEFAULT CommHiSpeedModeConstants, 796 NBCCommon.h, 1099 HS_MODE_E_PARITY CommHiSpeedParityConstants, 798 NBCCommon.h, 1099 HS_MODE_M_PARITY CommHiSpeedParityConstants, 798

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2035

NBCCommon.h, 1099 HS_MODE_N_PARITY CommHiSpeedParityConstants, 798 NBCCommon.h, 1099 HS_MODE_O_PARITY CommHiSpeedParityConstants, 798 NBCCommon.h, 1099 HS_MODE_S_PARITY CommHiSpeedParityConstants, 798 NBCCommon.h, 1099 HS_SEND_DATA CommHiSpeedStateConstants, 791 NBCCommon.h, 1099 HS_UPDATE CommHiSpeedFlagsConstants, 791 NBCCommon.h, 1099 HSDataMode CommModuleFunctions, 443 NXCDefs.h, 1446 HSFlags CommModuleFunctions, 443 NXCDefs.h, 1447 HSInputBufferInPtr CommModuleFunctions, 444 NXCDefs.h, 1447 HSInputBufferOutPtr CommModuleFunctions, 444 NXCDefs.h, 1447 HSMode CommModuleFunctions, 444 NXCDefs.h, 1448 HSOutputBufferInPtr CommModuleFunctions, 445 NXCDefs.h, 1448 HSOutputBufferOutPtr CommModuleFunctions, 445 NXCDefs.h, 1448 HSSpeed CommModuleFunctions, 445 NXCDefs.h, 1449 HSState CommModuleFunctions, 446 NXCDefs.h, 1449 HT_ADDR_ACCEL HiTechnicConstants, 862 NBCCommon.h, 1100

HT_ADDR_ANGLE HiTechnicConstants, 862 NBCCommon.h, 1100 HT_ADDR_COLOR HiTechnicConstants, 862 NBCCommon.h, 1100 HT_ADDR_COLOR2 HiTechnicConstants, 863 NBCCommon.h, 1100 HT_ADDR_COMPASS HiTechnicConstants, 863 NBCCommon.h, 1100 HT_ADDR_IRLINK HiTechnicConstants, 863 NBCCommon.h, 1100 HT_ADDR_IRRECEIVER HiTechnicConstants, 863 NBCCommon.h, 1100 HT_ADDR_IRSEEKER HiTechnicConstants, 863 NBCCommon.h, 1100 HT_ADDR_IRSEEKER2 HiTechnicConstants, 863 NBCCommon.h, 1100 HT_CH1_A HTIRReceiverConstants, 866 NBCCommon.h, 1100 HT_CH1_B HTIRReceiverConstants, 866 NBCCommon.h, 1101 HT_CH2_A HTIRReceiverConstants, 866 NBCCommon.h, 1101 HT_CH2_B HTIRReceiverConstants, 867 NBCCommon.h, 1101 HT_CH3_A HTIRReceiverConstants, 867 NBCCommon.h, 1101 HT_CH3_B HTIRReceiverConstants, 867 NBCCommon.h, 1101 HT_CH4_A HTIRReceiverConstants, 867 NBCCommon.h, 1101 HT_CH4_B

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2036

HTIRReceiverConstants, 867 NBCCommon.h, 1101 HT_CMD_COLOR2_50HZ HTColor2Constants, 868 NBCCommon.h, 1101 HT_CMD_COLOR2_60HZ HTColor2Constants, 868 NBCCommon.h, 1101 HT_CMD_COLOR2_ACTIVE HTColor2Constants, 868 NBCCommon.h, 1102 HT_CMD_COLOR2_BLCAL HTColor2Constants, 868 NBCCommon.h, 1102 HT_CMD_COLOR2_FAR HTColor2Constants, 868 NBCCommon.h, 1102 HT_CMD_COLOR2_LED_HI HTColor2Constants, 868 NBCCommon.h, 1102 HT_CMD_COLOR2_LED_LOW HTColor2Constants, 868 NBCCommon.h, 1102 HT_CMD_COLOR2_NEAR HTColor2Constants, 868 NBCCommon.h, 1102 HT_CMD_COLOR2_PASSIVE HTColor2Constants, 868 NBCCommon.h, 1102 HT_CMD_COLOR2_RAW HTColor2Constants, 869 NBCCommon.h, 1102 HT_CMD_COLOR2_WBCAL HTColor2Constants, 869 NBCCommon.h, 1102 HTANGLE_MODE_CALIBRATE HTAngleConstants, 869 NBCCommon.h, 1103 HTANGLE_MODE_NORMAL HTAngleConstants, 869 NBCCommon.h, 1103 HTANGLE_MODE_RESET HTAngleConstants, 870 NBCCommon.h, 1103 HTANGLE_REG_ACDIR HTAngleConstants, 870

NBCCommon.h, 1103 HTANGLE_REG_DC01 HTAngleConstants, 870 NBCCommon.h, 1103 HTANGLE_REG_DC02 HTAngleConstants, 870 NBCCommon.h, 1103 HTANGLE_REG_DC03 HTAngleConstants, 870 NBCCommon.h, 1103 HTANGLE_REG_DC04 HTAngleConstants, 870 NBCCommon.h, 1103 HTANGLE_REG_DC05 HTAngleConstants, 870 NBCCommon.h, 1103 HTANGLE_REG_DCAVG HTAngleConstants, 870 NBCCommon.h, 1104 HTANGLE_REG_DCDIR HTAngleConstants, 870 NBCCommon.h, 1104 HTANGLE_REG_MODE HTAngleConstants, 871 NBCCommon.h, 1104 HTAngleConstants HTANGLE_MODE_CALIBRATE, 869 HTANGLE_MODE_NORMAL, 869 HTANGLE_MODE_RESET, 870 HTANGLE_REG_ACDIR, 870 HTANGLE_REG_DC01, 870 HTANGLE_REG_DC02, 870 HTANGLE_REG_DC03, 870 HTANGLE_REG_DC04, 870 HTANGLE_REG_DC05, 870 HTANGLE_REG_DCAVG, 870 HTANGLE_REG_DCDIR, 870 HTANGLE_REG_MODE, 871 HTColor2Constants HT_CMD_COLOR2_50HZ, 868 HT_CMD_COLOR2_60HZ, 868 HT_CMD_COLOR2_ACTIVE, 868 HT_CMD_COLOR2_BLCAL, 868 HT_CMD_COLOR2_FAR, 868

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2037

HT_CMD_COLOR2_LED_HI, 868 HT_CMD_COLOR2_LED_LOW, 868 HT_CMD_COLOR2_NEAR, 868 HT_CMD_COLOR2_PASSIVE, 868 HT_CMD_COLOR2_RAW, 869 HT_CMD_COLOR2_WBCAL, 869 HTIR2_MODE_1200 HTIRSeeker2Constants, 864 NBCCommon.h, 1104 HTIR2_MODE_600 HTIRSeeker2Constants, 864 NBCCommon.h, 1104 HTIR2_REG_AC01 HTIRSeeker2Constants, 864 NBCCommon.h, 1104 HTIR2_REG_AC02 HTIRSeeker2Constants, 864 NBCCommon.h, 1104 HTIR2_REG_AC03 HTIRSeeker2Constants, 864 NBCCommon.h, 1104 HTIR2_REG_AC04 HTIRSeeker2Constants, 864 NBCCommon.h, 1104 HTIR2_REG_AC05 HTIRSeeker2Constants, 865 NBCCommon.h, 1105 HTIR2_REG_ACDIR HTIRSeeker2Constants, 865 NBCCommon.h, 1105 HTIR2_REG_DC01 HTIRSeeker2Constants, 865 NBCCommon.h, 1105 HTIR2_REG_DC02 HTIRSeeker2Constants, 865 NBCCommon.h, 1105 HTIR2_REG_DC03 HTIRSeeker2Constants, 865 NBCCommon.h, 1105 HTIR2_REG_DC04 HTIRSeeker2Constants, 865 NBCCommon.h, 1105 HTIR2_REG_DC05 HTIRSeeker2Constants, 865

NBCCommon.h, 1105 HTIR2_REG_DCAVG HTIRSeeker2Constants, 865 NBCCommon.h, 1105 HTIR2_REG_DCDIR HTIRSeeker2Constants, 865 NBCCommon.h, 1105 HTIR2_REG_MODE HTIRSeeker2Constants, 866 NBCCommon.h, 1106 HTIRReceiverConstants HT_CH1_A, 866 HT_CH1_B, 866 HT_CH2_A, 866 HT_CH2_B, 867 HT_CH3_A, 867 HT_CH3_B, 867 HT_CH4_A, 867 HT_CH4_B, 867 HTIRSeeker2Constants HTIR2_MODE_1200, 864 HTIR2_MODE_600, 864 HTIR2_REG_AC01, 864 HTIR2_REG_AC02, 864 HTIR2_REG_AC03, 864 HTIR2_REG_AC04, 864 HTIR2_REG_AC05, 865 HTIR2_REG_ACDIR, 865 HTIR2_REG_DC01, 865 HTIR2_REG_DC02, 865 HTIR2_REG_DC03, 865 HTIR2_REG_DC04, 865 HTIR2_REG_DC05, 865 HTIR2_REG_DCAVG, 865 HTIR2_REG_DCDIR, 865 HTIR2_REG_MODE, 866 HTIRTrain HiTechnicAPI, 66 NXCDefs.h, 1449 HTPFComboDirect HiTechnicAPI, 67 NXCDefs.h, 1450 HTPFComboPWM HiTechnicAPI, 67 NXCDefs.h, 1451 HTPFRawOutput

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2038

HiTechnicAPI, 68 NXCDefs.h, 1451 HTPFRepeat HiTechnicAPI, 69 NXCDefs.h, 1452 HTPFSingleOutputCST HiTechnicAPI, 69 NXCDefs.h, 1452 HTPFSingleOutputPWM HiTechnicAPI, 70 NXCDefs.h, 1453 HTPFSinglePin HiTechnicAPI, 70 NXCDefs.h, 1454 HTPFTrain HiTechnicAPI, 71 NXCDefs.h, 1454 HTRCXAddToDatalog HiTechnicAPI, 72 NXCDefs.h, 1455 HTRCXBatteryLevel HiTechnicAPI, 72 NXCDefs.h, 1455 HTRCXClearAllEvents HiTechnicAPI, 72 NXCDefs.h, 1456 HTRCXClearCounter HiTechnicAPI, 73 NXCDefs.h, 1456 HTRCXClearMsg HiTechnicAPI, 73 NXCDefs.h, 1456 HTRCXClearSensor HiTechnicAPI, 73 NXCDefs.h, 1456 HTRCXClearSound HiTechnicAPI, 73 NXCDefs.h, 1457 HTRCXClearTimer HiTechnicAPI, 74 NXCDefs.h, 1457 HTRCXCreateDatalog HiTechnicAPI, 74 NXCDefs.h, 1457 HTRCXDecCounter HiTechnicAPI, 74

NXCDefs.h, 1458 HTRCXDeleteSub HiTechnicAPI, 75 NXCDefs.h, 1458 HTRCXDeleteSubs HiTechnicAPI, 75 NXCDefs.h, 1458 HTRCXDeleteTask HiTechnicAPI, 75 NXCDefs.h, 1458 HTRCXDeleteTasks HiTechnicAPI, 75 NXCDefs.h, 1459 HTRCXDisableOutput HiTechnicAPI, 76 NXCDefs.h, 1459 HTRCXEnableOutput HiTechnicAPI, 76 NXCDefs.h, 1459 HTRCXEvent HiTechnicAPI, 76 NXCDefs.h, 1460 HTRCXFloat HiTechnicAPI, 77 NXCDefs.h, 1460 HTRCXFwd HiTechnicAPI, 77 NXCDefs.h, 1460 HTRCXIncCounter HiTechnicAPI, 77 NXCDefs.h, 1460 HTRCXInvertOutput HiTechnicAPI, 78 NXCDefs.h, 1461 HTRCXMuteSound HiTechnicAPI, 78 NXCDefs.h, 1461 HTRCXObvertOutput HiTechnicAPI, 78 NXCDefs.h, 1461 HTRCXOff HiTechnicAPI, 78 NXCDefs.h, 1462 HTRCXOn HiTechnicAPI, 79 NXCDefs.h, 1462

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2039

HTRCXOnFor HiTechnicAPI, 79 NXCDefs.h, 1462 HTRCXOnFwd HiTechnicAPI, 79 NXCDefs.h, 1462 HTRCXOnRev HiTechnicAPI, 80 NXCDefs.h, 1463 HTRCXPBTurnOff HiTechnicAPI, 80 NXCDefs.h, 1463 HTRCXPing HiTechnicAPI, 80 NXCDefs.h, 1463 HTRCXPlaySound HiTechnicAPI, 81 NXCDefs.h, 1464 HTRCXPlayTone HiTechnicAPI, 81 NXCDefs.h, 1464 HTRCXPlayToneVar HiTechnicAPI, 81 NXCDefs.h, 1464 HTRCXPoll HiTechnicAPI, 82 NXCDefs.h, 1465 HTRCXPollMemory HiTechnicAPI, 82 NXCDefs.h, 1465 HTRCXRemote HiTechnicAPI, 82 NXCDefs.h, 1465 HTRCXRev HiTechnicAPI, 83 NXCDefs.h, 1466 HTRCXSelectDisplay HiTechnicAPI, 83 NXCDefs.h, 1466 HTRCXSelectProgram HiTechnicAPI, 83 NXCDefs.h, 1466 HTRCXSendSerial HiTechnicAPI, 84 NXCDefs.h, 1467 HTRCXSetDirection

HiTechnicAPI, 84 NXCDefs.h, 1467 HTRCXSetEvent HiTechnicAPI, 84 NXCDefs.h, 1467 HTRCXSetGlobalDirection HiTechnicAPI, 85 NXCDefs.h, 1468 HTRCXSetGlobalOutput HiTechnicAPI, 85 NXCDefs.h, 1468 HTRCXSetIRLinkPort HiTechnicAPI, 86 NXCDefs.h, 1469 HTRCXSetMaxPower HiTechnicAPI, 86 NXCDefs.h, 1469 HTRCXSetMessage HiTechnicAPI, 86 NXCDefs.h, 1469 HTRCXSetOutput HiTechnicAPI, 86 NXCDefs.h, 1469 HTRCXSetPower HiTechnicAPI, 87 NXCDefs.h, 1470 HTRCXSetPriority HiTechnicAPI, 87 NXCDefs.h, 1470 HTRCXSetSensorMode HiTechnicAPI, 87 NXCDefs.h, 1470 HTRCXSetSensorType HiTechnicAPI, 88 NXCDefs.h, 1471 HTRCXSetSleepTime HiTechnicAPI, 88 NXCDefs.h, 1471 HTRCXSetTxPower HiTechnicAPI, 88 NXCDefs.h, 1471 HTRCXSetWatch HiTechnicAPI, 89 NXCDefs.h, 1472 HTRCXStartTask HiTechnicAPI, 89

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2040

NXCDefs.h, 1472 HTRCXStopAllTasks HiTechnicAPI, 89 NXCDefs.h, 1472 HTRCXStopTask HiTechnicAPI, 90 NXCDefs.h, 1473 HTRCXToggle HiTechnicAPI, 90 NXCDefs.h, 1473 HTRCXUnmuteSound HiTechnicAPI, 90 NXCDefs.h, 1473 HTScoutCalibrateSensor HiTechnicAPI, 90 NXCDefs.h, 1473 HTScoutMuteSound HiTechnicAPI, 91 NXCDefs.h, 1474 HTScoutSelectSounds HiTechnicAPI, 91 NXCDefs.h, 1474 HTScoutSendVLL HiTechnicAPI, 91 NXCDefs.h, 1474 HTScoutSetEventFeedback HiTechnicAPI, 91 NXCDefs.h, 1474 HTScoutSetLight HiTechnicAPI, 92 NXCDefs.h, 1475 HTScoutSetScoutMode HiTechnicAPI, 92 NXCDefs.h, 1475 HTScoutSetSensorClickTime HiTechnicAPI, 92 NXCDefs.h, 1475 HTScoutSetSensorHysteresis HiTechnicAPI, 93 NXCDefs.h, 1476 HTScoutSetSensorLowerLimit HiTechnicAPI, 93 NXCDefs.h, 1476 HTScoutSetSensorUpperLimit HiTechnicAPI, 94 NXCDefs.h, 1477

HTScoutUnmuteSound HiTechnicAPI, 94 NXCDefs.h, 1477 I2C_ADDR_DEFAULT GenericI2CConstants, 753 NBCCommon.h, 1106 I2C_REG_CMD GenericI2CConstants, 753 NBCCommon.h, 1106 I2C_REG_DEVICE_ID GenericI2CConstants, 753 NBCCommon.h, 1106 I2C_REG_VENDOR_ID GenericI2CConstants, 753 NBCCommon.h, 1106 I2C_REG_VERSION GenericI2CConstants, 753 NBCCommon.h, 1106 I2CBytes LowSpeedModuleFunctions, 355 NXCDefs.h, 1477 I2CBytesReady LowSpeedModuleFunctions, 356 NXCDefs.h, 1478 I2CCheckStatus LowSpeedModuleFunctions, 356 NXCDefs.h, 1479 I2CDeviceId LowSpeedModuleFunctions, 357 NXCDefs.h, 1479 I2CDeviceInfo LowSpeedModuleFunctions, 357 NXCDefs.h, 1480 I2CRead LowSpeedModuleFunctions, 358 NXCDefs.h, 1480 I2CSendCommand LowSpeedModuleFunctions, 359 NXCDefs.h, 1481 I2CStatus LowSpeedModuleFunctions, 359 NXCDefs.h, 1482 I2CVendorId LowSpeedModuleFunctions, 360 NXCDefs.h, 1482

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2041

I2CVersion LowSpeedModuleFunctions, 360 NXCDefs.h, 1483 I2CWrite LowSpeedModuleFunctions, 361 NXCDefs.h, 1483 IN_1 NBCCommon.h, 1107 NBCInputPortConstants, 709 IN_2 NBCCommon.h, 1107 NBCInputPortConstants, 709 IN_3 NBCCommon.h, 1107 NBCInputPortConstants, 710 IN_4 NBCCommon.h, 1107 NBCInputPortConstants, 710 IN_MODE_ANGLESTEP NBCCommon.h, 1107 NBCSensorModeConstants, 713 IN_MODE_BOOLEAN NBCCommon.h, 1107 NBCSensorModeConstants, 713 IN_MODE_CELSIUS NBCCommon.h, 1107 NBCSensorModeConstants, 714 IN_MODE_FAHRENHEIT NBCCommon.h, 1107 NBCSensorModeConstants, 714 IN_MODE_MODEMASK NBCCommon.h, 1107 NBCSensorModeConstants, 714 IN_MODE_PCTFULLSCALE NBCCommon.h, 1108 NBCSensorModeConstants, 714 IN_MODE_PERIODCOUNTER NBCCommon.h, 1108 NBCSensorModeConstants, 714 IN_MODE_RAW NBCCommon.h, 1108 NBCSensorModeConstants, 714 IN_MODE_SLOPEMASK NBCCommon.h, 1108 NBCSensorModeConstants, 714 IN_MODE_TRANSITIONCNT

NBCCommon.h, 1108 NBCSensorModeConstants, 714 IN_TYPE_ANGLE NBCCommon.h, 1108 NBCSensorTypeConstants, 711 IN_TYPE_COLORBLUE NBCCommon.h, 1108 NBCSensorTypeConstants, 711 IN_TYPE_COLOREXIT NBCCommon.h, 1108 NBCSensorTypeConstants, 711 IN_TYPE_COLORFULL NBCCommon.h, 1108 NBCSensorTypeConstants, 711 IN_TYPE_COLORGREEN NBCCommon.h, 1108 NBCSensorTypeConstants, 711 IN_TYPE_COLORNONE NBCCommon.h, 1109 NBCSensorTypeConstants, 711 IN_TYPE_COLORRED NBCCommon.h, 1109 NBCSensorTypeConstants, 711 IN_TYPE_CUSTOM NBCCommon.h, 1109 NBCSensorTypeConstants, 711 IN_TYPE_HISPEED NBCCommon.h, 1109 NBCSensorTypeConstants, 712 IN_TYPE_LIGHT_ACTIVE NBCCommon.h, 1109 NBCSensorTypeConstants, 712 IN_TYPE_LIGHT_INACTIVE NBCCommon.h, 1109 NBCSensorTypeConstants, 712 IN_TYPE_LOWSPEED NBCCommon.h, 1109 NBCSensorTypeConstants, 712 IN_TYPE_LOWSPEED_9V NBCCommon.h, 1109 NBCSensorTypeConstants, 712 IN_TYPE_NO_SENSOR NBCCommon.h, 1109 NBCSensorTypeConstants, 712 IN_TYPE_REFLECTION NBCCommon.h, 1109

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2042

NBCSensorTypeConstants, 712 IN_TYPE_SOUND_DB NBCCommon.h, 1110 NBCSensorTypeConstants, 712 IN_TYPE_SOUND_DBA NBCCommon.h, 1110 NBCSensorTypeConstants, 712 IN_TYPE_SWITCH NBCCommon.h, 1110 NBCSensorTypeConstants, 712 IN_TYPE_TEMPERATURE NBCCommon.h, 1110 NBCSensorTypeConstants, 713 Index ReadButtonType, 997 InPorts S1, 241 S2, 243 S3, 243 S4, 243 Input eld constants, 714 Input module, 43 Input module constants, 44 Input module functions, 252 Input module IOMAP offsets, 720 Input module types, 251 Input port constants, 240 Input port digital pin constants, 716 INPUT_BLACKCOLOR InputColorValueConstants, 718 NBCCommon.h, 1110 INPUT_BLANK InputColorIdxConstants, 717 NBCCommon.h, 1110 INPUT_BLUE InputColorIdxConstants, 717 NBCCommon.h, 1110 INPUT_BLUECOLOR InputColorValueConstants, 718 NBCCommon.h, 1110 INPUT_CAL_POINT_0 InputColorCalibrationConstants, 720 NBCCommon.h, 1110 INPUT_CAL_POINT_1

InputColorCalibrationConstants, 720 NBCCommon.h, 1111 INPUT_CAL_POINT_2 InputColorCalibrationConstants, 720 NBCCommon.h, 1111 INPUT_CUSTOM9V InputModuleConstants, 45 NBCCommon.h, 1111 INPUT_CUSTOMACTIVE InputModuleConstants, 45 NBCCommon.h, 1111 INPUT_CUSTOMINACTIVE InputModuleConstants, 45 NBCCommon.h, 1111 INPUT_DIGI0 InputDigiPinConstants, 716 NBCCommon.h, 1111 INPUT_DIGI1 InputDigiPinConstants, 716 NBCCommon.h, 1111 INPUT_GREEN InputColorIdxConstants, 717 NBCCommon.h, 1111 INPUT_GREENCOLOR InputColorValueConstants, 718 NBCCommon.h, 1111 INPUT_INVALID_DATA InputModuleConstants, 45 NBCCommon.h, 1111 INPUT_NO_OF_COLORS InputColorIdxConstants, 717 NBCCommon.h, 1112 INPUT_NO_OF_POINTS InputColorCalibrationConstants, 720 NBCCommon.h, 1112 INPUT_RED InputColorIdxConstants, 717 NBCCommon.h, 1112 INPUT_REDCOLOR InputColorValueConstants, 718 NBCCommon.h, 1112 INPUT_RESETCAL

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2043

InputColorCalibrationStateConstants, 719 NBCCommon.h, 1112 INPUT_RUNNINGCAL InputColorCalibrationStateConstants, 719 NBCCommon.h, 1112 INPUT_SENSORCAL InputColorCalibrationStateConstants, 719 NBCCommon.h, 1112 INPUT_SENSOROFF InputColorCalibrationStateConstants, 719 NBCCommon.h, 1112 INPUT_STARTCAL InputColorCalibrationStateConstants, 719 NBCCommon.h, 1112 INPUT_WHITECOLOR InputColorValueConstants, 718 NBCCommon.h, 1113 INPUT_YELLOWCOLOR InputColorValueConstants, 718 NBCCommon.h, 1113 InputColorCalibrationConstants INPUT_CAL_POINT_0, 720 INPUT_CAL_POINT_1, 720 INPUT_CAL_POINT_2, 720 INPUT_NO_OF_POINTS, 720 InputColorCalibrationStateConstants INPUT_RESETCAL, 719 INPUT_RUNNINGCAL, 719 INPUT_SENSORCAL, 719 INPUT_SENSOROFF, 719 INPUT_STARTCAL, 719 InputColorIdxConstants INPUT_BLANK, 717 INPUT_BLUE, 717 INPUT_GREEN, 717 INPUT_NO_OF_COLORS, 717 INPUT_RED, 717 InputColorValueConstants INPUT_BLACKCOLOR, 718 INPUT_BLUECOLOR, 718 INPUT_GREENCOLOR, 718

INPUT_REDCOLOR, 718 INPUT_WHITECOLOR, 718 INPUT_YELLOWCOLOR, 718 InputDigiPinConstants INPUT_DIGI0, 716 INPUT_DIGI1, 716 InputFieldConstants InputModeField, 715 InvalidDataField, 715 NormalizedValueField, 715 RawValueField, 715 ScaledValueField, 715 TypeField, 715 InputIOMAP InputOffsetADRaw, 721 InputOffsetColorADRaw, 721 InputOffsetColorBoolean, 721 InputOffsetColorCalibration, 721 InputOffsetColorCalibrationState, 722 InputOffsetColorCalLimits, 722 InputOffsetColorSensorRaw, 722 InputOffsetColorSensorValue, 722 InputOffsetCustomActiveStatus, 722 InputOffsetCustomPctFullScale, 722 InputOffsetCustomZeroOffset, 722 InputOffsetDigiPinsDir, 722 InputOffsetDigiPinsIn, 722 InputOffsetDigiPinsOut, 723 InputOffsetInvalidData, 723 InputOffsetSensorBoolean, 723 InputOffsetSensorMode, 723 InputOffsetSensorRaw, 723 InputOffsetSensorType, 723 InputOffsetSensorValue, 723 InputModeField InputFieldConstants, 715 NBCCommon.h, 1113 InputModuleConstants INPUT_CUSTOM9V, 45 INPUT_CUSTOMACTIVE, 45 INPUT_CUSTOMINACTIVE, 45 INPUT_INVALID_DATA, 45 InputModuleFunctions ClearSensor, 256 ColorADRaw, 256

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2044

ColorBoolean, 257 ColorCalibration, 257 ColorCalibrationState, 258 ColorCalLimits, 258 ColorSensorRaw, 259 ColorSensorValue, 259 CustomSensorActiveStatus, 260 CustomSensorPercentFullScale, 260 CustomSensorZeroOffset, 260 GetInput, 261 ReadSensorColorEx, 261 ReadSensorColorRaw, 262 ResetSensor, 262 Sensor, 263 SensorBoolean, 263 SensorDigiPinsDirection, 264 SensorDigiPinsOutputLevel, 264 SensorDigiPinsStatus, 264 SensorInvalid, 265 SensorMode, 265 SensorNormalized, 266 SensorRaw, 266 SensorScaled, 266 SensorType, 267 SensorValue, 267 SensorValueBool, 268 SensorValueRaw, 268 SetCustomSensorActiveStatus, 268 SetCustomSensorPercentFullScale, 269 SetCustomSensorZeroOffset, 269 SetInput, 269 SetSensor, 270 SetSensorBoolean, 270 SetSensorColorBlue, 271 SetSensorColorFull, 271 SetSensorColorGreen, 271 SetSensorColorNone, 272 SetSensorColorRed, 272 SetSensorDigiPinsDirection, 273 SetSensorDigiPinsOutputLevel, 273 SetSensorDigiPinsStatus, 273 SetSensorEMeter, 274 SetSensorLight, 274 SetSensorLowspeed, 274 SetSensorMode, 275

SetSensorSound, 275 SetSensorTemperature, 276 SetSensorTouch, 276 SetSensorType, 276 SetSensorUltrasonic, 277 SysColorSensorRead, 277 InputModuleID ModuleIDConstants, 226 NBCCommon.h, 1113 InputModuleName ModuleNameConstants, 224 NBCCommon.h, 1113 InputOffsetADRaw InputIOMAP, 721 NBCCommon.h, 1113 InputOffsetColorADRaw InputIOMAP, 721 NBCCommon.h, 1113 InputOffsetColorBoolean InputIOMAP, 721 NBCCommon.h, 1113 InputOffsetColorCalibration InputIOMAP, 721 NBCCommon.h, 1113 InputOffsetColorCalibrationState InputIOMAP, 722 NBCCommon.h, 1113 InputOffsetColorCalLimits InputIOMAP, 722 NBCCommon.h, 1114 InputOffsetColorSensorRaw InputIOMAP, 722 NBCCommon.h, 1114 InputOffsetColorSensorValue InputIOMAP, 722 NBCCommon.h, 1114 InputOffsetCustomActiveStatus InputIOMAP, 722 NBCCommon.h, 1114 InputOffsetCustomPctFullScale InputIOMAP, 722 NBCCommon.h, 1114 InputOffsetCustomZeroOffset InputIOMAP, 722 NBCCommon.h, 1114 InputOffsetDigiPinsDir

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2045

InputIOMAP, 722 NBCCommon.h, 1114 InputOffsetDigiPinsIn InputIOMAP, 722 NBCCommon.h, 1114 InputOffsetDigiPinsOut InputIOMAP, 723 NBCCommon.h, 1114 InputOffsetInvalidData InputIOMAP, 723 NBCCommon.h, 1114 InputOffsetSensorBoolean InputIOMAP, 723 NBCCommon.h, 1115 InputOffsetSensorMode InputIOMAP, 723 NBCCommon.h, 1115 InputOffsetSensorRaw InputIOMAP, 723 NBCCommon.h, 1115 InputOffsetSensorType InputIOMAP, 723 NBCCommon.h, 1115 InputOffsetSensorValue InputIOMAP, 723 NBCCommon.h, 1115 InputValuesType, 974 Calibrated, 975 CalibratedValue, 975 NormalizedValue, 975 Port, 975 RawValue, 975 ScaledValue, 976 SensorMode, 976 SensorType, 976 Valid, 976 INT_MAX NBCCommon.h, 1115 NXTLimits, 915 INT_MIN NBCCommon.h, 1115 NXTLimits, 915 INTF_BTOFF CommInterfaceConstants, 803 NBCCommon.h, 1115 INTF_BTON

CommInterfaceConstants, 803 NBCCommon.h, 1115 INTF_CONNECT CommInterfaceConstants, 803 NBCCommon.h, 1116 INTF_CONNECTBYNAME CommInterfaceConstants, 803 NBCCommon.h, 1116 INTF_CONNECTREQ CommInterfaceConstants, 803 NBCCommon.h, 1116 INTF_DISCONNECT CommInterfaceConstants, 803 NBCCommon.h, 1116 INTF_DISCONNECTALL CommInterfaceConstants, 803 NBCCommon.h, 1116 INTF_EXTREAD CommInterfaceConstants, 803 NBCCommon.h, 1116 INTF_FACTORYRESET CommInterfaceConstants, 803 NBCCommon.h, 1116 INTF_OPENSTREAM CommInterfaceConstants, 803 NBCCommon.h, 1116 INTF_PINREQ CommInterfaceConstants, 804 NBCCommon.h, 1116 INTF_REMOVEDEVICE CommInterfaceConstants, 804 NBCCommon.h, 1116 INTF_SEARCH CommInterfaceConstants, 804 NBCCommon.h, 1117 INTF_SENDDATA CommInterfaceConstants, 804 NBCCommon.h, 1117 INTF_SENDFILE CommInterfaceConstants, 804 NBCCommon.h, 1117 INTF_SETBTNAME CommInterfaceConstants, 804 NBCCommon.h, 1117 INTF_SETCMDMODE CommInterfaceConstants, 804

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2046

NBCCommon.h, 1117 INTF_STOPSEARCH CommInterfaceConstants, 804 NBCCommon.h, 1117 INTF_VISIBILITY CommInterfaceConstants, 804 NBCCommon.h, 1117 Invalid ColorSensorReadType, 922 InvalidDataField InputFieldConstants, 715 NBCCommon.h, 1117 IOCtrl module, 53 IOCtrl module constants, 668 IOCtrl module functions, 419 IOCtrl module IOMAP offsets, 669 IOCtrl module types, 419 IOCTRL_BOOT IOCtrlPO, 668 NBCCommon.h, 1117 IOCTRL_POWERDOWN IOCtrlPO, 668 NBCCommon.h, 1117 IOCtrlIOMAP IOCtrlOffsetPowerOn, 669 IOCtrlModuleFunctions PowerDown, 420 RebootInFirmwareMode, 420 SleepNow, 420 IOCtrlModuleID ModuleIDConstants, 226 NBCCommon.h, 1118 IOCtrlModuleName ModuleNameConstants, 224 NBCCommon.h, 1118 IOCtrlOffsetPowerOn IOCtrlIOMAP, 669 NBCCommon.h, 1118 IOCtrlPO IOCTRL_BOOT, 668 IOCTRL_POWERDOWN, 668 IOMapRead NBCCommon.h, 1118 SysCallConstants, 642 IOMapReadByID NBCCommon.h, 1118

SysCallConstants, 642 IOMapReadByIDType, 976 Buffer, 977 Count, 977 ModuleID, 977 Offset, 977 Result, 978 IOMapReadType, 978 Buffer, 979 Count, 979 ModuleName, 979 Offset, 979 Result, 979 IOMapWrite NBCCommon.h, 1118 SysCallConstants, 642 IOMapWriteByID NBCCommon.h, 1118 SysCallConstants, 643 IOMapWriteByIDType, 980 Buffer, 980 ModuleID, 980 Offset, 980 Result, 981 IOMapWriteType, 981 Buffer, 982 ModuleName, 982 Offset, 982 Result, 982 IR Train channel constants, 854 IRTrainChannels TRAIN_CHANNEL_1, 855 TRAIN_CHANNEL_2, 855 TRAIN_CHANNEL_3, 855 TRAIN_CHANNEL_ALL, 855 IRTrainFuncs TRAIN_FUNC_DECR_SPEED, 854 TRAIN_FUNC_INCR_SPEED, 854 TRAIN_FUNC_STOP, 854 TRAIN_FUNC_TOGGLE_LIGHT, 854 isalnum ctypeAPI, 628 NXCDefs.h, 1484 isalpha

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2047

ctypeAPI, 628 NXCDefs.h, 1485 iscntrl ctypeAPI, 629 NXCDefs.h, 1485 isdigit ctypeAPI, 629 NXCDefs.h, 1485 isgraph ctypeAPI, 629 NXCDefs.h, 1486 islower ctypeAPI, 630 NXCDefs.h, 1486 isNAN cmathAPI, 580 NXCDefs.h, 1487 isprint ctypeAPI, 630 NXCDefs.h, 1487 ispunct ctypeAPI, 631 NXCDefs.h, 1487 isspace ctypeAPI, 631 NXCDefs.h, 1488 isupper ctypeAPI, 631 NXCDefs.h, 1488 isxdigit ctypeAPI, 632 NXCDefs.h, 1489 KeepAlive NBCCommon.h, 1118 SysCallConstants, 643 KeepAliveType, 982 Result, 983 labs cstdlibAPI, 604 NXCDefs.h, 1489 LCD_LINE1 LineConstants, 645 NBCCommon.h, 1118 LCD_LINE2

LineConstants, 646 NBCCommon.h, 1119 LCD_LINE3 LineConstants, 646 NBCCommon.h, 1120 LCD_LINE4 LineConstants, 647 NBCCommon.h, 1120 LCD_LINE5 LineConstants, 647 NBCCommon.h, 1120 LCD_LINE6 LineConstants, 647 NBCCommon.h, 1121 LCD_LINE7 LineConstants, 647 NBCCommon.h, 1121 LCD_LINE8 LineConstants, 648 NBCCommon.h, 1121 ldiv cstdlibAPI, 604 NXCDefs.h, 1489 ldiv_t, 983 quot, 984 rem, 984 LDR_APPENDNOTPOSSIBLE LoaderErrors, 672 NBCCommon.h, 1121 LDR_BTBUSY LoaderErrors, 672 NBCCommon.h, 1121 LDR_BTCONNECTFAIL LoaderErrors, 672 NBCCommon.h, 1121 LDR_BTTIMEOUT LoaderErrors, 672 NBCCommon.h, 1122 LDR_CMD_BOOTCMD LoaderFunctionConstants, 676 NBCCommon.h, 1122 LDR_CMD_BTFACTORYRESET LoaderFunctionConstants, 676 NBCCommon.h, 1122 LDR_CMD_BTGETADR LoaderFunctionConstants, 677

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2048

NBCCommon.h, 1122 LDR_CMD_CLOSE LoaderFunctionConstants, 677 NBCCommon.h, 1122 LDR_CMD_CLOSEMODHANDLE LoaderFunctionConstants, 677 NBCCommon.h, 1122 LDR_CMD_CROPDATAFILE LoaderFunctionConstants, 677 NBCCommon.h, 1122 LDR_CMD_DELETE LoaderFunctionConstants, 677 NBCCommon.h, 1122 LDR_CMD_DELETEUSERFLASH LoaderFunctionConstants, 677 NBCCommon.h, 1122 LDR_CMD_DEVICEINFO LoaderFunctionConstants, 677 NBCCommon.h, 1122 LDR_CMD_FINDFIRST LoaderFunctionConstants, 677 NBCCommon.h, 1123 LDR_CMD_FINDFIRSTMODULE LoaderFunctionConstants, 677 NBCCommon.h, 1123 LDR_CMD_FINDNEXT LoaderFunctionConstants, 677 NBCCommon.h, 1123 LDR_CMD_FINDNEXTMODULE LoaderFunctionConstants, 678 NBCCommon.h, 1123 LDR_CMD_IOMAPREAD LoaderFunctionConstants, 678 NBCCommon.h, 1123 LDR_CMD_IOMAPWRITE LoaderFunctionConstants, 678 NBCCommon.h, 1123 LDR_CMD_OPENAPPENDDATA LoaderFunctionConstants, 678 NBCCommon.h, 1123 LDR_CMD_OPENREAD LoaderFunctionConstants, 678 NBCCommon.h, 1123 LDR_CMD_OPENREADLINEAR LoaderFunctionConstants, 678 NBCCommon.h, 1123

LDR_CMD_OPENWRITE LoaderFunctionConstants, 678 NBCCommon.h, 1123 LDR_CMD_OPENWRITEDATA LoaderFunctionConstants, 678 NBCCommon.h, 1124 LDR_CMD_OPENWRITELINEAR LoaderFunctionConstants, 678 NBCCommon.h, 1124 LDR_CMD_POLLCMD LoaderFunctionConstants, 678 NBCCommon.h, 1124 LDR_CMD_POLLCMDLEN LoaderFunctionConstants, 679 NBCCommon.h, 1124 LDR_CMD_READ LoaderFunctionConstants, 679 NBCCommon.h, 1124 LDR_CMD_RENAMEFILE LoaderFunctionConstants, 679 NBCCommon.h, 1124 LDR_CMD_RESIZEDATAFILE LoaderFunctionConstants, 679 NBCCommon.h, 1124 LDR_CMD_SEEKFROMCURRENT LoaderFunctionConstants, 679 NBCCommon.h, 1124 LDR_CMD_SEEKFROMEND LoaderFunctionConstants, 679 NBCCommon.h, 1124 LDR_CMD_SEEKFROMSTART LoaderFunctionConstants, 679 NBCCommon.h, 1124 LDR_CMD_SETBRICKNAME LoaderFunctionConstants, 679 NBCCommon.h, 1125 LDR_CMD_VERSIONS LoaderFunctionConstants, 679 NBCCommon.h, 1125 LDR_CMD_WRITE LoaderFunctionConstants, 679 NBCCommon.h, 1125 LDR_ENDOFFILE LoaderErrors, 672 NBCCommon.h, 1125 LDR_EOFEXPECTED

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2049

LoaderErrors, 672 NBCCommon.h, 1125 LDR_FILEEXISTS LoaderErrors, 672 NBCCommon.h, 1125 LDR_FILEISBUSY LoaderErrors, 673 NBCCommon.h, 1125 LDR_FILEISFULL LoaderErrors, 673 NBCCommon.h, 1126 LDR_FILENOTFOUND LoaderErrors, 673 NBCCommon.h, 1126 LDR_FILETX_CLOSEERROR LoaderErrors, 673 NBCCommon.h, 1126 LDR_FILETX_DSTEXISTS LoaderErrors, 673 NBCCommon.h, 1126 LDR_FILETX_SRCMISSING LoaderErrors, 673 NBCCommon.h, 1126 LDR_FILETX_STREAMERROR LoaderErrors, 673 NBCCommon.h, 1126 LDR_FILETX_TIMEOUT LoaderErrors, 673 NBCCommon.h, 1126 LDR_HANDLEALREADYCLOSED LoaderErrors, 674 NBCCommon.h, 1126 LDR_ILLEGALFILENAME LoaderErrors, 674 NBCCommon.h, 1126 LDR_ILLEGALHANDLE LoaderErrors, 674 NBCCommon.h, 1127 LDR_INPROGRESS LoaderErrors, 674 NBCCommon.h, 1127 LDR_INVALIDSEEK LoaderErrors, 674 NBCCommon.h, 1127 LDR_MODULENOTFOUND LoaderErrors, 674

NBCCommon.h, 1127 LDR_NOLINEARSPACE LoaderErrors, 674 NBCCommon.h, 1127 LDR_NOMOREFILES LoaderErrors, 674 NBCCommon.h, 1127 LDR_NOMOREHANDLES LoaderErrors, 674 NBCCommon.h, 1127 LDR_NOSPACE LoaderErrors, 674 NBCCommon.h, 1127 LDR_NOTLINEARFILE LoaderErrors, 675 NBCCommon.h, 1127 LDR_NOWRITEBUFFERS LoaderErrors, 675 NBCCommon.h, 1127 LDR_OUTOFBOUNDARY LoaderErrors, 675 NBCCommon.h, 1128 LDR_REQPIN LoaderErrors, 675 NBCCommon.h, 1128 LDR_SUCCESS LoaderErrors, 675 NBCCommon.h, 1128 LDR_UNDEFINEDERROR LoaderErrors, 675 NBCCommon.h, 1128 LeftStr cstringAPI, 615 NXCDefs.h, 1490 LEGO I2C address constants, 754 LEGO temperature sensor constants, 756 LEGO_ADDR_EMETER LEGOI2CAddressConstants, 754 NBCCommon.h, 1128 LEGO_ADDR_TEMP LEGOI2CAddressConstants, 754 NBCCommon.h, 1128 LEGO_ADDR_US LEGOI2CAddressConstants, 754 NBCCommon.h, 1128 LEGOI2CAddressConstants

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2050

LEGO_ADDR_EMETER, 754 LEGO_ADDR_TEMP, 754 LEGO_ADDR_US, 754 Length FileFindType, 964 FileOpenType, 965 FileReadWriteType, 967 FileSeekType, 972 LoaderExecuteFunctionType, 988 ReadLastResponseType, 999 Line number constants, 645 LineConstants LCD_LINE1, 645 LCD_LINE2, 646 LCD_LINE3, 646 LCD_LINE4, 647 LCD_LINE5, 647 LCD_LINE6, 647 LCD_LINE7, 647 LCD_LINE8, 648 LineOut DisplayModuleFunctions, 327 NXCDefs.h, 1490 ListFiles NBCCommon.h, 1128 SysCallConstants, 643 ListFilesType, 984 FileList, 985 Pattern, 985 Result, 985 Loader module, 53 Loader module constants, 669 Loader module error codes, 671 Loader module function constants, 675 Loader module functions, 532 Loader module IOMAP offsets, 670 Loader module types, 530 LoaderErrors LDR_APPENDNOTPOSSIBLE, 672 LDR_BTBUSY, 672 LDR_BTCONNECTFAIL, 672 LDR_BTTIMEOUT, 672 LDR_ENDOFFILE, 672 LDR_EOFEXPECTED, 672 LDR_FILEEXISTS, 672

LDR_FILEISBUSY, 673 LDR_FILEISFULL, 673 LDR_FILENOTFOUND, 673 LDR_FILETX_CLOSEERROR, 673 LDR_FILETX_DSTEXISTS, 673 LDR_FILETX_SRCMISSING, 673 LDR_FILETX_STREAMERROR, 673 LDR_FILETX_TIMEOUT, 673 LDR_HANDLEALREADYCLOSED, 674 LDR_ILLEGALFILENAME, 674 LDR_ILLEGALHANDLE, 674 LDR_INPROGRESS, 674 LDR_INVALIDSEEK, 674 LDR_MODULENOTFOUND, 674 LDR_NOLINEARSPACE, 674 LDR_NOMOREFILES, 674 LDR_NOMOREHANDLES, 674 LDR_NOSPACE, 674 LDR_NOTLINEARFILE, 675 LDR_NOWRITEBUFFERS, 675 LDR_OUTOFBOUNDARY, 675 LDR_REQPIN, 675 LDR_SUCCESS, 675 LDR_UNDEFINEDERROR, 675 LoaderExecuteFunction NBCCommon.h, 1128 SysCallConstants, 643 LoaderExecuteFunctionType, 985 Buffer, 988 Cmd, 988 Filename, 988 Length, 988 Result, 988 LoaderFunctionConstants LDR_CMD_BOOTCMD, 676 LDR_CMD_BTFACTORYRESET, 676 LDR_CMD_BTGETADR, 677 LDR_CMD_CLOSE, 677 LDR_CMD_CLOSEMODHANDLE, 677

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2051

LDR_CMD_CROPDATAFILE, 677 LDR_CMD_DELETE, 677 LDR_CMD_DELETEUSERFLASH, 677 LDR_CMD_DEVICEINFO, 677 LDR_CMD_FINDFIRST, 677 LDR_CMD_FINDFIRSTMODULE, 677 LDR_CMD_FINDNEXT, 677 LDR_CMD_FINDNEXTMODULE, 678 LDR_CMD_IOMAPREAD, 678 LDR_CMD_IOMAPWRITE, 678 LDR_CMD_OPENAPPENDDATA, 678 LDR_CMD_OPENREAD, 678 LDR_CMD_OPENREADLINEAR, 678 LDR_CMD_OPENWRITE, 678 LDR_CMD_OPENWRITEDATA, 678 LDR_CMD_OPENWRITELINEAR, 678 LDR_CMD_POLLCMD, 678 LDR_CMD_POLLCMDLEN, 679 LDR_CMD_READ, 679 LDR_CMD_RENAMEFILE, 679 LDR_CMD_RESIZEDATAFILE, 679 LDR_CMD_SEEKFROMCURRENT, 679 LDR_CMD_SEEKFROMEND, 679 LDR_CMD_SEEKFROMSTART, 679 LDR_CMD_SETBRICKNAME, 679 LDR_CMD_VERSIONS, 679 LDR_CMD_WRITE, 679 LoaderIOMAP LoaderOffsetFreeUserFlash, 670 LoaderOffsetPFunc, 670 LoaderModuleConstants EOF, 670 NULL, 670 LoaderModuleFunctions

CloseFile, 535 CreateFile, 535 CreateFileLinear, 536 CreateFileNonLinear, 537 DeleteFile, 537 FindFirstFile, 538 FindNextFile, 538 FreeMemory, 539 OpenFileAppend, 539 OpenFileRead, 540 OpenFileReadLinear, 540 Read, 541 ReadBytes, 541 ReadLn, 542 ReadLnString, 542 RenameFile, 543 ResizeFile, 543 ResolveHandle, 544 SizeOf, 544 SysFileClose, 544 SysFileDelete, 545 SysFileFindFirst, 545 SysFileFindNext, 545 SysFileOpenAppend, 546 SysFileOpenRead, 546 SysFileOpenReadLinear, 547 SysFileOpenWrite, 547 SysFileOpenWriteLinear, 547 SysFileOpenWriteNonLinear, 548 SysFileRead, 548 SysFileRename, 548 SysFileResize, 549 SysFileResolveHandle, 549 SysFileSeek, 550 SysFileTell, 550 SysFileWrite, 550 SysListFiles, 551 SysLoaderExecuteFunction, 551 Write, 551 WriteBytes, 552 WriteBytesEx, 552 WriteLn, 553 WriteLnString, 553 WriteString, 554 LoaderModuleID ModuleIDConstants, 226

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2052

NBCCommon.h, 1129 LoaderModuleName ModuleNameConstants, 225 NBCCommon.h, 1129 LoaderOffsetFreeUserFlash LoaderIOMAP, 670 NBCCommon.h, 1129 LoaderOffsetPFunc LoaderIOMAP, 670 NBCCommon.h, 1129 Location DrawFontType, 950 DrawGraphicArrayType, 952 DrawGraphicType, 954 DrawPointType, 956 DrawRectType, 959 DrawTextType, 960 LocationType, 988 X, 989 Y, 989 Log cmathAPI, 566 NXCDefs.h, 1337 log cmathAPI, 581 NXCDefs.h, 1491 Log10 cmathAPI, 566 NXCDefs.h, 1337 log10 cmathAPI, 581 NXCDefs.h, 1492 LONG_MAX NBCCommon.h, 1129 NXTLimits, 915 LONG_MIN NBCCommon.h, 1129 NXTLimits, 916 LongAbort NXCDefs.h, 1492 UiModuleFunctions, 522 Loop SoundPlayFileType, 1005 SoundPlayToneType, 1006 Low level LowSpeed module functions, 368

Low Speed module, 55 Low speed module IOMAP offsets, 749 LowLevelLowSpeedModuleFunctions GetLSInputBuffer, 370 GetLSOutputBuffer, 370 LSChannelState, 370 LSErrorType, 371 LSInputBufferBytesToRx, 371 LSInputBufferInPtr, 372 LSInputBufferOutPtr, 372 LSMode, 372 LSNoRestartOnRead, 373 LSOutputBufferBytesToRx, 373 LSOutputBufferInPtr, 373 LSOutputBufferOutPtr, 374 LSSpeed, 374 LSState, 375 LowSpeed module constants, 744 LowSpeed module functions, 352 LowSpeed module system call functions, 375 LowSpeed module types, 352 LOWSPEED_CH_NOT_READY LowSpeedErrorTypeConstants, 748 NBCCommon.h, 1129 LOWSPEED_COMMUNICATING LowSpeedChannelStateConstants, 746 NBCCommon.h, 1129 LOWSPEED_DATA_RECEIVED LowSpeedModeConstants, 747 NBCCommon.h, 1129 LOWSPEED_DONE LowSpeedChannelStateConstants, 746 NBCCommon.h, 1129 LOWSPEED_ERROR LowSpeedChannelStateConstants, 746 NBCCommon.h, 1130 LOWSPEED_IDLE LowSpeedChannelStateConstants, 746 NBCCommon.h, 1130 LOWSPEED_INIT

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2053

LowSpeedChannelStateConstants, 747 NBCCommon.h, 1130 LOWSPEED_LOAD_BUFFER LowSpeedChannelStateConstants, 747 NBCCommon.h, 1130 LOWSPEED_NO_ERROR LowSpeedErrorTypeConstants, 748 NBCCommon.h, 1130 LOWSPEED_RECEIVING LowSpeedModeConstants, 747 NBCCommon.h, 1130 LOWSPEED_RX_ERROR LowSpeedErrorTypeConstants, 748 NBCCommon.h, 1130 LOWSPEED_TRANSMITTING LowSpeedModeConstants, 748 NBCCommon.h, 1130 LOWSPEED_TX_ERROR LowSpeedErrorTypeConstants, 748 NBCCommon.h, 1130 LowspeedBytesReady LowSpeedModuleFunctions, 362 NXCDefs.h, 1493 LowSpeedChannelStateConstants LOWSPEED_COMMUNICATING, 746 LOWSPEED_DONE, 746 LOWSPEED_ERROR, 746 LOWSPEED_IDLE, 746 LOWSPEED_INIT, 747 LOWSPEED_LOAD_BUFFER, 747 LowspeedCheckStatus LowSpeedModuleFunctions, 362 NXCDefs.h, 1493 LowSpeedErrorTypeConstants LOWSPEED_CH_NOT_READY, 748 LOWSPEED_NO_ERROR, 748 LOWSPEED_RX_ERROR, 748 LOWSPEED_TX_ERROR, 748 LowSpeedIOMAP LowSpeedOffsetChannelState, 749 LowSpeedOffsetErrorType, 749 LowSpeedOffsetInBufBuf, 749

LowSpeedOffsetInBufBytesToRx, 750 LowSpeedOffsetInBufInPtr, 750 LowSpeedOffsetInBufOutPtr, 750 LowSpeedOffsetMode, 750 LowSpeedOffsetNoRestartOnRead, 750 LowSpeedOffsetOutBufBuf, 750 LowSpeedOffsetOutBufBytesToRx, 750 LowSpeedOffsetOutBufInPtr, 750 LowSpeedOffsetOutBufOutPtr, 750 LowSpeedOffsetSpeed, 750 LowSpeedOffsetState, 751 LowSpeedModeConstants LOWSPEED_DATA_RECEIVED, 747 LOWSPEED_RECEIVING, 747 LOWSPEED_TRANSMITTING, 748 LowSpeedModuleFunctions CongureTemperatureSensor, 354 I2CBytes, 355 I2CBytesReady, 356 I2CCheckStatus, 356 I2CDeviceId, 357 I2CDeviceInfo, 357 I2CRead, 358 I2CSendCommand, 359 I2CStatus, 359 I2CVendorId, 360 I2CVersion, 360 I2CWrite, 361 LowspeedBytesReady, 362 LowspeedCheckStatus, 362 LowspeedRead, 363 LowspeedStatus, 364 LowspeedWrite, 364 ReadI2CRegister, 365 ReadSensorEMeter, 366 ReadSensorUSEx, 366 SensorTemperature, 367 SensorUS, 367 WriteI2CRegister, 368 LowSpeedModuleID ModuleIDConstants, 227

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2054

NBCCommon.h, 1131 LowSpeedModuleName ModuleNameConstants, 225 NBCCommon.h, 1131 LowSpeedModuleSystemCallFunctions SysCommLSCheckStatus, 376 SysCommLSRead, 376 SysCommLSWrite, 376 SysCommLSWriteEx, 376 LowSpeedNoRestartConstants LSREAD_NO_RESTART_1, 751 LSREAD_NO_RESTART_2, 751 LSREAD_NO_RESTART_3, 751 LSREAD_NO_RESTART_4, 752 LSREAD_NO_RESTART_MASK, 752 LSREAD_RESTART_ALL, 752 LSREAD_RESTART_NONE, 752 LowSpeedOffsetChannelState LowSpeedIOMAP, 749 NBCCommon.h, 1131 LowSpeedOffsetErrorType LowSpeedIOMAP, 749 NBCCommon.h, 1131 LowSpeedOffsetInBufBuf LowSpeedIOMAP, 749 NBCCommon.h, 1131 LowSpeedOffsetInBufBytesToRx LowSpeedIOMAP, 750 NBCCommon.h, 1131 LowSpeedOffsetInBufInPtr LowSpeedIOMAP, 750 NBCCommon.h, 1131 LowSpeedOffsetInBufOutPtr LowSpeedIOMAP, 750 NBCCommon.h, 1131 LowSpeedOffsetMode LowSpeedIOMAP, 750 NBCCommon.h, 1131 LowSpeedOffsetNoRestartOnRead LowSpeedIOMAP, 750 NBCCommon.h, 1131 LowSpeedOffsetOutBufBuf LowSpeedIOMAP, 750 NBCCommon.h, 1132 LowSpeedOffsetOutBufBytesToRx

LowSpeedIOMAP, 750 NBCCommon.h, 1132 LowSpeedOffsetOutBufInPtr LowSpeedIOMAP, 750 NBCCommon.h, 1132 LowSpeedOffsetOutBufOutPtr LowSpeedIOMAP, 750 NBCCommon.h, 1132 LowSpeedOffsetSpeed LowSpeedIOMAP, 750 NBCCommon.h, 1132 LowSpeedOffsetState LowSpeedIOMAP, 751 NBCCommon.h, 1132 LowspeedRead LowSpeedModuleFunctions, 363 NXCDefs.h, 1494 LowSpeedStateConstants COM_CHANNEL_FOUR_ACTIVE, 745 COM_CHANNEL_NONE_ACTIVE, 745 COM_CHANNEL_ONE_ACTIVE, 745 COM_CHANNEL_THREE_ACTIVE, 745 COM_CHANNEL_TWO_ACTIVE, 746 LowspeedStatus LowSpeedModuleFunctions, 364 NXCDefs.h, 1495 LowspeedWrite LowSpeedModuleFunctions, 364 NXCDefs.h, 1495 LR_COULD_NOT_SAVE CommStatusCodesConstants, 805 NBCCommon.h, 1132 LR_ENTRY_REMOVED CommStatusCodesConstants, 805 NBCCommon.h, 1132 LR_STORE_IS_FULL CommStatusCodesConstants, 805 NBCCommon.h, 1132 LR_SUCCESS CommStatusCodesConstants, 805 NBCCommon.h, 1132

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2055

LR_UNKNOWN_ADDR CommStatusCodesConstants, 806 NBCCommon.h, 1133 LSChannelState LowLevelLowSpeedModuleFunctions, 370 NXCDefs.h, 1496 LSChannelState constants, 746 LSErrorType LowLevelLowSpeedModuleFunctions, 371 NXCDefs.h, 1496 LSErrorType constants, 748 LSInputBufferBytesToRx LowLevelLowSpeedModuleFunctions, 371 NXCDefs.h, 1497 LSInputBufferInPtr LowLevelLowSpeedModuleFunctions, 372 NXCDefs.h, 1497 LSInputBufferOutPtr LowLevelLowSpeedModuleFunctions, 372 NXCDefs.h, 1498 LSMode LowLevelLowSpeedModuleFunctions, 372 NXCDefs.h, 1498 LSMode constants, 747 LSNoRestartOnRead LowLevelLowSpeedModuleFunctions, 373 NXCDefs.h, 1498 LSNoRestartOnRead constants, 751 LSOutputBufferBytesToRx LowLevelLowSpeedModuleFunctions, 373 NXCDefs.h, 1499 LSOutputBufferInPtr LowLevelLowSpeedModuleFunctions, 373 NXCDefs.h, 1499 LSOutputBufferOutPtr LowLevelLowSpeedModuleFunctions, 374

NXCDefs.h, 1500 LSREAD_NO_RESTART_1 LowSpeedNoRestartConstants, 751 NBCCommon.h, 1133 LSREAD_NO_RESTART_2 LowSpeedNoRestartConstants, 751 NBCCommon.h, 1133 LSREAD_NO_RESTART_3 LowSpeedNoRestartConstants, 751 NBCCommon.h, 1133 LSREAD_NO_RESTART_4 LowSpeedNoRestartConstants, 752 NBCCommon.h, 1133 LSREAD_NO_RESTART_MASK LowSpeedNoRestartConstants, 752 NBCCommon.h, 1133 LSREAD_RESTART_ALL LowSpeedNoRestartConstants, 752 NBCCommon.h, 1133 LSREAD_RESTART_NONE LowSpeedNoRestartConstants, 752 NBCCommon.h, 1133 LSSpeed LowLevelLowSpeedModuleFunctions, 374 NXCDefs.h, 1500 LSState LowLevelLowSpeedModuleFunctions, 375 NXCDefs.h, 1500 LSState constants, 745 Mailbox constants, 656 MAILBOX1 MailboxConstants, 657 NBCCommon.h, 1133 MAILBOX10 MailboxConstants, 657 NBCCommon.h, 1134 MAILBOX2 MailboxConstants, 657 NBCCommon.h, 1134 MAILBOX3 MailboxConstants, 657 NBCCommon.h, 1134 MAILBOX4

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2056

MailboxConstants, 657 NBCCommon.h, 1134 MAILBOX5 MailboxConstants, 657 NBCCommon.h, 1134 MAILBOX6 MailboxConstants, 658 NBCCommon.h, 1134 MAILBOX7 MailboxConstants, 658 NBCCommon.h, 1134 MAILBOX8 MailboxConstants, 658 NBCCommon.h, 1134 MAILBOX9 MailboxConstants, 658 NBCCommon.h, 1134 MailboxConstants MAILBOX1, 657 MAILBOX10, 657 MAILBOX2, 657 MAILBOX3, 657 MAILBOX4, 657 MAILBOX5, 657 MAILBOX6, 658 MAILBOX7, 658 MAILBOX8, 658 MAILBOX9, 658 MAX_BT_MSG_SIZE CommMiscConstants, 782 NBCCommon.h, 1135 MaxAccelerationField NBCCommon.h, 1135 OutputFieldConstants, 736 MaxSpeedField NBCCommon.h, 1135 OutputFieldConstants, 736 MaxVal UpdateCalibCacheInfoType, 1010 memcmp cstringAPI, 616 NXCDefs.h, 1501 memcpy cstringAPI, 616 NXCDefs.h, 1501 memmove

cstringAPI, 617 NXCDefs.h, 1501 MemoryManager NBCCommon.h, 1135 SysCallConstants, 643 MemoryManagerType, 990 Compact, 990 DataspaceSize, 990 PoolSize, 990 Result, 991 MENUICON_CENTER DisplayModuleConstants, 764 NBCCommon.h, 1135 MENUICON_LEFT DisplayModuleConstants, 764 NBCCommon.h, 1135 MENUICON_RIGHT DisplayModuleConstants, 764 NBCCommon.h, 1135 MENUICONS DisplayModuleConstants, 764 NBCCommon.h, 1135 MENUTEXT DisplayModuleConstants, 764 NBCCommon.h, 1135 Message DatalogWriteType, 943 MessageReadType, 992 MessageWriteType, 993 MessageRead NBCCommon.h, 1136 SysCallConstants, 643 MessageReadType, 991 Message, 992 QueueID, 992 Remove, 992 Result, 992 MessageWrite NBCCommon.h, 1136 SysCallConstants, 643 MessageWriteType, 992 Message, 993 QueueID, 993 Result, 993 MidStr cstringAPI, 617

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2057

NXCDefs.h, 1502 MIN_1 NBCCommon.h, 1136 TimeConstants, 649 MindSensors ACCL-Nx constants, 883 MindSensors ACCL-Nx sensitivity level constants, 886 MindSensors API Functions, 108 MindSensors device constants, 871 MindSensors DIST-Nx constants, 876 MindSensors nRLink constants, 881 MindSensors NXTHID commands, 903 MindSensors NXTHID constants, 900 MindSensors NXTHID modier keys, 901 MindSensors NXTHID registers, 901 MindSensors NXTLineLeader commands, 911 MindSensors NXTLineLeader constants, 908 MindSensors NXTLineLeader registers, 908 MindSensors NXTPowerMeter commands, 906 MindSensors NXTPowerMeter constants, 904 MindSensors NXTPowerMeter registers, 904 MindSensors NXTServo commands, 898 MindSensors NXTServo constants, 891 MindSensors NXTServo position constants, 895 MindSensors NXTServo quick position constants, 896 MindSensors NXTServo registers, 891 MindSensors NXTServo servo numbers, 897 MindSensors NXTSumoEyes constants, 907 MindSensors PFMate constants, 887 MindSensors PSP-Nx button set 1 constants, 879 MindSensors PSP-Nx button set 2 constants, 880 MindSensors PSP-Nx constants, 877 MindSensorsAPI
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

ACCLNxCalibrateX, 124 ACCLNxCalibrateXEnd, 125 ACCLNxCalibrateY, 125 ACCLNxCalibrateYEnd, 126 ACCLNxCalibrateZ, 126 ACCLNxCalibrateZEnd, 127 ACCLNxResetCalibration, 127 ACCLNxSensitivity, 127 ACCLNxXOffset, 128 ACCLNxXRange, 128 ACCLNxYOffset, 129 ACCLNxYRange, 129 ACCLNxZOffset, 130 ACCLNxZRange, 130 DISTNxDistance, 130 DISTNxGP2D12, 131 DISTNxGP2D120, 131 DISTNxGP2YA02, 132 DISTNxGP2YA21, 132 DISTNxMaxDistance, 133 DISTNxMinDistance, 133 DISTNxModuleType, 134 DISTNxNumPoints, 134 DISTNxVoltage, 134 MSADPAOff, 135 MSADPAOn, 135 MSDeenergize, 136 MSEnergize, 136 MSIRTrain, 137 MSPFComboDirect, 137 MSPFComboPWM, 138 MSPFRawOutput, 138 MSPFRepeat, 139 MSPFSingleOutputCST, 140 MSPFSingleOutputPWM, 140 MSPFSinglePin, 141 MSPFTrain, 142 MSRCXAbsVar, 142 MSRCXAddToDatalog, 143 MSRCXAndVar, 143 MSRCXBatteryLevel, 144 MSRCXBoot, 144 MSRCXCalibrateEvent, 144 MSRCXClearAllEvents, 144 MSRCXClearCounter, 145 MSRCXClearMsg, 145

INDEX

2058

MSRCXClearSensor, 145 MSRCXClearSound, 145 MSRCXClearTimer, 146 MSRCXCreateDatalog, 146 MSRCXDecCounter, 146 MSRCXDeleteSub, 147 MSRCXDeleteSubs, 147 MSRCXDeleteTask, 147 MSRCXDeleteTasks, 147 MSRCXDisableOutput, 148 MSRCXDivVar, 148 MSRCXEnableOutput, 148 MSRCXEvent, 149 MSRCXFloat, 149 MSRCXFwd, 149 MSRCXIncCounter, 150 MSRCXInvertOutput, 150 MSRCXMulVar, 150 MSRCXMuteSound, 151 MSRCXObvertOutput, 151 MSRCXOff, 151 MSRCXOn, 151 MSRCXOnFor, 152 MSRCXOnFwd, 152 MSRCXOnRev, 152 MSRCXOrVar, 153 MSRCXPBTurnOff, 153 MSRCXPing, 153 MSRCXPlaySound, 154 MSRCXPlayTone, 154 MSRCXPlayToneVar, 154 MSRCXPoll, 155 MSRCXPollMemory, 155 MSRCXRemote, 155 MSRCXReset, 156 MSRCXRev, 156 MSRCXSelectDisplay, 156 MSRCXSelectProgram, 157 MSRCXSendSerial, 157 MSRCXSet, 157 MSRCXSetDirection, 158 MSRCXSetEvent, 158 MSRCXSetGlobalDirection, 158 MSRCXSetGlobalOutput, 159 MSRCXSetMaxPower, 159 MSRCXSetMessage, 160
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

MSRCXSetNRLinkPort, 160 MSRCXSetOutput, 160 MSRCXSetPower, 161 MSRCXSetPriority, 161 MSRCXSetSensorMode, 161 MSRCXSetSensorType, 162 MSRCXSetSleepTime, 162 MSRCXSetTxPower, 162 MSRCXSetUserDisplay, 163 MSRCXSetVar, 163 MSRCXSetWatch, 163 MSRCXSgnVar, 164 MSRCXStartTask, 164 MSRCXStopAllTasks, 164 MSRCXStopTask, 165 MSRCXSubVar, 165 MSRCXSumVar, 165 MSRCXToggle, 166 MSRCXUnlock, 166 MSRCXUnmuteSound, 166 MSReadValue, 166 MSScoutCalibrateSensor, 167 MSScoutMuteSound, 167 MSScoutSelectSounds, 167 MSScoutSendVLL, 168 MSScoutSetCounterLimit, 168 MSScoutSetEventFeedback, 168 MSScoutSetLight, 169 MSScoutSetScoutMode, 169 MSScoutSetScoutRules, 169 MSScoutSetSensorClickTime, 170 MSScoutSetSensorHysteresis, 170 MSScoutSetSensorLowerLimit, 171 MSScoutSetSensorUpperLimit, 171 MSScoutSetTimerLimit, 171 MSScoutUnmuteSound, 172 NRLink2400, 172 NRLink4800, 172 NRLinkFlush, 173 NRLinkIRLong, 173 NRLinkIRShort, 174 NRLinkSetPF, 174 NRLinkSetRCX, 175 NRLinkSetTrain, 175 NRLinkStatus, 175 NRLinkTxRaw, 176

INDEX

2059

NXTHIDAsciiMode, 176 NXTHIDDirectMode, 177 NXTHIDLoadCharacter, 177 NXTHIDTransmit, 178 NXTLineLeaderAverage, 178 NXTLineLeaderCalibrateBlack, 179 NXTLineLeaderCalibrateWhite, 179 NXTLineLeaderInvert, 180 NXTLineLeaderPowerDown, 180 NXTLineLeaderPowerUp, 181 NXTLineLeaderReset, 181 NXTLineLeaderResult, 182 NXTLineLeaderSnapshot, 182 NXTLineLeaderSteering, 183 NXTPowerMeterCapacityUsed, 183 NXTPowerMeterElapsedTime, 184 NXTPowerMeterErrorCount, 184 NXTPowerMeterMaxCurrent, 185 NXTPowerMeterMaxVoltage, 185 NXTPowerMeterMinCurrent, 186 NXTPowerMeterMinVoltage, 186 NXTPowerMeterPresentCurrent, 187 NXTPowerMeterPresentPower, 187 NXTPowerMeterPresentVoltage, 187 NXTPowerMeterResetCounters, 188 NXTPowerMeterTotalPowerConsumed, 188 NXTServoBatteryVoltage, 189 NXTServoEditMacro, 189 NXTServoGotoMacroAddress, 190 NXTServoHaltMacro, 190 NXTServoInit, 191 NXTServoPauseMacro, 191 NXTServoPosition, 192 NXTServoQuitEdit, 192 NXTServoReset, 193 NXTServoResumeMacro, 193 NXTServoSpeed, 194 PFMateSend, 194 PFMateSendRaw, 195 PSPNxAnalog, 196 PSPNxDigital, 196 ReadNRLinkBytes, 197

ReadSensorMSAccel, 197 ReadSensorMSPlayStation, 198 ReadSensorMSRTClock, 198 ReadSensorMSTilt, 199 RunNRLinkMacro, 200 SensorMSCompass, 200 SensorMSDROD, 201 SensorMSPressure, 201 SensorMSPressureRaw, 201 SensorNXTSumoEyes, 202 SensorNXTSumoEyesRaw, 202 SetACCLNxSensitivity, 203 SetNXTLineLeaderKdFactor, 203 SetNXTLineLeaderKdValue, 204 SetNXTLineLeaderKiFactor, 204 SetNXTLineLeaderKiValue, 205 SetNXTLineLeaderKpFactor, 205 SetNXTLineLeaderKpValue, 206 SetNXTLineLeaderSetpoint, 207 SetNXTServoPosition, 207 SetNXTServoQuickPosition, 208 SetNXTServoSpeed, 208 SetSensorMSDROD, 209 SetSensorMSPressure, 209 SetSensorNXTSumoEyes, 209 WriteNRLinkBytes, 210 MindSensorsConstants MS_ADDR_ACCLNX, 872 MS_ADDR_CMPSNX, 873 MS_ADDR_DISTNX, 873 MS_ADDR_IVSENS, 873 MS_ADDR_LINELDR, 873 MS_ADDR_MTRMUX, 873 MS_ADDR_NRLINK, 873 MS_ADDR_NXTCAM, 874 MS_ADDR_NXTHID, 874 MS_ADDR_NXTMMX, 874 MS_ADDR_NXTSERVO, 874 MS_ADDR_NXTSERVO_EM, 874 MS_ADDR_PFMATE, 874 MS_ADDR_PSPNX, 875 MS_ADDR_RTCLOCK, 875 MS_ADDR_RXMUX, 875 MS_CMD_ADPA_OFF, 875 MS_CMD_ADPA_ON, 875 MS_CMD_DEENERGIZED, 875

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2060

MS_CMD_ENERGIZED, 875 MinVal UpdateCalibCacheInfoType, 1010 MiscConstants DEGREES_PER_RADIAN, 228 FALSE, 228 NA, 228 PI, 228 RADIANS_PER_DEGREE, 228 TRUE, 229 Miscellaneous Comm module constants, 781 Miscellaneous NBC/NXC constants, 227 Mode CommHSControlType, 932 OutputStateType, 994 ModuleID IOMapReadByIDType, 977 IOMapWriteByIDType, 980 ModuleIDConstants ButtonModuleID, 226 CommandModuleID, 226 CommModuleID, 226 DisplayModuleID, 226 InputModuleID, 226 IOCtrlModuleID, 226 LoaderModuleID, 226 LowSpeedModuleID, 227 OutputModuleID, 227 SoundModuleID, 227 UIModuleID, 227 ModuleName IOMapReadType, 979 IOMapWriteType, 982 ModuleNameConstants ButtonModuleName, 224 CommandModuleName, 224 CommModuleName, 224 DisplayModuleName, 224 InputModuleName, 224 IOCtrlModuleName, 224 LoaderModuleName, 225 LowSpeedModuleName, 225 OutputModuleName, 225 SoundModuleName, 225 UIModuleName, 225

MotorActualSpeed NXCDefs.h, 1502 OutputModuleFunctions, 285 MotorBlockTachoCount NXCDefs.h, 1503 OutputModuleFunctions, 286 MotorMaxAcceleration NXCDefs.h, 1503 OutputModuleFunctions, 286 MotorMaxSpeed NXCDefs.h, 1504 OutputModuleFunctions, 287 MotorMode NXCDefs.h, 1504 OutputModuleFunctions, 287 MotorOutputOptions NXCDefs.h, 1504 OutputModuleFunctions, 287 MotorOverload NXCDefs.h, 1505 OutputModuleFunctions, 288 MotorPower NXCDefs.h, 1505 OutputModuleFunctions, 288 MotorPwnFreq NXCDefs.h, 1505 OutputModuleFunctions, 289 MotorRegDValue NXCDefs.h, 1506 OutputModuleFunctions, 289 MotorRegIValue NXCDefs.h, 1506 OutputModuleFunctions, 289 MotorRegPValue NXCDefs.h, 1507 OutputModuleFunctions, 290 MotorRegulation NXCDefs.h, 1507 OutputModuleFunctions, 290 MotorRegulationOptions NXCDefs.h, 1507 OutputModuleFunctions, 290 MotorRegulationTime NXCDefs.h, 1508 OutputModuleFunctions, 291 MotorRotationCount

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2061

NXCDefs.h, 1508 OutputModuleFunctions, 291 MotorRunState NXCDefs.h, 1508 OutputModuleFunctions, 291 MotorTachoCount NXCDefs.h, 1509 OutputModuleFunctions, 292 MotorTachoLimit NXCDefs.h, 1509 OutputModuleFunctions, 292 MotorTurnRatio NXCDefs.h, 1510 OutputModuleFunctions, 293 MS_1 NBCCommon.h, 1136 TimeConstants, 649 MS_10 NBCCommon.h, 1136 TimeConstants, 650 MS_100 NBCCommon.h, 1136 TimeConstants, 650 MS_150 NBCCommon.h, 1136 TimeConstants, 650 MS_2 NBCCommon.h, 1137 TimeConstants, 650 MS_20 NBCCommon.h, 1137 TimeConstants, 650 MS_200 NBCCommon.h, 1137 TimeConstants, 650 MS_250 NBCCommon.h, 1137 TimeConstants, 651 MS_3 NBCCommon.h, 1137 TimeConstants, 651 MS_30 NBCCommon.h, 1137 TimeConstants, 651 MS_300 NBCCommon.h, 1137

TimeConstants, 651 MS_350 NBCCommon.h, 1137 TimeConstants, 651 MS_4 NBCCommon.h, 1138 TimeConstants, 651 MS_40 NBCCommon.h, 1138 TimeConstants, 651 MS_400 NBCCommon.h, 1138 TimeConstants, 651 MS_450 NBCCommon.h, 1138 TimeConstants, 651 MS_5 NBCCommon.h, 1138 TimeConstants, 652 MS_50 NBCCommon.h, 1138 TimeConstants, 652 MS_500 NBCCommon.h, 1138 TimeConstants, 652 MS_6 NBCCommon.h, 1139 TimeConstants, 652 MS_60 NBCCommon.h, 1139 TimeConstants, 652 MS_600 NBCCommon.h, 1139 TimeConstants, 652 MS_7 NBCCommon.h, 1139 TimeConstants, 652 MS_70 NBCCommon.h, 1139 TimeConstants, 653 MS_700 NBCCommon.h, 1139 TimeConstants, 653 MS_8 NBCCommon.h, 1139 TimeConstants, 653

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2062

MS_80 NBCCommon.h, 1139 TimeConstants, 653 MS_800 NBCCommon.h, 1139 TimeConstants, 653 MS_9 NBCCommon.h, 1139 TimeConstants, 653 MS_90 NBCCommon.h, 1140 TimeConstants, 653 MS_900 NBCCommon.h, 1140 TimeConstants, 653 MS_ADDR_ACCLNX MindSensorsConstants, 872 NBCCommon.h, 1140 MS_ADDR_CMPSNX MindSensorsConstants, 873 NBCCommon.h, 1140 MS_ADDR_DISTNX MindSensorsConstants, 873 NBCCommon.h, 1140 MS_ADDR_IVSENS MindSensorsConstants, 873 NBCCommon.h, 1141 MS_ADDR_LINELDR MindSensorsConstants, 873 NBCCommon.h, 1141 MS_ADDR_MTRMUX MindSensorsConstants, 873 NBCCommon.h, 1141 MS_ADDR_NRLINK MindSensorsConstants, 873 NBCCommon.h, 1141 MS_ADDR_NXTCAM MindSensorsConstants, 874 NBCCommon.h, 1141 MS_ADDR_NXTHID MindSensorsConstants, 874 NBCCommon.h, 1141 MS_ADDR_NXTMMX MindSensorsConstants, 874 NBCCommon.h, 1142 MS_ADDR_NXTSERVO

MindSensorsConstants, 874 NBCCommon.h, 1142 MS_ADDR_NXTSERVO_EM MindSensorsConstants, 874 NBCCommon.h, 1142 MS_ADDR_PFMATE MindSensorsConstants, 874 NBCCommon.h, 1142 MS_ADDR_PSPNX MindSensorsConstants, 875 NBCCommon.h, 1142 MS_ADDR_RTCLOCK MindSensorsConstants, 875 NBCCommon.h, 1142 MS_ADDR_RXMUX MindSensorsConstants, 875 NBCCommon.h, 1143 MS_CMD_ADPA_OFF MindSensorsConstants, 875 NBCCommon.h, 1143 MS_CMD_ADPA_ON MindSensorsConstants, 875 NBCCommon.h, 1143 MS_CMD_DEENERGIZED MindSensorsConstants, 875 NBCCommon.h, 1143 MS_CMD_ENERGIZED MindSensorsConstants, 875 NBCCommon.h, 1143 MSACCLNx ACCL_CMD_RESET_CAL, 884 ACCL_CMD_X_CAL, 884 ACCL_CMD_X_CAL_END, 884 ACCL_CMD_Y_CAL, 885 ACCL_CMD_Y_CAL_END, 885 ACCL_CMD_Z_CAL, 885 ACCL_CMD_Z_CAL_END, 885 ACCL_REG_SENS_LVL, 885 ACCL_REG_X_ACCEL, 885 ACCL_REG_X_OFFSET, 885 ACCL_REG_X_RANGE, 885 ACCL_REG_X_TILT, 885 ACCL_REG_Y_ACCEL, 885 ACCL_REG_Y_OFFSET, 886 ACCL_REG_Y_RANGE, 886 ACCL_REG_Y_TILT, 886

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2063

ACCL_REG_Z_ACCEL, 886 ACCL_REG_Z_OFFSET, 886 ACCL_REG_Z_RANGE, 886 ACCL_REG_Z_TILT, 886 MSACCLNxSLevel ACCL_SENSITIVITY_LEVEL_1, 887 ACCL_SENSITIVITY_LEVEL_2, 887 ACCL_SENSITIVITY_LEVEL_3, 887 ACCL_SENSITIVITY_LEVEL_4, 887 MSADPAOff MindSensorsAPI, 135 NXCDefs.h, 1510 MSADPAOn MindSensorsAPI, 135 NXCDefs.h, 1510 MSDeenergize MindSensorsAPI, 136 NXCDefs.h, 1511 MSDistNX DIST_CMD_CUSTOM, 876 DIST_CMD_GP2D12, 876 DIST_CMD_GP2D120, 876 DIST_CMD_GP2YA02, 876 DIST_CMD_GP2YA21, 876 DIST_REG_DIST, 877 DIST_REG_DIST1, 877 DIST_REG_DIST_MAX, 877 DIST_REG_DIST_MIN, 877 DIST_REG_MODULE_TYPE, 877 DIST_REG_NUM_POINTS, 877 DIST_REG_VOLT, 877 DIST_REG_VOLT1, 877 MSEnergize MindSensorsAPI, 136 NXCDefs.h, 1511 MSIRTrain MindSensorsAPI, 137 NXCDefs.h, 1512 MSNRLink NRLINK_CMD_2400, 882 NRLINK_CMD_4800, 882 NRLINK_CMD_FLUSH, 882

NRLINK_CMD_IR_LONG, 882 NRLINK_CMD_IR_SHORT, 882 NRLINK_CMD_RUN_MACRO, 882 NRLINK_CMD_SET_PF, 883 NRLINK_CMD_SET_RCX, 883 NRLINK_CMD_SET_TRAIN, 883 NRLINK_CMD_TX_RAW, 883 NRLINK_REG_BYTES, 883 NRLINK_REG_DATA, 883 NRLINK_REG_EEPROM, 883 MSPFComboDirect MindSensorsAPI, 137 NXCDefs.h, 1512 MSPFComboPWM MindSensorsAPI, 138 NXCDefs.h, 1513 MSPFRawOutput MindSensorsAPI, 138 NXCDefs.h, 1514 MSPFRepeat MindSensorsAPI, 139 NXCDefs.h, 1514 MSPFSingleOutputCST MindSensorsAPI, 140 NXCDefs.h, 1515 MSPFSingleOutputPWM MindSensorsAPI, 140 NXCDefs.h, 1515 MSPFSinglePin MindSensorsAPI, 141 NXCDefs.h, 1516 MSPFTrain MindSensorsAPI, 142 NXCDefs.h, 1517 MSPSPNX PSP_CMD_ANALOG, 878 PSP_CMD_DIGITAL, 878 PSP_REG_BTNSET1, 878 PSP_REG_BTNSET2, 878 PSP_REG_XLEFT, 878 PSP_REG_XRIGHT, 879 PSP_REG_YLEFT, 879 PSP_REG_YRIGHT, 879 MSPSPNXBtnSet1 PSP_BTNSET1_DOWN, 879

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2064

PSP_BTNSET1_L3, 879 PSP_BTNSET1_LEFT, 880 PSP_BTNSET1_R3, 880 PSP_BTNSET1_RIGHT, 880 PSP_BTNSET1_UP, 880 MSPSPNXBtnSet2 PSP_BTNSET2_CIRCLE, 881 PSP_BTNSET2_CROSS, 881 PSP_BTNSET2_L1, 881 PSP_BTNSET2_L2, 881 PSP_BTNSET2_R1, 881 PSP_BTNSET2_R2, 881 PSP_BTNSET2_SQUARE, 881 PSP_BTNSET2_TRIANGLE, 881 MSRCXAbsVar MindSensorsAPI, 142 NXCDefs.h, 1517 MSRCXAddToDatalog MindSensorsAPI, 143 NXCDefs.h, 1518 MSRCXAndVar MindSensorsAPI, 143 NXCDefs.h, 1518 MSRCXBatteryLevel MindSensorsAPI, 144 NXCDefs.h, 1519 MSRCXBoot MindSensorsAPI, 144 NXCDefs.h, 1519 MSRCXCalibrateEvent MindSensorsAPI, 144 NXCDefs.h, 1519 MSRCXClearAllEvents MindSensorsAPI, 144 NXCDefs.h, 1519 MSRCXClearCounter MindSensorsAPI, 145 NXCDefs.h, 1520 MSRCXClearMsg MindSensorsAPI, 145 NXCDefs.h, 1520 MSRCXClearSensor MindSensorsAPI, 145 NXCDefs.h, 1520 MSRCXClearSound MindSensorsAPI, 145

NXCDefs.h, 1520 MSRCXClearTimer MindSensorsAPI, 146 NXCDefs.h, 1521 MSRCXCreateDatalog MindSensorsAPI, 146 NXCDefs.h, 1521 MSRCXDecCounter MindSensorsAPI, 146 NXCDefs.h, 1521 MSRCXDeleteSub MindSensorsAPI, 147 NXCDefs.h, 1522 MSRCXDeleteSubs MindSensorsAPI, 147 NXCDefs.h, 1522 MSRCXDeleteTask MindSensorsAPI, 147 NXCDefs.h, 1522 MSRCXDeleteTasks MindSensorsAPI, 147 NXCDefs.h, 1522 MSRCXDisableOutput MindSensorsAPI, 148 NXCDefs.h, 1523 MSRCXDivVar MindSensorsAPI, 148 NXCDefs.h, 1523 MSRCXEnableOutput MindSensorsAPI, 148 NXCDefs.h, 1523 MSRCXEvent MindSensorsAPI, 149 NXCDefs.h, 1524 MSRCXFloat MindSensorsAPI, 149 NXCDefs.h, 1524 MSRCXFwd MindSensorsAPI, 149 NXCDefs.h, 1524 MSRCXIncCounter MindSensorsAPI, 150 NXCDefs.h, 1525 MSRCXInvertOutput MindSensorsAPI, 150 NXCDefs.h, 1525

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2065

MSRCXMulVar MindSensorsAPI, 150 NXCDefs.h, 1525 MSRCXMuteSound MindSensorsAPI, 151 NXCDefs.h, 1526 MSRCXObvertOutput MindSensorsAPI, 151 NXCDefs.h, 1526 MSRCXOff MindSensorsAPI, 151 NXCDefs.h, 1526 MSRCXOn MindSensorsAPI, 151 NXCDefs.h, 1526 MSRCXOnFor MindSensorsAPI, 152 NXCDefs.h, 1527 MSRCXOnFwd MindSensorsAPI, 152 NXCDefs.h, 1527 MSRCXOnRev MindSensorsAPI, 152 NXCDefs.h, 1527 MSRCXOrVar MindSensorsAPI, 153 NXCDefs.h, 1528 MSRCXPBTurnOff MindSensorsAPI, 153 NXCDefs.h, 1528 MSRCXPing MindSensorsAPI, 153 NXCDefs.h, 1528 MSRCXPlaySound MindSensorsAPI, 154 NXCDefs.h, 1529 MSRCXPlayTone MindSensorsAPI, 154 NXCDefs.h, 1529 MSRCXPlayToneVar MindSensorsAPI, 154 NXCDefs.h, 1529 MSRCXPoll MindSensorsAPI, 155 NXCDefs.h, 1530 MSRCXPollMemory

MindSensorsAPI, 155 NXCDefs.h, 1530 MSRCXRemote MindSensorsAPI, 155 NXCDefs.h, 1530 MSRCXReset MindSensorsAPI, 156 NXCDefs.h, 1531 MSRCXRev MindSensorsAPI, 156 NXCDefs.h, 1531 MSRCXSelectDisplay MindSensorsAPI, 156 NXCDefs.h, 1531 MSRCXSelectProgram MindSensorsAPI, 157 NXCDefs.h, 1532 MSRCXSendSerial MindSensorsAPI, 157 NXCDefs.h, 1532 MSRCXSet MindSensorsAPI, 157 NXCDefs.h, 1532 MSRCXSetDirection MindSensorsAPI, 158 NXCDefs.h, 1533 MSRCXSetEvent MindSensorsAPI, 158 NXCDefs.h, 1533 MSRCXSetGlobalDirection MindSensorsAPI, 158 NXCDefs.h, 1533 MSRCXSetGlobalOutput MindSensorsAPI, 159 NXCDefs.h, 1534 MSRCXSetMaxPower MindSensorsAPI, 159 NXCDefs.h, 1534 MSRCXSetMessage MindSensorsAPI, 160 NXCDefs.h, 1535 MSRCXSetNRLinkPort MindSensorsAPI, 160 NXCDefs.h, 1535 MSRCXSetOutput MindSensorsAPI, 160

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2066

NXCDefs.h, 1535 MSRCXSetPower MindSensorsAPI, 161 NXCDefs.h, 1536 MSRCXSetPriority MindSensorsAPI, 161 NXCDefs.h, 1536 MSRCXSetSensorMode MindSensorsAPI, 161 NXCDefs.h, 1536 MSRCXSetSensorType MindSensorsAPI, 162 NXCDefs.h, 1537 MSRCXSetSleepTime MindSensorsAPI, 162 NXCDefs.h, 1537 MSRCXSetTxPower MindSensorsAPI, 162 NXCDefs.h, 1537 MSRCXSetUserDisplay MindSensorsAPI, 163 NXCDefs.h, 1538 MSRCXSetVar MindSensorsAPI, 163 NXCDefs.h, 1538 MSRCXSetWatch MindSensorsAPI, 163 NXCDefs.h, 1538 MSRCXSgnVar MindSensorsAPI, 164 NXCDefs.h, 1539 MSRCXStartTask MindSensorsAPI, 164 NXCDefs.h, 1539 MSRCXStopAllTasks MindSensorsAPI, 164 NXCDefs.h, 1539 MSRCXStopTask MindSensorsAPI, 165 NXCDefs.h, 1540 MSRCXSubVar MindSensorsAPI, 165 NXCDefs.h, 1540 MSRCXSumVar MindSensorsAPI, 165 NXCDefs.h, 1540

MSRCXToggle MindSensorsAPI, 166 NXCDefs.h, 1541 MSRCXUnlock MindSensorsAPI, 166 NXCDefs.h, 1541 MSRCXUnmuteSound MindSensorsAPI, 166 NXCDefs.h, 1541 MSReadValue MindSensorsAPI, 166 NXCDefs.h, 1541 MSScoutCalibrateSensor MindSensorsAPI, 167 NXCDefs.h, 1542 MSScoutMuteSound MindSensorsAPI, 167 NXCDefs.h, 1542 MSScoutSelectSounds MindSensorsAPI, 167 NXCDefs.h, 1542 MSScoutSendVLL MindSensorsAPI, 168 NXCDefs.h, 1543 MSScoutSetCounterLimit MindSensorsAPI, 168 NXCDefs.h, 1543 MSScoutSetEventFeedback MindSensorsAPI, 168 NXCDefs.h, 1543 MSScoutSetLight MindSensorsAPI, 169 NXCDefs.h, 1544 MSScoutSetScoutMode MindSensorsAPI, 169 NXCDefs.h, 1544 MSScoutSetScoutRules MindSensorsAPI, 169 NXCDefs.h, 1544 MSScoutSetSensorClickTime MindSensorsAPI, 170 NXCDefs.h, 1545 MSScoutSetSensorHysteresis MindSensorsAPI, 170 NXCDefs.h, 1545 MSScoutSetSensorLowerLimit

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2067

MindSensorsAPI, 171 NXCDefs.h, 1546 MSScoutSetSensorUpperLimit MindSensorsAPI, 171 NXCDefs.h, 1546 MSScoutSetTimerLimit MindSensorsAPI, 171 NXCDefs.h, 1546 MSScoutUnmuteSound MindSensorsAPI, 172 NXCDefs.h, 1547 MulDiv32 cmathAPI, 567 NXCDefs.h, 1337 muldiv32 cmathAPI, 582 NXCDefs.h, 1547 NA MiscConstants, 228 NBCCommon.h, 1143 Name CommBTConnectionType, 925 CommExecuteFunctionType, 930 ComputeCalibValueType, 940 UpdateCalibCacheInfoType, 1010 NBC Input port constants, 709 NBC sensor mode constants, 713 NBC sensor type constants, 710 NBCCommon.h, 1012 ACCL_CMD_RESET_CAL, 1053 ACCL_CMD_X_CAL, 1053 ACCL_CMD_X_CAL_END, 1053 ACCL_CMD_Y_CAL, 1053 ACCL_CMD_Y_CAL_END, 1053 ACCL_CMD_Z_CAL, 1053 ACCL_CMD_Z_CAL_END, 1053 ACCL_REG_SENS_LVL, 1053 ACCL_REG_X_ACCEL, 1053 ACCL_REG_X_OFFSET, 1054 ACCL_REG_X_RANGE, 1054 ACCL_REG_X_TILT, 1054 ACCL_REG_Y_ACCEL, 1054 ACCL_REG_Y_OFFSET, 1054 ACCL_REG_Y_RANGE, 1054 ACCL_REG_Y_TILT, 1054

ACCL_REG_Z_ACCEL, 1054 ACCL_REG_Z_OFFSET, 1054 ACCL_REG_Z_RANGE, 1054 ACCL_REG_Z_TILT, 1055 ACCL_SENSITIVITY_LEVEL_1, 1055 ACCL_SENSITIVITY_LEVEL_2, 1055 ACCL_SENSITIVITY_LEVEL_3, 1055 ACCL_SENSITIVITY_LEVEL_4, 1055 ActualSpeedField, 1055 BITMAP_1, 1055 BITMAP_2, 1055 BITMAP_3, 1056 BITMAP_4, 1056 BITMAPS, 1056 BlockTachoCountField, 1056 BREAKOUT_REQ, 1056 BT_ARM_CMD_MODE, 1056 BT_ARM_DATA_MODE, 1056 BT_ARM_OFF, 1056 BT_BRICK_PORT_OPEN, 1057 BT_BRICK_VISIBILITY, 1057 BT_CMD_BYTE, 1057 BT_CMD_READY, 1057 BT_CONNECTION_0_ENABLE, 1057 BT_CONNECTION_1_ENABLE, 1057 BT_CONNECTION_2_ENABLE, 1057 BT_CONNECTION_3_ENABLE, 1057 BT_DEFAULT_INQUIRY_MAX, 1057 BT_DEFAULT_INQUIRY_TIMEOUT_LO, 1057 BT_DEVICE_AWAY, 1058 BT_DEVICE_EMPTY, 1058 BT_DEVICE_KNOWN, 1058 BT_DEVICE_NAME, 1058 BT_DEVICE_UNKNOWN, 1058 BT_DISABLE, 1058 BT_ENABLE, 1058

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2068

BTN1, 1058 BTN2, 1059 BTN3, 1059 BTN4, 1059 BTNCENTER, 1059 BTNEXIT, 1059 BTNLEFT, 1059 BTNRIGHT, 1059 BTNSTATE_LONG_PRESSED_EV, 1060 BTNSTATE_LONG_RELEASED_EV, 1060 BTNSTATE_NONE, 1060 BTNSTATE_PRESSED_EV, 1060 BTNSTATE_PRESSED_STATE, 1060 BTNSTATE_SHORT_RELEASED_EV, 1060 ButtonModuleID, 1060 ButtonModuleName, 1061 ButtonOffsetLongPressCnt, 1061 ButtonOffsetLongRelCnt, 1061 ButtonOffsetPressedCnt, 1061 ButtonOffsetRelCnt, 1061 ButtonOffsetShortRelCnt, 1061 ButtonOffsetState, 1061 CHAR_BIT, 1061 CHAR_MAX, 1061 CHAR_MIN, 1061 CLUMP_DONE, 1062 CLUMP_SUSPEND, 1062 ColorSensorRead, 1062 COM_CHANNEL_FOUR_ACTIVE, 1062 COM_CHANNEL_NONE_ACTIVE, 1062 COM_CHANNEL_ONE_ACTIVE, 1062 COM_CHANNEL_THREE_ACTIVE, 1062 COM_CHANNEL_TWO_ACTIVE, 1062 CommandModuleID, 1062 CommandModuleName, 1063 CommandOffsetActivateFlag, 1063 CommandOffsetAwake, 1063
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CommandOffsetDeactivateFlag, 1063 CommandOffsetFileName, 1063 CommandOffsetFormatString, 1063 CommandOffsetMemoryPool, 1063 CommandOffsetOffsetDS, 1063 CommandOffsetOffsetDVA, 1064 CommandOffsetPRCHandler, 1064 CommandOffsetProgStatus, 1064 CommandOffsetSyncTick, 1064 CommandOffsetSyncTime, 1064 CommandOffsetTick, 1064 CommBTCheckStatus, 1064 CommBTConnection, 1064 CommBTOnOff, 1065 CommBTRead, 1065 CommBTWrite, 1065 CommExecuteFunction, 1065 CommHSCheckStatus, 1065 CommHSControl, 1065 CommHSRead, 1065 CommHSWrite, 1065 CommLSCheckStatus, 1065 CommLSRead, 1065 CommLSWrite, 1066 CommLSWriteEx, 1066 CommModuleID, 1066 CommModuleName, 1066 CommOffsetBrickDataBdAddr, 1066 CommOffsetBrickDataBluecoreVersion, 1066 CommOffsetBrickDataBtHwStatus, 1066 CommOffsetBrickDataBtStateStatus, 1066 CommOffsetBrickDataName, 1066 CommOffsetBrickDataTimeOutValue, 1066 CommOffsetBtConnectTableBdAddr, 1067 CommOffsetBtConnectTableClassOfDevice, 1067 CommOffsetBtConnectTableHandleNr, 1067

INDEX

2069

CommOffsetBtConnectTableLinkQuality, 1067 CommOffsetBtConnectTableName, 1067 CommOffsetBtConnectTablePinCode, 1067 CommOffsetBtConnectTableStreamStatus, 1067 CommOffsetBtDataMode, 1067 CommOffsetBtDeviceCnt, 1067 CommOffsetBtDeviceNameCnt, 1067 CommOffsetBtDeviceTableBdAddr, 1068 CommOffsetBtDeviceTableClassOfDevice, 1068 CommOffsetBtDeviceTableDeviceStatus, 1068 CommOffsetBtDeviceTableName, 1068 CommOffsetBtInBufBuf, 1068 CommOffsetBtInBufInPtr, 1068 CommOffsetBtInBufOutPtr, 1068 CommOffsetBtOutBufBuf, 1068 CommOffsetBtOutBufInPtr, 1068 CommOffsetBtOutBufOutPtr, 1068 CommOffsetHsDataMode, 1069 CommOffsetHsFlags, 1069 CommOffsetHsInBufBuf, 1069 CommOffsetHsInBufInPtr, 1069 CommOffsetHsInBufOutPtr, 1069 CommOffsetHsMode, 1069 CommOffsetHsOutBufBuf, 1069 CommOffsetHsOutBufInPtr, 1069 CommOffsetHsOutBufOutPtr, 1069 CommOffsetHsSpeed, 1069 CommOffsetHsState, 1070 CommOffsetPFunc, 1070 CommOffsetPFuncTwo, 1070 CommOffsetUsbInBufBuf, 1070 CommOffsetUsbInBufInPtr, 1070 CommOffsetUsbInBufOutPtr, 1070 CommOffsetUsbOutBufBuf, 1070 CommOffsetUsbOutBufInPtr, 1070 CommOffsetUsbOutBufOutPtr, 1070
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

CommOffsetUsbPollBufBuf, 1070 CommOffsetUsbPollBufInPtr, 1071 CommOffsetUsbPollBufOutPtr, 1071 CommOffsetUsbState, 1071 ComputeCalibValue, 1071 CONN_BT0, 1071 CONN_BT1, 1071 CONN_BT2, 1072 CONN_BT3, 1072 CONN_HS4, 1072 CONN_HS_1, 1072 CONN_HS_2, 1072 CONN_HS_3, 1072 CONN_HS_4, 1072 CONN_HS_5, 1072 CONN_HS_6, 1072 CONN_HS_7, 1073 CONN_HS_8, 1073 CONN_HS_ALL, 1073 CT_ADDR_RFID, 1073 CT_REG_DATA, 1073 CT_REG_MODE, 1073 CT_REG_STATUS, 1073 DATA_MODE_GPS, 1073 DATA_MODE_MASK, 1073 DATA_MODE_NXT, 1074 DATA_MODE_RAW, 1074 DATA_MODE_UPDATE, 1074 DatalogGetTimes, 1074 DatalogWrite, 1074 DEGREES_PER_RADIAN, 1074 DISPLAY_BUSY, 1074 DISPLAY_CHAR, 1074 DISPLAY_CONTRAST_DEFAULT, 1074 DISPLAY_CONTRAST_MAX, 1075 DISPLAY_ERASE_ALL, 1075 DISPLAY_ERASE_LINE, 1075 DISPLAY_FILL_REGION, 1075 DISPLAY_FRAME, 1075 DISPLAY_HEIGHT, 1075 DISPLAY_HORIZONTAL_LINE, 1075

INDEX

2070

DISPLAY_MENUICONS_X_DIFF, 1076 DISPLAY_MENUICONS_X_OFFS, 1076 DISPLAY_MENUICONS_Y, 1076 DISPLAY_ON, 1076 DISPLAY_PIXEL, 1076 DISPLAY_POPUP, 1076 DISPLAY_REFRESH, 1076 DISPLAY_REFRESH_DISABLED, 1076 DISPLAY_VERTICAL_LINE, 1077 DISPLAY_WIDTH, 1077 DisplayExecuteFunction, 1077 DisplayModuleID, 1077 DisplayModuleName, 1077 DisplayOffsetContrast, 1077 DisplayOffsetDisplay, 1077 DisplayOffsetEraseMask, 1077 DisplayOffsetFlags, 1077 DisplayOffsetNormal, 1078 DisplayOffsetPBitmaps, 1078 DisplayOffsetPFont, 1078 DisplayOffsetPFunc, 1078 DisplayOffsetPMenuIcons, 1078 DisplayOffsetPMenuText, 1078 DisplayOffsetPopup, 1078 DisplayOffsetPScreens, 1078 DisplayOffsetPStatusIcons, 1078 DisplayOffsetPStatusText, 1078 DisplayOffsetPStepIcons, 1079 DisplayOffsetPTextLines, 1079 DisplayOffsetStatusIcons, 1079 DisplayOffsetStepIcons, 1079 DisplayOffsetTextLinesCenterFlags, 1079 DisplayOffsetUpdateMask, 1079 DIST_CMD_CUSTOM, 1079 DIST_CMD_GP2D12, 1079 DIST_CMD_GP2D120, 1079 DIST_CMD_GP2YA02, 1079 DIST_CMD_GP2YA21, 1080 DIST_REG_DIST, 1080 DIST_REG_DIST1, 1080 DIST_REG_DIST_MAX, 1080 DIST_REG_DIST_MIN, 1080
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

DIST_REG_MODULE_TYPE, 1080 DIST_REG_NUM_POINTS, 1080 DIST_REG_VOLT, 1080 DIST_REG_VOLT1, 1080 DRAW_OPT_CLEAR, 1080 DRAW_OPT_CLEAR_EXCEPT_STATUS_SCREEN, 1081 DRAW_OPT_CLEAR_PIXELS, 1081 DRAW_OPT_CLEAR_SCREEN_MODES, 1081 DRAW_OPT_CLEAR_WHOLE_SCREEN, 1081 DRAW_OPT_FILL_SHAPE, 1081 DRAW_OPT_FONT_DIR_B2TL, 1081 DRAW_OPT_FONT_DIR_B2TR, 1081 DRAW_OPT_FONT_DIR_L2RB, 1081 DRAW_OPT_FONT_DIR_L2RT, 1082 DRAW_OPT_FONT_DIR_R2LB, 1082 DRAW_OPT_FONT_DIR_R2LT, 1082 DRAW_OPT_FONT_DIR_T2BL, 1082 DRAW_OPT_FONT_DIR_T2BR, 1082 DRAW_OPT_FONT_DIRECTIONS, 1082 DRAW_OPT_FONT_WRAP, 1082 DRAW_OPT_INVERT, 1083 DRAW_OPT_LOGICAL_AND, 1083 DRAW_OPT_LOGICAL_COPY, 1083 DRAW_OPT_LOGICAL_OPERATIONS, 1083 DRAW_OPT_LOGICAL_OR, 1083 DRAW_OPT_LOGICAL_XOR, 1083 DRAW_OPT_NORMAL, 1084

INDEX

2071

DRAW_OPT_POLYGON_POLYLINE, 1084 DrawCircle, 1084 DrawEllipse, 1084 DrawFont, 1084 DrawGraphic, 1084 DrawGraphicArray, 1084 DrawLine, 1085 DrawPoint, 1085 DrawPolygon, 1085 DrawRect, 1085 DrawText, 1085 EMETER_REG_AIN, 1085 EMETER_REG_AOUT, 1085 EMETER_REG_JOULES, 1085 EMETER_REG_VIN, 1085 EMETER_REG_VOUT, 1086 EMETER_REG_WIN, 1086 EMETER_REG_WOUT, 1086 EOF, 1086 ERR_ARG, 1086 ERR_BAD_POOL_SIZE, 1086 ERR_BAD_PTR, 1086 ERR_CLUMP_COUNT, 1086 ERR_COMM_BUFFER_FULL, 1086 ERR_COMM_BUS_ERR, 1086 ERR_COMM_CHAN_INVALID, 1087 ERR_COMM_CHAN_NOT_READY, 1087 ERR_DEFAULT_OFFSETS, 1087 ERR_FILE, 1087 ERR_INSANE_OFFSET, 1087 ERR_INSTR, 1087 ERR_INVALID_FIELD, 1087 ERR_INVALID_PORT, 1087 ERR_INVALID_QUEUE, 1087 ERR_INVALID_SIZE, 1087 ERR_LOADER_ERR, 1088 ERR_MEM, 1088 ERR_MEMMGR_FAIL, 1088 ERR_NO_ACTIVE_CLUMP, 1088 ERR_NO_CODE, 1088 ERR_NO_PROG, 1088 ERR_NON_FATAL, 1088
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

ERR_RC_BAD_PACKET, 1088 ERR_RC_FAILED, 1088 ERR_RC_ILLEGAL_VAL, 1088 ERR_RC_UNKNOWN_CMD, 1089 ERR_SPOTCHECK_FAIL, 1089 ERR_VER, 1089 FALSE, 1089 FileClose, 1089 FileDelete, 1089 FileFindFirst, 1089 FileFindNext, 1089 FileOpenAppend, 1089 FileOpenRead, 1089 FileOpenReadLinear, 1090 FileOpenWrite, 1090 FileOpenWriteLinear, 1090 FileOpenWriteNonLinear, 1090 FileRead, 1090 FileRename, 1090 FileResize, 1090 FileResolveHandle, 1090 FileSeek, 1090 FileTell, 1090 FileWrite, 1091 FRAME_SELECT, 1091 FREQUENCY_MAX, 1091 FREQUENCY_MIN, 1091 GetStartTick, 1091 GL_CAMERA_DEPTH, 1091 GL_CIRCLE, 1091 GL_CIRCLE_SIZE, 1091 GL_CULL_BACK, 1091 GL_CULL_FRONT, 1092 GL_CULL_MODE, 1092 GL_CULL_NONE, 1092 GL_LINE, 1092 GL_POINT, 1092 GL_POLYGON, 1092 GL_ROTATE_X, 1092 GL_ROTATE_Y, 1093 GL_ROTATE_Z, 1093 GL_SCALE_X, 1093 GL_SCALE_Y, 1093 GL_SCALE_Z, 1093 GL_TRANSLATE_X, 1093 GL_TRANSLATE_Y, 1093

INDEX

2072

GL_TRANSLATE_Z, 1094 GL_ZOOM_FACTOR, 1094 HS_ADDRESS_1, 1094 HS_ADDRESS_2, 1094 HS_ADDRESS_3, 1094 HS_ADDRESS_4, 1094 HS_ADDRESS_5, 1094 HS_ADDRESS_6, 1094 HS_ADDRESS_7, 1095 HS_ADDRESS_8, 1095 HS_ADDRESS_ALL, 1095 HS_BAUD_115200, 1095 HS_BAUD_1200, 1095 HS_BAUD_14400, 1095 HS_BAUD_19200, 1095 HS_BAUD_230400, 1095 HS_BAUD_2400, 1095 HS_BAUD_28800, 1095 HS_BAUD_3600, 1096 HS_BAUD_38400, 1096 HS_BAUD_460800, 1096 HS_BAUD_4800, 1096 HS_BAUD_57600, 1096 HS_BAUD_7200, 1096 HS_BAUD_76800, 1096 HS_BAUD_921600, 1096 HS_BAUD_9600, 1096 HS_BAUD_DEFAULT, 1096 HS_CMD_READY, 1097 HS_CTRL_EXIT, 1097 HS_CTRL_INIT, 1097 HS_CTRL_UART, 1097 HS_DISABLE, 1097 HS_ENABLE, 1097 HS_INIT_RECEIVER, 1097 HS_INITIALISE, 1097 HS_MODE_10_STOP, 1098 HS_MODE_15_STOP, 1098 HS_MODE_20_STOP, 1098 HS_MODE_5_DATA, 1098 HS_MODE_6_DATA, 1098 HS_MODE_7_DATA, 1098 HS_MODE_7E1, 1098 HS_MODE_8_DATA, 1098 HS_MODE_8N1, 1098 HS_MODE_DEFAULT, 1099
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

HS_MODE_E_PARITY, 1099 HS_MODE_M_PARITY, 1099 HS_MODE_N_PARITY, 1099 HS_MODE_O_PARITY, 1099 HS_MODE_S_PARITY, 1099 HS_SEND_DATA, 1099 HS_UPDATE, 1099 HT_ADDR_ACCEL, 1100 HT_ADDR_ANGLE, 1100 HT_ADDR_COLOR, 1100 HT_ADDR_COLOR2, 1100 HT_ADDR_COMPASS, 1100 HT_ADDR_IRLINK, 1100 HT_ADDR_IRRECEIVER, 1100 HT_ADDR_IRSEEKER, 1100 HT_ADDR_IRSEEKER2, 1100 HT_CH1_A, 1100 HT_CH1_B, 1101 HT_CH2_A, 1101 HT_CH2_B, 1101 HT_CH3_A, 1101 HT_CH3_B, 1101 HT_CH4_A, 1101 HT_CH4_B, 1101 HT_CMD_COLOR2_50HZ, 1101 HT_CMD_COLOR2_60HZ, 1101 HT_CMD_COLOR2_ACTIVE, 1102 HT_CMD_COLOR2_BLCAL, 1102 HT_CMD_COLOR2_FAR, 1102 HT_CMD_COLOR2_LED_HI, 1102 HT_CMD_COLOR2_LED_LOW, 1102 HT_CMD_COLOR2_NEAR, 1102 HT_CMD_COLOR2_PASSIVE, 1102 HT_CMD_COLOR2_RAW, 1102 HT_CMD_COLOR2_WBCAL, 1102 HTANGLE_MODE_CALIBRATE, 1103 HTANGLE_MODE_NORMAL, 1103 HTANGLE_MODE_RESET, 1103 HTANGLE_REG_ACDIR, 1103

INDEX

2073

HTANGLE_REG_DC01, 1103 HTANGLE_REG_DC02, 1103 HTANGLE_REG_DC03, 1103 HTANGLE_REG_DC04, 1103 HTANGLE_REG_DC05, 1103 HTANGLE_REG_DCAVG, 1104 HTANGLE_REG_DCDIR, 1104 HTANGLE_REG_MODE, 1104 HTIR2_MODE_1200, 1104 HTIR2_MODE_600, 1104 HTIR2_REG_AC01, 1104 HTIR2_REG_AC02, 1104 HTIR2_REG_AC03, 1104 HTIR2_REG_AC04, 1104 HTIR2_REG_AC05, 1105 HTIR2_REG_ACDIR, 1105 HTIR2_REG_DC01, 1105 HTIR2_REG_DC02, 1105 HTIR2_REG_DC03, 1105 HTIR2_REG_DC04, 1105 HTIR2_REG_DC05, 1105 HTIR2_REG_DCAVG, 1105 HTIR2_REG_DCDIR, 1105 HTIR2_REG_MODE, 1106 I2C_ADDR_DEFAULT, 1106 I2C_REG_CMD, 1106 I2C_REG_DEVICE_ID, 1106 I2C_REG_VENDOR_ID, 1106 I2C_REG_VERSION, 1106 IN_1, 1107 IN_2, 1107 IN_3, 1107 IN_4, 1107 IN_MODE_ANGLESTEP, 1107 IN_MODE_BOOLEAN, 1107 IN_MODE_CELSIUS, 1107 IN_MODE_FAHRENHEIT, 1107 IN_MODE_MODEMASK, 1107 IN_MODE_PCTFULLSCALE, 1108 IN_MODE_PERIODCOUNTER, 1108 IN_MODE_RAW, 1108 IN_MODE_SLOPEMASK, 1108 IN_MODE_TRANSITIONCNT, 1108
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

IN_TYPE_ANGLE, 1108 IN_TYPE_COLORBLUE, 1108 IN_TYPE_COLOREXIT, 1108 IN_TYPE_COLORFULL, 1108 IN_TYPE_COLORGREEN, 1108 IN_TYPE_COLORNONE, 1109 IN_TYPE_COLORRED, 1109 IN_TYPE_CUSTOM, 1109 IN_TYPE_HISPEED, 1109 IN_TYPE_LIGHT_ACTIVE, 1109 IN_TYPE_LIGHT_INACTIVE, 1109 IN_TYPE_LOWSPEED, 1109 IN_TYPE_LOWSPEED_9V, 1109 IN_TYPE_NO_SENSOR, 1109 IN_TYPE_REFLECTION, 1109 IN_TYPE_SOUND_DB, 1110 IN_TYPE_SOUND_DBA, 1110 IN_TYPE_SWITCH, 1110 IN_TYPE_TEMPERATURE, 1110 INPUT_BLACKCOLOR, 1110 INPUT_BLANK, 1110 INPUT_BLUE, 1110 INPUT_BLUECOLOR, 1110 INPUT_CAL_POINT_0, 1110 INPUT_CAL_POINT_1, 1111 INPUT_CAL_POINT_2, 1111 INPUT_CUSTOM9V, 1111 INPUT_CUSTOMACTIVE, 1111 INPUT_CUSTOMINACTIVE, 1111 INPUT_DIGI0, 1111 INPUT_DIGI1, 1111 INPUT_GREEN, 1111 INPUT_GREENCOLOR, 1111 INPUT_INVALID_DATA, 1111 INPUT_NO_OF_COLORS, 1112 INPUT_NO_OF_POINTS, 1112 INPUT_RED, 1112 INPUT_REDCOLOR, 1112 INPUT_RESETCAL, 1112 INPUT_RUNNINGCAL, 1112 INPUT_SENSORCAL, 1112 INPUT_SENSOROFF, 1112 INPUT_STARTCAL, 1112 INPUT_WHITECOLOR, 1113 INPUT_YELLOWCOLOR, 1113

INDEX

2074

InputModeField, 1113 InputModuleID, 1113 InputModuleName, 1113 InputOffsetADRaw, 1113 InputOffsetColorADRaw, 1113 InputOffsetColorBoolean, 1113 InputOffsetColorCalibration, 1113 InputOffsetColorCalibrationState, 1113 InputOffsetColorCalLimits, 1114 InputOffsetColorSensorRaw, 1114 InputOffsetColorSensorValue, 1114 InputOffsetCustomActiveStatus, 1114 InputOffsetCustomPctFullScale, 1114 InputOffsetCustomZeroOffset, 1114 InputOffsetDigiPinsDir, 1114 InputOffsetDigiPinsIn, 1114 InputOffsetDigiPinsOut, 1114 InputOffsetInvalidData, 1114 InputOffsetSensorBoolean, 1115 InputOffsetSensorMode, 1115 InputOffsetSensorRaw, 1115 InputOffsetSensorType, 1115 InputOffsetSensorValue, 1115 INT_MAX, 1115 INT_MIN, 1115 INTF_BTOFF, 1115 INTF_BTON, 1115 INTF_CONNECT, 1116 INTF_CONNECTBYNAME, 1116 INTF_CONNECTREQ, 1116 INTF_DISCONNECT, 1116 INTF_DISCONNECTALL, 1116 INTF_EXTREAD, 1116 INTF_FACTORYRESET, 1116 INTF_OPENSTREAM, 1116 INTF_PINREQ, 1116 INTF_REMOVEDEVICE, 1116 INTF_SEARCH, 1117 INTF_SENDDATA, 1117 INTF_SENDFILE, 1117 INTF_SETBTNAME, 1117 INTF_SETCMDMODE, 1117 INTF_STOPSEARCH, 1117
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INTF_VISIBILITY, 1117 InvalidDataField, 1117 IOCTRL_BOOT, 1117 IOCTRL_POWERDOWN, 1117 IOCtrlModuleID, 1118 IOCtrlModuleName, 1118 IOCtrlOffsetPowerOn, 1118 IOMapRead, 1118 IOMapReadByID, 1118 IOMapWrite, 1118 IOMapWriteByID, 1118 KeepAlive, 1118 LCD_LINE1, 1118 LCD_LINE2, 1119 LCD_LINE3, 1120 LCD_LINE4, 1120 LCD_LINE5, 1120 LCD_LINE6, 1121 LCD_LINE7, 1121 LCD_LINE8, 1121 LDR_APPENDNOTPOSSIBLE, 1121 LDR_BTBUSY, 1121 LDR_BTCONNECTFAIL, 1121 LDR_BTTIMEOUT, 1122 LDR_CMD_BOOTCMD, 1122 LDR_CMD_BTFACTORYRESET, 1122 LDR_CMD_BTGETADR, 1122 LDR_CMD_CLOSE, 1122 LDR_CMD_CLOSEMODHANDLE, 1122 LDR_CMD_CROPDATAFILE, 1122 LDR_CMD_DELETE, 1122 LDR_CMD_DELETEUSERFLASH, 1122 LDR_CMD_DEVICEINFO, 1122 LDR_CMD_FINDFIRST, 1123 LDR_CMD_FINDFIRSTMODULE, 1123 LDR_CMD_FINDNEXT, 1123 LDR_CMD_FINDNEXTMODULE, 1123 LDR_CMD_IOMAPREAD, 1123

INDEX

2075

LDR_CMD_IOMAPWRITE, 1123 LDR_CMD_OPENAPPENDDATA, 1123 LDR_CMD_OPENREAD, 1123 LDR_CMD_OPENREADLINEAR, 1123 LDR_CMD_OPENWRITE, 1123 LDR_CMD_OPENWRITEDATA, 1124 LDR_CMD_OPENWRITELINEAR, 1124 LDR_CMD_POLLCMD, 1124 LDR_CMD_POLLCMDLEN, 1124 LDR_CMD_READ, 1124 LDR_CMD_RENAMEFILE, 1124 LDR_CMD_RESIZEDATAFILE, 1124 LDR_CMD_SEEKFROMCURRENT, 1124 LDR_CMD_SEEKFROMEND, 1124 LDR_CMD_SEEKFROMSTART, 1124 LDR_CMD_SETBRICKNAME, 1125 LDR_CMD_VERSIONS, 1125 LDR_CMD_WRITE, 1125 LDR_ENDOFFILE, 1125 LDR_EOFEXPECTED, 1125 LDR_FILEEXISTS, 1125 LDR_FILEISBUSY, 1125 LDR_FILEISFULL, 1126 LDR_FILENOTFOUND, 1126 LDR_FILETX_CLOSEERROR, 1126 LDR_FILETX_DSTEXISTS, 1126 LDR_FILETX_SRCMISSING, 1126 LDR_FILETX_STREAMERROR, 1126 LDR_FILETX_TIMEOUT, 1126 LDR_HANDLEALREADYCLOSED, 1126 LDR_ILLEGALFILENAME, 1126
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

LDR_ILLEGALHANDLE, 1127 LDR_INPROGRESS, 1127 LDR_INVALIDSEEK, 1127 LDR_MODULENOTFOUND, 1127 LDR_NOLINEARSPACE, 1127 LDR_NOMOREFILES, 1127 LDR_NOMOREHANDLES, 1127 LDR_NOSPACE, 1127 LDR_NOTLINEARFILE, 1127 LDR_NOWRITEBUFFERS, 1127 LDR_OUTOFBOUNDARY, 1128 LDR_REQPIN, 1128 LDR_SUCCESS, 1128 LDR_UNDEFINEDERROR, 1128 LEGO_ADDR_EMETER, 1128 LEGO_ADDR_TEMP, 1128 LEGO_ADDR_US, 1128 ListFiles, 1128 LoaderExecuteFunction, 1128 LoaderModuleID, 1129 LoaderModuleName, 1129 LoaderOffsetFreeUserFlash, 1129 LoaderOffsetPFunc, 1129 LONG_MAX, 1129 LONG_MIN, 1129 LOWSPEED_CH_NOT_READY, 1129 LOWSPEED_COMMUNICATING, 1129 LOWSPEED_DATA_RECEIVED, 1129 LOWSPEED_DONE, 1129 LOWSPEED_ERROR, 1130 LOWSPEED_IDLE, 1130 LOWSPEED_INIT, 1130 LOWSPEED_LOAD_BUFFER, 1130 LOWSPEED_NO_ERROR, 1130 LOWSPEED_RECEIVING, 1130 LOWSPEED_RX_ERROR, 1130 LOWSPEED_TRANSMITTING, 1130 LOWSPEED_TX_ERROR, 1130 LowSpeedModuleID, 1131 LowSpeedModuleName, 1131 LowSpeedOffsetChannelState, 1131

INDEX

2076

LowSpeedOffsetErrorType, 1131 LowSpeedOffsetInBufBuf, 1131 LowSpeedOffsetInBufBytesToRx, 1131 LowSpeedOffsetInBufInPtr, 1131 LowSpeedOffsetInBufOutPtr, 1131 LowSpeedOffsetMode, 1131 LowSpeedOffsetNoRestartOnRead, 1131 LowSpeedOffsetOutBufBuf, 1132 LowSpeedOffsetOutBufBytesToRx, 1132 LowSpeedOffsetOutBufInPtr, 1132 LowSpeedOffsetOutBufOutPtr, 1132 LowSpeedOffsetSpeed, 1132 LowSpeedOffsetState, 1132 LR_COULD_NOT_SAVE, 1132 LR_ENTRY_REMOVED, 1132 LR_STORE_IS_FULL, 1132 LR_SUCCESS, 1132 LR_UNKNOWN_ADDR, 1133 LSREAD_NO_RESTART_1, 1133 LSREAD_NO_RESTART_2, 1133 LSREAD_NO_RESTART_3, 1133 LSREAD_NO_RESTART_4, 1133 LSREAD_NO_RESTART_MASK, 1133 LSREAD_RESTART_ALL, 1133 LSREAD_RESTART_NONE, 1133 MAILBOX1, 1133 MAILBOX10, 1134 MAILBOX2, 1134 MAILBOX3, 1134 MAILBOX4, 1134 MAILBOX5, 1134 MAILBOX6, 1134 MAILBOX7, 1134 MAILBOX8, 1134 MAILBOX9, 1134 MAX_BT_MSG_SIZE, 1135 MaxAccelerationField, 1135 MaxSpeedField, 1135 MemoryManager, 1135 MENUICON_CENTER, 1135 MENUICON_LEFT, 1135
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

MENUICON_RIGHT, 1135 MENUICONS, 1135 MENUTEXT, 1135 MessageRead, 1136 MessageWrite, 1136 MIN_1, 1136 MS_1, 1136 MS_10, 1136 MS_100, 1136 MS_150, 1136 MS_2, 1137 MS_20, 1137 MS_200, 1137 MS_250, 1137 MS_3, 1137 MS_30, 1137 MS_300, 1137 MS_350, 1137 MS_4, 1138 MS_40, 1138 MS_400, 1138 MS_450, 1138 MS_5, 1138 MS_50, 1138 MS_500, 1138 MS_6, 1139 MS_60, 1139 MS_600, 1139 MS_7, 1139 MS_70, 1139 MS_700, 1139 MS_8, 1139 MS_80, 1139 MS_800, 1139 MS_9, 1139 MS_90, 1140 MS_900, 1140 MS_ADDR_ACCLNX, 1140 MS_ADDR_CMPSNX, 1140 MS_ADDR_DISTNX, 1140 MS_ADDR_IVSENS, 1141 MS_ADDR_LINELDR, 1141 MS_ADDR_MTRMUX, 1141 MS_ADDR_NRLINK, 1141 MS_ADDR_NXTCAM, 1141 MS_ADDR_NXTHID, 1141

INDEX

2077

MS_ADDR_NXTMMX, 1142 MS_ADDR_NXTSERVO, 1142 MS_ADDR_NXTSERVO_EM, 1142 MS_ADDR_PFMATE, 1142 MS_ADDR_PSPNX, 1142 MS_ADDR_RTCLOCK, 1142 MS_ADDR_RXMUX, 1143 MS_CMD_ADPA_OFF, 1143 MS_CMD_ADPA_ON, 1143 MS_CMD_DEENERGIZED, 1143 MS_CMD_ENERGIZED, 1143 NA, 1143 NO_ERR, 1143 NO_OF_BTNS, 1144 NormalizedValueField, 1144 NRLINK_CMD_2400, 1144 NRLINK_CMD_4800, 1144 NRLINK_CMD_FLUSH, 1144 NRLINK_CMD_IR_LONG, 1144 NRLINK_CMD_IR_SHORT, 1144 NRLINK_CMD_RUN_MACRO, 1144 NRLINK_CMD_SET_PF, 1144 NRLINK_CMD_SET_RCX, 1145 NRLINK_CMD_SET_TRAIN, 1145 NRLINK_CMD_TX_RAW, 1145 NRLINK_REG_BYTES, 1145 NRLINK_REG_DATA, 1145 NRLINK_REG_EEPROM, 1145 NULL, 1145 NXTHID_CMD_ASCII, 1145 NXTHID_CMD_DIRECT, 1145 NXTHID_CMD_TRANSMIT, 1145 NXTHID_MOD_LEFT_ALT, 1146 NXTHID_MOD_LEFT_CTRL, 1146 NXTHID_MOD_LEFT_GUI, 1146 NXTHID_MOD_LEFT_SHIFT, 1146 NXTHID_MOD_NONE, 1146 NXTHID_MOD_RIGHT_ALT, 1146 NXTHID_MOD_RIGHT_CTRL, 1146
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

NXTHID_MOD_RIGHT_GUI, 1146 NXTHID_MOD_RIGHT_SHIFT, 1147 NXTHID_REG_CMD, 1147 NXTHID_REG_DATA, 1147 NXTHID_REG_MODIFIER, 1147 NXTLL_CMD_BLACK, 1147 NXTLL_CMD_EUROPEAN, 1147 NXTLL_CMD_INVERT, 1147 NXTLL_CMD_POWERDOWN, 1147 NXTLL_CMD_POWERUP, 1147 NXTLL_CMD_RESET, 1147 NXTLL_CMD_SNAPSHOT, 1148 NXTLL_CMD_UNIVERSAL, 1148 NXTLL_CMD_USA, 1148 NXTLL_CMD_WHITE, 1148 NXTLL_REG_AVERAGE, 1148 NXTLL_REG_BLACKDATA, 1148 NXTLL_REG_BLACKLIMITS, 1148 NXTLL_REG_CALIBRATED, 1148 NXTLL_REG_CMD, 1148 NXTLL_REG_KD_FACTOR, 1149 NXTLL_REG_KD_VALUE, 1149 NXTLL_REG_KI_FACTOR, 1149 NXTLL_REG_KI_VALUE, 1149 NXTLL_REG_KP_FACTOR, 1149 NXTLL_REG_KP_VALUE, 1149 NXTLL_REG_RAWVOLTAGE, 1149 NXTLL_REG_RESULT, 1149 NXTLL_REG_SETPOINT, 1149 NXTLL_REG_STEERING, 1149 NXTLL_REG_WHITEDATA, 1150 NXTLL_REG_WHITELIMITS, 1150 NXTPM_CMD_RESET, 1150 NXTPM_REG_CAPACITY, 1150 NXTPM_REG_CMD, 1150 NXTPM_REG_CURRENT, 1150 NXTPM_REG_ERRORCOUNT, 1150 NXTPM_REG_GAIN, 1150

INDEX

2078

NXTPM_REG_MAXCURRENT, 1150 NXTPM_REG_MAXVOLTAGE, 1150 NXTPM_REG_MINCURRENT, 1151 NXTPM_REG_MINVOLTAGE, 1151 NXTPM_REG_POWER, 1151 NXTPM_REG_TIME, 1151 NXTPM_REG_TOTALPOWER, 1151 NXTPM_REG_USERGAIN, 1151 NXTPM_REG_VOLTAGE, 1151 NXTSE_ZONE_FRONT, 1151 NXTSE_ZONE_LEFT, 1151 NXTSE_ZONE_NONE, 1152 NXTSE_ZONE_RIGHT, 1152 NXTSERVO_CMD_EDIT1, 1152 NXTSERVO_CMD_EDIT2, 1152 NXTSERVO_CMD_GOTO, 1152 NXTSERVO_CMD_HALT, 1152 NXTSERVO_CMD_INIT, 1152 NXTSERVO_CMD_PAUSE, 1152 NXTSERVO_CMD_RESET, 1153 NXTSERVO_CMD_RESUME, 1153 NXTSERVO_EM_CMD_QUIT, 1153 NXTSERVO_EM_REG_CMD, 1153 NXTSERVO_EM_REG_EEPROM_END, 1153 NXTSERVO_EM_REG_EEPROM_START, 1153 NXTSERVO_POS_CENTER, 1153 NXTSERVO_POS_MAX, 1153 NXTSERVO_POS_MIN, 1154 NXTSERVO_QPOS_CENTER, 1154 NXTSERVO_QPOS_MAX, 1154 NXTSERVO_QPOS_MIN, 1154 NXTSERVO_REG_CMD, 1154 NXTSERVO_REG_S1_POS, 1154 NXTSERVO_REG_S1_QPOS, 1154
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

NXTSERVO_REG_S1_SPEED, 1154 NXTSERVO_REG_S2_POS, 1154 NXTSERVO_REG_S2_QPOS, 1155 NXTSERVO_REG_S2_SPEED, 1155 NXTSERVO_REG_S3_POS, 1155 NXTSERVO_REG_S3_QPOS, 1155 NXTSERVO_REG_S3_SPEED, 1155 NXTSERVO_REG_S4_POS, 1155 NXTSERVO_REG_S4_QPOS, 1155 NXTSERVO_REG_S4_SPEED, 1155 NXTSERVO_REG_S5_POS, 1155 NXTSERVO_REG_S5_QPOS, 1155 NXTSERVO_REG_S5_SPEED, 1156 NXTSERVO_REG_S6_POS, 1156 NXTSERVO_REG_S6_QPOS, 1156 NXTSERVO_REG_S6_SPEED, 1156 NXTSERVO_REG_S7_POS, 1156 NXTSERVO_REG_S7_QPOS, 1156 NXTSERVO_REG_S7_SPEED, 1156 NXTSERVO_REG_S8_POS, 1156 NXTSERVO_REG_S8_QPOS, 1156 NXTSERVO_REG_S8_SPEED, 1156 NXTSERVO_REG_VOLTAGE, 1157 NXTSERVO_SERVO_1, 1157 NXTSERVO_SERVO_2, 1157 NXTSERVO_SERVO_3, 1157 NXTSERVO_SERVO_4, 1157 NXTSERVO_SERVO_5, 1157 NXTSERVO_SERVO_6, 1157 NXTSERVO_SERVO_7, 1157

INDEX

2079

NXTSERVO_SERVO_8, 1157 OPARR_MAX, 1158 OPARR_MEAN, 1158 OPARR_MIN, 1158 OPARR_SORT, 1158 OPARR_STD, 1158 OPARR_SUM, 1158 OPARR_SUMSQR, 1158 OUT_A, 1158 OUT_AB, 1159 OUT_ABC, 1159 OUT_AC, 1159 OUT_B, 1159 OUT_BC, 1159 OUT_C, 1159 OUT_MODE_BRAKE, 1160 OUT_MODE_COAST, 1160 OUT_MODE_MOTORON, 1160 OUT_MODE_REGMETHOD, 1160 OUT_MODE_REGULATED, 1160 OUT_OPTION_HOLDATLIMIT, 1160 OUT_OPTION_RAMPDOWNTOLIMIT, 1160 OUT_REGMODE_IDLE, 1160 OUT_REGMODE_POS, 1161 OUT_REGMODE_SPEED, 1161 OUT_REGMODE_SYNC, 1161 OUT_REGOPTION_NO_SATURATION, 1161 OUT_RUNSTATE_HOLD, 1161 OUT_RUNSTATE_IDLE, 1161 OUT_RUNSTATE_RAMPDOWN, 1161 OUT_RUNSTATE_RAMPUP, 1162 OUT_RUNSTATE_RUNNING, 1162 OutputModeField, 1162 OutputModuleID, 1162 OutputModuleName, 1162 OutputOffsetActualSpeed, 1162 OutputOffsetBlockTachoCount, 1162 OutputOffsetFlags, 1163 OutputOffsetMaxAccel, 1163
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

OutputOffsetMaxSpeed, 1163 OutputOffsetMode, 1163 OutputOffsetMotorRPM, 1163 OutputOffsetOptions, 1163 OutputOffsetOverloaded, 1163 OutputOffsetRegDParameter, 1163 OutputOffsetRegIParameter, 1163 OutputOffsetRegMode, 1164 OutputOffsetRegPParameter, 1164 OutputOffsetRegulationOptions, 1164 OutputOffsetRegulationTime, 1164 OutputOffsetRotationCount, 1164 OutputOffsetRunState, 1164 OutputOffsetSpeed, 1164 OutputOffsetSyncTurnParameter, 1164 OutputOffsetTachoCount, 1164 OutputOffsetTachoLimit, 1165 OutputOptionsField, 1165 OverloadField, 1165 PF_CHANNEL_1, 1165 PF_CHANNEL_2, 1165 PF_CHANNEL_3, 1166 PF_CHANNEL_4, 1166 PF_CMD_BRAKE, 1166 PF_CMD_FLOAT, 1166 PF_CMD_FWD, 1166 PF_CMD_REV, 1166 PF_CMD_STOP, 1166 PF_CST_CLEAR1_CLEAR2, 1167 PF_CST_CLEAR1_SET2, 1167 PF_CST_DECREMENT_PWM, 1167 PF_CST_FULL_FWD, 1167 PF_CST_FULL_REV, 1167 PF_CST_INCREMENT_PWM, 1167 PF_CST_SET1_CLEAR2, 1167 PF_CST_SET1_SET2, 1167 PF_CST_TOGGLE_DIR, 1167 PF_FUNC_CLEAR, 1168 PF_FUNC_NOCHANGE, 1168 PF_FUNC_SET, 1168 PF_FUNC_TOGGLE, 1168

INDEX

2080

PF_MODE_COMBO_DIRECT, 1168 PF_MODE_COMBO_PWM, 1168 PF_MODE_SINGLE_OUTPUT_CST, 1168 PF_MODE_SINGLE_OUTPUT_PWM, 1168 PF_MODE_SINGLE_PIN_CONT, 1168 PF_MODE_SINGLE_PIN_TIME, 1169 PF_MODE_TRAIN, 1169 PF_OUT_A, 1169 PF_OUT_B, 1169 PF_PIN_C1, 1169 PF_PIN_C2, 1169 PF_PWM_BRAKE, 1169 PF_PWM_FLOAT, 1169 PF_PWM_FWD1, 1170 PF_PWM_FWD2, 1170 PF_PWM_FWD3, 1170 PF_PWM_FWD4, 1170 PF_PWM_FWD5, 1170 PF_PWM_FWD6, 1170 PF_PWM_FWD7, 1170 PF_PWM_REV1, 1170 PF_PWM_REV2, 1170 PF_PWM_REV3, 1171 PF_PWM_REV4, 1171 PF_PWM_REV5, 1171 PF_PWM_REV6, 1171 PF_PWM_REV7, 1171 PFMATE_CHANNEL_1, 1171 PFMATE_CHANNEL_2, 1171 PFMATE_CHANNEL_3, 1171 PFMATE_CHANNEL_4, 1172 PFMATE_CMD_GO, 1172 PFMATE_CMD_RAW, 1172 PFMATE_MOTORS_A, 1172 PFMATE_MOTORS_B, 1172 PFMATE_MOTORS_BOTH, 1172 PFMATE_REG_A_CMD, 1172 PFMATE_REG_A_SPEED, 1172 PFMATE_REG_B_CMD, 1172 PFMATE_REG_B_SPEED, 1173 PFMATE_REG_CHANNEL, 1173
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

PFMATE_REG_CMD, 1173 PFMATE_REG_MOTORS, 1173 PI, 1173 PID_0, 1173 PID_1, 1173 PID_2, 1173 PID_3, 1173 PID_4, 1174 PID_5, 1174 PID_6, 1174 PID_7, 1174 POOL_MAX_SIZE, 1174 PowerField, 1174 PROG_ABORT, 1174 PROG_ERROR, 1174 PROG_IDLE, 1175 PROG_OK, 1175 PROG_RESET, 1175 PROG_RUNNING, 1175 PSP_BTNSET1_DOWN, 1175 PSP_BTNSET1_L3, 1175 PSP_BTNSET1_LEFT, 1175 PSP_BTNSET1_R3, 1175 PSP_BTNSET1_RIGHT, 1175 PSP_BTNSET1_UP, 1175 PSP_BTNSET2_CIRCLE, 1176 PSP_BTNSET2_CROSS, 1176 PSP_BTNSET2_L1, 1176 PSP_BTNSET2_L2, 1176 PSP_BTNSET2_R1, 1176 PSP_BTNSET2_R2, 1176 PSP_BTNSET2_SQUARE, 1176 PSP_BTNSET2_TRIANGLE, 1176 PSP_CMD_ANALOG, 1176 PSP_CMD_DIGITAL, 1176 PSP_REG_BTNSET1, 1177 PSP_REG_BTNSET2, 1177 PSP_REG_XLEFT, 1177 PSP_REG_XRIGHT, 1177 PSP_REG_YLEFT, 1177 PSP_REG_YRIGHT, 1177 RADIANS_PER_DEGREE, 1177 RAND_MAX, 1177 RandomNumber, 1177 RawValueField, 1178 RC_PROP_BTONOFF, 1178

INDEX

2081

RC_PROP_DEBUGGING, 1178 RC_PROP_SLEEP_TIMEOUT, 1178 RC_PROP_SOUND_LEVEL, 1178 RCX_AbsVarOp, 1178 RCX_AndVarOp, 1178 RCX_AutoOffOp, 1178 RCX_BatteryLevelOp, 1178 RCX_BatteryLevelSrc, 1179 RCX_BootModeOp, 1179 RCX_CalibrateEventOp, 1179 RCX_ClearAllEventsOp, 1179 RCX_ClearCounterOp, 1179 RCX_ClearMsgOp, 1179 RCX_ClearSensorOp, 1179 RCX_ClearSoundOp, 1179 RCX_ClearTimerOp, 1179 RCX_ClickCounterSrc, 1179 RCX_ConstantSrc, 1180 RCX_CounterSrc, 1180 RCX_DatalogOp, 1180 RCX_DatalogRawDirectSrc, 1180 RCX_DatalogRawIndirectSrc, 1180 RCX_DatalogSrcDirectSrc, 1180 RCX_DatalogSrcIndirectSrc, 1180 RCX_DatalogValueDirectSrc, 1181 RCX_DatalogValueIndirectSrc, 1181 RCX_DecCounterOp, 1181 RCX_DeleteSubOp, 1181 RCX_DeleteSubsOp, 1181 RCX_DeleteTaskOp, 1181 RCX_DeleteTasksOp, 1181 RCX_DirectEventOp, 1181 RCX_DisplayOp, 1181 RCX_DivVarOp, 1181 RCX_DurationSrc, 1182 RCX_EventStateSrc, 1182 RCX_FirmwareVersionSrc, 1182 RCX_GlobalMotorStatusSrc, 1182 RCX_GOutputDirOp, 1182 RCX_GOutputModeOp, 1182 RCX_GOutputPowerOp, 1182 RCX_HysteresisSrc, 1182 RCX_IncCounterOp, 1182 RCX_IndirectVarSrc, 1182
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

RCX_InputBooleanSrc, 1183 RCX_InputModeOp, 1183 RCX_InputModeSrc, 1183 RCX_InputRawSrc, 1183 RCX_InputTypeOp, 1183 RCX_InputTypeSrc, 1183 RCX_InputValueSrc, 1183 RCX_IRModeOp, 1183 RCX_LightOp, 1183 RCX_LowerThresholdSrc, 1184 RCX_LSBlinkTimeOp, 1184 RCX_LSCalibrateOp, 1184 RCX_LSHysteresisOp, 1184 RCX_LSLowerThreshOp, 1184 RCX_LSUpperThreshOp, 1184 RCX_MessageOp, 1184 RCX_MessageSrc, 1184 RCX_MulVarOp, 1184 RCX_MuteSoundOp, 1184 RCX_OnOffFloatOp, 1185 RCX_OrVarOp, 1185 RCX_OUT_A, 1185 RCX_OUT_AB, 1185 RCX_OUT_ABC, 1185 RCX_OUT_AC, 1185 RCX_OUT_B, 1186 RCX_OUT_BC, 1186 RCX_OUT_C, 1186 RCX_OUT_FLOAT, 1186 RCX_OUT_FULL, 1186 RCX_OUT_FWD, 1186 RCX_OUT_HALF, 1186 RCX_OUT_LOW, 1186 RCX_OUT_OFF, 1187 RCX_OUT_ON, 1187 RCX_OUT_REV, 1187 RCX_OUT_TOGGLE, 1187 RCX_OutputDirOp, 1187 RCX_OutputPowerOp, 1187 RCX_OutputStatusSrc, 1187 RCX_PBTurnOffOp, 1187 RCX_PingOp, 1187 RCX_PlaySoundOp, 1188 RCX_PlayToneOp, 1188 RCX_PlayToneVarOp, 1188 RCX_PollMemoryOp, 1188

INDEX

2082

RCX_PollOp, 1188 RCX_ProgramSlotSrc, 1188 RCX_RandomSrc, 1188 RCX_RemoteKeysReleased, 1188 RCX_RemoteOp, 1188 RCX_RemoteOutABackward, 1189 RCX_RemoteOutAForward, 1189 RCX_RemoteOutBBackward, 1189 RCX_RemoteOutBForward, 1189 RCX_RemoteOutCBackward, 1189 RCX_RemoteOutCForward, 1189 RCX_RemotePBMessage1, 1189 RCX_RemotePBMessage2, 1189 RCX_RemotePBMessage3, 1189 RCX_RemotePlayASound, 1189 RCX_RemoteSelProgram1, 1190 RCX_RemoteSelProgram2, 1190 RCX_RemoteSelProgram3, 1190 RCX_RemoteSelProgram4, 1190 RCX_RemoteSelProgram5, 1190 RCX_RemoteStopOutOff, 1190 RCX_ScoutCounterLimitSrc, 1190 RCX_ScoutEventFBSrc, 1190 RCX_ScoutLightParamsSrc, 1190 RCX_ScoutOp, 1191 RCX_ScoutRulesOp, 1191 RCX_ScoutRulesSrc, 1191 RCX_ScoutTimerLimitSrc, 1191 RCX_SelectProgramOp, 1191 RCX_SendUARTDataOp, 1191 RCX_SetCounterOp, 1191 RCX_SetDatalogOp, 1191 RCX_SetEventOp, 1191 RCX_SetFeedbackOp, 1191 RCX_SetPriorityOp, 1192 RCX_SetSourceValueOp, 1192 RCX_SetTimerLimitOp, 1192 RCX_SetVarOp, 1192 RCX_SetWatchOp, 1192 RCX_SgnVarOp, 1192 RCX_SoundOp, 1192 RCX_StartTaskOp, 1192 RCX_StopAllTasksOp, 1192 RCX_StopTaskOp, 1192 RCX_SubVarOp, 1193 RCX_SumVarOp, 1193
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

RCX_TaskEventsSrc, 1193 RCX_TenMSTimerSrc, 1193 RCX_TimerSrc, 1193 RCX_UARTSetupSrc, 1193 RCX_UnlockFirmOp, 1193 RCX_UnlockOp, 1193 RCX_UnmuteSoundOp, 1193 RCX_UploadDatalogOp, 1193 RCX_UpperThresholdSrc, 1194 RCX_VariableSrc, 1194 RCX_ViewSourceValOp, 1194 RCX_VLLOp, 1194 RCX_WatchSrc, 1194 ReadButton, 1194 ReadLastResponse, 1194 ReadSemData, 1195 RegDValueField, 1195 RegIValueField, 1195 RegModeField, 1195 RegPValueField, 1196 RESET_ALL, 1196 RESET_BLOCK_COUNT, 1196 RESET_BLOCKANDTACHO, 1196 RESET_COUNT, 1196 RESET_NONE, 1196 RESET_ROTATION_COUNT, 1196 RFID_MODE_CONTINUOUS, 1196 RFID_MODE_SINGLE, 1197 RFID_MODE_STOP, 1197 RICArg, 1197 RICImgPoint, 1197 RICImgRect, 1197 RICMapArg, 1198 RICMapElement, 1198 RICMapFunction, 1198 RICOpCircle, 1199 RICOpCopyBits, 1199 RICOpDescription, 1199 RICOpEllipse, 1200 RICOpLine, 1200 RICOpNumBox, 1200 RICOpPixel, 1201 RICOpPolygon, 1201

INDEX

2083

RICOpRect, 1201 RICOpSprite, 1202 RICOpVarMap, 1202 RICPolygonPoints, 1203 RICSpriteData, 1203 ROTATE_QUEUE, 1203 RotationCountField, 1203 RunStateField, 1204 SAMPLERATE_DEFAULT, 1204 SAMPLERATE_MAX, 1204 SAMPLERATE_MIN, 1204 ScaledValueField, 1204 SCHAR_MAX, 1204 SCHAR_MIN, 1204 SCOUT_FXR_ALARM, 1205 SCOUT_FXR_BUG, 1205 SCOUT_FXR_NONE, 1205 SCOUT_FXR_RANDOM, 1205 SCOUT_FXR_SCIENCE, 1205 SCOUT_LIGHT_OFF, 1205 SCOUT_LIGHT_ON, 1205 SCOUT_LR_AVOID, 1205 SCOUT_LR_IGNORE, 1206 SCOUT_LR_OFF_WHEN, 1206 SCOUT_LR_SEEK_DARK, 1206 SCOUT_LR_SEEK_LIGHT, 1206 SCOUT_LR_WAIT_FOR, 1206 SCOUT_MODE_POWER, 1206 SCOUT_MODE_STANDALONE, 1206 SCOUT_MR_CIRCLE_LEFT, 1206 SCOUT_MR_CIRCLE_RIGHT, 1207 SCOUT_MR_FORWARD, 1207 SCOUT_MR_LOOP_A, 1207 SCOUT_MR_LOOP_AB, 1207 SCOUT_MR_LOOP_B, 1207 SCOUT_MR_NO_MOTION, 1207 SCOUT_MR_ZIGZAG, 1207 SCOUT_SNDSET_ALARM, 1207 SCOUT_SNDSET_BASIC, 1207 SCOUT_SNDSET_BUG, 1208 SCOUT_SNDSET_NONE, 1208 SCOUT_SNDSET_RANDOM, 1208 SCOUT_SNDSET_SCIENCE, 1208
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

SCOUT_SOUND_1_BLINK, 1208 SCOUT_SOUND_2_BLINK, 1208 SCOUT_SOUND_COUNTER1, 1208 SCOUT_SOUND_COUNTER2, 1208 SCOUT_SOUND_ENTER_BRIGHT, 1208 SCOUT_SOUND_ENTER_DARK, 1208 SCOUT_SOUND_ENTER_NORMAL, 1209 SCOUT_SOUND_ENTERSA, 1209 SCOUT_SOUND_KEYERROR, 1209 SCOUT_SOUND_MAIL_RECEIVED, 1209 SCOUT_SOUND_NONE, 1209 SCOUT_SOUND_REMOTE, 1209 SCOUT_SOUND_SPECIAL1, 1209 SCOUT_SOUND_SPECIAL2, 1209 SCOUT_SOUND_SPECIAL3, 1209 SCOUT_SOUND_TIMER1, 1209 SCOUT_SOUND_TIMER2, 1210 SCOUT_SOUND_TIMER3, 1210 SCOUT_SOUND_TOUCH1_PRES, 1210 SCOUT_SOUND_TOUCH1_REL, 1210 SCOUT_SOUND_TOUCH2_PRES, 1210 SCOUT_SOUND_TOUCH2_REL, 1210 SCOUT_TGS_LONG, 1210 SCOUT_TGS_MEDIUM, 1210 SCOUT_TGS_SHORT, 1210 SCOUT_TR_AVOID, 1211 SCOUT_TR_IGNORE, 1211 SCOUT_TR_OFF_WHEN, 1211 SCOUT_TR_REVERSE, 1211 SCOUT_TR_WAIT_FOR, 1211 SCREEN_BACKGROUND, 1211 SCREEN_LARGE, 1211 SCREEN_MODE_CLEAR, 1211 SCREEN_MODE_RESTORE, 1212 SCREEN_SMALL, 1212

INDEX

2084

SCREENS, 1212 SEC_1, 1212 SEC_10, 1212 SEC_15, 1212 SEC_2, 1213 SEC_20, 1213 SEC_3, 1213 SEC_30, 1213 SEC_4, 1213 SEC_5, 1213 SEC_6, 1214 SEC_7, 1214 SEC_8, 1214 SEC_9, 1214 SetScreenMode, 1214 SetSleepTimeoutVal, 1215 SHRT_MAX, 1215 SHRT_MIN, 1215 SIZE_OF_BDADDR, 1215 SIZE_OF_BRICK_NAME, 1215 SIZE_OF_BT_CONNECT_TABLE, 1215 SIZE_OF_BT_DEVICE_TABLE, 1215 SIZE_OF_BT_NAME, 1215 SIZE_OF_BT_PINCODE, 1215 SIZE_OF_BTBUF, 1215 SIZE_OF_CLASS_OF_DEVICE, 1216 SIZE_OF_HSBUF, 1216 SIZE_OF_USBBUF, 1216 SIZE_OF_USBDATA, 1216 SOUND_CLICK, 1216 SOUND_DOUBLE_BEEP, 1216 SOUND_DOWN, 1216 SOUND_FAST_UP, 1216 SOUND_FLAGS_IDLE, 1217 SOUND_FLAGS_RUNNING, 1217 SOUND_FLAGS_UPDATE, 1217 SOUND_LOW_BEEP, 1217 SOUND_MODE_LOOP, 1217 SOUND_MODE_ONCE, 1217 SOUND_MODE_TONE, 1217 SOUND_STATE_FILE, 1218 SOUND_STATE_IDLE, 1218 SOUND_STATE_STOP, 1218
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

SOUND_STATE_TONE, 1218 SOUND_UP, 1218 SoundGetState, 1218 SoundModuleID, 1218 SoundModuleName, 1219 SoundOffsetDuration, 1219 SoundOffsetFlags, 1219 SoundOffsetFreq, 1219 SoundOffsetMode, 1219 SoundOffsetSampleRate, 1219 SoundOffsetSoundFilename, 1219 SoundOffsetState, 1220 SoundOffsetVolume, 1220 SoundPlayFile, 1220 SoundPlayTone, 1220 SoundSetState, 1220 SPECIALS, 1220 STAT_COMM_PENDING, 1220 STAT_MSG_EMPTY_MAILBOX, 1220 STATUSICON_BATTERY, 1220 STATUSICON_BLUETOOTH, 1220 STATUSICON_USB, 1221 STATUSICON_VM, 1221 STATUSICONS, 1221 STATUSTEXT, 1221 STEPICON_1, 1221 STEPICON_2, 1221 STEPICON_3, 1221 STEPICON_4, 1221 STEPICON_5, 1221 STEPICONS, 1221 STEPLINE, 1222 STOP_REQ, 1222 TachoCountField, 1222 TachoLimitField, 1222 TEMP_FQ_1, 1222 TEMP_FQ_2, 1222 TEMP_FQ_4, 1222 TEMP_FQ_6, 1223 TEMP_OS_ONESHOT, 1223 TEMP_POL_HIGH, 1223 TEMP_POL_LOW, 1223 TEMP_REG_CONFIG, 1223 TEMP_REG_TEMP, 1223

INDEX

2085

TEMP_REG_THIGH, 1223 TEMP_REG_TLOW, 1223 TEMP_RES_10BIT, 1223 TEMP_RES_11BIT, 1224 TEMP_RES_12BIT, 1224 TEMP_RES_9BIT, 1224 TEMP_SD_CONTINUOUS, 1224 TEMP_SD_SHUTDOWN, 1224 TEMP_TM_COMPARATOR, 1224 TEMP_TM_INTERRUPT, 1224 TEXTLINE_1, 1224 TEXTLINE_2, 1225 TEXTLINE_3, 1225 TEXTLINE_4, 1225 TEXTLINE_5, 1225 TEXTLINE_6, 1225 TEXTLINE_7, 1225 TEXTLINE_8, 1225 TEXTLINES, 1225 TIMES_UP, 1225 TONE_A3, 1226 TONE_A4, 1226 TONE_A5, 1226 TONE_A6, 1226 TONE_A7, 1226 TONE_AS3, 1226 TONE_AS4, 1226 TONE_AS5, 1226 TONE_AS6, 1226 TONE_AS7, 1227 TONE_B3, 1227 TONE_B4, 1227 TONE_B5, 1227 TONE_B6, 1227 TONE_B7, 1227 TONE_C4, 1227 TONE_C5, 1227 TONE_C6, 1228 TONE_C7, 1228 TONE_CS4, 1228 TONE_CS5, 1228 TONE_CS6, 1228 TONE_CS7, 1228 TONE_D4, 1228 TONE_D5, 1228 TONE_D6, 1228
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

TONE_D7, 1229 TONE_DS4, 1229 TONE_DS5, 1229 TONE_DS6, 1229 TONE_DS7, 1229 TONE_E4, 1229 TONE_E5, 1229 TONE_E6, 1229 TONE_E7, 1230 TONE_F4, 1230 TONE_F5, 1230 TONE_F6, 1230 TONE_F7, 1230 TONE_FS4, 1230 TONE_FS5, 1230 TONE_FS6, 1230 TONE_FS7, 1230 TONE_G4, 1230 TONE_G5, 1231 TONE_G6, 1231 TONE_G7, 1231 TONE_GS4, 1231 TONE_GS5, 1231 TONE_GS6, 1231 TONE_GS7, 1231 TOPLINE, 1231 TRAIN_CHANNEL_1, 1232 TRAIN_CHANNEL_2, 1232 TRAIN_CHANNEL_3, 1232 TRAIN_CHANNEL_ALL, 1232 TRAIN_FUNC_DECR_SPEED, 1232 TRAIN_FUNC_INCR_SPEED, 1232 TRAIN_FUNC_STOP, 1232 TRAIN_FUNC_TOGGLE_LIGHT, 1232 TRUE, 1233 TurnRatioField, 1233 TypeField, 1233 UCHAR_MAX, 1233 UF_PENDING_UPDATES, 1233 UF_UPDATE_MODE, 1233 UF_UPDATE_PID_VALUES, 1234 UF_UPDATE_RESET_BLOCK_COUNT, 1234

INDEX

2086

UF_UPDATE_RESET_COUNT, 1234 UF_UPDATE_RESET_ROTATION_COUNT, 1234 UF_UPDATE_SPEED, 1234 UF_UPDATE_TACHO_LIMIT, 1234 UI_BT_CONNECT_REQUEST, 1234 UI_BT_ERROR_ATTENTION, 1234 UI_BT_PIN_REQUEST, 1234 UI_BT_STATE_CONNECTED, 1234 UI_BT_STATE_OFF, 1235 UI_BT_STATE_VISIBLE, 1235 UI_BUTTON_ENTER, 1235 UI_BUTTON_EXIT, 1235 UI_BUTTON_LEFT, 1235 UI_BUTTON_NONE, 1235 UI_BUTTON_RIGHT, 1235 UI_FLAGS_BUSY, 1235 UI_FLAGS_DISABLE_EXIT, 1236 UI_FLAGS_DISABLE_LEFT_RIGHT_ENTER, 1236 UI_FLAGS_ENABLE_STATUS_UPDATE, 1236 UI_FLAGS_EXECUTE_LMS_FILE, 1236 UI_FLAGS_REDRAW_STATUS, 1236 UI_FLAGS_RESET_SLEEP_TIMER, 1236 UI_FLAGS_UPDATE, 1236 UI_STATE_BT_ERROR, 1236 UI_STATE_CONNECT_REQUEST, 1236 UI_STATE_DRAW_MENU, 1237 UI_STATE_ENTER_PRESSED, 1237 UI_STATE_EXECUTE_FILE, 1237 UI_STATE_EXECUTING_FILE, 1237 UI_STATE_EXIT_PRESSED, 1237 UI_STATE_INIT_DISPLAY, 1237 UI_STATE_INIT_INTRO, 1237
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

UI_STATE_INIT_LOW_BATTERY, 1237 UI_STATE_INIT_MENU, 1237 UI_STATE_INIT_WAIT, 1237 UI_STATE_LEFT_PRESSED, 1238 UI_STATE_LOW_BATTERY, 1238 UI_STATE_NEXT_MENU, 1238 UI_STATE_RIGHT_PRESSED, 1238 UI_STATE_TEST_BUTTONS, 1238 UI_VM_IDLE, 1238 UI_VM_RESET1, 1238 UI_VM_RESET2, 1238 UI_VM_RUN_FREE, 1238 UI_VM_RUN_PAUSE, 1239 UI_VM_RUN_SINGLE, 1239 UIModuleID, 1239 UIModuleName, 1239 UINT_MAX, 1239 UIOffsetAbortFlag, 1239 UIOffsetBatteryState, 1239 UIOffsetBatteryVoltage, 1239 UIOffsetBluetoothState, 1239 UIOffsetButton, 1239 UIOffsetError, 1240 UIOffsetFlags, 1240 UIOffsetForceOff, 1240 UIOffsetLMSlename, 1240 UIOffsetOBPPointer, 1240 UIOffsetPMenu, 1240 UIOffsetRechargeable, 1240 UIOffsetRunState, 1240 UIOffsetSleepTimeout, 1240 UIOffsetSleepTimer, 1240 UIOffsetState, 1241 UIOffsetUsbState, 1241 UIOffsetVolume, 1241 ULONG_MAX, 1241 UpdateCalibCacheInfo, 1241 UpdateFlagsField, 1241 US_CMD_CONTINUOUS, 1241 US_CMD_EVENTCAPTURE, 1241 US_CMD_OFF, 1241 US_CMD_SINGLESHOT, 1242

INDEX

2087

US_CMD_WARMRESET, 1242 US_REG_ACTUAL_ZERO, 1242 US_REG_CM_INTERVAL, 1242 US_REG_FACTORY_ACTUAL_ZERO, 1242 US_REG_FACTORY_SCALE_DIVISOR, 1242 US_REG_FACTORY_SCALE_FACTOR, 1242 US_REG_MEASUREMENT_UNITS, 1242 US_REG_SCALE_DIVISOR, 1242 US_REG_SCALE_FACTOR, 1243 USB_CMD_READY, 1243 USB_PROTOCOL_OVERHEAD, 1243 USHRT_MAX, 1243 WriteSemData, 1243 NBCInputPortConstants IN_1, 709 IN_2, 709 IN_3, 710 IN_4, 710 NBCSensorModeConstants IN_MODE_ANGLESTEP, 713 IN_MODE_BOOLEAN, 713 IN_MODE_CELSIUS, 714 IN_MODE_FAHRENHEIT, 714 IN_MODE_MODEMASK, 714 IN_MODE_PCTFULLSCALE, 714 IN_MODE_PERIODCOUNTER, 714 IN_MODE_RAW, 714 IN_MODE_SLOPEMASK, 714 IN_MODE_TRANSITIONCNT, 714 NBCSensorTypeConstants IN_TYPE_ANGLE, 711 IN_TYPE_COLORBLUE, 711 IN_TYPE_COLOREXIT, 711 IN_TYPE_COLORFULL, 711 IN_TYPE_COLORGREEN, 711 IN_TYPE_COLORNONE, 711 IN_TYPE_COLORRED, 711 IN_TYPE_CUSTOM, 711 IN_TYPE_HISPEED, 712

IN_TYPE_LIGHT_ACTIVE, 712 IN_TYPE_LIGHT_INACTIVE, 712 IN_TYPE_LOWSPEED, 712 IN_TYPE_LOWSPEED_9V, 712 IN_TYPE_NO_SENSOR, 712 IN_TYPE_REFLECTION, 712 IN_TYPE_SOUND_DB, 712 IN_TYPE_SOUND_DBA, 712 IN_TYPE_SWITCH, 712 IN_TYPE_TEMPERATURE, 713 NewFilename FileRenameType, 968 NewSize FileResizeType, 969 NewVal WriteSemDataType, 1011 NO_ERR CommandModuleConstants, 50 NBCCommon.h, 1143 NO_OF_BTNS ButtonNameConstants, 695 NBCCommon.h, 1144 NoRestartOnRead CommLSWriteExType, 937 NormalizedArray ColorSensorReadType, 923 NormalizedValue InputValuesType, 975 NormalizedValueField InputFieldConstants, 715 NBCCommon.h, 1144 NRLink2400 MindSensorsAPI, 172 NXCDefs.h, 1548 NRLink4800 MindSensorsAPI, 172 NXCDefs.h, 1548 NRLINK_CMD_2400 MSNRLink, 882 NBCCommon.h, 1144 NRLINK_CMD_4800 MSNRLink, 882 NBCCommon.h, 1144 NRLINK_CMD_FLUSH MSNRLink, 882 NBCCommon.h, 1144

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2088

NRLINK_CMD_IR_LONG MSNRLink, 882 NBCCommon.h, 1144 NRLINK_CMD_IR_SHORT MSNRLink, 882 NBCCommon.h, 1144 NRLINK_CMD_RUN_MACRO MSNRLink, 882 NBCCommon.h, 1144 NRLINK_CMD_SET_PF MSNRLink, 883 NBCCommon.h, 1144 NRLINK_CMD_SET_RCX MSNRLink, 883 NBCCommon.h, 1145 NRLINK_CMD_SET_TRAIN MSNRLink, 883 NBCCommon.h, 1145 NRLINK_CMD_TX_RAW MSNRLink, 883 NBCCommon.h, 1145 NRLINK_REG_BYTES MSNRLink, 883 NBCCommon.h, 1145 NRLINK_REG_DATA MSNRLink, 883 NBCCommon.h, 1145 NRLINK_REG_EEPROM MSNRLink, 883 NBCCommon.h, 1145 NRLinkFlush MindSensorsAPI, 173 NXCDefs.h, 1548 NRLinkIRLong MindSensorsAPI, 173 NXCDefs.h, 1549 NRLinkIRShort MindSensorsAPI, 174 NXCDefs.h, 1549 NRLinkSetPF MindSensorsAPI, 174 NXCDefs.h, 1550 NRLinkSetRCX MindSensorsAPI, 175 NXCDefs.h, 1550 NRLinkSetTrain

MindSensorsAPI, 175 NXCDefs.h, 1551 NRLinkStatus MindSensorsAPI, 175 NXCDefs.h, 1551 NRLinkTxRaw MindSensorsAPI, 176 NXCDefs.h, 1551 NULL LoaderModuleConstants, 670 NBCCommon.h, 1145 NumOut DisplayModuleFunctions, 327 NXCDefs.h, 1552 NumToStr cstringAPI, 617 NXCDefs.h, 1553 NXCAPIDocs.h, 1243 NXCDefs.h, 1244 _SENSOR_CFG, 1330 abort, 1352 AbortFlag, 1353 abs, 1353 ACCLNxCalibrateX, 1353 ACCLNxCalibrateXEnd, 1354 ACCLNxCalibrateY, 1354 ACCLNxCalibrateYEnd, 1355 ACCLNxCalibrateZ, 1355 ACCLNxCalibrateZEnd, 1356 ACCLNxResetCalibration, 1356 ACCLNxSensitivity, 1356 ACCLNxXOffset, 1357 ACCLNxXRange, 1357 ACCLNxYOffset, 1358 ACCLNxYRange, 1358 ACCLNxZOffset, 1359 ACCLNxZRange, 1359 Acos, 1330 acos, 1359 AcosD, 1330 acosd, 1360 Acquire, 1360 addressOf, 1361 addressOfEx, 1361 ArrayBuild, 1362 ArrayInit, 1362

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2089

ArrayLen, 1363 ArrayMax, 1363 ArrayMean, 1364 ArrayMin, 1364 ArrayOp, 1365 ArraySort, 1366 ArrayStd, 1366 ArraySubset, 1367 ArraySum, 1367 ArraySumSqr, 1368 Asin, 1330 asin, 1368 AsinD, 1331 asind, 1369 Atan, 1331 atan, 1369 Atan2, 1332 atan2, 1370 Atan2D, 1332 atan2d, 1371 AtanD, 1332 atand, 1371 atof, 1372 atoi, 1373 atol, 1373 BatteryLevel, 1374 BatteryState, 1374 bcd2dec, 1374 BluetoothState, 1375 BluetoothStatus, 1375 BluetoothWrite, 1376 BrickDataBluecoreVersion, 1376 BrickDataBtHardwareStatus, 1376 BrickDataBtStateStatus, 1377 BrickDataName, 1377 BrickDataTimeoutValue, 1377 BTConnectionClass, 1378 BTConnectionHandleNum, 1378 BTConnectionLinkQuality, 1378 BTConnectionName, 1379 BTConnectionPinCode, 1379 BTConnectionStreamStatus, 1380 BTDataMode, 1380 BTDeviceClass, 1380 BTDeviceCount, 1381 BTDeviceName, 1381
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

BTDeviceNameCount, 1381 BTDeviceStatus, 1382 BTInputBufferInPtr, 1382 BTInputBufferOutPtr, 1382 BTOutputBufferInPtr, 1383 BTOutputBufferOutPtr, 1383 ButtonCount, 1383 ButtonLongPressCount, 1384 ButtonLongReleaseCount, 1384 ButtonPressCount, 1385 ButtonPressed, 1385 ButtonReleaseCount, 1385 ButtonShortReleaseCount, 1386 ButtonState, 1386 ByteArrayToStr, 1387 ByteArrayToStrEx, 1387 Ceil, 1333 ceil, 1387 CircleOut, 1388 ClearLine, 1388 ClearScreen, 1389 ClearSensor, 1389 CloseFile, 1389 Coast, 1390 CoastEx, 1390 ColorADRaw, 1391 ColorBoolean, 1391 ColorCalibration, 1392 ColorCalibrationState, 1392 ColorCalLimits, 1393 ColorSensorRaw, 1393 ColorSensorValue, 1394 CommandFlags, 1394 CongureTemperatureSensor, 1395 Copy, 1395 Cos, 1333 cos, 1396 CosD, 1334 cosd, 1396 Cosh, 1334 cosh, 1397 CoshD, 1334 coshd, 1397 CreateFile, 1397 CreateFileLinear, 1398 CreateFileNonLinear, 1399

INDEX

2090

CurrentTick, 1399 CustomSensorActiveStatus, 1400 CustomSensorPercentFullScale, 1400 CustomSensorZeroOffset, 1400 DeleteFile, 1401 DisplayContrast, 1401 DisplayDisplay, 1401 DisplayEraseMask, 1402 DisplayFlags, 1402 DisplayFont, 1402 DisplayTextLinesCenterFlags, 1403 DisplayUpdateMask, 1403 DISTNxDistance, 1403 DISTNxGP2D12, 1404 DISTNxGP2D120, 1404 DISTNxGP2YA02, 1405 DISTNxGP2YA21, 1405 DISTNxMaxDistance, 1406 DISTNxMinDistance, 1406 DISTNxModuleType, 1407 DISTNxNumPoints, 1407 DISTNxVoltage, 1407 div, 1408 EllipseOut, 1408 ExitTo, 1409 Exp, 1335 exp, 1409 fclose, 1410 feof, 1410 fush, 1411 fgetc, 1411 fgets, 1411 FindFirstFile, 1412 FindNextFile, 1412 FirstTick, 1413 Flatten, 1413 FlattenVar, 1414 Float, 1414 Floor, 1335 oor, 1414 Follows, 1415 FontNumOut, 1415 FontTextOut, 1416 fopen, 1417 ForceOff, 1417
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

FormatNum, 1418 fprintf, 1418 fputc, 1419 fputs, 1419 Frac, 1336 frac, 1420 FreeMemory, 1420 fseek, 1421 ftell, 1421 GetBrickDataAddress, 1422 GetBTConnectionAddress, 1422 GetBTDeviceAddress, 1422 GetBTInputBuffer, 1423 GetBTOutputBuffer, 1423 GetButtonModuleValue, 1424 getc, 1336 getchar, 1424 GetCommandModuleBytes, 1424 GetCommandModuleValue, 1425 GetCommModuleBytes, 1425 GetCommModuleValue, 1426 GetDisplayModuleBytes, 1426 GetDisplayModuleValue, 1426 GetDisplayNormal, 1427 GetDisplayPopup, 1427 GetHSInputBuffer, 1428 GetHSOutputBuffer, 1428 GetInput, 1429 GetInputModuleValue, 1429 GetIOMapBytes, 1429 GetIOMapBytesByID, 1430 GetIOMapValue, 1430 GetIOMapValueByID, 1431 GetLastResponseInfo, 1431 GetLoaderModuleValue, 1432 GetLowSpeedModuleBytes, 1432 GetLowSpeedModuleValue, 1433 GetLSInputBuffer, 1433 GetLSOutputBuffer, 1433 GetMemoryInfo, 1434 GetOutput, 1434 GetOutputModuleValue, 1435 GetSoundModuleValue, 1435 GetUIModuleValue, 1436 GetUSBInputBuffer, 1436 GetUSBOutputBuffer, 1436

INDEX

2091

GetUSBPollBuffer, 1437 glAddToAngleX, 1437 glAddToAngleY, 1438 glAddToAngleZ, 1438 glAddVertex, 1438 glBegin, 1438 glBeginObject, 1439 glBeginRender, 1439 glBox, 1439 glCallObject, 1440 glCos32768, 1440 glCube, 1440 glEnd, 1441 glEndObject, 1441 glFinishRender, 1441 glInit, 1441 glObjectAction, 1442 glPyramid, 1442 glSet, 1442 glSetAngleX, 1443 glSetAngleY, 1443 glSetAngleZ, 1443 glSin32768, 1444 GraphicArrayOut, 1444 GraphicArrayOutEx, 1444 GraphicOut, 1445 GraphicOutEx, 1446 HSDataMode, 1446 HSFlags, 1447 HSInputBufferInPtr, 1447 HSInputBufferOutPtr, 1447 HSMode, 1448 HSOutputBufferInPtr, 1448 HSOutputBufferOutPtr, 1448 HSSpeed, 1449 HSState, 1449 HTIRTrain, 1449 HTPFComboDirect, 1450 HTPFComboPWM, 1451 HTPFRawOutput, 1451 HTPFRepeat, 1452 HTPFSingleOutputCST, 1452 HTPFSingleOutputPWM, 1453 HTPFSinglePin, 1454 HTPFTrain, 1454 HTRCXAddToDatalog, 1455
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

HTRCXBatteryLevel, 1455 HTRCXClearAllEvents, 1456 HTRCXClearCounter, 1456 HTRCXClearMsg, 1456 HTRCXClearSensor, 1456 HTRCXClearSound, 1457 HTRCXClearTimer, 1457 HTRCXCreateDatalog, 1457 HTRCXDecCounter, 1458 HTRCXDeleteSub, 1458 HTRCXDeleteSubs, 1458 HTRCXDeleteTask, 1458 HTRCXDeleteTasks, 1459 HTRCXDisableOutput, 1459 HTRCXEnableOutput, 1459 HTRCXEvent, 1460 HTRCXFloat, 1460 HTRCXFwd, 1460 HTRCXIncCounter, 1460 HTRCXInvertOutput, 1461 HTRCXMuteSound, 1461 HTRCXObvertOutput, 1461 HTRCXOff, 1462 HTRCXOn, 1462 HTRCXOnFor, 1462 HTRCXOnFwd, 1462 HTRCXOnRev, 1463 HTRCXPBTurnOff, 1463 HTRCXPing, 1463 HTRCXPlaySound, 1464 HTRCXPlayTone, 1464 HTRCXPlayToneVar, 1464 HTRCXPoll, 1465 HTRCXPollMemory, 1465 HTRCXRemote, 1465 HTRCXRev, 1466 HTRCXSelectDisplay, 1466 HTRCXSelectProgram, 1466 HTRCXSendSerial, 1467 HTRCXSetDirection, 1467 HTRCXSetEvent, 1467 HTRCXSetGlobalDirection, 1468 HTRCXSetGlobalOutput, 1468 HTRCXSetIRLinkPort, 1469 HTRCXSetMaxPower, 1469 HTRCXSetMessage, 1469

INDEX

2092

HTRCXSetOutput, 1469 HTRCXSetPower, 1470 HTRCXSetPriority, 1470 HTRCXSetSensorMode, 1470 HTRCXSetSensorType, 1471 HTRCXSetSleepTime, 1471 HTRCXSetTxPower, 1471 HTRCXSetWatch, 1472 HTRCXStartTask, 1472 HTRCXStopAllTasks, 1472 HTRCXStopTask, 1473 HTRCXToggle, 1473 HTRCXUnmuteSound, 1473 HTScoutCalibrateSensor, 1473 HTScoutMuteSound, 1474 HTScoutSelectSounds, 1474 HTScoutSendVLL, 1474 HTScoutSetEventFeedback, 1474 HTScoutSetLight, 1475 HTScoutSetScoutMode, 1475 HTScoutSetSensorClickTime, 1475 HTScoutSetSensorHysteresis, 1476 HTScoutSetSensorLowerLimit, 1476 HTScoutSetSensorUpperLimit, 1477 HTScoutUnmuteSound, 1477 I2CBytes, 1477 I2CBytesReady, 1478 I2CCheckStatus, 1479 I2CDeviceId, 1479 I2CDeviceInfo, 1480 I2CRead, 1480 I2CSendCommand, 1481 I2CStatus, 1482 I2CVendorId, 1482 I2CVersion, 1483 I2CWrite, 1483 isalnum, 1484 isalpha, 1485 iscntrl, 1485 isdigit, 1485 isgraph, 1486 islower, 1486 isNAN, 1487 isprint, 1487
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

ispunct, 1487 isspace, 1488 isupper, 1488 isxdigit, 1489 labs, 1489 ldiv, 1489 LeftStr, 1490 LineOut, 1490 Log, 1337 log, 1491 Log10, 1337 log10, 1492 LongAbort, 1492 LowspeedBytesReady, 1493 LowspeedCheckStatus, 1493 LowspeedRead, 1494 LowspeedStatus, 1495 LowspeedWrite, 1495 LSChannelState, 1496 LSErrorType, 1496 LSInputBufferBytesToRx, 1497 LSInputBufferInPtr, 1497 LSInputBufferOutPtr, 1498 LSMode, 1498 LSNoRestartOnRead, 1498 LSOutputBufferBytesToRx, 1499 LSOutputBufferInPtr, 1499 LSOutputBufferOutPtr, 1500 LSSpeed, 1500 LSState, 1500 memcmp, 1501 memcpy, 1501 memmove, 1501 MidStr, 1502 MotorActualSpeed, 1502 MotorBlockTachoCount, 1503 MotorMaxAcceleration, 1503 MotorMaxSpeed, 1504 MotorMode, 1504 MotorOutputOptions, 1504 MotorOverload, 1505 MotorPower, 1505 MotorPwnFreq, 1505 MotorRegDValue, 1506 MotorRegIValue, 1506 MotorRegPValue, 1507

INDEX

2093

MotorRegulation, 1507 MotorRegulationOptions, 1507 MotorRegulationTime, 1508 MotorRotationCount, 1508 MotorRunState, 1508 MotorTachoCount, 1509 MotorTachoLimit, 1509 MotorTurnRatio, 1510 MSADPAOff, 1510 MSADPAOn, 1510 MSDeenergize, 1511 MSEnergize, 1511 MSIRTrain, 1512 MSPFComboDirect, 1512 MSPFComboPWM, 1513 MSPFRawOutput, 1514 MSPFRepeat, 1514 MSPFSingleOutputCST, 1515 MSPFSingleOutputPWM, 1515 MSPFSinglePin, 1516 MSPFTrain, 1517 MSRCXAbsVar, 1517 MSRCXAddToDatalog, 1518 MSRCXAndVar, 1518 MSRCXBatteryLevel, 1519 MSRCXBoot, 1519 MSRCXCalibrateEvent, 1519 MSRCXClearAllEvents, 1519 MSRCXClearCounter, 1520 MSRCXClearMsg, 1520 MSRCXClearSensor, 1520 MSRCXClearSound, 1520 MSRCXClearTimer, 1521 MSRCXCreateDatalog, 1521 MSRCXDecCounter, 1521 MSRCXDeleteSub, 1522 MSRCXDeleteSubs, 1522 MSRCXDeleteTask, 1522 MSRCXDeleteTasks, 1522 MSRCXDisableOutput, 1523 MSRCXDivVar, 1523 MSRCXEnableOutput, 1523 MSRCXEvent, 1524 MSRCXFloat, 1524 MSRCXFwd, 1524 MSRCXIncCounter, 1525
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

MSRCXInvertOutput, 1525 MSRCXMulVar, 1525 MSRCXMuteSound, 1526 MSRCXObvertOutput, 1526 MSRCXOff, 1526 MSRCXOn, 1526 MSRCXOnFor, 1527 MSRCXOnFwd, 1527 MSRCXOnRev, 1527 MSRCXOrVar, 1528 MSRCXPBTurnOff, 1528 MSRCXPing, 1528 MSRCXPlaySound, 1529 MSRCXPlayTone, 1529 MSRCXPlayToneVar, 1529 MSRCXPoll, 1530 MSRCXPollMemory, 1530 MSRCXRemote, 1530 MSRCXReset, 1531 MSRCXRev, 1531 MSRCXSelectDisplay, 1531 MSRCXSelectProgram, 1532 MSRCXSendSerial, 1532 MSRCXSet, 1532 MSRCXSetDirection, 1533 MSRCXSetEvent, 1533 MSRCXSetGlobalDirection, 1533 MSRCXSetGlobalOutput, 1534 MSRCXSetMaxPower, 1534 MSRCXSetMessage, 1535 MSRCXSetNRLinkPort, 1535 MSRCXSetOutput, 1535 MSRCXSetPower, 1536 MSRCXSetPriority, 1536 MSRCXSetSensorMode, 1536 MSRCXSetSensorType, 1537 MSRCXSetSleepTime, 1537 MSRCXSetTxPower, 1537 MSRCXSetUserDisplay, 1538 MSRCXSetVar, 1538 MSRCXSetWatch, 1538 MSRCXSgnVar, 1539 MSRCXStartTask, 1539 MSRCXStopAllTasks, 1539 MSRCXStopTask, 1540 MSRCXSubVar, 1540

INDEX

2094

MSRCXSumVar, 1540 MSRCXToggle, 1541 MSRCXUnlock, 1541 MSRCXUnmuteSound, 1541 MSReadValue, 1541 MSScoutCalibrateSensor, 1542 MSScoutMuteSound, 1542 MSScoutSelectSounds, 1542 MSScoutSendVLL, 1543 MSScoutSetCounterLimit, 1543 MSScoutSetEventFeedback, 1543 MSScoutSetLight, 1544 MSScoutSetScoutMode, 1544 MSScoutSetScoutRules, 1544 MSScoutSetSensorClickTime, 1545 MSScoutSetSensorHysteresis, 1545 MSScoutSetSensorLowerLimit, 1546 MSScoutSetSensorUpperLimit, 1546 MSScoutSetTimerLimit, 1546 MSScoutUnmuteSound, 1547 MulDiv32, 1337 muldiv32, 1547 NRLink2400, 1548 NRLink4800, 1548 NRLinkFlush, 1548 NRLinkIRLong, 1549 NRLinkIRShort, 1549 NRLinkSetPF, 1550 NRLinkSetRCX, 1550 NRLinkSetTrain, 1551 NRLinkStatus, 1551 NRLinkTxRaw, 1551 NumOut, 1552 NumToStr, 1553 NXTHIDAsciiMode, 1553 NXTHIDDirectMode, 1554 NXTHIDLoadCharacter, 1554 NXTHIDTransmit, 1555 NXTLineLeaderAverage, 1555 NXTLineLeaderCalibrateBlack, 1556 NXTLineLeaderCalibrateWhite, 1556 NXTLineLeaderInvert, 1557
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

NXTLineLeaderPowerDown, 1557 NXTLineLeaderPowerUp, 1558 NXTLineLeaderReset, 1558 NXTLineLeaderResult, 1559 NXTLineLeaderSnapshot, 1559 NXTLineLeaderSteering, 1560 NXTPowerMeterCapacityUsed, 1560 NXTPowerMeterElapsedTime, 1561 NXTPowerMeterErrorCount, 1561 NXTPowerMeterMaxCurrent, 1562 NXTPowerMeterMaxVoltage, 1562 NXTPowerMeterMinCurrent, 1563 NXTPowerMeterMinVoltage, 1563 NXTPowerMeterPresentCurrent, 1564 NXTPowerMeterPresentPower, 1564 NXTPowerMeterPresentVoltage, 1564 NXTPowerMeterResetCounters, 1565 NXTPowerMeterTotalPowerConsumed, 1565 NXTServoBatteryVoltage, 1566 NXTServoEditMacro, 1566 NXTServoGotoMacroAddress, 1567 NXTServoHaltMacro, 1567 NXTServoInit, 1568 NXTServoPauseMacro, 1568 NXTServoPosition, 1569 NXTServoQuitEdit, 1569 NXTServoReset, 1570 NXTServoResumeMacro, 1570 NXTServoSpeed, 1571 Off, 1571 OffEx, 1572 OnBrickProgramPointer, 1572 OnFwd, 1573 OnFwdEx, 1573 OnFwdReg, 1573 OnFwdRegEx, 1574 OnFwdRegExPID, 1574 OnFwdRegPID, 1575 OnFwdSync, 1576 OnFwdSyncEx, 1576

INDEX

2095

OnFwdSyncExPID, 1577 OnFwdSyncPID, 1577 OnRev, 1578 OnRevEx, 1578 OnRevReg, 1579 OnRevRegEx, 1579 OnRevRegExPID, 1580 OnRevRegPID, 1581 OnRevSync, 1581 OnRevSyncEx, 1582 OnRevSyncExPID, 1582 OnRevSyncPID, 1583 OpenFileAppend, 1584 OpenFileRead, 1584 OpenFileReadLinear, 1585 PFMateSend, 1585 PFMateSendRaw, 1586 PlayFile, 1586 PlayFileEx, 1587 PlaySound, 1587 PlayTone, 1588 PlayToneEx, 1588 PlayTones, 1589 PointOut, 1589 PolyOut, 1590 Pos, 1590 PosRegAddAngle, 1591 PosRegEnable, 1591 PosRegSetAngle, 1592 PosRegSetMax, 1592 Pow, 1338 pow, 1592 PowerDown, 1593 Precedes, 1593 printf, 1594 PSPNxAnalog, 1594 PSPNxDigital, 1594 putc, 1338 rand, 1595 Random, 1595 Read, 1596 ReadButtonEx, 1596 ReadBytes, 1597 ReadI2CRegister, 1597 ReadLn, 1598 ReadLnString, 1598
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

ReadNRLinkBytes, 1599 ReadSensorColorEx, 1599 ReadSensorColorRaw, 1600 ReadSensorEMeter, 1600 ReadSensorHTAccel, 1601 ReadSensorHTAngle, 1602 ReadSensorHTColor, 1602 ReadSensorHTColor2Active, 1603 ReadSensorHTIRReceiver, 1603 ReadSensorHTIRReceiverEx, 1604 ReadSensorHTIRSeeker, 1604 ReadSensorHTIRSeeker2AC, 1605 ReadSensorHTIRSeeker2DC, 1605 ReadSensorHTNormalizedColor, 1606 ReadSensorHTNormalizedColor2Active, 1607 ReadSensorHTRawColor, 1607 ReadSensorHTRawColor2, 1608 ReadSensorHTTouchMultiplexer, 1608 ReadSensorMSAccel, 1609 ReadSensorMSPlayStation, 1609 ReadSensorMSRTClock, 1610 ReadSensorMSTilt, 1611 ReadSensorUSEx, 1611 RebootInFirmwareMode, 1612 ReceiveMessage, 1612 ReceiveRemoteBool, 1613 ReceiveRemoteMessageEx, 1613 ReceiveRemoteNumber, 1614 ReceiveRemoteString, 1614 RechargeableBattery, 1615 RectOut, 1615 reladdressOf, 1616 Release, 1616 RemoteBluetoothFactoryReset, 1617 RemoteCloseFile, 1617 RemoteConnectionIdle, 1618 RemoteConnectionWrite, 1618 RemoteDatalogRead, 1619 RemoteDatalogSetTimes, 1619 RemoteDeleteFile, 1620 RemoteDeleteUserFlash, 1620 RemoteFindFirstFile, 1621

INDEX

2096

RemoteFindNextFile, 1622 RemoteGetBatteryLevel, 1622 RemoteGetBluetoothAddress, 1623 RemoteGetConnectionCount, 1623 RemoteGetConnectionName, 1624 RemoteGetContactCount, 1624 RemoteGetContactName, 1625 RemoteGetCurrentProgramName, 1626 RemoteGetDeviceInfo, 1626 RemoteGetFirmwareVersion, 1627 RemoteGetInputValues, 1627 RemoteGetOutputState, 1628 RemoteGetProperty, 1629 RemoteIOMapRead, 1629 RemoteIOMapWriteBytes, 1630 RemoteIOMapWriteValue, 1630 RemoteKeepAlive, 1631 RemoteLowspeedGetStatus, 1631 RemoteLowspeedRead, 1632 RemoteLowspeedWrite, 1633 RemoteMessageRead, 1633 RemoteMessageWrite, 1634 RemoteOpenAppendData, 1634 RemoteOpenRead, 1635 RemoteOpenWrite, 1635 RemoteOpenWriteData, 1636 RemoteOpenWriteLinear, 1637 RemotePlaySoundFile, 1637 RemotePlayTone, 1638 RemotePollCommand, 1638 RemotePollCommandLength, 1639 RemoteRead, 1640 RemoteRenameFile, 1640 RemoteResetMotorPosition, 1641 RemoteResetScaledValue, 1642 RemoteResetTachoCount, 1642 RemoteSetBrickName, 1643 RemoteSetInputMode, 1643 RemoteSetOutputState, 1644 RemoteSetProperty, 1644 RemoteStartProgram, 1645 RemoteStopProgram, 1645 RemoteStopSound, 1646 RemoteWrite, 1646 remove, 1647
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

rename, 1647 RenameFile, 1648 ResetAllTachoCounts, 1648 ResetBlockTachoCount, 1649 ResetRotationCount, 1649 ResetScreen, 1649 ResetSensor, 1650 ResetSensorHTAngle, 1650 ResetSleepTimer, 1650 ResetTachoCount, 1651 ResizeFile, 1651 ResolveHandle, 1652 rewind, 1652 RFIDInit, 1652 RFIDMode, 1653 RFIDRead, 1653 RFIDReadContinuous, 1654 RFIDReadSingle, 1654 RFIDStatus, 1655 RFIDStop, 1655 RICSetValue, 1339 RightStr, 1655 RotateMotor, 1656 RotateMotorEx, 1656 RotateMotorExPID, 1657 RotateMotorPID, 1658 RS485Control, 1658 RS485DataAvailable, 1659 RS485Disable, 1659 RS485Enable, 1660 RS485Initialize, 1660 RS485Read, 1660 RS485SendingData, 1661 RS485Status, 1661 RS485Uart, 1662 RS485Write, 1662 RunNRLinkMacro, 1663 S1, 1339 s16, 1341 S2, 1341 S3, 1341 s32, 1342 S4, 1342 s8, 1342 SEEK_CUR, 1342 SEEK_END, 1342

INDEX

2097

SEEK_SET, 1342 SendMessage, 1663 SendRemoteBool, 1664 SendRemoteNumber, 1664 SendRemoteString, 1665 SendResponseBool, 1665 SendResponseNumber, 1666 SendResponseString, 1666 SendRS485Bool, 1667 SendRS485Number, 1667 SendRS485String, 1668 Sensor, 1668 SENSOR_1, 1342 SENSOR_2, 1343 SENSOR_3, 1343 SENSOR_4, 1343 SENSOR_CELSIUS, 1343 SENSOR_COLORBLUE, 1343 SENSOR_COLORFULL, 1343 SENSOR_COLORGREEN, 1343 SENSOR_COLORNONE, 1343 SENSOR_COLORRED, 1343 SENSOR_EDGE, 1344 SENSOR_FAHRENHEIT, 1344 SENSOR_LIGHT, 1344 SENSOR_LOWSPEED, 1344 SENSOR_LOWSPEED_9V, 1344 SENSOR_MODE_BOOL, 1344 SENSOR_MODE_CELSIUS, 1344 SENSOR_MODE_EDGE, 1344 SENSOR_MODE_FAHRENHEIT, 1345 SENSOR_MODE_PERCENT, 1345 SENSOR_MODE_PULSE, 1345 SENSOR_MODE_RAW, 1345 SENSOR_MODE_ROTATION, 1345 SENSOR_NXTLIGHT, 1345 SENSOR_PULSE, 1345 SENSOR_ROTATION, 1345 SENSOR_SOUND, 1346 SENSOR_TOUCH, 1346 SENSOR_TYPE_COLORBLUE, 1346 SENSOR_TYPE_COLORFULL, 1346
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

SENSOR_TYPE_COLORGREEN, 1346 SENSOR_TYPE_COLORNONE, 1346 SENSOR_TYPE_COLORRED, 1346 SENSOR_TYPE_CUSTOM, 1346 SENSOR_TYPE_HIGHSPEED, 1347 SENSOR_TYPE_LIGHT, 1347 SENSOR_TYPE_LIGHT_ACTIVE, 1347 SENSOR_TYPE_LIGHT_INACTIVE, 1347 SENSOR_TYPE_LOWSPEED, 1347 SENSOR_TYPE_LOWSPEED_9V, 1347 SENSOR_TYPE_NONE, 1347 SENSOR_TYPE_ROTATION, 1347 SENSOR_TYPE_SOUND_DB, 1348 SENSOR_TYPE_SOUND_DBA, 1348 SENSOR_TYPE_TEMPERATURE, 1348 SENSOR_TYPE_TOUCH, 1348 SensorBoolean, 1668 SensorDigiPinsDirection, 1669 SensorDigiPinsOutputLevel, 1669 SensorDigiPinsStatus, 1670 SensorHTColorNum, 1670 SensorHTCompass, 1670 SensorHTEOPD, 1671 SensorHTGyro, 1671 SensorHTIRSeeker2ACDir, 1672 SensorHTIRSeeker2Addr, 1672 SensorHTIRSeeker2DCDir, 1673 SensorHTIRSeekerDir, 1673 SensorHTMagnet, 1673 SensorInvalid, 1674 SensorMode, 1674 SensorMSCompass, 1675 SensorMSDROD, 1675 SensorMSPressure, 1675 SensorMSPressureRaw, 1676

INDEX

2098

SensorNormalized, 1676 SensorNXTSumoEyes, 1677 SensorNXTSumoEyesRaw, 1677 SensorRaw, 1677 SensorScaled, 1678 SensorTemperature, 1678 SensorType, 1679 SensorUS, 1679 SensorValue, 1680 SensorValueBool, 1680 SensorValueRaw, 1680 set_fopen_size, 1681 SetAbortFlag, 1681 SetACCLNxSensitivity, 1681 SetBatteryState, 1682 SetBluetoothState, 1682 SetBTDataMode, 1683 SetBTInputBuffer, 1683 SetBTInputBufferInPtr, 1683 SetBTInputBufferOutPtr, 1684 SetBTOutputBuffer, 1684 SetBTOutputBufferInPtr, 1684 SetBTOutputBufferOutPtr, 1685 SetButtonLongPressCount, 1685 SetButtonLongReleaseCount, 1685 SetButtonModuleValue, 1686 SetButtonPressCount, 1686 SetButtonReleaseCount, 1686 SetButtonShortReleaseCount, 1687 SetButtonState, 1687 SetCommandFlags, 1687 SetCommandModuleBytes, 1688 SetCommandModuleValue, 1688 SetCommModuleBytes, 1688 SetCommModuleValue, 1689 SetCustomSensorActiveStatus, 1689 SetCustomSensorPercentFullScale, 1690 SetCustomSensorZeroOffset, 1690 SetDisplayContrast, 1690 SetDisplayDisplay, 1691 SetDisplayEraseMask, 1691 SetDisplayFlags, 1691 SetDisplayFont, 1692 SetDisplayModuleBytes, 1692 SetDisplayModuleValue, 1692
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

SetDisplayNormal, 1693 SetDisplayPopup, 1693 SetDisplayTextLinesCenterFlags, 1694 SetDisplayUpdateMask, 1694 SetHSDataMode, 1694 SetHSFlags, 1695 SetHSInputBuffer, 1695 SetHSInputBufferInPtr, 1695 SetHSInputBufferOutPtr, 1696 SetHSMode, 1696 SetHSOutputBuffer, 1696 SetHSOutputBufferInPtr, 1697 SetHSOutputBufferOutPtr, 1697 SetHSSpeed, 1697 SetHSState, 1698 SetHTColor2Mode, 1698 SetHTIRSeeker2Mode, 1698 SetInput, 1699 SetInputModuleValue, 1699 SetIOCtrlModuleValue, 1700 SetIOMapBytes, 1700 SetIOMapBytesByID, 1700 SetIOMapValue, 1701 SetIOMapValueByID, 1701 SetLoaderModuleValue, 1702 SetLongAbort, 1702 SetLowSpeedModuleBytes, 1703 SetLowSpeedModuleValue, 1703 SetMotorPwnFreq, 1703 SetMotorRegulationOptions, 1704 SetMotorRegulationTime, 1704 SetNXTLineLeaderKdFactor, 1704 SetNXTLineLeaderKdValue, 1705 SetNXTLineLeaderKiFactor, 1706 SetNXTLineLeaderKiValue, 1706 SetNXTLineLeaderKpFactor, 1707 SetNXTLineLeaderKpValue, 1707 SetNXTLineLeaderSetpoint, 1708 SetNXTServoPosition, 1708 SetNXTServoQuickPosition, 1709 SetNXTServoSpeed, 1710 SetOnBrickProgramPointer, 1710 SetOutput, 1710 SetOutputModuleValue, 1711 SetSensor, 1711

INDEX

2099

SetSensorBoolean, 1712 SetSensorColorBlue, 1712 SetSensorColorFull, 1713 SetSensorColorGreen, 1713 SetSensorColorNone, 1713 SetSensorColorRed, 1714 SetSensorDigiPinsDirection, 1714 SetSensorDigiPinsOutputLevel, 1715 SetSensorDigiPinsStatus, 1715 SetSensorEMeter, 1715 SetSensorHTEOPD, 1716 SetSensorHTGyro, 1716 SetSensorHTMagnet, 1716 SetSensorLight, 1717 SetSensorLowspeed, 1717 SetSensorMode, 1717 SetSensorMSDROD, 1718 SetSensorMSPressure, 1718 SetSensorNXTSumoEyes, 1719 SetSensorSound, 1719 SetSensorTemperature, 1719 SetSensorTouch, 1720 SetSensorType, 1720 SetSensorUltrasonic, 1721 SetSleepTime, 1721 SetSleepTimeout, 1721 SetSleepTimer, 1722 SetSoundDuration, 1722 SetSoundFlags, 1722 SetSoundFrequency, 1723 SetSoundMode, 1723 SetSoundModuleState, 1723 SetSoundModuleValue, 1724 SetSoundSampleRate, 1724 SetSoundVolume, 1725 SetUIButton, 1725 SetUIModuleValue, 1725 SetUIState, 1726 SetUSBInputBuffer, 1726 SetUSBInputBufferInPtr, 1726 SetUSBInputBufferOutPtr, 1727 SetUSBOutputBuffer, 1727 SetUSBOutputBufferInPtr, 1727 SetUSBOutputBufferOutPtr, 1727 SetUSBPollBuffer, 1728
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

SetUSBPollBufferInPtr, 1728 SetUSBPollBufferOutPtr, 1728 SetUSBState, 1729 SetVMRunState, 1729 SetVolume, 1729 sign, 1730 Sin, 1348 sin, 1730 SinD, 1349 sind, 1731 Sinh, 1349 sinh, 1731 SinhD, 1349 sinhd, 1731 SizeOf, 1732 SleepNow, 1732 SleepTime, 1732 SleepTimeout, 1733 SleepTimer, 1733 SoundDuration, 1733 SoundFlags, 1734 SoundFrequency, 1734 SoundMode, 1735 SoundSampleRate, 1735 SoundState, 1735 SoundVolume, 1736 sprintf, 1736 Sqrt, 1350 sqrt, 1737 StartTask, 1737 Stop, 1737 StopAllTasks, 1738 StopSound, 1738 StopTask, 1738 StrCat, 1739 strcat, 1739 strcmp, 1740 strcpy, 1740 StrIndex, 1741 StrLen, 1741 strlen, 1741 strncat, 1742 strncmp, 1742 strncpy, 1743 StrReplace, 1743 StrToByteArray, 1744

INDEX

2100

strtod, 1744 strtol, 1745 StrToNum, 1746 strtoul, 1747 SubStr, 1747 SysCall, 1748 SysColorSensorRead, 1748 SysCommBTCheckStatus, 1749 SysCommBTConnection, 1749 SysCommBTOnOff, 1749 SysCommBTWrite, 1750 SysCommExecuteFunction, 1750 SysCommHSCheckStatus, 1751 SysCommHSControl, 1751 SysCommHSRead, 1751 SysCommHSWrite, 1752 SysCommLSCheckStatus, 1752 SysCommLSRead, 1753 SysCommLSWrite, 1753 SysCommLSWriteEx, 1753 SysComputeCalibValue, 1754 SysDatalogGetTimes, 1754 SysDatalogWrite, 1755 SysDisplayExecuteFunction, 1755 SysDrawCircle, 1756 SysDrawEllipse, 1756 SysDrawFont, 1756 SysDrawGraphic, 1757 SysDrawGraphicArray, 1757 SysDrawLine, 1757 SysDrawPoint, 1758 SysDrawPolygon, 1758 SysDrawRect, 1758 SysDrawText, 1759 SysFileClose, 1759 SysFileDelete, 1759 SysFileFindFirst, 1760 SysFileFindNext, 1760 SysFileOpenAppend, 1761 SysFileOpenRead, 1761 SysFileOpenReadLinear, 1761 SysFileOpenWrite, 1762 SysFileOpenWriteLinear, 1762 SysFileOpenWriteNonLinear, 1762 SysFileRead, 1763 SysFileRename, 1763
Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

SysFileResize, 1764 SysFileResolveHandle, 1764 SysFileSeek, 1764 SysFileTell, 1765 SysFileWrite, 1765 SysGetStartTick, 1765 SysIOMapRead, 1766 SysIOMapReadByID, 1766 SysIOMapWrite, 1767 SysIOMapWriteByID, 1767 SysKeepAlive, 1767 SysListFiles, 1768 SysLoaderExecuteFunction, 1768 SysMemoryManager, 1768 SysMessageRead, 1769 SysMessageWrite, 1769 SysRandomNumber, 1769 SysReadButton, 1770 SysReadLastResponse, 1770 SysReadSemData, 1771 SysSetScreenMode, 1771 SysSetSleepTimeout, 1771 SysSoundGetState, 1772 SysSoundPlayFile, 1772 SysSoundPlayTone, 1772 SysSoundSetState, 1773 SysUpdateCalibCacheInfo, 1773 SysWriteSemData, 1774 Tan, 1350 tan, 1774 TanD, 1350 tand, 1774 Tanh, 1351 tanh, 1775 TanhD, 1351 tanhd, 1775 TextOut, 1776 tolower, 1777 toupper, 1777 Trunc, 1352 trunc, 1778 u16, 1352 u32, 1352 u8, 1352 UIButton, 1778 UIState, 1778

INDEX

2101

UnattenVar, 1779 USBInputBufferInPtr, 1779 USBInputBufferOutPtr, 1780 USBOutputBufferInPtr, 1780 USBOutputBufferOutPtr, 1780 USBPollBufferInPtr, 1780 USBPollBufferOutPtr, 1781 USBState, 1781 UsbState, 1781 UseRS485, 1782 VMRunState, 1782 Volume, 1782 Wait, 1782 Write, 1783 WriteBytes, 1784 WriteBytesEx, 1784 WriteI2CRegister, 1785 WriteLn, 1785 WriteLnString, 1786 WriteNRLinkBytes, 1786 WriteString, 1787 Yield, 1787 NXT rmware module IDs, 225 NXT rmware module names, 223 NXT Firmware Modules, 42 NXTHID_CMD_ASCII NBCCommon.h, 1145 NXTHIDCommands, 903 NXTHID_CMD_DIRECT NBCCommon.h, 1145 NXTHIDCommands, 903 NXTHID_CMD_TRANSMIT NBCCommon.h, 1145 NXTHIDCommands, 903 NXTHID_MOD_LEFT_ALT NBCCommon.h, 1146 NXTHIDModiers, 902 NXTHID_MOD_LEFT_CTRL NBCCommon.h, 1146 NXTHIDModiers, 902 NXTHID_MOD_LEFT_GUI NBCCommon.h, 1146 NXTHIDModiers, 902 NXTHID_MOD_LEFT_SHIFT NBCCommon.h, 1146 NXTHIDModiers, 902

NXTHID_MOD_NONE NBCCommon.h, 1146 NXTHIDModiers, 902 NXTHID_MOD_RIGHT_ALT NBCCommon.h, 1146 NXTHIDModiers, 902 NXTHID_MOD_RIGHT_CTRL NBCCommon.h, 1146 NXTHIDModiers, 902 NXTHID_MOD_RIGHT_GUI NBCCommon.h, 1146 NXTHIDModiers, 903 NXTHID_MOD_RIGHT_SHIFT NBCCommon.h, 1147 NXTHIDModiers, 903 NXTHID_REG_CMD NBCCommon.h, 1147 NXTHIDRegisters, 901 NXTHID_REG_DATA NBCCommon.h, 1147 NXTHIDRegisters, 901 NXTHID_REG_MODIFIER NBCCommon.h, 1147 NXTHIDRegisters, 901 NXTHIDAsciiMode MindSensorsAPI, 176 NXCDefs.h, 1553 NXTHIDCommands NXTHID_CMD_ASCII, 903 NXTHID_CMD_DIRECT, 903 NXTHID_CMD_TRANSMIT, 903 NXTHIDDirectMode MindSensorsAPI, 177 NXCDefs.h, 1554 NXTHIDLoadCharacter MindSensorsAPI, 177 NXCDefs.h, 1554 NXTHIDModiers NXTHID_MOD_LEFT_ALT, 902 NXTHID_MOD_LEFT_CTRL, 902 NXTHID_MOD_LEFT_GUI, 902 NXTHID_MOD_LEFT_SHIFT, 902 NXTHID_MOD_NONE, 902 NXTHID_MOD_RIGHT_ALT, 902

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2102

NXTHID_MOD_RIGHT_CTRL, 902 NXTHID_MOD_RIGHT_GUI, 903 NXTHID_MOD_RIGHT_SHIFT, 903 NXTHIDRegisters NXTHID_REG_CMD, 901 NXTHID_REG_DATA, 901 NXTHID_REG_MODIFIER, 901 NXTHIDTransmit MindSensorsAPI, 178 NXCDefs.h, 1555 NXTLimits CHAR_BIT, 915 CHAR_MAX, 915 CHAR_MIN, 915 INT_MAX, 915 INT_MIN, 915 LONG_MAX, 915 LONG_MIN, 916 RAND_MAX, 916 SCHAR_MAX, 916 SCHAR_MIN, 916 SHRT_MAX, 916 SHRT_MIN, 916 UCHAR_MAX, 916 UINT_MAX, 916 ULONG_MAX, 916 USHRT_MAX, 916 NXTLineLeaderAverage MindSensorsAPI, 178 NXCDefs.h, 1555 NXTLineLeaderCalibrateBlack MindSensorsAPI, 179 NXCDefs.h, 1556 NXTLineLeaderCalibrateWhite MindSensorsAPI, 179 NXCDefs.h, 1556 NXTLineLeaderCommands NXTLL_CMD_BLACK, 911 NXTLL_CMD_EUROPEAN, 911 NXTLL_CMD_INVERT, 911 NXTLL_CMD_POWERDOWN, 911 NXTLL_CMD_POWERUP, 911 NXTLL_CMD_RESET, 912

NXTLL_CMD_SNAPSHOT, 912 NXTLL_CMD_UNIVERSAL, 912 NXTLL_CMD_USA, 912 NXTLL_CMD_WHITE, 912 NXTLineLeaderInvert MindSensorsAPI, 180 NXCDefs.h, 1557 NXTLineLeaderPowerDown MindSensorsAPI, 180 NXCDefs.h, 1557 NXTLineLeaderPowerUp MindSensorsAPI, 181 NXCDefs.h, 1558 NXTLineLeaderRegisters NXTLL_REG_AVERAGE, 909 NXTLL_REG_BLACKDATA, 909 NXTLL_REG_BLACKLIMITS, 909 NXTLL_REG_CALIBRATED, 909 NXTLL_REG_CMD, 909 NXTLL_REG_KD_FACTOR, 909 NXTLL_REG_KD_VALUE, 909 NXTLL_REG_KI_FACTOR, 909 NXTLL_REG_KI_VALUE, 910 NXTLL_REG_KP_FACTOR, 910 NXTLL_REG_KP_VALUE, 910 NXTLL_REG_RAWVOLTAGE, 910 NXTLL_REG_RESULT, 910 NXTLL_REG_SETPOINT, 910 NXTLL_REG_STEERING, 910 NXTLL_REG_WHITEDATA, 910 NXTLL_REG_WHITELIMITS, 910 NXTLineLeaderReset MindSensorsAPI, 181 NXCDefs.h, 1558 NXTLineLeaderResult MindSensorsAPI, 182 NXCDefs.h, 1559 NXTLineLeaderSnapshot MindSensorsAPI, 182 NXCDefs.h, 1559 NXTLineLeaderSteering MindSensorsAPI, 183 NXCDefs.h, 1560

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2103

NXTLL_CMD_BLACK NBCCommon.h, 1147 NXTLineLeaderCommands, 911 NXTLL_CMD_EUROPEAN NBCCommon.h, 1147 NXTLineLeaderCommands, 911 NXTLL_CMD_INVERT NBCCommon.h, 1147 NXTLineLeaderCommands, 911 NXTLL_CMD_POWERDOWN NBCCommon.h, 1147 NXTLineLeaderCommands, 911 NXTLL_CMD_POWERUP NBCCommon.h, 1147 NXTLineLeaderCommands, 911 NXTLL_CMD_RESET NBCCommon.h, 1147 NXTLineLeaderCommands, 912 NXTLL_CMD_SNAPSHOT NBCCommon.h, 1148 NXTLineLeaderCommands, 912 NXTLL_CMD_UNIVERSAL NBCCommon.h, 1148 NXTLineLeaderCommands, 912 NXTLL_CMD_USA NBCCommon.h, 1148 NXTLineLeaderCommands, 912 NXTLL_CMD_WHITE NBCCommon.h, 1148 NXTLineLeaderCommands, 912 NXTLL_REG_AVERAGE NBCCommon.h, 1148 NXTLineLeaderRegisters, 909 NXTLL_REG_BLACKDATA NBCCommon.h, 1148 NXTLineLeaderRegisters, 909 NXTLL_REG_BLACKLIMITS NBCCommon.h, 1148 NXTLineLeaderRegisters, 909 NXTLL_REG_CALIBRATED NBCCommon.h, 1148 NXTLineLeaderRegisters, 909 NXTLL_REG_CMD NBCCommon.h, 1148 NXTLineLeaderRegisters, 909 NXTLL_REG_KD_FACTOR

NBCCommon.h, 1149 NXTLineLeaderRegisters, 909 NXTLL_REG_KD_VALUE NBCCommon.h, 1149 NXTLineLeaderRegisters, 909 NXTLL_REG_KI_FACTOR NBCCommon.h, 1149 NXTLineLeaderRegisters, 909 NXTLL_REG_KI_VALUE NBCCommon.h, 1149 NXTLineLeaderRegisters, 910 NXTLL_REG_KP_FACTOR NBCCommon.h, 1149 NXTLineLeaderRegisters, 910 NXTLL_REG_KP_VALUE NBCCommon.h, 1149 NXTLineLeaderRegisters, 910 NXTLL_REG_RAWVOLTAGE NBCCommon.h, 1149 NXTLineLeaderRegisters, 910 NXTLL_REG_RESULT NBCCommon.h, 1149 NXTLineLeaderRegisters, 910 NXTLL_REG_SETPOINT NBCCommon.h, 1149 NXTLineLeaderRegisters, 910 NXTLL_REG_STEERING NBCCommon.h, 1149 NXTLineLeaderRegisters, 910 NXTLL_REG_WHITEDATA NBCCommon.h, 1150 NXTLineLeaderRegisters, 910 NXTLL_REG_WHITELIMITS NBCCommon.h, 1150 NXTLineLeaderRegisters, 910 NXTPM_CMD_RESET NBCCommon.h, 1150 NXTPowerMeterCommands, 906 NXTPM_REG_CAPACITY NBCCommon.h, 1150 NXTPowerMeterRegisters, 905 NXTPM_REG_CMD NBCCommon.h, 1150 NXTPowerMeterRegisters, 905 NXTPM_REG_CURRENT NBCCommon.h, 1150

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2104

NXTPowerMeterRegisters, 905 NXTPM_REG_ERRORCOUNT NBCCommon.h, 1150 NXTPowerMeterRegisters, 905 NXTPM_REG_GAIN NBCCommon.h, 1150 NXTPowerMeterRegisters, 905 NXTPM_REG_MAXCURRENT NBCCommon.h, 1150 NXTPowerMeterRegisters, 905 NXTPM_REG_MAXVOLTAGE NBCCommon.h, 1150 NXTPowerMeterRegisters, 905 NXTPM_REG_MINCURRENT NBCCommon.h, 1151 NXTPowerMeterRegisters, 905 NXTPM_REG_MINVOLTAGE NBCCommon.h, 1151 NXTPowerMeterRegisters, 905 NXTPM_REG_POWER NBCCommon.h, 1151 NXTPowerMeterRegisters, 905 NXTPM_REG_TIME NBCCommon.h, 1151 NXTPowerMeterRegisters, 906 NXTPM_REG_TOTALPOWER NBCCommon.h, 1151 NXTPowerMeterRegisters, 906 NXTPM_REG_USERGAIN NBCCommon.h, 1151 NXTPowerMeterRegisters, 906 NXTPM_REG_VOLTAGE NBCCommon.h, 1151 NXTPowerMeterRegisters, 906 NXTPowerMeterCapacityUsed MindSensorsAPI, 183 NXCDefs.h, 1560 NXTPowerMeterCommands NXTPM_CMD_RESET, 906 NXTPowerMeterElapsedTime MindSensorsAPI, 184 NXCDefs.h, 1561 NXTPowerMeterErrorCount MindSensorsAPI, 184 NXCDefs.h, 1561 NXTPowerMeterMaxCurrent

MindSensorsAPI, 185 NXCDefs.h, 1562 NXTPowerMeterMaxVoltage MindSensorsAPI, 185 NXCDefs.h, 1562 NXTPowerMeterMinCurrent MindSensorsAPI, 186 NXCDefs.h, 1563 NXTPowerMeterMinVoltage MindSensorsAPI, 186 NXCDefs.h, 1563 NXTPowerMeterPresentCurrent MindSensorsAPI, 187 NXCDefs.h, 1564 NXTPowerMeterPresentPower MindSensorsAPI, 187 NXCDefs.h, 1564 NXTPowerMeterPresentVoltage MindSensorsAPI, 187 NXCDefs.h, 1564 NXTPowerMeterRegisters NXTPM_REG_CAPACITY, 905 NXTPM_REG_CMD, 905 NXTPM_REG_CURRENT, 905 NXTPM_REG_ERRORCOUNT, 905 NXTPM_REG_GAIN, 905 NXTPM_REG_MAXCURRENT, 905 NXTPM_REG_MAXVOLTAGE, 905 NXTPM_REG_MINCURRENT, 905 NXTPM_REG_MINVOLTAGE, 905 NXTPM_REG_POWER, 905 NXTPM_REG_TIME, 906 NXTPM_REG_TOTALPOWER, 906 NXTPM_REG_USERGAIN, 906 NXTPM_REG_VOLTAGE, 906 NXTPowerMeterResetCounters MindSensorsAPI, 188 NXCDefs.h, 1565 NXTPowerMeterTotalPowerConsumed MindSensorsAPI, 188

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2105

NXCDefs.h, 1565 NXTSE_ZONE_FRONT NBCCommon.h, 1151 NXTSumoEyesConstants, 907 NXTSE_ZONE_LEFT NBCCommon.h, 1151 NXTSumoEyesConstants, 907 NXTSE_ZONE_NONE NBCCommon.h, 1152 NXTSumoEyesConstants, 907 NXTSE_ZONE_RIGHT NBCCommon.h, 1152 NXTSumoEyesConstants, 907 NXTSERVO_CMD_EDIT1 NBCCommon.h, 1152 NXTServoCommands, 899 NXTSERVO_CMD_EDIT2 NBCCommon.h, 1152 NXTServoCommands, 899 NXTSERVO_CMD_GOTO NBCCommon.h, 1152 NXTServoCommands, 899 NXTSERVO_CMD_HALT NBCCommon.h, 1152 NXTServoCommands, 899 NXTSERVO_CMD_INIT NBCCommon.h, 1152 NXTServoCommands, 899 NXTSERVO_CMD_PAUSE NBCCommon.h, 1152 NXTServoCommands, 899 NXTSERVO_CMD_RESET NBCCommon.h, 1153 NXTServoCommands, 900 NXTSERVO_CMD_RESUME NBCCommon.h, 1153 NXTServoCommands, 900 NXTSERVO_EM_CMD_QUIT NBCCommon.h, 1153 NXTServoCommands, 900 NXTSERVO_EM_REG_CMD NBCCommon.h, 1153 NXTServoRegisters, 892 NXTSERVO_EM_REG_EEPROM_END NBCCommon.h, 1153

NXTServoRegisters, 892 NXTSERVO_EM_REG_EEPROM_START NBCCommon.h, 1153 NXTServoRegisters, 893 NXTSERVO_POS_CENTER NBCCommon.h, 1153 NXTServoPos, 896 NXTSERVO_POS_MAX NBCCommon.h, 1153 NXTServoPos, 896 NXTSERVO_POS_MIN NBCCommon.h, 1154 NXTServoPos, 896 NXTSERVO_QPOS_CENTER NBCCommon.h, 1154 NXTServoQPos, 897 NXTSERVO_QPOS_MAX NBCCommon.h, 1154 NXTServoQPos, 897 NXTSERVO_QPOS_MIN NBCCommon.h, 1154 NXTServoQPos, 897 NXTSERVO_REG_CMD NBCCommon.h, 1154 NXTServoRegisters, 893 NXTSERVO_REG_S1_POS NBCCommon.h, 1154 NXTServoRegisters, 893 NXTSERVO_REG_S1_QPOS NBCCommon.h, 1154 NXTServoRegisters, 893 NXTSERVO_REG_S1_SPEED NBCCommon.h, 1154 NXTServoRegisters, 893 NXTSERVO_REG_S2_POS NBCCommon.h, 1154 NXTServoRegisters, 893 NXTSERVO_REG_S2_QPOS NBCCommon.h, 1155 NXTServoRegisters, 893 NXTSERVO_REG_S2_SPEED NBCCommon.h, 1155 NXTServoRegisters, 893 NXTSERVO_REG_S3_POS NBCCommon.h, 1155

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2106

NXTServoRegisters, 893 NXTSERVO_REG_S3_QPOS NBCCommon.h, 1155 NXTServoRegisters, 893 NXTSERVO_REG_S3_SPEED NBCCommon.h, 1155 NXTServoRegisters, 894 NXTSERVO_REG_S4_POS NBCCommon.h, 1155 NXTServoRegisters, 894 NXTSERVO_REG_S4_QPOS NBCCommon.h, 1155 NXTServoRegisters, 894 NXTSERVO_REG_S4_SPEED NBCCommon.h, 1155 NXTServoRegisters, 894 NXTSERVO_REG_S5_POS NBCCommon.h, 1155 NXTServoRegisters, 894 NXTSERVO_REG_S5_QPOS NBCCommon.h, 1155 NXTServoRegisters, 894 NXTSERVO_REG_S5_SPEED NBCCommon.h, 1156 NXTServoRegisters, 894 NXTSERVO_REG_S6_POS NBCCommon.h, 1156 NXTServoRegisters, 894 NXTSERVO_REG_S6_QPOS NBCCommon.h, 1156 NXTServoRegisters, 894 NXTSERVO_REG_S6_SPEED NBCCommon.h, 1156 NXTServoRegisters, 894 NXTSERVO_REG_S7_POS NBCCommon.h, 1156 NXTServoRegisters, 895 NXTSERVO_REG_S7_QPOS NBCCommon.h, 1156 NXTServoRegisters, 895 NXTSERVO_REG_S7_SPEED NBCCommon.h, 1156 NXTServoRegisters, 895 NXTSERVO_REG_S8_POS NBCCommon.h, 1156 NXTServoRegisters, 895

NXTSERVO_REG_S8_QPOS NBCCommon.h, 1156 NXTServoRegisters, 895 NXTSERVO_REG_S8_SPEED NBCCommon.h, 1156 NXTServoRegisters, 895 NXTSERVO_REG_VOLTAGE NBCCommon.h, 1157 NXTServoRegisters, 895 NXTSERVO_SERVO_1 NBCCommon.h, 1157 NXTServoNumbers, 897 NXTSERVO_SERVO_2 NBCCommon.h, 1157 NXTServoNumbers, 898 NXTSERVO_SERVO_3 NBCCommon.h, 1157 NXTServoNumbers, 898 NXTSERVO_SERVO_4 NBCCommon.h, 1157 NXTServoNumbers, 898 NXTSERVO_SERVO_5 NBCCommon.h, 1157 NXTServoNumbers, 898 NXTSERVO_SERVO_6 NBCCommon.h, 1157 NXTServoNumbers, 898 NXTSERVO_SERVO_7 NBCCommon.h, 1157 NXTServoNumbers, 898 NXTSERVO_SERVO_8 NBCCommon.h, 1157 NXTServoNumbers, 898 NXTServoBatteryVoltage MindSensorsAPI, 189 NXCDefs.h, 1566 NXTServoCommands NXTSERVO_CMD_EDIT1, 899 NXTSERVO_CMD_EDIT2, 899 NXTSERVO_CMD_GOTO, 899 NXTSERVO_CMD_HALT, 899 NXTSERVO_CMD_INIT, 899 NXTSERVO_CMD_PAUSE, 899 NXTSERVO_CMD_RESET, 900 NXTSERVO_CMD_RESUME, 900

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2107

NXTSERVO_EM_CMD_QUIT, 900 NXTServoEditMacro MindSensorsAPI, 189 NXCDefs.h, 1566 NXTServoGotoMacroAddress MindSensorsAPI, 190 NXCDefs.h, 1567 NXTServoHaltMacro MindSensorsAPI, 190 NXCDefs.h, 1567 NXTServoInit MindSensorsAPI, 191 NXCDefs.h, 1568 NXTServoNumbers NXTSERVO_SERVO_1, 897 NXTSERVO_SERVO_2, 898 NXTSERVO_SERVO_3, 898 NXTSERVO_SERVO_4, 898 NXTSERVO_SERVO_5, 898 NXTSERVO_SERVO_6, 898 NXTSERVO_SERVO_7, 898 NXTSERVO_SERVO_8, 898 NXTServoPauseMacro MindSensorsAPI, 191 NXCDefs.h, 1568 NXTServoPos NXTSERVO_POS_CENTER, 896 NXTSERVO_POS_MAX, 896 NXTSERVO_POS_MIN, 896 NXTServoPosition MindSensorsAPI, 192 NXCDefs.h, 1569 NXTServoQPos NXTSERVO_QPOS_CENTER, 897 NXTSERVO_QPOS_MAX, 897 NXTSERVO_QPOS_MIN, 897 NXTServoQuitEdit MindSensorsAPI, 192 NXCDefs.h, 1569 NXTServoRegisters NXTSERVO_EM_REG_CMD, 892 NXTSERVO_EM_REG_EEPROM_END, 892 NXTSERVO_EM_REG_EEPROM_START, 893

NXTSERVO_REG_CMD, 893 NXTSERVO_REG_S1_POS, 893 NXTSERVO_REG_S1_QPOS, 893 NXTSERVO_REG_S1_SPEED, 893 NXTSERVO_REG_S2_POS, 893 NXTSERVO_REG_S2_QPOS, 893 NXTSERVO_REG_S2_SPEED, 893 NXTSERVO_REG_S3_POS, 893 NXTSERVO_REG_S3_QPOS, 893 NXTSERVO_REG_S3_SPEED, 894 NXTSERVO_REG_S4_POS, 894 NXTSERVO_REG_S4_QPOS, 894 NXTSERVO_REG_S4_SPEED, 894 NXTSERVO_REG_S5_POS, 894 NXTSERVO_REG_S5_QPOS, 894 NXTSERVO_REG_S5_SPEED, 894 NXTSERVO_REG_S6_POS, 894 NXTSERVO_REG_S6_QPOS, 894 NXTSERVO_REG_S6_SPEED, 894 NXTSERVO_REG_S7_POS, 895 NXTSERVO_REG_S7_QPOS, 895 NXTSERVO_REG_S7_SPEED, 895 NXTSERVO_REG_S8_POS, 895 NXTSERVO_REG_S8_QPOS, 895 NXTSERVO_REG_S8_SPEED, 895 NXTSERVO_REG_VOLTAGE, 895 NXTServoReset MindSensorsAPI, 193 NXCDefs.h, 1570 NXTServoResumeMacro MindSensorsAPI, 193 NXCDefs.h, 1570 NXTServoSpeed MindSensorsAPI, 194 NXCDefs.h, 1571 NXTSumoEyesConstants NXTSE_ZONE_FRONT, 907 NXTSE_ZONE_LEFT, 907

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2108

NXTSE_ZONE_NONE, 907 NXTSE_ZONE_RIGHT, 907 Off NXCDefs.h, 1571 OutputModuleFunctions, 293 OffEx NXCDefs.h, 1572 OutputModuleFunctions, 293 Offset IOMapReadByIDType, 977 IOMapReadType, 979 IOMapWriteByIDType, 980 IOMapWriteType, 982 OldFilename FileRenameType, 968 On DisplayExecuteFunctionType, 944 OnBrickProgramPointer NXCDefs.h, 1572 UiModuleFunctions, 522 OnFwd NXCDefs.h, 1573 OutputModuleFunctions, 294 OnFwdEx NXCDefs.h, 1573 OutputModuleFunctions, 294 OnFwdReg NXCDefs.h, 1573 OutputModuleFunctions, 295 OnFwdRegEx NXCDefs.h, 1574 OutputModuleFunctions, 295 OnFwdRegExPID NXCDefs.h, 1574 OutputModuleFunctions, 296 OnFwdRegPID NXCDefs.h, 1575 OutputModuleFunctions, 296 OnFwdSync NXCDefs.h, 1576 OutputModuleFunctions, 297 OnFwdSyncEx NXCDefs.h, 1576 OutputModuleFunctions, 298 OnFwdSyncExPID

NXCDefs.h, 1577 OutputModuleFunctions, 298 OnFwdSyncPID NXCDefs.h, 1577 OutputModuleFunctions, 299 OnRev NXCDefs.h, 1578 OutputModuleFunctions, 299 OnRevEx NXCDefs.h, 1578 OutputModuleFunctions, 300 OnRevReg NXCDefs.h, 1579 OutputModuleFunctions, 300 OnRevRegEx NXCDefs.h, 1579 OutputModuleFunctions, 301 OnRevRegExPID NXCDefs.h, 1580 OutputModuleFunctions, 301 OnRevRegPID NXCDefs.h, 1581 OutputModuleFunctions, 302 OnRevSync NXCDefs.h, 1581 OutputModuleFunctions, 303 OnRevSyncEx NXCDefs.h, 1582 OutputModuleFunctions, 303 OnRevSyncExPID NXCDefs.h, 1582 OutputModuleFunctions, 304 OnRevSyncPID NXCDefs.h, 1583 OutputModuleFunctions, 304 OPARR_MAX ArrayOpConstants, 635 NBCCommon.h, 1158 OPARR_MEAN ArrayOpConstants, 635 NBCCommon.h, 1158 OPARR_MIN ArrayOpConstants, 635 NBCCommon.h, 1158 OPARR_SORT ArrayOpConstants, 635

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2109

NBCCommon.h, 1158 OPARR_STD ArrayOpConstants, 635 NBCCommon.h, 1158 OPARR_SUM ArrayOpConstants, 635 NBCCommon.h, 1158 OPARR_SUMSQR ArrayOpConstants, 635 NBCCommon.h, 1158 OpenFileAppend LoaderModuleFunctions, 539 NXCDefs.h, 1584 OpenFileRead LoaderModuleFunctions, 540 NXCDefs.h, 1584 OpenFileReadLinear LoaderModuleFunctions, 540 NXCDefs.h, 1585 Options DrawCircleType, 947 DrawEllipseType, 949 DrawFontType, 951 DrawGraphicArrayType, 952 DrawGraphicType, 954 DrawLineType, 955 DrawPointType, 957 DrawPolygonType, 958 DrawRectType, 959 DrawTextType, 960 Origin FileSeekType, 972 OUT_A NBCCommon.h, 1158 OutputPortConstants, 724 OUT_AB NBCCommon.h, 1159 OutputPortConstants, 724 OUT_ABC NBCCommon.h, 1159 OutputPortConstants, 725 OUT_AC NBCCommon.h, 1159 OutputPortConstants, 725 OUT_B NBCCommon.h, 1159

OutputPortConstants, 725 OUT_BC NBCCommon.h, 1159 OutputPortConstants, 725 OUT_C NBCCommon.h, 1159 OutputPortConstants, 725 OUT_MODE_BRAKE NBCCommon.h, 1160 OutModeConstants, 730 OUT_MODE_COAST NBCCommon.h, 1160 OutModeConstants, 730 OUT_MODE_MOTORON NBCCommon.h, 1160 OutModeConstants, 730 OUT_MODE_REGMETHOD NBCCommon.h, 1160 OutModeConstants, 730 OUT_MODE_REGULATED NBCCommon.h, 1160 OutModeConstants, 730 OUT_OPTION_HOLDATLIMIT NBCCommon.h, 1160 OutOptionConstants, 731 OUT_OPTION_RAMPDOWNTOLIMIT NBCCommon.h, 1160 OutOptionConstants, 731 OUT_REGMODE_IDLE NBCCommon.h, 1160 OutRegModeConstants, 734 OUT_REGMODE_POS NBCCommon.h, 1161 OutRegModeConstants, 734 OUT_REGMODE_SPEED NBCCommon.h, 1161 OutRegModeConstants, 734 OUT_REGMODE_SYNC NBCCommon.h, 1161 OutRegModeConstants, 734 OUT_REGOPTION_NO_SATURATION NBCCommon.h, 1161 OutRegOptionConstants, 732 OUT_RUNSTATE_HOLD NBCCommon.h, 1161

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2110

OutRunStateConstants, 732 OUT_RUNSTATE_IDLE NBCCommon.h, 1161 OutRunStateConstants, 732 OUT_RUNSTATE_RAMPDOWN NBCCommon.h, 1161 OutRunStateConstants, 732 OUT_RUNSTATE_RAMPUP NBCCommon.h, 1162 OutRunStateConstants, 733 OUT_RUNSTATE_RUNNING NBCCommon.h, 1162 OutRunStateConstants, 733 OutModeConstants OUT_MODE_BRAKE, 730 OUT_MODE_COAST, 730 OUT_MODE_MOTORON, 730 OUT_MODE_REGMETHOD, 730 OUT_MODE_REGULATED, 730 OutOptionConstants OUT_OPTION_HOLDATLIMIT, 731 OUT_OPTION_RAMPDOWNTOLIMIT, 731 Output eld constants, 734 Output module, 47 Output module constants, 47 Output module functions, 279 Output module IOMAP offsets, 741 Output module types, 279 Output port constants, 723 Output port mode constants, 729 Output port option constants, 731 Output port regulation mode constants, 733 Output port run state constants, 732 Output port update ag constants, 727 Output regulation option constants, 731 OutputFieldConstants ActualSpeedField, 736 BlockTachoCountField, 736 MaxAccelerationField, 736 MaxSpeedField, 736 OutputModeField, 737 OutputOptionsField, 737

OverloadField, 737 PowerField, 737 RegDValueField, 738 RegIValueField, 738 RegModeField, 738 RegPValueField, 739 RotationCountField, 739 RunStateField, 739 TachoCountField, 739 TachoLimitField, 740 TurnRatioField, 740 UpdateFlagsField, 740 OutputIOMAP OutputOffsetActualSpeed, 741 OutputOffsetBlockTachoCount, 741 OutputOffsetFlags, 741 OutputOffsetMaxAccel, 742 OutputOffsetMaxSpeed, 742 OutputOffsetMode, 742 OutputOffsetMotorRPM, 742 OutputOffsetOptions, 742 OutputOffsetOverloaded, 742 OutputOffsetRegDParameter, 742 OutputOffsetRegIParameter, 742 OutputOffsetRegMode, 742 OutputOffsetRegPParameter, 743 OutputOffsetRegulationOptions, 743 OutputOffsetRegulationTime, 743 OutputOffsetRotationCount, 743 OutputOffsetRunState, 743 OutputOffsetSpeed, 743 OutputOffsetSyncTurnParameter, 743 OutputOffsetTachoCount, 743 OutputOffsetTachoLimit, 743 OutputModeField NBCCommon.h, 1162 OutputFieldConstants, 737 OutputModuleFunctions Coast, 284 CoastEx, 284 Float, 285 GetOutput, 285 MotorActualSpeed, 285 MotorBlockTachoCount, 286 MotorMaxAcceleration, 286

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2111

MotorMaxSpeed, 287 MotorMode, 287 MotorOutputOptions, 287 MotorOverload, 288 MotorPower, 288 MotorPwnFreq, 289 MotorRegDValue, 289 MotorRegIValue, 289 MotorRegPValue, 290 MotorRegulation, 290 MotorRegulationOptions, 290 MotorRegulationTime, 291 MotorRotationCount, 291 MotorRunState, 291 MotorTachoCount, 292 MotorTachoLimit, 292 MotorTurnRatio, 293 Off, 293 OffEx, 293 OnFwd, 294 OnFwdEx, 294 OnFwdReg, 295 OnFwdRegEx, 295 OnFwdRegExPID, 296 OnFwdRegPID, 296 OnFwdSync, 297 OnFwdSyncEx, 298 OnFwdSyncExPID, 298 OnFwdSyncPID, 299 OnRev, 299 OnRevEx, 300 OnRevReg, 300 OnRevRegEx, 301 OnRevRegExPID, 301 OnRevRegPID, 302 OnRevSync, 303 OnRevSyncEx, 303 OnRevSyncExPID, 304 OnRevSyncPID, 304 PosRegAddAngle, 305 PosRegEnable, 305 PosRegSetAngle, 306 PosRegSetMax, 306 ResetAllTachoCounts, 307 ResetBlockTachoCount, 307 ResetRotationCount, 307

ResetTachoCount, 308 RotateMotor, 308 RotateMotorEx, 309 RotateMotorExPID, 309 RotateMotorPID, 310 SetMotorPwnFreq, 311 SetMotorRegulationOptions, 311 SetMotorRegulationTime, 311 SetOutput, 311 OutputModuleID ModuleIDConstants, 227 NBCCommon.h, 1162 OutputModuleName ModuleNameConstants, 225 NBCCommon.h, 1162 OutputOffsetActualSpeed NBCCommon.h, 1162 OutputIOMAP, 741 OutputOffsetBlockTachoCount NBCCommon.h, 1162 OutputIOMAP, 741 OutputOffsetFlags NBCCommon.h, 1163 OutputIOMAP, 741 OutputOffsetMaxAccel NBCCommon.h, 1163 OutputIOMAP, 742 OutputOffsetMaxSpeed NBCCommon.h, 1163 OutputIOMAP, 742 OutputOffsetMode NBCCommon.h, 1163 OutputIOMAP, 742 OutputOffsetMotorRPM NBCCommon.h, 1163 OutputIOMAP, 742 OutputOffsetOptions NBCCommon.h, 1163 OutputIOMAP, 742 OutputOffsetOverloaded NBCCommon.h, 1163 OutputIOMAP, 742 OutputOffsetRegDParameter NBCCommon.h, 1163 OutputIOMAP, 742 OutputOffsetRegIParameter

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2112

NBCCommon.h, 1163 OutputIOMAP, 742 OutputOffsetRegMode NBCCommon.h, 1164 OutputIOMAP, 742 OutputOffsetRegPParameter NBCCommon.h, 1164 OutputIOMAP, 743 OutputOffsetRegulationOptions NBCCommon.h, 1164 OutputIOMAP, 743 OutputOffsetRegulationTime NBCCommon.h, 1164 OutputIOMAP, 743 OutputOffsetRotationCount NBCCommon.h, 1164 OutputIOMAP, 743 OutputOffsetRunState NBCCommon.h, 1164 OutputIOMAP, 743 OutputOffsetSpeed NBCCommon.h, 1164 OutputIOMAP, 743 OutputOffsetSyncTurnParameter NBCCommon.h, 1164 OutputIOMAP, 743 OutputOffsetTachoCount NBCCommon.h, 1164 OutputIOMAP, 743 OutputOffsetTachoLimit NBCCommon.h, 1165 OutputIOMAP, 743 OutputOptionsField NBCCommon.h, 1165 OutputFieldConstants, 737 OutputPortConstants OUT_A, 724 OUT_AB, 724 OUT_ABC, 725 OUT_AC, 725 OUT_B, 725 OUT_BC, 725 OUT_C, 725 OutputStateType, 994 BlockTachoCount, 994 Mode, 994

Port, 994 Power, 994 RegMode, 995 RotationCount, 995 RunState, 995 TachoCount, 995 TachoLimit, 995 TurnRatio, 995 OutRegModeConstants OUT_REGMODE_IDLE, 734 OUT_REGMODE_POS, 734 OUT_REGMODE_SPEED, 734 OUT_REGMODE_SYNC, 734 OutRegOptionConstants OUT_REGOPTION_NO_SATURATION, 732 OutRunStateConstants OUT_RUNSTATE_HOLD, 732 OUT_RUNSTATE_IDLE, 732 OUT_RUNSTATE_RAMPDOWN, 732 OUT_RUNSTATE_RAMPUP, 733 OUT_RUNSTATE_RUNNING, 733 OutUFConstants UF_PENDING_UPDATES, 727 UF_UPDATE_MODE, 727 UF_UPDATE_PID_VALUES, 727 UF_UPDATE_RESET_BLOCK_COUNT, 727 UF_UPDATE_RESET_COUNT, 728 UF_UPDATE_RESET_ROTATION_COUNT, 728 UF_UPDATE_SPEED, 728 UF_UPDATE_TACHO_LIMIT, 728 OverloadField NBCCommon.h, 1165 OutputFieldConstants, 737 Param1 CommExecuteFunctionType, 930 Param2 CommExecuteFunctionType, 930 Param3 CommExecuteFunctionType, 930 Pattern

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2113

ListFilesType, 985 PF/IR Train function constants, 853 PF_CHANNEL_1 NBCCommon.h, 1165 PFChannelConstants, 851 PF_CHANNEL_2 NBCCommon.h, 1165 PFChannelConstants, 852 PF_CHANNEL_3 NBCCommon.h, 1166 PFChannelConstants, 852 PF_CHANNEL_4 NBCCommon.h, 1166 PFChannelConstants, 852 PF_CMD_BRAKE NBCCommon.h, 1166 PFCmdConstants, 850 PF_CMD_FLOAT NBCCommon.h, 1166 PFCmdConstants, 850 PF_CMD_FWD NBCCommon.h, 1166 PFCmdConstants, 850 PF_CMD_REV NBCCommon.h, 1166 PFCmdConstants, 851 PF_CMD_STOP NBCCommon.h, 1166 PFCmdConstants, 851 PF_CST_CLEAR1_CLEAR2 NBCCommon.h, 1167 PFCSTOptions, 858 PF_CST_CLEAR1_SET2 NBCCommon.h, 1167 PFCSTOptions, 858 PF_CST_DECREMENT_PWM NBCCommon.h, 1167 PFCSTOptions, 858 PF_CST_FULL_FWD NBCCommon.h, 1167 PFCSTOptions, 858 PF_CST_FULL_REV NBCCommon.h, 1167 PFCSTOptions, 858 PF_CST_INCREMENT_PWM NBCCommon.h, 1167

PFCSTOptions, 858 PF_CST_SET1_CLEAR2 NBCCommon.h, 1167 PFCSTOptions, 858 PF_CST_SET1_SET2 NBCCommon.h, 1167 PFCSTOptions, 859 PF_CST_TOGGLE_DIR NBCCommon.h, 1167 PFCSTOptions, 859 PF_FUNC_CLEAR NBCCommon.h, 1168 PFPinFuncs, 857 PF_FUNC_NOCHANGE NBCCommon.h, 1168 PFPinFuncs, 857 PF_FUNC_SET NBCCommon.h, 1168 PFPinFuncs, 857 PF_FUNC_TOGGLE NBCCommon.h, 1168 PFPinFuncs, 857 PF_MODE_COMBO_DIRECT NBCCommon.h, 1168 PFModeConstants, 853 PF_MODE_COMBO_PWM NBCCommon.h, 1168 PFModeConstants, 853 PF_MODE_SINGLE_OUTPUT_CST NBCCommon.h, 1168 PFModeConstants, 853 PF_MODE_SINGLE_OUTPUT_PWM NBCCommon.h, 1168 PFModeConstants, 853 PF_MODE_SINGLE_PIN_CONT NBCCommon.h, 1168 PFModeConstants, 853 PF_MODE_SINGLE_PIN_TIME NBCCommon.h, 1169 PFModeConstants, 853 PF_MODE_TRAIN NBCCommon.h, 1169 PFModeConstants, 853 PF_OUT_A NBCCommon.h, 1169 PFOutputs, 855

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2114

PF_OUT_B NBCCommon.h, 1169 PFOutputs, 856 PF_PIN_C1 NBCCommon.h, 1169 PFPinConstants, 856 PF_PIN_C2 NBCCommon.h, 1169 PFPinConstants, 856 PF_PWM_BRAKE NBCCommon.h, 1169 PFPWMOptions, 860 PF_PWM_FLOAT NBCCommon.h, 1169 PFPWMOptions, 860 PF_PWM_FWD1 NBCCommon.h, 1170 PFPWMOptions, 860 PF_PWM_FWD2 NBCCommon.h, 1170 PFPWMOptions, 860 PF_PWM_FWD3 NBCCommon.h, 1170 PFPWMOptions, 860 PF_PWM_FWD4 NBCCommon.h, 1170 PFPWMOptions, 860 PF_PWM_FWD5 NBCCommon.h, 1170 PFPWMOptions, 860 PF_PWM_FWD6 NBCCommon.h, 1170 PFPWMOptions, 860 PF_PWM_FWD7 NBCCommon.h, 1170 PFPWMOptions, 860 PF_PWM_REV1 NBCCommon.h, 1170 PFPWMOptions, 861 PF_PWM_REV2 NBCCommon.h, 1170 PFPWMOptions, 861 PF_PWM_REV3 NBCCommon.h, 1171 PFPWMOptions, 861 PF_PWM_REV4

NBCCommon.h, 1171 PFPWMOptions, 861 PF_PWM_REV5 NBCCommon.h, 1171 PFPWMOptions, 861 PF_PWM_REV6 NBCCommon.h, 1171 PFPWMOptions, 861 PF_PWM_REV7 NBCCommon.h, 1171 PFPWMOptions, 861 PFChannelConstants PF_CHANNEL_1, 851 PF_CHANNEL_2, 852 PF_CHANNEL_3, 852 PF_CHANNEL_4, 852 PFCmdConstants PF_CMD_BRAKE, 850 PF_CMD_FLOAT, 850 PF_CMD_FWD, 850 PF_CMD_REV, 851 PF_CMD_STOP, 851 PFCSTOptions PF_CST_CLEAR1_CLEAR2, 858 PF_CST_CLEAR1_SET2, 858 PF_CST_DECREMENT_PWM, 858 PF_CST_FULL_FWD, 858 PF_CST_FULL_REV, 858 PF_CST_INCREMENT_PWM, 858 PF_CST_SET1_CLEAR2, 858 PF_CST_SET1_SET2, 859 PF_CST_TOGGLE_DIR, 859 PFMate channel constants, 890 PFMate motor constants, 889 PFMATE_CHANNEL_1 NBCCommon.h, 1171 PFMateChannelConstants, 890 PFMATE_CHANNEL_2 NBCCommon.h, 1171 PFMateChannelConstants, 890 PFMATE_CHANNEL_3 NBCCommon.h, 1171 PFMateChannelConstants, 891 PFMATE_CHANNEL_4 NBCCommon.h, 1172

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2115

PFMateChannelConstants, 891 PFMATE_CMD_GO NBCCommon.h, 1172 PFMateConstants, 888 PFMATE_CMD_RAW NBCCommon.h, 1172 PFMateConstants, 888 PFMATE_MOTORS_A NBCCommon.h, 1172 PFMateMotorConstants, 890 PFMATE_MOTORS_B NBCCommon.h, 1172 PFMateMotorConstants, 890 PFMATE_MOTORS_BOTH NBCCommon.h, 1172 PFMateMotorConstants, 890 PFMATE_REG_A_CMD NBCCommon.h, 1172 PFMateConstants, 888 PFMATE_REG_A_SPEED NBCCommon.h, 1172 PFMateConstants, 888 PFMATE_REG_B_CMD NBCCommon.h, 1172 PFMateConstants, 889 PFMATE_REG_B_SPEED NBCCommon.h, 1173 PFMateConstants, 889 PFMATE_REG_CHANNEL NBCCommon.h, 1173 PFMateConstants, 889 PFMATE_REG_CMD NBCCommon.h, 1173 PFMateConstants, 889 PFMATE_REG_MOTORS NBCCommon.h, 1173 PFMateConstants, 889 PFMateChannelConstants PFMATE_CHANNEL_1, 890 PFMATE_CHANNEL_2, 890 PFMATE_CHANNEL_3, 891 PFMATE_CHANNEL_4, 891 PFMateConstants PFMATE_CMD_GO, 888 PFMATE_CMD_RAW, 888 PFMATE_REG_A_CMD, 888

PFMATE_REG_A_SPEED, 888 PFMATE_REG_B_CMD, 889 PFMATE_REG_B_SPEED, 889 PFMATE_REG_CHANNEL, 889 PFMATE_REG_CMD, 889 PFMATE_REG_MOTORS, 889 PFMateMotorConstants PFMATE_MOTORS_A, 890 PFMATE_MOTORS_B, 890 PFMATE_MOTORS_BOTH, 890 PFMateSend MindSensorsAPI, 194 NXCDefs.h, 1585 PFMateSendRaw MindSensorsAPI, 195 NXCDefs.h, 1586 PFModeConstants PF_MODE_COMBO_DIRECT, 853 PF_MODE_COMBO_PWM, 853 PF_MODE_SINGLE_OUTPUT_CST, 853 PF_MODE_SINGLE_OUTPUT_PWM, 853 PF_MODE_SINGLE_PIN_CONT, 853 PF_MODE_SINGLE_PIN_TIME, 853 PF_MODE_TRAIN, 853 PFOutputs PF_OUT_A, 855 PF_OUT_B, 856 PFPinConstants PF_PIN_C1, 856 PF_PIN_C2, 856 PFPinFuncs PF_FUNC_CLEAR, 857 PF_FUNC_NOCHANGE, 857 PF_FUNC_SET, 857 PF_FUNC_TOGGLE, 857 PFPWMOptions PF_PWM_BRAKE, 860 PF_PWM_FLOAT, 860 PF_PWM_FWD1, 860 PF_PWM_FWD2, 860 PF_PWM_FWD3, 860

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2116

PF_PWM_FWD4, 860 PF_PWM_FWD5, 860 PF_PWM_FWD6, 860 PF_PWM_FWD7, 860 PF_PWM_REV1, 861 PF_PWM_REV2, 861 PF_PWM_REV3, 861 PF_PWM_REV4, 861 PF_PWM_REV5, 861 PF_PWM_REV6, 861 PF_PWM_REV7, 861 PI MiscConstants, 228 NBCCommon.h, 1173 PID constants, 725 PID_0 NBCCommon.h, 1173 PIDConstants, 726 PID_1 NBCCommon.h, 1173 PIDConstants, 726 PID_2 NBCCommon.h, 1173 PIDConstants, 726 PID_3 NBCCommon.h, 1173 PIDConstants, 726 PID_4 NBCCommon.h, 1174 PIDConstants, 726 PID_5 NBCCommon.h, 1174 PIDConstants, 726 PID_6 NBCCommon.h, 1174 PIDConstants, 726 PID_7 NBCCommon.h, 1174 PIDConstants, 726 PIDConstants PID_0, 726 PID_1, 726 PID_2, 726 PID_3, 726 PID_4, 726 PID_5, 726

PID_6, 726 PID_7, 726 PlayFile NXCDefs.h, 1586 SoundModuleFunctions, 342 PlayFileEx NXCDefs.h, 1587 SoundModuleFunctions, 342 PlaySound NXCDefs.h, 1587 SoundModuleFunctions, 343 PlayTone NXCDefs.h, 1588 SoundModuleFunctions, 343 PlayToneEx NXCDefs.h, 1588 SoundModuleFunctions, 344 PlayTones NXCDefs.h, 1589 SoundModuleFunctions, 344 PointOut DisplayModuleFunctions, 328 NXCDefs.h, 1589 Points DrawPolygonType, 958 PolyOut DisplayModuleFunctions, 329 NXCDefs.h, 1590 POOL_MAX_SIZE CommandModuleConstants, 51 NBCCommon.h, 1174 PoolSize MemoryManagerType, 990 Port ColorSensorReadType, 923 CommLSCheckStatusType, 934 CommLSReadType, 936 CommLSWriteExType, 937 CommLSWriteType, 939 InputValuesType, 975 OutputStateType, 994 Pos cstringAPI, 618 NXCDefs.h, 1590 Position FileTellType, 973

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2117

PosRegAddAngle NXCDefs.h, 1591 OutputModuleFunctions, 305 PosRegEnable NXCDefs.h, 1591 OutputModuleFunctions, 305 PosRegSetAngle NXCDefs.h, 1592 OutputModuleFunctions, 306 PosRegSetMax NXCDefs.h, 1592 OutputModuleFunctions, 306 Pow cmathAPI, 567 NXCDefs.h, 1338 pow cmathAPI, 582 NXCDefs.h, 1592 Power OutputStateType, 994 Power Function channel constants, 851 Power Function command constants, 850 Power Function CST options constants, 857 Power Function mode constants, 852 Power Function output constants, 855 Power Function pin constants, 856 Power Function PWM option constants, 859 Power Function single pin function constants, 856 PowerDown IOCtrlModuleFunctions, 420 NXCDefs.h, 1593 PowerField NBCCommon.h, 1174 OutputFieldConstants, 737 PowerOn constants, 668 PowerState CommBTOnOffType, 926 Precedes CommandModuleFunctions, 394 NXCDefs.h, 1593 Pressed ReadButtonType, 997 printf

cstdioAPI, 596 NXCDefs.h, 1594 PROG_ABORT CommandProgStatus, 665 NBCCommon.h, 1174 PROG_ERROR CommandProgStatus, 665 NBCCommon.h, 1174 PROG_IDLE CommandProgStatus, 665 NBCCommon.h, 1175 PROG_OK CommandProgStatus, 665 NBCCommon.h, 1175 PROG_RESET CommandProgStatus, 665 NBCCommon.h, 1175 PROG_RUNNING CommandProgStatus, 665 NBCCommon.h, 1175 Program status constants, 664 Property constants, 633 PSP_BTNSET1_DOWN MSPSPNXBtnSet1, 879 NBCCommon.h, 1175 PSP_BTNSET1_L3 MSPSPNXBtnSet1, 879 NBCCommon.h, 1175 PSP_BTNSET1_LEFT MSPSPNXBtnSet1, 880 NBCCommon.h, 1175 PSP_BTNSET1_R3 MSPSPNXBtnSet1, 880 NBCCommon.h, 1175 PSP_BTNSET1_RIGHT MSPSPNXBtnSet1, 880 NBCCommon.h, 1175 PSP_BTNSET1_UP MSPSPNXBtnSet1, 880 NBCCommon.h, 1175 PSP_BTNSET2_CIRCLE MSPSPNXBtnSet2, 881 NBCCommon.h, 1176 PSP_BTNSET2_CROSS MSPSPNXBtnSet2, 881 NBCCommon.h, 1176

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2118

PSP_BTNSET2_L1 MSPSPNXBtnSet2, 881 NBCCommon.h, 1176 PSP_BTNSET2_L2 MSPSPNXBtnSet2, 881 NBCCommon.h, 1176 PSP_BTNSET2_R1 MSPSPNXBtnSet2, 881 NBCCommon.h, 1176 PSP_BTNSET2_R2 MSPSPNXBtnSet2, 881 NBCCommon.h, 1176 PSP_BTNSET2_SQUARE MSPSPNXBtnSet2, 881 NBCCommon.h, 1176 PSP_BTNSET2_TRIANGLE MSPSPNXBtnSet2, 881 NBCCommon.h, 1176 PSP_CMD_ANALOG MSPSPNX, 878 NBCCommon.h, 1176 PSP_CMD_DIGITAL MSPSPNX, 878 NBCCommon.h, 1176 PSP_REG_BTNSET1 MSPSPNX, 878 NBCCommon.h, 1177 PSP_REG_BTNSET2 MSPSPNX, 878 NBCCommon.h, 1177 PSP_REG_XLEFT MSPSPNX, 878 NBCCommon.h, 1177 PSP_REG_XRIGHT MSPSPNX, 879 NBCCommon.h, 1177 PSP_REG_YLEFT MSPSPNX, 879 NBCCommon.h, 1177 PSP_REG_YRIGHT MSPSPNX, 879 NBCCommon.h, 1177 PSPNxAnalog MindSensorsAPI, 196 NXCDefs.h, 1594 PSPNxDigital

MindSensorsAPI, 196 NXCDefs.h, 1594 putc cstdioAPI, 590 NXCDefs.h, 1338 QueueID MessageReadType, 992 MessageWriteType, 993 quot div_t, 946 ldiv_t, 984 RADIANS_PER_DEGREE MiscConstants, 228 NBCCommon.h, 1177 rand cstdlibAPI, 605 NXCDefs.h, 1595 RAND_MAX NBCCommon.h, 1177 NXTLimits, 916 Random cstdlibAPI, 605 NXCDefs.h, 1595 RandomNumber NBCCommon.h, 1177 SysCallConstants, 643 RandomNumberType, 995 Result, 996 RawArray ColorSensorReadType, 923 RawVal ComputeCalibValueType, 940 RawValue InputValuesType, 975 RawValueField InputFieldConstants, 715 NBCCommon.h, 1178 RC_PROP_BTONOFF NBCCommon.h, 1178 RCPropertyConstants, 634 RC_PROP_DEBUGGING NBCCommon.h, 1178 RCPropertyConstants, 634 RC_PROP_SLEEP_TIMEOUT

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2119

NBCCommon.h, 1178 RCPropertyConstants, 634 RC_PROP_SOUND_LEVEL NBCCommon.h, 1178 RCPropertyConstants, 634 RCPropertyConstants RC_PROP_BTONOFF, 634 RC_PROP_DEBUGGING, 634 RC_PROP_SLEEP_TIMEOUT, 634 RC_PROP_SOUND_LEVEL, 634 RCX and Scout opcode constants, 839 RCX and Scout sound constants, 820 RCX and Scout source constants, 833 RCX constants, 812 RCX IR remote constants, 817 RCX output constants, 813 RCX output direction constants, 816 RCX output mode constants, 815 RCX output power constants, 816 RCX_AbsVarOp NBCCommon.h, 1178 RCXOpcodeConstants, 841 RCX_AndVarOp NBCCommon.h, 1178 RCXOpcodeConstants, 841 RCX_AutoOffOp NBCCommon.h, 1178 RCXOpcodeConstants, 841 RCX_BatteryLevelOp NBCCommon.h, 1178 RCXOpcodeConstants, 841 RCX_BatteryLevelSrc NBCCommon.h, 1179 RCXSourceConstants, 835 RCX_BootModeOp NBCCommon.h, 1179 RCXOpcodeConstants, 842 RCX_CalibrateEventOp NBCCommon.h, 1179 RCXOpcodeConstants, 842 RCX_ClearAllEventsOp NBCCommon.h, 1179 RCXOpcodeConstants, 842 RCX_ClearCounterOp NBCCommon.h, 1179 RCXOpcodeConstants, 842

RCX_ClearMsgOp NBCCommon.h, 1179 RCXOpcodeConstants, 842 RCX_ClearSensorOp NBCCommon.h, 1179 RCXOpcodeConstants, 842 RCX_ClearSoundOp NBCCommon.h, 1179 RCXOpcodeConstants, 842 RCX_ClearTimerOp NBCCommon.h, 1179 RCXOpcodeConstants, 842 RCX_ClickCounterSrc NBCCommon.h, 1179 RCXSourceConstants, 835 RCX_ConstantSrc NBCCommon.h, 1180 RCXSourceConstants, 835 RCX_CounterSrc NBCCommon.h, 1180 RCXSourceConstants, 835 RCX_DatalogOp NBCCommon.h, 1180 RCXOpcodeConstants, 842 RCX_DatalogRawDirectSrc NBCCommon.h, 1180 RCXSourceConstants, 835 RCX_DatalogRawIndirectSrc NBCCommon.h, 1180 RCXSourceConstants, 835 RCX_DatalogSrcDirectSrc NBCCommon.h, 1180 RCXSourceConstants, 835 RCX_DatalogSrcIndirectSrc NBCCommon.h, 1180 RCXSourceConstants, 835 RCX_DatalogValueDirectSrc NBCCommon.h, 1181 RCXSourceConstants, 836 RCX_DatalogValueIndirectSrc NBCCommon.h, 1181 RCXSourceConstants, 836 RCX_DecCounterOp NBCCommon.h, 1181 RCXOpcodeConstants, 842 RCX_DeleteSubOp

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2120

NBCCommon.h, 1181 RCXOpcodeConstants, 843 RCX_DeleteSubsOp NBCCommon.h, 1181 RCXOpcodeConstants, 843 RCX_DeleteTaskOp NBCCommon.h, 1181 RCXOpcodeConstants, 843 RCX_DeleteTasksOp NBCCommon.h, 1181 RCXOpcodeConstants, 843 RCX_DirectEventOp NBCCommon.h, 1181 RCXOpcodeConstants, 843 RCX_DisplayOp NBCCommon.h, 1181 RCXOpcodeConstants, 843 RCX_DivVarOp NBCCommon.h, 1181 RCXOpcodeConstants, 843 RCX_DurationSrc NBCCommon.h, 1182 RCXSourceConstants, 836 RCX_EventStateSrc NBCCommon.h, 1182 RCXSourceConstants, 836 RCX_FirmwareVersionSrc NBCCommon.h, 1182 RCXSourceConstants, 836 RCX_GlobalMotorStatusSrc NBCCommon.h, 1182 RCXSourceConstants, 836 RCX_GOutputDirOp NBCCommon.h, 1182 RCXOpcodeConstants, 843 RCX_GOutputModeOp NBCCommon.h, 1182 RCXOpcodeConstants, 843 RCX_GOutputPowerOp NBCCommon.h, 1182 RCXOpcodeConstants, 843 RCX_HysteresisSrc NBCCommon.h, 1182 RCXSourceConstants, 836 RCX_IncCounterOp NBCCommon.h, 1182

RCXOpcodeConstants, 844 RCX_IndirectVarSrc NBCCommon.h, 1182 RCXSourceConstants, 836 RCX_InputBooleanSrc NBCCommon.h, 1183 RCXSourceConstants, 836 RCX_InputModeOp NBCCommon.h, 1183 RCXOpcodeConstants, 844 RCX_InputModeSrc NBCCommon.h, 1183 RCXSourceConstants, 836 RCX_InputRawSrc NBCCommon.h, 1183 RCXSourceConstants, 837 RCX_InputTypeOp NBCCommon.h, 1183 RCXOpcodeConstants, 844 RCX_InputTypeSrc NBCCommon.h, 1183 RCXSourceConstants, 837 RCX_InputValueSrc NBCCommon.h, 1183 RCXSourceConstants, 837 RCX_IRModeOp NBCCommon.h, 1183 RCXOpcodeConstants, 844 RCX_LightOp NBCCommon.h, 1183 RCXOpcodeConstants, 844 RCX_LowerThresholdSrc NBCCommon.h, 1184 RCXSourceConstants, 837 RCX_LSBlinkTimeOp NBCCommon.h, 1184 RCXOpcodeConstants, 844 RCX_LSCalibrateOp NBCCommon.h, 1184 RCXOpcodeConstants, 844 RCX_LSHysteresisOp NBCCommon.h, 1184 RCXOpcodeConstants, 844 RCX_LSLowerThreshOp NBCCommon.h, 1184 RCXOpcodeConstants, 844

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2121

RCX_LSUpperThreshOp NBCCommon.h, 1184 RCXOpcodeConstants, 844 RCX_MessageOp NBCCommon.h, 1184 RCXOpcodeConstants, 845 RCX_MessageSrc NBCCommon.h, 1184 RCXSourceConstants, 837 RCX_MulVarOp NBCCommon.h, 1184 RCXOpcodeConstants, 845 RCX_MuteSoundOp NBCCommon.h, 1184 RCXOpcodeConstants, 845 RCX_OnOffFloatOp NBCCommon.h, 1185 RCXOpcodeConstants, 845 RCX_OrVarOp NBCCommon.h, 1185 RCXOpcodeConstants, 845 RCX_OUT_A NBCCommon.h, 1185 RCXOutputConstants, 814 RCX_OUT_AB NBCCommon.h, 1185 RCXOutputConstants, 814 RCX_OUT_ABC NBCCommon.h, 1185 RCXOutputConstants, 814 RCX_OUT_AC NBCCommon.h, 1185 RCXOutputConstants, 814 RCX_OUT_B NBCCommon.h, 1186 RCXOutputConstants, 814 RCX_OUT_BC NBCCommon.h, 1186 RCXOutputConstants, 814 RCX_OUT_C NBCCommon.h, 1186 RCXOutputConstants, 815 RCX_OUT_FLOAT NBCCommon.h, 1186 RCXOutputMode, 815 RCX_OUT_FULL

NBCCommon.h, 1186 RCXOutputPower, 817 RCX_OUT_FWD NBCCommon.h, 1186 RCXOutputDirection, 816 RCX_OUT_HALF NBCCommon.h, 1186 RCXOutputPower, 817 RCX_OUT_LOW NBCCommon.h, 1186 RCXOutputPower, 817 RCX_OUT_OFF NBCCommon.h, 1187 RCXOutputMode, 815 RCX_OUT_ON NBCCommon.h, 1187 RCXOutputMode, 815 RCX_OUT_REV NBCCommon.h, 1187 RCXOutputDirection, 816 RCX_OUT_TOGGLE NBCCommon.h, 1187 RCXOutputDirection, 816 RCX_OutputDirOp NBCCommon.h, 1187 RCXOpcodeConstants, 845 RCX_OutputPowerOp NBCCommon.h, 1187 RCXOpcodeConstants, 845 RCX_OutputStatusSrc NBCCommon.h, 1187 RCXSourceConstants, 837 RCX_PBTurnOffOp NBCCommon.h, 1187 RCXOpcodeConstants, 845 RCX_PingOp NBCCommon.h, 1187 RCXOpcodeConstants, 845 RCX_PlaySoundOp NBCCommon.h, 1188 RCXOpcodeConstants, 845 RCX_PlayToneOp NBCCommon.h, 1188 RCXOpcodeConstants, 846 RCX_PlayToneVarOp NBCCommon.h, 1188

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2122

RCXOpcodeConstants, 846 RCX_PollMemoryOp NBCCommon.h, 1188 RCXOpcodeConstants, 846 RCX_PollOp NBCCommon.h, 1188 RCXOpcodeConstants, 846 RCX_ProgramSlotSrc NBCCommon.h, 1188 RCXSourceConstants, 837 RCX_RandomSrc NBCCommon.h, 1188 RCXSourceConstants, 837 RCX_RemoteKeysReleased NBCCommon.h, 1188 RCXRemoteConstants, 818 RCX_RemoteOp NBCCommon.h, 1188 RCXOpcodeConstants, 846 RCX_RemoteOutABackward NBCCommon.h, 1189 RCXRemoteConstants, 818 RCX_RemoteOutAForward NBCCommon.h, 1189 RCXRemoteConstants, 818 RCX_RemoteOutBBackward NBCCommon.h, 1189 RCXRemoteConstants, 818 RCX_RemoteOutBForward NBCCommon.h, 1189 RCXRemoteConstants, 818 RCX_RemoteOutCBackward NBCCommon.h, 1189 RCXRemoteConstants, 818 RCX_RemoteOutCForward NBCCommon.h, 1189 RCXRemoteConstants, 818 RCX_RemotePBMessage1 NBCCommon.h, 1189 RCXRemoteConstants, 819 RCX_RemotePBMessage2 NBCCommon.h, 1189 RCXRemoteConstants, 819 RCX_RemotePBMessage3 NBCCommon.h, 1189 RCXRemoteConstants, 819

RCX_RemotePlayASound NBCCommon.h, 1189 RCXRemoteConstants, 819 RCX_RemoteSelProgram1 NBCCommon.h, 1190 RCXRemoteConstants, 819 RCX_RemoteSelProgram2 NBCCommon.h, 1190 RCXRemoteConstants, 819 RCX_RemoteSelProgram3 NBCCommon.h, 1190 RCXRemoteConstants, 819 RCX_RemoteSelProgram4 NBCCommon.h, 1190 RCXRemoteConstants, 819 RCX_RemoteSelProgram5 NBCCommon.h, 1190 RCXRemoteConstants, 819 RCX_RemoteStopOutOff NBCCommon.h, 1190 RCXRemoteConstants, 820 RCX_ScoutCounterLimitSrc NBCCommon.h, 1190 RCXSourceConstants, 838 RCX_ScoutEventFBSrc NBCCommon.h, 1190 RCXSourceConstants, 838 RCX_ScoutLightParamsSrc NBCCommon.h, 1190 RCXSourceConstants, 838 RCX_ScoutOp NBCCommon.h, 1191 RCXOpcodeConstants, 846 RCX_ScoutRulesOp NBCCommon.h, 1191 RCXOpcodeConstants, 846 RCX_ScoutRulesSrc NBCCommon.h, 1191 RCXSourceConstants, 838 RCX_ScoutTimerLimitSrc NBCCommon.h, 1191 RCXSourceConstants, 838 RCX_SelectProgramOp NBCCommon.h, 1191 RCXOpcodeConstants, 846 RCX_SendUARTDataOp

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2123

NBCCommon.h, 1191 RCXOpcodeConstants, 846 RCX_SetCounterOp NBCCommon.h, 1191 RCXOpcodeConstants, 846 RCX_SetDatalogOp NBCCommon.h, 1191 RCXOpcodeConstants, 847 RCX_SetEventOp NBCCommon.h, 1191 RCXOpcodeConstants, 847 RCX_SetFeedbackOp NBCCommon.h, 1191 RCXOpcodeConstants, 847 RCX_SetPriorityOp NBCCommon.h, 1192 RCXOpcodeConstants, 847 RCX_SetSourceValueOp NBCCommon.h, 1192 RCXOpcodeConstants, 847 RCX_SetTimerLimitOp NBCCommon.h, 1192 RCXOpcodeConstants, 847 RCX_SetVarOp NBCCommon.h, 1192 RCXOpcodeConstants, 847 RCX_SetWatchOp NBCCommon.h, 1192 RCXOpcodeConstants, 847 RCX_SgnVarOp NBCCommon.h, 1192 RCXOpcodeConstants, 847 RCX_SoundOp NBCCommon.h, 1192 RCXOpcodeConstants, 847 RCX_StartTaskOp NBCCommon.h, 1192 RCXOpcodeConstants, 848 RCX_StopAllTasksOp NBCCommon.h, 1192 RCXOpcodeConstants, 848 RCX_StopTaskOp NBCCommon.h, 1192 RCXOpcodeConstants, 848 RCX_SubVarOp NBCCommon.h, 1193

RCXOpcodeConstants, 848 RCX_SumVarOp NBCCommon.h, 1193 RCXOpcodeConstants, 848 RCX_TaskEventsSrc NBCCommon.h, 1193 RCXSourceConstants, 838 RCX_TenMSTimerSrc NBCCommon.h, 1193 RCXSourceConstants, 838 RCX_TimerSrc NBCCommon.h, 1193 RCXSourceConstants, 838 RCX_UARTSetupSrc NBCCommon.h, 1193 RCXSourceConstants, 838 RCX_UnlockFirmOp NBCCommon.h, 1193 RCXOpcodeConstants, 848 RCX_UnlockOp NBCCommon.h, 1193 RCXOpcodeConstants, 848 RCX_UnmuteSoundOp NBCCommon.h, 1193 RCXOpcodeConstants, 848 RCX_UploadDatalogOp NBCCommon.h, 1193 RCXOpcodeConstants, 848 RCX_UpperThresholdSrc NBCCommon.h, 1194 RCXSourceConstants, 839 RCX_VariableSrc NBCCommon.h, 1194 RCXSourceConstants, 839 RCX_ViewSourceValOp NBCCommon.h, 1194 RCXOpcodeConstants, 848 RCX_VLLOp NBCCommon.h, 1194 RCXOpcodeConstants, 849 RCX_WatchSrc NBCCommon.h, 1194 RCXSourceConstants, 839 RCXOpcodeConstants RCX_AbsVarOp, 841 RCX_AndVarOp, 841

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2124

RCX_AutoOffOp, 841 RCX_BatteryLevelOp, 841 RCX_BootModeOp, 842 RCX_CalibrateEventOp, 842 RCX_ClearAllEventsOp, 842 RCX_ClearCounterOp, 842 RCX_ClearMsgOp, 842 RCX_ClearSensorOp, 842 RCX_ClearSoundOp, 842 RCX_ClearTimerOp, 842 RCX_DatalogOp, 842 RCX_DecCounterOp, 842 RCX_DeleteSubOp, 843 RCX_DeleteSubsOp, 843 RCX_DeleteTaskOp, 843 RCX_DeleteTasksOp, 843 RCX_DirectEventOp, 843 RCX_DisplayOp, 843 RCX_DivVarOp, 843 RCX_GOutputDirOp, 843 RCX_GOutputModeOp, 843 RCX_GOutputPowerOp, 843 RCX_IncCounterOp, 844 RCX_InputModeOp, 844 RCX_InputTypeOp, 844 RCX_IRModeOp, 844 RCX_LightOp, 844 RCX_LSBlinkTimeOp, 844 RCX_LSCalibrateOp, 844 RCX_LSHysteresisOp, 844 RCX_LSLowerThreshOp, 844 RCX_LSUpperThreshOp, 844 RCX_MessageOp, 845 RCX_MulVarOp, 845 RCX_MuteSoundOp, 845 RCX_OnOffFloatOp, 845 RCX_OrVarOp, 845 RCX_OutputDirOp, 845 RCX_OutputPowerOp, 845 RCX_PBTurnOffOp, 845 RCX_PingOp, 845 RCX_PlaySoundOp, 845 RCX_PlayToneOp, 846 RCX_PlayToneVarOp, 846 RCX_PollMemoryOp, 846 RCX_PollOp, 846

RCX_RemoteOp, 846 RCX_ScoutOp, 846 RCX_ScoutRulesOp, 846 RCX_SelectProgramOp, 846 RCX_SendUARTDataOp, 846 RCX_SetCounterOp, 846 RCX_SetDatalogOp, 847 RCX_SetEventOp, 847 RCX_SetFeedbackOp, 847 RCX_SetPriorityOp, 847 RCX_SetSourceValueOp, 847 RCX_SetTimerLimitOp, 847 RCX_SetVarOp, 847 RCX_SetWatchOp, 847 RCX_SgnVarOp, 847 RCX_SoundOp, 847 RCX_StartTaskOp, 848 RCX_StopAllTasksOp, 848 RCX_StopTaskOp, 848 RCX_SubVarOp, 848 RCX_SumVarOp, 848 RCX_UnlockFirmOp, 848 RCX_UnlockOp, 848 RCX_UnmuteSoundOp, 848 RCX_UploadDatalogOp, 848 RCX_ViewSourceValOp, 848 RCX_VLLOp, 849 RCXOutputConstants RCX_OUT_A, 814 RCX_OUT_AB, 814 RCX_OUT_ABC, 814 RCX_OUT_AC, 814 RCX_OUT_B, 814 RCX_OUT_BC, 814 RCX_OUT_C, 815 RCXOutputDirection RCX_OUT_FWD, 816 RCX_OUT_REV, 816 RCX_OUT_TOGGLE, 816 RCXOutputMode RCX_OUT_FLOAT, 815 RCX_OUT_OFF, 815 RCX_OUT_ON, 815 RCXOutputPower RCX_OUT_FULL, 817 RCX_OUT_HALF, 817

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2125

RCX_OUT_LOW, 817 RCXRemoteConstants RCX_RemoteKeysReleased, 818 RCX_RemoteOutABackward, 818 RCX_RemoteOutAForward, 818 RCX_RemoteOutBBackward, 818 RCX_RemoteOutBForward, 818 RCX_RemoteOutCBackward, 818 RCX_RemoteOutCForward, 818 RCX_RemotePBMessage1, 819 RCX_RemotePBMessage2, 819 RCX_RemotePBMessage3, 819 RCX_RemotePlayASound, 819 RCX_RemoteSelProgram1, 819 RCX_RemoteSelProgram2, 819 RCX_RemoteSelProgram3, 819 RCX_RemoteSelProgram4, 819 RCX_RemoteSelProgram5, 819 RCX_RemoteStopOutOff, 820 RCXSoundConstants SOUND_CLICK, 820 SOUND_DOUBLE_BEEP, 820 SOUND_DOWN, 820 SOUND_FAST_UP, 821 SOUND_LOW_BEEP, 821 SOUND_UP, 821 RCXSourceConstants RCX_BatteryLevelSrc, 835 RCX_ClickCounterSrc, 835 RCX_ConstantSrc, 835 RCX_CounterSrc, 835 RCX_DatalogRawDirectSrc, 835 RCX_DatalogRawIndirectSrc, 835 RCX_DatalogSrcDirectSrc, 835 RCX_DatalogSrcIndirectSrc, 835 RCX_DatalogValueDirectSrc, 836 RCX_DatalogValueIndirectSrc, 836 RCX_DurationSrc, 836 RCX_EventStateSrc, 836 RCX_FirmwareVersionSrc, 836 RCX_GlobalMotorStatusSrc, 836 RCX_HysteresisSrc, 836 RCX_IndirectVarSrc, 836 RCX_InputBooleanSrc, 836 RCX_InputModeSrc, 836 RCX_InputRawSrc, 837

RCX_InputTypeSrc, 837 RCX_InputValueSrc, 837 RCX_LowerThresholdSrc, 837 RCX_MessageSrc, 837 RCX_OutputStatusSrc, 837 RCX_ProgramSlotSrc, 837 RCX_RandomSrc, 837 RCX_ScoutCounterLimitSrc, 838 RCX_ScoutEventFBSrc, 838 RCX_ScoutLightParamsSrc, 838 RCX_ScoutRulesSrc, 838 RCX_ScoutTimerLimitSrc, 838 RCX_TaskEventsSrc, 838 RCX_TenMSTimerSrc, 838 RCX_TimerSrc, 838 RCX_UARTSetupSrc, 838 RCX_UpperThresholdSrc, 839 RCX_VariableSrc, 839 RCX_WatchSrc, 839 Read LoaderModuleFunctions, 541 NXCDefs.h, 1596 ReadButton NBCCommon.h, 1194 SysCallConstants, 643 ReadButtonEx ButtonModuleFunctions, 514 NXCDefs.h, 1596 ReadButtonType, 996 Count, 997 Index, 997 Pressed, 997 Reset, 997 Result, 997 ReadBytes LoaderModuleFunctions, 541 NXCDefs.h, 1597 ReadI2CRegister LowSpeedModuleFunctions, 365 NXCDefs.h, 1597 ReadLastResponse NBCCommon.h, 1194 SysCallConstants, 643 ReadLastResponseType, 998 Buffer, 998 Clear, 998

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2126

Command, 998 Length, 999 Result, 999 ReadLn LoaderModuleFunctions, 542 NXCDefs.h, 1598 ReadLnString LoaderModuleFunctions, 542 NXCDefs.h, 1598 ReadNRLinkBytes MindSensorsAPI, 197 NXCDefs.h, 1599 ReadSemData NBCCommon.h, 1195 SysCallConstants, 644 ReadSemDataType, 999 Request, 1000 SemData, 1000 ReadSensorColorEx InputModuleFunctions, 261 NXCDefs.h, 1599 ReadSensorColorRaw InputModuleFunctions, 262 NXCDefs.h, 1600 ReadSensorEMeter LowSpeedModuleFunctions, 366 NXCDefs.h, 1600 ReadSensorHTAccel HiTechnicAPI, 94 NXCDefs.h, 1601 ReadSensorHTAngle HiTechnicAPI, 95 NXCDefs.h, 1602 ReadSensorHTColor HiTechnicAPI, 95 NXCDefs.h, 1602 ReadSensorHTColor2Active HiTechnicAPI, 96 NXCDefs.h, 1603 ReadSensorHTIRReceiver HiTechnicAPI, 96 NXCDefs.h, 1603 ReadSensorHTIRReceiverEx HiTechnicAPI, 97 NXCDefs.h, 1604 ReadSensorHTIRSeeker

HiTechnicAPI, 97 NXCDefs.h, 1604 ReadSensorHTIRSeeker2AC HiTechnicAPI, 98 NXCDefs.h, 1605 ReadSensorHTIRSeeker2DC HiTechnicAPI, 99 NXCDefs.h, 1605 ReadSensorHTNormalizedColor HiTechnicAPI, 99 NXCDefs.h, 1606 ReadSensorHTNormalizedColor2Active HiTechnicAPI, 100 NXCDefs.h, 1607 ReadSensorHTRawColor HiTechnicAPI, 101 NXCDefs.h, 1607 ReadSensorHTRawColor2 HiTechnicAPI, 101 NXCDefs.h, 1608 ReadSensorHTTouchMultiplexer HiTechnicAPI, 102 NXCDefs.h, 1608 ReadSensorMSAccel MindSensorsAPI, 197 NXCDefs.h, 1609 ReadSensorMSPlayStation MindSensorsAPI, 198 NXCDefs.h, 1609 ReadSensorMSRTClock MindSensorsAPI, 198 NXCDefs.h, 1610 ReadSensorMSTilt MindSensorsAPI, 199 NXCDefs.h, 1611 ReadSensorUSEx LowSpeedModuleFunctions, 366 NXCDefs.h, 1611 RebootInFirmwareMode IOCtrlModuleFunctions, 420 NXCDefs.h, 1612 ReceiveMessage CommModuleFunctions, 446 NXCDefs.h, 1612 ReceiveRemoteBool CommModuleFunctions, 446

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2127

NXCDefs.h, 1613 ReceiveRemoteMessageEx CommModuleFunctions, 447 NXCDefs.h, 1613 ReceiveRemoteNumber CommModuleFunctions, 448 NXCDefs.h, 1614 ReceiveRemoteString CommModuleFunctions, 448 NXCDefs.h, 1614 RechargeableBattery NXCDefs.h, 1615 UiModuleFunctions, 523 RectOut DisplayModuleFunctions, 330 NXCDefs.h, 1615 RegDValueField NBCCommon.h, 1195 OutputFieldConstants, 738 RegIValueField NBCCommon.h, 1195 OutputFieldConstants, 738 RegMode OutputStateType, 995 RegModeField NBCCommon.h, 1195 OutputFieldConstants, 738 RegPValueField NBCCommon.h, 1196 OutputFieldConstants, 739 reladdressOf cstringAPI, 618 NXCDefs.h, 1616 Release CommandModuleFunctions, 394 NXCDefs.h, 1616 rem div_t, 946 ldiv_t, 984 Remote connection constants, 786 Remote control (direct commands) errors, 663 RemoteBluetoothFactoryReset CommModuleSCFunctions, 495 NXCDefs.h, 1617 RemoteCloseFile

CommModuleSCFunctions, 496 NXCDefs.h, 1617 RemoteConnectionIdle CommModuleFunctions, 449 NXCDefs.h, 1618 RemoteConnectionWrite CommModuleFunctions, 449 NXCDefs.h, 1618 RemoteDatalogRead CommModuleDCFunctions, 478 NXCDefs.h, 1619 RemoteDatalogSetTimes CommModuleDCFunctions, 478 NXCDefs.h, 1619 RemoteDeleteFile CommModuleSCFunctions, 496 NXCDefs.h, 1620 RemoteDeleteUserFlash CommModuleSCFunctions, 497 NXCDefs.h, 1620 RemoteFindFirstFile CommModuleSCFunctions, 497 NXCDefs.h, 1621 RemoteFindNextFile CommModuleSCFunctions, 498 NXCDefs.h, 1622 RemoteGetBatteryLevel CommModuleDCFunctions, 479 NXCDefs.h, 1622 RemoteGetBluetoothAddress CommModuleSCFunctions, 499 NXCDefs.h, 1623 RemoteGetConnectionCount CommModuleDCFunctions, 479 NXCDefs.h, 1623 RemoteGetConnectionName CommModuleDCFunctions, 480 NXCDefs.h, 1624 RemoteGetContactCount CommModuleDCFunctions, 480 NXCDefs.h, 1624 RemoteGetContactName CommModuleDCFunctions, 481 NXCDefs.h, 1625 RemoteGetCurrentProgramName CommModuleDCFunctions, 482

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2128

NXCDefs.h, 1626 RemoteGetDeviceInfo CommModuleSCFunctions, 499 NXCDefs.h, 1626 RemoteGetFirmwareVersion CommModuleSCFunctions, 500 NXCDefs.h, 1627 RemoteGetInputValues CommModuleDCFunctions, 482 NXCDefs.h, 1627 RemoteGetOutputState CommModuleDCFunctions, 483 NXCDefs.h, 1628 RemoteGetProperty CommModuleDCFunctions, 483 NXCDefs.h, 1629 RemoteIOMapRead CommModuleSCFunctions, 501 NXCDefs.h, 1629 RemoteIOMapWriteBytes CommModuleSCFunctions, 501 NXCDefs.h, 1630 RemoteIOMapWriteValue CommModuleSCFunctions, 502 NXCDefs.h, 1630 RemoteKeepAlive CommModuleDCFunctions, 484 NXCDefs.h, 1631 RemoteLowspeedGetStatus CommModuleDCFunctions, 484 NXCDefs.h, 1631 RemoteLowspeedRead CommModuleDCFunctions, 485 NXCDefs.h, 1632 RemoteLowspeedWrite CommModuleDCFunctions, 486 NXCDefs.h, 1633 RemoteMessageRead CommModuleDCFunctions, 486 NXCDefs.h, 1633 RemoteMessageWrite CommModuleDCFunctions, 487 NXCDefs.h, 1634 RemoteOpenAppendData CommModuleSCFunctions, 502 NXCDefs.h, 1634

RemoteOpenRead CommModuleSCFunctions, 503 NXCDefs.h, 1635 RemoteOpenWrite CommModuleSCFunctions, 504 NXCDefs.h, 1635 RemoteOpenWriteData CommModuleSCFunctions, 504 NXCDefs.h, 1636 RemoteOpenWriteLinear CommModuleSCFunctions, 505 NXCDefs.h, 1637 RemotePlaySoundFile CommModuleDCFunctions, 487 NXCDefs.h, 1637 RemotePlayTone CommModuleDCFunctions, 488 NXCDefs.h, 1638 RemotePollCommand CommModuleSCFunctions, 506 NXCDefs.h, 1638 RemotePollCommandLength CommModuleSCFunctions, 506 NXCDefs.h, 1639 RemoteRead CommModuleSCFunctions, 507 NXCDefs.h, 1640 RemoteRenameFile CommModuleSCFunctions, 508 NXCDefs.h, 1640 RemoteResetMotorPosition CommModuleDCFunctions, 488 NXCDefs.h, 1641 RemoteResetScaledValue CommModuleDCFunctions, 489 NXCDefs.h, 1642 RemoteResetTachoCount CommModuleDCFunctions, 489 NXCDefs.h, 1642 RemoteSetBrickName CommModuleSCFunctions, 508 NXCDefs.h, 1643 RemoteSetInputMode CommModuleDCFunctions, 490 NXCDefs.h, 1643 RemoteSetOutputState

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2129

CommModuleDCFunctions, 490 NXCDefs.h, 1644 RemoteSetProperty CommModuleDCFunctions, 491 NXCDefs.h, 1644 RemoteStartProgram CommModuleDCFunctions, 492 NXCDefs.h, 1645 RemoteStopProgram CommModuleDCFunctions, 492 NXCDefs.h, 1645 RemoteStopSound CommModuleDCFunctions, 493 NXCDefs.h, 1646 RemoteWrite CommModuleSCFunctions, 509 NXCDefs.h, 1646 Remove MessageReadType, 992 remove cstdioAPI, 597 NXCDefs.h, 1647 rename cstdioAPI, 597 NXCDefs.h, 1647 RenameFile LoaderModuleFunctions, 543 NXCDefs.h, 1648 Request ReadSemDataType, 1000 WriteSemDataType, 1012 Reset ReadButtonType, 997 RESET_ALL NBCCommon.h, 1196 TachoResetConstants, 729 RESET_BLOCK_COUNT NBCCommon.h, 1196 TachoResetConstants, 729 RESET_BLOCKANDTACHO NBCCommon.h, 1196 TachoResetConstants, 729 RESET_COUNT NBCCommon.h, 1196 TachoResetConstants, 729 RESET_NONE

NBCCommon.h, 1196 TachoResetConstants, 729 RESET_ROTATION_COUNT NBCCommon.h, 1196 TachoResetConstants, 729 ResetAllTachoCounts NXCDefs.h, 1648 OutputModuleFunctions, 307 ResetBlockTachoCount NXCDefs.h, 1649 OutputModuleFunctions, 307 ResetRotationCount NXCDefs.h, 1649 OutputModuleFunctions, 307 ResetScreen DisplayModuleFunctions, 330 NXCDefs.h, 1649 ResetSensor InputModuleFunctions, 262 NXCDefs.h, 1650 ResetSensorHTAngle HiTechnicAPI, 102 NXCDefs.h, 1650 ResetSleepTimer CommandModuleFunctions, 395 NXCDefs.h, 1650 ResetTachoCount NXCDefs.h, 1651 OutputModuleFunctions, 308 ResizeFile LoaderModuleFunctions, 543 NXCDefs.h, 1651 ResolveHandle LoaderModuleFunctions, 544 NXCDefs.h, 1652 Result ColorSensorReadType, 923 CommBTCheckStatusType, 924 CommBTConnectionType, 925 CommBTOnOffType, 926 CommBTWriteType, 928 CommExecuteFunctionType, 930 CommHSControlType, 932 CommLSCheckStatusType, 935 CommLSReadType, 936 CommLSWriteExType, 938

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2130

CommLSWriteType, 939 ComputeCalibValueType, 941 DatalogWriteType, 943 DrawCircleType, 948 DrawEllipseType, 949 DrawFontType, 951 DrawGraphicArrayType, 952 DrawGraphicType, 954 DrawLineType, 955 DrawPointType, 957 DrawPolygonType, 958 DrawRectType, 959 DrawTextType, 961 FileCloseType, 962 FileDeleteType, 963 FileFindType, 964 FileOpenType, 965 FileReadWriteType, 967 FileRenameType, 968 FileResizeType, 969 FileResolveHandleType, 971 FileSeekType, 972 FileTellType, 973 GetStartTickType, 974 IOMapReadByIDType, 978 IOMapReadType, 979 IOMapWriteByIDType, 981 IOMapWriteType, 982 KeepAliveType, 983 ListFilesType, 985 LoaderExecuteFunctionType, 988 MemoryManagerType, 991 MessageReadType, 992 MessageWriteType, 993 RandomNumberType, 996 ReadButtonType, 997 ReadLastResponseType, 999 SetScreenModeType, 1001 SetSleepTimeoutType, 1002 SoundPlayFileType, 1005 SoundPlayToneType, 1007 SoundSetStateType, 1008 UpdateCalibCacheInfoType, 1010 ReturnLen CommLSWriteExType, 938 CommLSWriteType, 939

RetVal CommExecuteFunctionType, 930 rewind cstdioAPI, 597 NXCDefs.h, 1652 RFID_MODE_CONTINUOUS CTRFIDModeConstants, 914 NBCCommon.h, 1196 RFID_MODE_SINGLE CTRFIDModeConstants, 914 NBCCommon.h, 1197 RFID_MODE_STOP CTRFIDModeConstants, 914 NBCCommon.h, 1197 RFIDInit CodatexAPI, 211 NXCDefs.h, 1652 RFIDMode CodatexAPI, 212 NXCDefs.h, 1653 RFIDRead CodatexAPI, 212 NXCDefs.h, 1653 RFIDReadContinuous CodatexAPI, 213 NXCDefs.h, 1654 RFIDReadSingle CodatexAPI, 213 NXCDefs.h, 1654 RFIDStatus CodatexAPI, 213 NXCDefs.h, 1655 RFIDStop CodatexAPI, 214 NXCDefs.h, 1655 RIC Macro Wrappers, 214 RICArg NBCCommon.h, 1197 RICMacros, 217 RICImgPoint NBCCommon.h, 1197 RICMacros, 217 RICImgRect NBCCommon.h, 1197 RICMacros, 217 RICMacros

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2131

RICArg, 217 RICImgPoint, 217 RICImgRect, 217 RICMapArg, 218 RICMapElement, 218 RICMapFunction, 218 RICOpCircle, 218 RICOpCopyBits, 219 RICOpDescription, 219 RICOpEllipse, 220 RICOpLine, 220 RICOpNumBox, 220 RICOpPixel, 221 RICOpPolygon, 221 RICOpRect, 221 RICOpSprite, 222 RICOpVarMap, 222 RICPolygonPoints, 222 RICSetValue, 223 RICSpriteData, 223 RICMapArg NBCCommon.h, 1198 RICMacros, 218 RICMapElement NBCCommon.h, 1198 RICMacros, 218 RICMapFunction NBCCommon.h, 1198 RICMacros, 218 RICOpCircle NBCCommon.h, 1199 RICMacros, 218 RICOpCopyBits NBCCommon.h, 1199 RICMacros, 219 RICOpDescription NBCCommon.h, 1199 RICMacros, 219 RICOpEllipse NBCCommon.h, 1200 RICMacros, 220 RICOpLine NBCCommon.h, 1200 RICMacros, 220 RICOpNumBox NBCCommon.h, 1200

RICMacros, 220 RICOpPixel NBCCommon.h, 1201 RICMacros, 221 RICOpPolygon NBCCommon.h, 1201 RICMacros, 221 RICOpRect NBCCommon.h, 1201 RICMacros, 221 RICOpSprite NBCCommon.h, 1202 RICMacros, 222 RICOpVarMap NBCCommon.h, 1202 RICMacros, 222 RICPolygonPoints NBCCommon.h, 1203 RICMacros, 222 RICSetValue NXCDefs.h, 1339 RICMacros, 223 RICSpriteData NBCCommon.h, 1203 RICMacros, 223 RightStr cstringAPI, 619 NXCDefs.h, 1655 ROTATE_QUEUE CommandVMState, 659 NBCCommon.h, 1203 RotateMotor NXCDefs.h, 1656 OutputModuleFunctions, 308 RotateMotorEx NXCDefs.h, 1656 OutputModuleFunctions, 309 RotateMotorExPID NXCDefs.h, 1657 OutputModuleFunctions, 309 RotateMotorPID NXCDefs.h, 1658 OutputModuleFunctions, 310 RotationCount OutputStateType, 995 RotationCountField

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2132

NBCCommon.h, 1203 OutputFieldConstants, 739 RS485Control CommModuleFunctions, 450 NXCDefs.h, 1658 RS485DataAvailable CommModuleFunctions, 450 NXCDefs.h, 1659 RS485Disable CommModuleFunctions, 451 NXCDefs.h, 1659 RS485Enable CommModuleFunctions, 451 NXCDefs.h, 1660 RS485Initialize CommModuleFunctions, 452 NXCDefs.h, 1660 RS485Read CommModuleFunctions, 452 NXCDefs.h, 1660 RS485SendingData CommModuleFunctions, 452 NXCDefs.h, 1661 RS485Status CommModuleFunctions, 453 NXCDefs.h, 1661 RS485Uart CommModuleFunctions, 453 NXCDefs.h, 1662 RS485Write CommModuleFunctions, 454 NXCDefs.h, 1662 RunNRLinkMacro MindSensorsAPI, 200 NXCDefs.h, 1663 RunState OutputStateType, 995 RunStateField NBCCommon.h, 1204 OutputFieldConstants, 739 S1 InPorts, 241 NXCDefs.h, 1339 s16 NXCDefs.h, 1341

TypeAliases, 240 S2 InPorts, 243 NXCDefs.h, 1341 S3 InPorts, 243 NXCDefs.h, 1341 s32 NXCDefs.h, 1342 TypeAliases, 240 S4 InPorts, 243 NXCDefs.h, 1342 s8 NXCDefs.h, 1342 TypeAliases, 240 SAMPLERATE_DEFAULT NBCCommon.h, 1204 SoundMisc, 685 SAMPLERATE_MAX NBCCommon.h, 1204 SoundMisc, 685 SAMPLERATE_MIN NBCCommon.h, 1204 SoundMisc, 685 ScaledArray ColorSensorReadType, 923 ScaledValue InputValuesType, 976 ScaledValueField InputFieldConstants, 715 NBCCommon.h, 1204 SCHAR_MAX NBCCommon.h, 1204 NXTLimits, 916 SCHAR_MIN NBCCommon.h, 1204 NXTLimits, 916 Scout constants, 821 Scout light constants, 822 Scout light rule constants, 830 Scout mode constants, 827 Scout motion rule constants, 828 Scout sound constants, 823 Scout sound set constants, 826 Scout special effect constants, 832

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2133

Scout touch rule constants, 829 Scout transmit rule constants, 831 SCOUT_FXR_ALARM NBCCommon.h, 1205 ScoutSpecialEffectConstants, 833 SCOUT_FXR_BUG NBCCommon.h, 1205 ScoutSpecialEffectConstants, 833 SCOUT_FXR_NONE NBCCommon.h, 1205 ScoutSpecialEffectConstants, 833 SCOUT_FXR_RANDOM NBCCommon.h, 1205 ScoutSpecialEffectConstants, 833 SCOUT_FXR_SCIENCE NBCCommon.h, 1205 ScoutSpecialEffectConstants, 833 SCOUT_LIGHT_OFF NBCCommon.h, 1205 ScoutLightConstants, 823 SCOUT_LIGHT_ON NBCCommon.h, 1205 ScoutLightConstants, 823 SCOUT_LR_AVOID NBCCommon.h, 1205 ScoutLightRuleConstants, 831 SCOUT_LR_IGNORE NBCCommon.h, 1206 ScoutLightRuleConstants, 831 SCOUT_LR_OFF_WHEN NBCCommon.h, 1206 ScoutLightRuleConstants, 831 SCOUT_LR_SEEK_DARK NBCCommon.h, 1206 ScoutLightRuleConstants, 831 SCOUT_LR_SEEK_LIGHT NBCCommon.h, 1206 ScoutLightRuleConstants, 831 SCOUT_LR_WAIT_FOR NBCCommon.h, 1206 ScoutLightRuleConstants, 831 SCOUT_MODE_POWER NBCCommon.h, 1206 ScoutModeConstants, 827 SCOUT_MODE_STANDALONE NBCCommon.h, 1206

ScoutModeConstants, 828 SCOUT_MR_CIRCLE_LEFT NBCCommon.h, 1206 ScoutMotionRuleConstants, 828 SCOUT_MR_CIRCLE_RIGHT NBCCommon.h, 1207 ScoutMotionRuleConstants, 828 SCOUT_MR_FORWARD NBCCommon.h, 1207 ScoutMotionRuleConstants, 828 SCOUT_MR_LOOP_A NBCCommon.h, 1207 ScoutMotionRuleConstants, 829 SCOUT_MR_LOOP_AB NBCCommon.h, 1207 ScoutMotionRuleConstants, 829 SCOUT_MR_LOOP_B NBCCommon.h, 1207 ScoutMotionRuleConstants, 829 SCOUT_MR_NO_MOTION NBCCommon.h, 1207 ScoutMotionRuleConstants, 829 SCOUT_MR_ZIGZAG NBCCommon.h, 1207 ScoutMotionRuleConstants, 829 SCOUT_SNDSET_ALARM NBCCommon.h, 1207 ScoutSndSetConstants, 826 SCOUT_SNDSET_BASIC NBCCommon.h, 1207 ScoutSndSetConstants, 826 SCOUT_SNDSET_BUG NBCCommon.h, 1208 ScoutSndSetConstants, 827 SCOUT_SNDSET_NONE NBCCommon.h, 1208 ScoutSndSetConstants, 827 SCOUT_SNDSET_RANDOM NBCCommon.h, 1208 ScoutSndSetConstants, 827 SCOUT_SNDSET_SCIENCE NBCCommon.h, 1208 ScoutSndSetConstants, 827 SCOUT_SOUND_1_BLINK NBCCommon.h, 1208 ScoutSoundConstants, 824

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2134

SCOUT_SOUND_2_BLINK NBCCommon.h, 1208 ScoutSoundConstants, 824 SCOUT_SOUND_COUNTER1 NBCCommon.h, 1208 ScoutSoundConstants, 824 SCOUT_SOUND_COUNTER2 NBCCommon.h, 1208 ScoutSoundConstants, 824 SCOUT_SOUND_ENTER_BRIGHT NBCCommon.h, 1208 ScoutSoundConstants, 824 SCOUT_SOUND_ENTER_DARK NBCCommon.h, 1208 ScoutSoundConstants, 824 SCOUT_SOUND_ENTER_NORMAL NBCCommon.h, 1209 ScoutSoundConstants, 824 SCOUT_SOUND_ENTERSA NBCCommon.h, 1209 ScoutSoundConstants, 824 SCOUT_SOUND_KEYERROR NBCCommon.h, 1209 ScoutSoundConstants, 824 SCOUT_SOUND_MAIL_RECEIVED NBCCommon.h, 1209 ScoutSoundConstants, 825 SCOUT_SOUND_NONE NBCCommon.h, 1209 ScoutSoundConstants, 825 SCOUT_SOUND_REMOTE NBCCommon.h, 1209 ScoutSoundConstants, 825 SCOUT_SOUND_SPECIAL1 NBCCommon.h, 1209 ScoutSoundConstants, 825 SCOUT_SOUND_SPECIAL2 NBCCommon.h, 1209 ScoutSoundConstants, 825 SCOUT_SOUND_SPECIAL3 NBCCommon.h, 1209 ScoutSoundConstants, 825 SCOUT_SOUND_TIMER1 NBCCommon.h, 1209 ScoutSoundConstants, 825 SCOUT_SOUND_TIMER2

NBCCommon.h, 1210 ScoutSoundConstants, 825 SCOUT_SOUND_TIMER3 NBCCommon.h, 1210 ScoutSoundConstants, 825 SCOUT_SOUND_TOUCH1_PRES NBCCommon.h, 1210 ScoutSoundConstants, 825 SCOUT_SOUND_TOUCH1_REL NBCCommon.h, 1210 ScoutSoundConstants, 826 SCOUT_SOUND_TOUCH2_PRES NBCCommon.h, 1210 ScoutSoundConstants, 826 SCOUT_SOUND_TOUCH2_REL NBCCommon.h, 1210 ScoutSoundConstants, 826 SCOUT_TGS_LONG NBCCommon.h, 1210 ScoutTransmitRuleConstants, 832 SCOUT_TGS_MEDIUM NBCCommon.h, 1210 ScoutTransmitRuleConstants, 832 SCOUT_TGS_SHORT NBCCommon.h, 1210 ScoutTransmitRuleConstants, 832 SCOUT_TR_AVOID NBCCommon.h, 1211 ScoutTouchRuleConstants, 830 SCOUT_TR_IGNORE NBCCommon.h, 1211 ScoutTouchRuleConstants, 830 SCOUT_TR_OFF_WHEN NBCCommon.h, 1211 ScoutTouchRuleConstants, 830 SCOUT_TR_REVERSE NBCCommon.h, 1211 ScoutTouchRuleConstants, 830 SCOUT_TR_WAIT_FOR NBCCommon.h, 1211 ScoutTouchRuleConstants, 830 ScoutLightConstants SCOUT_LIGHT_OFF, 823 SCOUT_LIGHT_ON, 823 ScoutLightRuleConstants SCOUT_LR_AVOID, 831

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2135

SCOUT_LR_IGNORE, 831 SCOUT_LR_OFF_WHEN, 831 SCOUT_LR_SEEK_DARK, 831 SCOUT_LR_SEEK_LIGHT, 831 SCOUT_LR_WAIT_FOR, 831 ScoutModeConstants SCOUT_MODE_POWER, 827 SCOUT_MODE_STANDALONE, 828 ScoutMotionRuleConstants SCOUT_MR_CIRCLE_LEFT, 828 SCOUT_MR_CIRCLE_RIGHT, 828 SCOUT_MR_FORWARD, 828 SCOUT_MR_LOOP_A, 829 SCOUT_MR_LOOP_AB, 829 SCOUT_MR_LOOP_B, 829 SCOUT_MR_NO_MOTION, 829 SCOUT_MR_ZIGZAG, 829 ScoutSndSetConstants SCOUT_SNDSET_ALARM, 826 SCOUT_SNDSET_BASIC, 826 SCOUT_SNDSET_BUG, 827 SCOUT_SNDSET_NONE, 827 SCOUT_SNDSET_RANDOM, 827 SCOUT_SNDSET_SCIENCE, 827 ScoutSoundConstants SCOUT_SOUND_1_BLINK, 824 SCOUT_SOUND_2_BLINK, 824 SCOUT_SOUND_COUNTER1, 824 SCOUT_SOUND_COUNTER2, 824 SCOUT_SOUND_ENTER_BRIGHT, 824 SCOUT_SOUND_ENTER_DARK, 824 SCOUT_SOUND_ENTER_NORMAL, 824 SCOUT_SOUND_ENTERSA, 824 SCOUT_SOUND_KEYERROR, 824 SCOUT_SOUND_MAIL_RECEIVED, 825 SCOUT_SOUND_NONE, 825 SCOUT_SOUND_REMOTE, 825

SCOUT_SOUND_SPECIAL1, 825 SCOUT_SOUND_SPECIAL2, 825 SCOUT_SOUND_SPECIAL3, 825 SCOUT_SOUND_TIMER1, 825 SCOUT_SOUND_TIMER2, 825 SCOUT_SOUND_TIMER3, 825 SCOUT_SOUND_TOUCH1_PRES, 825 SCOUT_SOUND_TOUCH1_REL, 826 SCOUT_SOUND_TOUCH2_PRES, 826 SCOUT_SOUND_TOUCH2_REL, 826 ScoutSpecialEffectConstants SCOUT_FXR_ALARM, 833 SCOUT_FXR_BUG, 833 SCOUT_FXR_NONE, 833 SCOUT_FXR_RANDOM, 833 SCOUT_FXR_SCIENCE, 833 ScoutTouchRuleConstants SCOUT_TR_AVOID, 830 SCOUT_TR_IGNORE, 830 SCOUT_TR_OFF_WHEN, 830 SCOUT_TR_REVERSE, 830 SCOUT_TR_WAIT_FOR, 830 ScoutTransmitRuleConstants SCOUT_TGS_LONG, 832 SCOUT_TGS_MEDIUM, 832 SCOUT_TGS_SHORT, 832 SCREEN_BACKGROUND DisplayModuleConstants, 764 NBCCommon.h, 1211 SCREEN_LARGE DisplayModuleConstants, 764 NBCCommon.h, 1211 SCREEN_MODE_CLEAR DisplayModuleConstants, 764 NBCCommon.h, 1211 SCREEN_MODE_RESTORE DisplayModuleConstants, 765 NBCCommon.h, 1212 SCREEN_SMALL DisplayModuleConstants, 765 NBCCommon.h, 1212 ScreenMode

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2136

SetScreenModeType, 1001 SCREENS DisplayModuleConstants, 765 NBCCommon.h, 1212 SEC_1 NBCCommon.h, 1212 TimeConstants, 653 SEC_10 NBCCommon.h, 1212 TimeConstants, 654 SEC_15 NBCCommon.h, 1212 TimeConstants, 654 SEC_2 NBCCommon.h, 1213 TimeConstants, 654 SEC_20 NBCCommon.h, 1213 TimeConstants, 654 SEC_3 NBCCommon.h, 1213 TimeConstants, 654 SEC_30 NBCCommon.h, 1213 TimeConstants, 655 SEC_4 NBCCommon.h, 1213 TimeConstants, 655 SEC_5 NBCCommon.h, 1213 TimeConstants, 655 SEC_6 NBCCommon.h, 1214 TimeConstants, 655 SEC_7 NBCCommon.h, 1214 TimeConstants, 656 SEC_8 NBCCommon.h, 1214 TimeConstants, 656 SEC_9 NBCCommon.h, 1214 TimeConstants, 656 SEEK_CUR fseekConstants, 599 NXCDefs.h, 1342

SEEK_END fseekConstants, 599 NXCDefs.h, 1342 SEEK_SET fseekConstants, 599 NXCDefs.h, 1342 SemData ReadSemDataType, 1000 WriteSemDataType, 1012 SendingData CommHSCheckStatusType, 931 SendMessage CommModuleFunctions, 454 NXCDefs.h, 1663 SendRemoteBool CommModuleFunctions, 455 NXCDefs.h, 1664 SendRemoteNumber CommModuleFunctions, 455 NXCDefs.h, 1664 SendRemoteString CommModuleFunctions, 456 NXCDefs.h, 1665 SendResponseBool CommModuleFunctions, 456 NXCDefs.h, 1665 SendResponseNumber CommModuleFunctions, 457 NXCDefs.h, 1666 SendResponseString CommModuleFunctions, 457 NXCDefs.h, 1666 SendRS485Bool CommModuleFunctions, 458 NXCDefs.h, 1667 SendRS485Number CommModuleFunctions, 458 NXCDefs.h, 1667 SendRS485String CommModuleFunctions, 459 NXCDefs.h, 1668 Sensor InputModuleFunctions, 263 NXCDefs.h, 1668 Sensor mode constants, 246 Sensor type constants, 243

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2137

Sensor types and modes, 45 SENSOR_1 BasicSensorValues, 278 NXCDefs.h, 1342 SENSOR_2 BasicSensorValues, 278 NXCDefs.h, 1343 SENSOR_3 BasicSensorValues, 278 NXCDefs.h, 1343 SENSOR_4 BasicSensorValues, 278 NXCDefs.h, 1343 SENSOR_CELSIUS NXCDefs.h, 1343 SensorTypeModes, 249 SENSOR_COLORBLUE NXCDefs.h, 1343 SensorTypeModes, 249 SENSOR_COLORFULL NXCDefs.h, 1343 SensorTypeModes, 249 SENSOR_COLORGREEN NXCDefs.h, 1343 SensorTypeModes, 249 SENSOR_COLORNONE NXCDefs.h, 1343 SensorTypeModes, 249 SENSOR_COLORRED NXCDefs.h, 1343 SensorTypeModes, 250 SENSOR_EDGE NXCDefs.h, 1344 SensorTypeModes, 250 SENSOR_FAHRENHEIT NXCDefs.h, 1344 SensorTypeModes, 250 SENSOR_LIGHT NXCDefs.h, 1344 SensorTypeModes, 250 SENSOR_LOWSPEED NXCDefs.h, 1344 SensorTypeModes, 250 SENSOR_LOWSPEED_9V NXCDefs.h, 1344 SensorTypeModes, 250

SENSOR_MODE_BOOL NXCDefs.h, 1344 SensorModes, 247 SENSOR_MODE_CELSIUS NXCDefs.h, 1344 SensorModes, 247 SENSOR_MODE_EDGE NXCDefs.h, 1344 SensorModes, 247 SENSOR_MODE_FAHRENHEIT NXCDefs.h, 1345 SensorModes, 247 SENSOR_MODE_PERCENT NXCDefs.h, 1345 SensorModes, 247 SENSOR_MODE_PULSE NXCDefs.h, 1345 SensorModes, 247 SENSOR_MODE_RAW NXCDefs.h, 1345 SensorModes, 247 SENSOR_MODE_ROTATION NXCDefs.h, 1345 SensorModes, 248 SENSOR_NXTLIGHT NXCDefs.h, 1345 SensorTypeModes, 250 SENSOR_PULSE NXCDefs.h, 1345 SensorTypeModes, 250 SENSOR_ROTATION NXCDefs.h, 1345 SensorTypeModes, 251 SENSOR_SOUND NXCDefs.h, 1346 SensorTypeModes, 251 SENSOR_TOUCH NXCDefs.h, 1346 SensorTypeModes, 251 SENSOR_TYPE_COLORBLUE NXCDefs.h, 1346 SensorTypes, 244 SENSOR_TYPE_COLORFULL NXCDefs.h, 1346 SensorTypes, 244 SENSOR_TYPE_COLORGREEN

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2138

NXCDefs.h, 1346 SensorTypes, 244 SENSOR_TYPE_COLORNONE NXCDefs.h, 1346 SensorTypes, 244 SENSOR_TYPE_COLORRED NXCDefs.h, 1346 SensorTypes, 244 SENSOR_TYPE_CUSTOM NXCDefs.h, 1346 SensorTypes, 244 SENSOR_TYPE_HIGHSPEED NXCDefs.h, 1347 SensorTypes, 244 SENSOR_TYPE_LIGHT NXCDefs.h, 1347 SensorTypes, 245 SENSOR_TYPE_LIGHT_ACTIVE NXCDefs.h, 1347 SensorTypes, 245 SENSOR_TYPE_LIGHT_INACTIVE NXCDefs.h, 1347 SensorTypes, 245 SENSOR_TYPE_LOWSPEED NXCDefs.h, 1347 SensorTypes, 245 SENSOR_TYPE_LOWSPEED_9V NXCDefs.h, 1347 SensorTypes, 245 SENSOR_TYPE_NONE NXCDefs.h, 1347 SensorTypes, 245 SENSOR_TYPE_ROTATION NXCDefs.h, 1347 SensorTypes, 245 SENSOR_TYPE_SOUND_DB NXCDefs.h, 1348 SensorTypes, 245 SENSOR_TYPE_SOUND_DBA NXCDefs.h, 1348 SensorTypes, 246 SENSOR_TYPE_TEMPERATURE NXCDefs.h, 1348 SensorTypes, 246 SENSOR_TYPE_TOUCH NXCDefs.h, 1348

SensorTypes, 246 SensorBoolean InputModuleFunctions, 263 NXCDefs.h, 1668 SensorDigiPinsDirection InputModuleFunctions, 264 NXCDefs.h, 1669 SensorDigiPinsOutputLevel InputModuleFunctions, 264 NXCDefs.h, 1669 SensorDigiPinsStatus InputModuleFunctions, 264 NXCDefs.h, 1670 SensorHTColorNum HiTechnicAPI, 103 NXCDefs.h, 1670 SensorHTCompass HiTechnicAPI, 103 NXCDefs.h, 1670 SensorHTEOPD HiTechnicAPI, 103 NXCDefs.h, 1671 SensorHTGyro HiTechnicAPI, 104 NXCDefs.h, 1671 SensorHTIRSeeker2ACDir HiTechnicAPI, 104 NXCDefs.h, 1672 SensorHTIRSeeker2Addr HiTechnicAPI, 105 NXCDefs.h, 1672 SensorHTIRSeeker2DCDir HiTechnicAPI, 105 NXCDefs.h, 1673 SensorHTIRSeekerDir HiTechnicAPI, 106 NXCDefs.h, 1673 SensorHTMagnet HiTechnicAPI, 106 NXCDefs.h, 1673 SensorInvalid InputModuleFunctions, 265 NXCDefs.h, 1674 SensorMode InputModuleFunctions, 265 InputValuesType, 976

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2139

NXCDefs.h, 1674 SensorModes SENSOR_MODE_BOOL, 247 SENSOR_MODE_CELSIUS, 247 SENSOR_MODE_EDGE, 247 SENSOR_MODE_FAHRENHEIT, 247 SENSOR_MODE_PERCENT, 247 SENSOR_MODE_PULSE, 247 SENSOR_MODE_RAW, 247 SENSOR_MODE_ROTATION, 248 SensorMSCompass MindSensorsAPI, 200 NXCDefs.h, 1675 SensorMSDROD MindSensorsAPI, 201 NXCDefs.h, 1675 SensorMSPressure MindSensorsAPI, 201 NXCDefs.h, 1675 SensorMSPressureRaw MindSensorsAPI, 201 NXCDefs.h, 1676 SensorNormalized InputModuleFunctions, 266 NXCDefs.h, 1676 SensorNXTSumoEyes MindSensorsAPI, 202 NXCDefs.h, 1677 SensorNXTSumoEyesRaw MindSensorsAPI, 202 NXCDefs.h, 1677 SensorRaw InputModuleFunctions, 266 NXCDefs.h, 1677 SensorScaled InputModuleFunctions, 266 NXCDefs.h, 1678 SensorTemperature LowSpeedModuleFunctions, 367 NXCDefs.h, 1678 SensorType InputModuleFunctions, 267 InputValuesType, 976 NXCDefs.h, 1679 SensorTypeModes

_SENSOR_CFG, 249 SENSOR_CELSIUS, 249 SENSOR_COLORBLUE, 249 SENSOR_COLORFULL, 249 SENSOR_COLORGREEN, 249 SENSOR_COLORNONE, 249 SENSOR_COLORRED, 250 SENSOR_EDGE, 250 SENSOR_FAHRENHEIT, 250 SENSOR_LIGHT, 250 SENSOR_LOWSPEED, 250 SENSOR_LOWSPEED_9V, 250 SENSOR_NXTLIGHT, 250 SENSOR_PULSE, 250 SENSOR_ROTATION, 251 SENSOR_SOUND, 251 SENSOR_TOUCH, 251 SensorTypes SENSOR_TYPE_COLORBLUE, 244 SENSOR_TYPE_COLORFULL, 244 SENSOR_TYPE_COLORGREEN, 244 SENSOR_TYPE_COLORNONE, 244 SENSOR_TYPE_COLORRED, 244 SENSOR_TYPE_CUSTOM, 244 SENSOR_TYPE_HIGHSPEED, 244 SENSOR_TYPE_LIGHT, 245 SENSOR_TYPE_LIGHT_ACTIVE, 245 SENSOR_TYPE_LIGHT_INACTIVE, 245 SENSOR_TYPE_LOWSPEED, 245 SENSOR_TYPE_LOWSPEED_9V, 245 SENSOR_TYPE_NONE, 245 SENSOR_TYPE_ROTATION, 245 SENSOR_TYPE_SOUND_DB, 245 SENSOR_TYPE_SOUND_DBA, 246 SENSOR_TYPE_TEMPERATURE, 246 SENSOR_TYPE_TOUCH, 246

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2140

SensorUS LowSpeedModuleFunctions, 367 NXCDefs.h, 1679 SensorValue InputModuleFunctions, 267 NXCDefs.h, 1680 SensorValueBool InputModuleFunctions, 268 NXCDefs.h, 1680 SensorValueRaw InputModuleFunctions, 268 NXCDefs.h, 1680 set_fopen_size cstdioAPI, 598 NXCDefs.h, 1681 SetAbortFlag NXCDefs.h, 1681 UiModuleFunctions, 523 SetACCLNxSensitivity MindSensorsAPI, 203 NXCDefs.h, 1681 SetBatteryState NXCDefs.h, 1682 UiModuleFunctions, 523 SetBluetoothState NXCDefs.h, 1682 UiModuleFunctions, 524 SetBTDataMode CommModuleFunctions, 459 NXCDefs.h, 1683 SetBTInputBuffer CommModuleFunctions, 459 NXCDefs.h, 1683 SetBTInputBufferInPtr CommModuleFunctions, 460 NXCDefs.h, 1683 SetBTInputBufferOutPtr CommModuleFunctions, 460 NXCDefs.h, 1684 SetBTOutputBuffer CommModuleFunctions, 460 NXCDefs.h, 1684 SetBTOutputBufferInPtr CommModuleFunctions, 461 NXCDefs.h, 1684 SetBTOutputBufferOutPtr

CommModuleFunctions, 461 NXCDefs.h, 1685 SetButtonLongPressCount ButtonModuleFunctions, 515 NXCDefs.h, 1685 SetButtonLongReleaseCount ButtonModuleFunctions, 515 NXCDefs.h, 1685 SetButtonModuleValue CommandModuleFunctions, 395 NXCDefs.h, 1686 SetButtonPressCount ButtonModuleFunctions, 516 NXCDefs.h, 1686 SetButtonReleaseCount ButtonModuleFunctions, 516 NXCDefs.h, 1686 SetButtonShortReleaseCount ButtonModuleFunctions, 516 NXCDefs.h, 1687 SetButtonState ButtonModuleFunctions, 517 NXCDefs.h, 1687 SetCommandFlags NXCDefs.h, 1687 UiModuleFunctions, 524 SetCommandModuleBytes CommandModuleFunctions, 395 NXCDefs.h, 1688 SetCommandModuleValue CommandModuleFunctions, 396 NXCDefs.h, 1688 SetCommModuleBytes CommandModuleFunctions, 396 NXCDefs.h, 1688 SetCommModuleValue CommandModuleFunctions, 397 NXCDefs.h, 1689 SetCustomSensorActiveStatus InputModuleFunctions, 268 NXCDefs.h, 1689 SetCustomSensorPercentFullScale InputModuleFunctions, 269 NXCDefs.h, 1690 SetCustomSensorZeroOffset InputModuleFunctions, 269

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2141

NXCDefs.h, 1690 SetDisplayContrast DisplayModuleFunctions, 331 NXCDefs.h, 1690 SetDisplayDisplay DisplayModuleFunctions, 331 NXCDefs.h, 1691 SetDisplayEraseMask DisplayModuleFunctions, 331 NXCDefs.h, 1691 SetDisplayFlags DisplayModuleFunctions, 332 NXCDefs.h, 1691 SetDisplayFont DisplayModuleFunctions, 332 NXCDefs.h, 1692 SetDisplayModuleBytes CommandModuleFunctions, 397 NXCDefs.h, 1692 SetDisplayModuleValue CommandModuleFunctions, 397 NXCDefs.h, 1692 SetDisplayNormal DisplayModuleFunctions, 332 NXCDefs.h, 1693 SetDisplayPopup DisplayModuleFunctions, 333 NXCDefs.h, 1693 SetDisplayTextLinesCenterFlags DisplayModuleFunctions, 333 NXCDefs.h, 1694 SetDisplayUpdateMask DisplayModuleFunctions, 333 NXCDefs.h, 1694 SetHSDataMode CommModuleFunctions, 461 NXCDefs.h, 1694 SetHSFlags CommModuleFunctions, 462 NXCDefs.h, 1695 SetHSInputBuffer CommModuleFunctions, 462 NXCDefs.h, 1695 SetHSInputBufferInPtr CommModuleFunctions, 463 NXCDefs.h, 1695

SetHSInputBufferOutPtr CommModuleFunctions, 463 NXCDefs.h, 1696 SetHSMode CommModuleFunctions, 463 NXCDefs.h, 1696 SetHSOutputBuffer CommModuleFunctions, 464 NXCDefs.h, 1696 SetHSOutputBufferInPtr CommModuleFunctions, 464 NXCDefs.h, 1697 SetHSOutputBufferOutPtr CommModuleFunctions, 464 NXCDefs.h, 1697 SetHSSpeed CommModuleFunctions, 465 NXCDefs.h, 1697 SetHSState CommModuleFunctions, 465 NXCDefs.h, 1698 SetHTColor2Mode HiTechnicAPI, 106 NXCDefs.h, 1698 SetHTIRSeeker2Mode HiTechnicAPI, 107 NXCDefs.h, 1698 SetInput InputModuleFunctions, 269 NXCDefs.h, 1699 SetInputModuleValue CommandModuleFunctions, 398 NXCDefs.h, 1699 SetIOCtrlModuleValue CommandModuleFunctions, 398 NXCDefs.h, 1700 SetIOMapBytes CommandModuleFunctions, 398 NXCDefs.h, 1700 SetIOMapBytesByID CommandModuleFunctions, 399 NXCDefs.h, 1700 SetIOMapValue CommandModuleFunctions, 399 NXCDefs.h, 1701 SetIOMapValueByID

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2142

CommandModuleFunctions, 400 NXCDefs.h, 1701 SetLoaderModuleValue CommandModuleFunctions, 400 NXCDefs.h, 1702 SetLongAbort NXCDefs.h, 1702 UiModuleFunctions, 524 SetLowSpeedModuleBytes CommandModuleFunctions, 401 NXCDefs.h, 1703 SetLowSpeedModuleValue CommandModuleFunctions, 401 NXCDefs.h, 1703 SetMotorPwnFreq NXCDefs.h, 1703 OutputModuleFunctions, 311 SetMotorRegulationOptions NXCDefs.h, 1704 OutputModuleFunctions, 311 SetMotorRegulationTime NXCDefs.h, 1704 OutputModuleFunctions, 311 SetNXTLineLeaderKdFactor MindSensorsAPI, 203 NXCDefs.h, 1704 SetNXTLineLeaderKdValue MindSensorsAPI, 204 NXCDefs.h, 1705 SetNXTLineLeaderKiFactor MindSensorsAPI, 204 NXCDefs.h, 1706 SetNXTLineLeaderKiValue MindSensorsAPI, 205 NXCDefs.h, 1706 SetNXTLineLeaderKpFactor MindSensorsAPI, 205 NXCDefs.h, 1707 SetNXTLineLeaderKpValue MindSensorsAPI, 206 NXCDefs.h, 1707 SetNXTLineLeaderSetpoint MindSensorsAPI, 207 NXCDefs.h, 1708 SetNXTServoPosition MindSensorsAPI, 207

NXCDefs.h, 1708 SetNXTServoQuickPosition MindSensorsAPI, 208 NXCDefs.h, 1709 SetNXTServoSpeed MindSensorsAPI, 208 NXCDefs.h, 1710 SetOnBrickProgramPointer NXCDefs.h, 1710 UiModuleFunctions, 525 SetOutput NXCDefs.h, 1710 OutputModuleFunctions, 311 SetOutputModuleValue CommandModuleFunctions, 402 NXCDefs.h, 1711 SetScreenMode NBCCommon.h, 1214 SysCallConstants, 644 SetScreenModeType, 1000 Result, 1001 ScreenMode, 1001 SetSensor InputModuleFunctions, 270 NXCDefs.h, 1711 SetSensorBoolean InputModuleFunctions, 270 NXCDefs.h, 1712 SetSensorColorBlue InputModuleFunctions, 271 NXCDefs.h, 1712 SetSensorColorFull InputModuleFunctions, 271 NXCDefs.h, 1713 SetSensorColorGreen InputModuleFunctions, 271 NXCDefs.h, 1713 SetSensorColorNone InputModuleFunctions, 272 NXCDefs.h, 1713 SetSensorColorRed InputModuleFunctions, 272 NXCDefs.h, 1714 SetSensorDigiPinsDirection InputModuleFunctions, 273 NXCDefs.h, 1714

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2143

SetSensorDigiPinsOutputLevel InputModuleFunctions, 273 NXCDefs.h, 1715 SetSensorDigiPinsStatus InputModuleFunctions, 273 NXCDefs.h, 1715 SetSensorEMeter InputModuleFunctions, 274 NXCDefs.h, 1715 SetSensorHTEOPD HiTechnicAPI, 107 NXCDefs.h, 1716 SetSensorHTGyro HiTechnicAPI, 108 NXCDefs.h, 1716 SetSensorHTMagnet HiTechnicAPI, 108 NXCDefs.h, 1716 SetSensorLight InputModuleFunctions, 274 NXCDefs.h, 1717 SetSensorLowspeed InputModuleFunctions, 274 NXCDefs.h, 1717 SetSensorMode InputModuleFunctions, 275 NXCDefs.h, 1717 SetSensorMSDROD MindSensorsAPI, 209 NXCDefs.h, 1718 SetSensorMSPressure MindSensorsAPI, 209 NXCDefs.h, 1718 SetSensorNXTSumoEyes MindSensorsAPI, 209 NXCDefs.h, 1719 SetSensorSound InputModuleFunctions, 275 NXCDefs.h, 1719 SetSensorTemperature InputModuleFunctions, 276 NXCDefs.h, 1719 SetSensorTouch InputModuleFunctions, 276 NXCDefs.h, 1720 SetSensorType

InputModuleFunctions, 276 NXCDefs.h, 1720 SetSensorUltrasonic InputModuleFunctions, 277 NXCDefs.h, 1721 SetSleepTime NXCDefs.h, 1721 UiModuleFunctions, 525 SetSleepTimeout NXCDefs.h, 1721 UiModuleFunctions, 526 SetSleepTimeoutType, 1001 Result, 1002 TheSleepTimeoutMS, 1002 SetSleepTimeoutVal NBCCommon.h, 1215 SysCallConstants, 644 SetSleepTimer NXCDefs.h, 1722 UiModuleFunctions, 526 SetSoundDuration NXCDefs.h, 1722 SoundModuleFunctions, 344 SetSoundFlags NXCDefs.h, 1722 SoundModuleFunctions, 345 SetSoundFrequency NXCDefs.h, 1723 SoundModuleFunctions, 345 SetSoundMode NXCDefs.h, 1723 SoundModuleFunctions, 346 SetSoundModuleState NXCDefs.h, 1723 SoundModuleFunctions, 346 SetSoundModuleValue CommandModuleFunctions, 402 NXCDefs.h, 1724 SetSoundSampleRate NXCDefs.h, 1724 SoundModuleFunctions, 346 SetSoundVolume NXCDefs.h, 1725 SoundModuleFunctions, 347 SetUIButton NXCDefs.h, 1725

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2144

UiModuleFunctions, 526 SetUIModuleValue CommandModuleFunctions, 402 NXCDefs.h, 1725 SetUIState NXCDefs.h, 1726 UiModuleFunctions, 526 SetUSBInputBuffer CommModuleFunctions, 465 NXCDefs.h, 1726 SetUSBInputBufferInPtr CommModuleFunctions, 466 NXCDefs.h, 1726 SetUSBInputBufferOutPtr CommModuleFunctions, 466 NXCDefs.h, 1727 SetUSBOutputBuffer CommModuleFunctions, 466 NXCDefs.h, 1727 SetUSBOutputBufferInPtr CommModuleFunctions, 467 NXCDefs.h, 1727 SetUSBOutputBufferOutPtr CommModuleFunctions, 467 NXCDefs.h, 1727 SetUSBPollBuffer CommModuleFunctions, 467 NXCDefs.h, 1728 SetUSBPollBufferInPtr CommModuleFunctions, 468 NXCDefs.h, 1728 SetUSBPollBufferOutPtr CommModuleFunctions, 468 NXCDefs.h, 1728 SetUSBState CommModuleFunctions, 468 NXCDefs.h, 1729 SetVMRunState NXCDefs.h, 1729 UiModuleFunctions, 527 SetVolume NXCDefs.h, 1729 UiModuleFunctions, 527 SHRT_MAX NBCCommon.h, 1215 NXTLimits, 916

SHRT_MIN NBCCommon.h, 1215 NXTLimits, 916 sign cmathAPI, 583 NXCDefs.h, 1730 Sin cmathAPI, 568 NXCDefs.h, 1348 sin cmathAPI, 583 NXCDefs.h, 1730 SinD cmathAPI, 568 NXCDefs.h, 1349 sind cmathAPI, 584 NXCDefs.h, 1731 Sinh cmathAPI, 568 NXCDefs.h, 1349 sinh cmathAPI, 584 NXCDefs.h, 1731 SinhD cmathAPI, 569 NXCDefs.h, 1349 sinhd cmathAPI, 585 NXCDefs.h, 1731 Size DrawCircleType, 948 DrawRectType, 959 SIZE_OF_BDADDR CommMiscConstants, 782 NBCCommon.h, 1215 SIZE_OF_BRICK_NAME CommMiscConstants, 782 NBCCommon.h, 1215 SIZE_OF_BT_CONNECT_TABLE CommMiscConstants, 782 NBCCommon.h, 1215 SIZE_OF_BT_DEVICE_TABLE CommMiscConstants, 782 NBCCommon.h, 1215 SIZE_OF_BT_NAME

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2145

CommMiscConstants, 782 NBCCommon.h, 1215 SIZE_OF_BT_PINCODE CommMiscConstants, 783 NBCCommon.h, 1215 SIZE_OF_BTBUF CommMiscConstants, 783 NBCCommon.h, 1215 SIZE_OF_CLASS_OF_DEVICE CommMiscConstants, 783 NBCCommon.h, 1216 SIZE_OF_HSBUF CommMiscConstants, 783 NBCCommon.h, 1216 SIZE_OF_USBBUF CommMiscConstants, 783 NBCCommon.h, 1216 SIZE_OF_USBDATA CommMiscConstants, 783 NBCCommon.h, 1216 SizeOf LoaderModuleFunctions, 544 NXCDefs.h, 1732 SizeType, 1002 Height, 1003 Width, 1003 SizeX DrawEllipseType, 949 SizeY DrawEllipseType, 949 SleepNow IOCtrlModuleFunctions, 420 NXCDefs.h, 1732 SleepTime NXCDefs.h, 1732 UiModuleFunctions, 527 SleepTimeout NXCDefs.h, 1733 UiModuleFunctions, 528 SleepTimer NXCDefs.h, 1733 UiModuleFunctions, 528 Sound module, 54 Sound module constants, 680 Sound module functions, 340 Sound module IOMAP offsets, 683

Sound module miscellaneous constants, 684 Sound module types, 339 SOUND_CLICK NBCCommon.h, 1216 RCXSoundConstants, 820 SOUND_DOUBLE_BEEP NBCCommon.h, 1216 RCXSoundConstants, 820 SOUND_DOWN NBCCommon.h, 1216 RCXSoundConstants, 820 SOUND_FAST_UP NBCCommon.h, 1216 RCXSoundConstants, 821 SOUND_FLAGS_IDLE NBCCommon.h, 1217 SoundFlagsConstants, 681 SOUND_FLAGS_RUNNING NBCCommon.h, 1217 SoundFlagsConstants, 681 SOUND_FLAGS_UPDATE NBCCommon.h, 1217 SoundFlagsConstants, 681 SOUND_LOW_BEEP NBCCommon.h, 1217 RCXSoundConstants, 821 SOUND_MODE_LOOP NBCCommon.h, 1217 SoundModeConstants, 683 SOUND_MODE_ONCE NBCCommon.h, 1217 SoundModeConstants, 683 SOUND_MODE_TONE NBCCommon.h, 1217 SoundModeConstants, 683 SOUND_STATE_FILE NBCCommon.h, 1218 SoundStateConstants, 682 SOUND_STATE_IDLE NBCCommon.h, 1218 SoundStateConstants, 682 SOUND_STATE_STOP NBCCommon.h, 1218 SoundStateConstants, 682 SOUND_STATE_TONE

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2146

NBCCommon.h, 1218 SoundStateConstants, 682 SOUND_UP NBCCommon.h, 1218 RCXSoundConstants, 821 SoundDuration NXCDefs.h, 1733 SoundModuleFunctions, 347 SoundFlags NXCDefs.h, 1734 SoundModuleFunctions, 348 SoundFlags constants, 680 SoundFlagsConstants SOUND_FLAGS_IDLE, 681 SOUND_FLAGS_RUNNING, 681 SOUND_FLAGS_UPDATE, 681 SoundFrequency NXCDefs.h, 1734 SoundModuleFunctions, 348 SoundGetState NBCCommon.h, 1218 SysCallConstants, 644 SoundGetStateType, 1003 Flags, 1004 State, 1004 SoundIOMAP SoundOffsetDuration, 683 SoundOffsetFlags, 683 SoundOffsetFreq, 684 SoundOffsetMode, 684 SoundOffsetSampleRate, 684 SoundOffsetSoundFilename, 684 SoundOffsetState, 684 SoundOffsetVolume, 684 SoundLevel SoundPlayFileType, 1005 SoundPlayToneType, 1007 SoundMisc FREQUENCY_MAX, 685 FREQUENCY_MIN, 685 SAMPLERATE_DEFAULT, 685 SAMPLERATE_MAX, 685 SAMPLERATE_MIN, 685 SoundMode NXCDefs.h, 1735 SoundModuleFunctions, 348

SoundMode constants, 682 SoundModeConstants SOUND_MODE_LOOP, 683 SOUND_MODE_ONCE, 683 SOUND_MODE_TONE, 683 SoundModuleFunctions PlayFile, 342 PlayFileEx, 342 PlaySound, 343 PlayTone, 343 PlayToneEx, 344 PlayTones, 344 SetSoundDuration, 344 SetSoundFlags, 345 SetSoundFrequency, 345 SetSoundMode, 346 SetSoundModuleState, 346 SetSoundSampleRate, 346 SetSoundVolume, 347 SoundDuration, 347 SoundFlags, 348 SoundFrequency, 348 SoundMode, 348 SoundSampleRate, 349 SoundState, 349 SoundVolume, 349 StopSound, 350 SysSoundGetState, 350 SysSoundPlayFile, 350 SysSoundPlayTone, 351 SysSoundSetState, 351 SoundModuleID ModuleIDConstants, 227 NBCCommon.h, 1218 SoundModuleName ModuleNameConstants, 225 NBCCommon.h, 1219 SoundOffsetDuration NBCCommon.h, 1219 SoundIOMAP, 683 SoundOffsetFlags NBCCommon.h, 1219 SoundIOMAP, 683 SoundOffsetFreq NBCCommon.h, 1219 SoundIOMAP, 684

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2147

SoundOffsetMode NBCCommon.h, 1219 SoundIOMAP, 684 SoundOffsetSampleRate NBCCommon.h, 1219 SoundIOMAP, 684 SoundOffsetSoundFilename NBCCommon.h, 1219 SoundIOMAP, 684 SoundOffsetState NBCCommon.h, 1220 SoundIOMAP, 684 SoundOffsetVolume NBCCommon.h, 1220 SoundIOMAP, 684 SoundPlayFile NBCCommon.h, 1220 SysCallConstants, 644 SoundPlayFileType, 1004 Filename, 1005 Loop, 1005 Result, 1005 SoundLevel, 1005 SoundPlayTone NBCCommon.h, 1220 SysCallConstants, 644 SoundPlayToneType, 1006 Duration, 1006 Frequency, 1006 Loop, 1006 Result, 1007 SoundLevel, 1007 SoundSampleRate NXCDefs.h, 1735 SoundModuleFunctions, 349 SoundSetState NBCCommon.h, 1220 SysCallConstants, 644 SoundSetStateType, 1007 Flags, 1008 Result, 1008 State, 1008 SoundState NXCDefs.h, 1735 SoundModuleFunctions, 349 SoundState constants, 681

SoundStateConstants SOUND_STATE_FILE, 682 SOUND_STATE_IDLE, 682 SOUND_STATE_STOP, 682 SOUND_STATE_TONE, 682 SoundVolume NXCDefs.h, 1736 SoundModuleFunctions, 349 SPECIALS DisplayModuleConstants, 765 NBCCommon.h, 1220 sprintf cstdioAPI, 598 NXCDefs.h, 1736 Sqrt cmathAPI, 569 NXCDefs.h, 1350 sqrt cmathAPI, 585 NXCDefs.h, 1737 Standard I2C constants, 752 Standard-C API functions, 230 StartLoc DrawLineType, 955 StartTask CommandModuleFunctions, 403 NXCDefs.h, 1737 STAT_COMM_PENDING CommandModuleConstants, 51 NBCCommon.h, 1220 STAT_MSG_EMPTY_MAILBOX CommandModuleConstants, 51 NBCCommon.h, 1220 State SoundGetStateType, 1004 SoundSetStateType, 1008 Status CommHSReadWriteType, 933 DisplayExecuteFunctionType, 945 STATUSICON_BATTERY DisplayModuleConstants, 765 NBCCommon.h, 1220 STATUSICON_BLUETOOTH DisplayModuleConstants, 765 NBCCommon.h, 1220 STATUSICON_USB

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2148

DisplayModuleConstants, 765 NBCCommon.h, 1221 STATUSICON_VM DisplayModuleConstants, 765 NBCCommon.h, 1221 STATUSICONS DisplayModuleConstants, 766 NBCCommon.h, 1221 STATUSTEXT DisplayModuleConstants, 766 NBCCommon.h, 1221 STEPICON_1 DisplayModuleConstants, 766 NBCCommon.h, 1221 STEPICON_2 DisplayModuleConstants, 766 NBCCommon.h, 1221 STEPICON_3 DisplayModuleConstants, 766 NBCCommon.h, 1221 STEPICON_4 DisplayModuleConstants, 766 NBCCommon.h, 1221 STEPICON_5 DisplayModuleConstants, 766 NBCCommon.h, 1221 STEPICONS DisplayModuleConstants, 766 NBCCommon.h, 1221 STEPLINE DisplayModuleConstants, 766 NBCCommon.h, 1222 Stop CommandModuleFunctions, 403 NXCDefs.h, 1737 STOP_REQ CommandVMState, 659 NBCCommon.h, 1222 StopAllTasks CommandModuleFunctions, 403 NXCDefs.h, 1738 StopSound NXCDefs.h, 1738 SoundModuleFunctions, 350 StopTask CommandModuleFunctions, 403

NXCDefs.h, 1738 StrCat cstringAPI, 620 NXCDefs.h, 1739 strcat cstringAPI, 619 NXCDefs.h, 1739 strcmp cstringAPI, 620 NXCDefs.h, 1740 strcpy cstringAPI, 621 NXCDefs.h, 1740 StrIndex cstringAPI, 621 NXCDefs.h, 1741 StrLen cstringAPI, 622 NXCDefs.h, 1741 strlen cstringAPI, 622 NXCDefs.h, 1741 strncat cstringAPI, 622 NXCDefs.h, 1742 strncmp cstringAPI, 623 NXCDefs.h, 1742 strncpy cstringAPI, 623 NXCDefs.h, 1743 StrReplace cstringAPI, 624 NXCDefs.h, 1743 StrToByteArray cstringAPI, 624 NXCDefs.h, 1744 strtod cstdlibAPI, 606 NXCDefs.h, 1744 strtol cstdlibAPI, 607 NXCDefs.h, 1745 StrToNum cstringAPI, 625 NXCDefs.h, 1746

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2149

strtoul cstdlibAPI, 607 NXCDefs.h, 1747 SubStr cstringAPI, 625 NXCDefs.h, 1747 SyncTick DatalogGetTimesType, 942 SyncTime DatalogGetTimesType, 942 SysCall CommandModuleFunctions, 404 NXCDefs.h, 1748 SysCallConstants ColorSensorRead, 637 CommBTCheckStatus, 637 CommBTConnection, 637 CommBTOnOff, 638 CommBTRead, 638 CommBTWrite, 638 CommExecuteFunction, 638 CommHSCheckStatus, 638 CommHSControl, 638 CommHSRead, 638 CommHSWrite, 638 CommLSCheckStatus, 638 CommLSRead, 638 CommLSWrite, 639 CommLSWriteEx, 639 ComputeCalibValue, 639 DatalogGetTimes, 639 DatalogWrite, 639 DisplayExecuteFunction, 639 DrawCircle, 639 DrawEllipse, 639 DrawFont, 639 DrawGraphic, 639 DrawGraphicArray, 640 DrawLine, 640 DrawPoint, 640 DrawPolygon, 640 DrawRect, 640 DrawText, 640 FileClose, 640 FileDelete, 640 FileFindFirst, 641

FileFindNext, 641 FileOpenAppend, 641 FileOpenRead, 641 FileOpenReadLinear, 641 FileOpenWrite, 641 FileOpenWriteLinear, 641 FileOpenWriteNonLinear, 641 FileRead, 641 FileRename, 641 FileResize, 642 FileResolveHandle, 642 FileSeek, 642 FileTell, 642 FileWrite, 642 GetStartTick, 642 IOMapRead, 642 IOMapReadByID, 642 IOMapWrite, 642 IOMapWriteByID, 643 KeepAlive, 643 ListFiles, 643 LoaderExecuteFunction, 643 MemoryManager, 643 MessageRead, 643 MessageWrite, 643 RandomNumber, 643 ReadButton, 643 ReadLastResponse, 643 ReadSemData, 644 SetScreenMode, 644 SetSleepTimeoutVal, 644 SoundGetState, 644 SoundPlayFile, 644 SoundPlayTone, 644 SoundSetState, 644 UpdateCalibCacheInfo, 644 WriteSemData, 644 SysColorSensorRead InputModuleFunctions, 277 NXCDefs.h, 1748 SysCommBTCheckStatus CommModuleFunctions, 468 NXCDefs.h, 1749 SysCommBTConnection CommModuleFunctions, 469 NXCDefs.h, 1749

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2150

SysCommBTOnOff CommModuleFunctions, 469 NXCDefs.h, 1749 SysCommBTWrite CommModuleFunctions, 470 NXCDefs.h, 1750 SysCommExecuteFunction CommModuleFunctions, 470 NXCDefs.h, 1750 SysCommHSCheckStatus CommModuleFunctions, 470 NXCDefs.h, 1751 SysCommHSControl CommModuleFunctions, 471 NXCDefs.h, 1751 SysCommHSRead CommModuleFunctions, 471 NXCDefs.h, 1751 SysCommHSWrite CommModuleFunctions, 472 NXCDefs.h, 1752 SysCommLSCheckStatus LowSpeedModuleSystemCallFunctions, 376 NXCDefs.h, 1752 SysCommLSRead LowSpeedModuleSystemCallFunctions, 376 NXCDefs.h, 1753 SysCommLSWrite LowSpeedModuleSystemCallFunctions, 376 NXCDefs.h, 1753 SysCommLSWriteEx LowSpeedModuleSystemCallFunctions, 376 NXCDefs.h, 1753 SysComputeCalibValue CommandModuleFunctions, 404 NXCDefs.h, 1754 SysDatalogGetTimes CommandModuleFunctions, 405 NXCDefs.h, 1754 SysDatalogWrite CommandModuleFunctions, 405 NXCDefs.h, 1755

SysDisplayExecuteFunction DisplayModuleFunctions, 334 NXCDefs.h, 1755 SysDrawCircle DisplayModuleFunctions, 334 NXCDefs.h, 1756 SysDrawEllipse DisplayModuleFunctions, 334 NXCDefs.h, 1756 SysDrawFont DisplayModuleFunctions, 335 NXCDefs.h, 1756 SysDrawGraphic DisplayModuleFunctions, 335 NXCDefs.h, 1757 SysDrawGraphicArray DisplayModuleFunctions, 336 NXCDefs.h, 1757 SysDrawLine DisplayModuleFunctions, 336 NXCDefs.h, 1757 SysDrawPoint DisplayModuleFunctions, 336 NXCDefs.h, 1758 SysDrawPolygon DisplayModuleFunctions, 337 NXCDefs.h, 1758 SysDrawRect DisplayModuleFunctions, 337 NXCDefs.h, 1758 SysDrawText DisplayModuleFunctions, 337 NXCDefs.h, 1759 SysFileClose LoaderModuleFunctions, 544 NXCDefs.h, 1759 SysFileDelete LoaderModuleFunctions, 545 NXCDefs.h, 1759 SysFileFindFirst LoaderModuleFunctions, 545 NXCDefs.h, 1760 SysFileFindNext LoaderModuleFunctions, 545 NXCDefs.h, 1760 SysFileOpenAppend

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2151

LoaderModuleFunctions, 546 NXCDefs.h, 1761 SysFileOpenRead LoaderModuleFunctions, 546 NXCDefs.h, 1761 SysFileOpenReadLinear LoaderModuleFunctions, 547 NXCDefs.h, 1761 SysFileOpenWrite LoaderModuleFunctions, 547 NXCDefs.h, 1762 SysFileOpenWriteLinear LoaderModuleFunctions, 547 NXCDefs.h, 1762 SysFileOpenWriteNonLinear LoaderModuleFunctions, 548 NXCDefs.h, 1762 SysFileRead LoaderModuleFunctions, 548 NXCDefs.h, 1763 SysFileRename LoaderModuleFunctions, 548 NXCDefs.h, 1763 SysFileResize LoaderModuleFunctions, 549 NXCDefs.h, 1764 SysFileResolveHandle LoaderModuleFunctions, 549 NXCDefs.h, 1764 SysFileSeek LoaderModuleFunctions, 550 NXCDefs.h, 1764 SysFileTell LoaderModuleFunctions, 550 NXCDefs.h, 1765 SysFileWrite LoaderModuleFunctions, 550 NXCDefs.h, 1765 SysGetStartTick CommandModuleFunctions, 406 NXCDefs.h, 1765 SysIOMapRead CommandModuleFunctions, 406 NXCDefs.h, 1766 SysIOMapReadByID CommandModuleFunctions, 406

NXCDefs.h, 1766 SysIOMapWrite CommandModuleFunctions, 407 NXCDefs.h, 1767 SysIOMapWriteByID CommandModuleFunctions, 407 NXCDefs.h, 1767 SysKeepAlive CommandModuleFunctions, 408 NXCDefs.h, 1767 SysListFiles LoaderModuleFunctions, 551 NXCDefs.h, 1768 SysLoaderExecuteFunction LoaderModuleFunctions, 551 NXCDefs.h, 1768 SysMemoryManager CommandModuleFunctions, 408 NXCDefs.h, 1768 SysMessageRead CommModuleFunctions, 472 NXCDefs.h, 1769 SysMessageWrite CommModuleFunctions, 472 NXCDefs.h, 1769 SysRandomNumber cstdlibAPI, 608 NXCDefs.h, 1769 SysReadButton ButtonModuleFunctions, 517 NXCDefs.h, 1770 SysReadLastResponse CommandModuleFunctions, 408 NXCDefs.h, 1770 SysReadSemData CommandModuleFunctions, 409 NXCDefs.h, 1771 SysSetScreenMode DisplayModuleFunctions, 338 NXCDefs.h, 1771 SysSetSleepTimeout NXCDefs.h, 1771 UiModuleFunctions, 528 SysSoundGetState NXCDefs.h, 1772 SoundModuleFunctions, 350

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2152

SysSoundPlayFile NXCDefs.h, 1772 SoundModuleFunctions, 350 SysSoundPlayTone NXCDefs.h, 1772 SoundModuleFunctions, 351 SysSoundSetState NXCDefs.h, 1773 SoundModuleFunctions, 351 System Call function constants, 635 System Command functions, 493 SysUpdateCalibCacheInfo CommandModuleFunctions, 409 NXCDefs.h, 1773 SysWriteSemData CommandModuleFunctions, 410 NXCDefs.h, 1774 TachoCount OutputStateType, 995 TachoCountField NBCCommon.h, 1222 OutputFieldConstants, 739 TachoLimit OutputStateType, 995 TachoLimitField NBCCommon.h, 1222 OutputFieldConstants, 740 Tachometer counter reset ags, 728 TachoResetConstants RESET_ALL, 729 RESET_BLOCK_COUNT, 729 RESET_BLOCKANDTACHO, 729 RESET_COUNT, 729 RESET_NONE, 729 RESET_ROTATION_COUNT, 729 Tan cmathAPI, 570 NXCDefs.h, 1350 tan cmathAPI, 585 NXCDefs.h, 1774 TanD cmathAPI, 570 NXCDefs.h, 1350 tand

cmathAPI, 586 NXCDefs.h, 1774 Tanh cmathAPI, 570 NXCDefs.h, 1351 tanh cmathAPI, 586 NXCDefs.h, 1775 TanhD cmathAPI, 571 NXCDefs.h, 1351 tanhd cmathAPI, 587 NXCDefs.h, 1775 TEMP_FQ_1 NBCCommon.h, 1222 TempI2CConstants, 757 TEMP_FQ_2 NBCCommon.h, 1222 TempI2CConstants, 757 TEMP_FQ_4 NBCCommon.h, 1222 TempI2CConstants, 757 TEMP_FQ_6 NBCCommon.h, 1223 TempI2CConstants, 757 TEMP_OS_ONESHOT NBCCommon.h, 1223 TempI2CConstants, 758 TEMP_POL_HIGH NBCCommon.h, 1223 TempI2CConstants, 758 TEMP_POL_LOW NBCCommon.h, 1223 TempI2CConstants, 758 TEMP_REG_CONFIG NBCCommon.h, 1223 TempI2CConstants, 758 TEMP_REG_TEMP NBCCommon.h, 1223 TempI2CConstants, 758 TEMP_REG_THIGH NBCCommon.h, 1223 TempI2CConstants, 758 TEMP_REG_TLOW NBCCommon.h, 1223

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2153

TempI2CConstants, 758 TEMP_RES_10BIT NBCCommon.h, 1223 TempI2CConstants, 758 TEMP_RES_11BIT NBCCommon.h, 1224 TempI2CConstants, 758 TEMP_RES_12BIT NBCCommon.h, 1224 TempI2CConstants, 759 TEMP_RES_9BIT NBCCommon.h, 1224 TempI2CConstants, 759 TEMP_SD_CONTINUOUS NBCCommon.h, 1224 TempI2CConstants, 759 TEMP_SD_SHUTDOWN NBCCommon.h, 1224 TempI2CConstants, 759 TEMP_TM_COMPARATOR NBCCommon.h, 1224 TempI2CConstants, 759 TEMP_TM_INTERRUPT NBCCommon.h, 1224 TempI2CConstants, 759 TempI2CConstants TEMP_FQ_1, 757 TEMP_FQ_2, 757 TEMP_FQ_4, 757 TEMP_FQ_6, 757 TEMP_OS_ONESHOT, 758 TEMP_POL_HIGH, 758 TEMP_POL_LOW, 758 TEMP_REG_CONFIG, 758 TEMP_REG_TEMP, 758 TEMP_REG_THIGH, 758 TEMP_REG_TLOW, 758 TEMP_RES_10BIT, 758 TEMP_RES_11BIT, 758 TEMP_RES_12BIT, 759 TEMP_RES_9BIT, 759 TEMP_SD_CONTINUOUS, 759 TEMP_SD_SHUTDOWN, 759 TEMP_TM_COMPARATOR, 759 TEMP_TM_INTERRUPT, 759 Text

DrawFontType, 951 DrawTextType, 961 Text line constants, 775 TEXTLINE_1 DisplayTextLineConstants, 776 NBCCommon.h, 1224 TEXTLINE_2 DisplayTextLineConstants, 776 NBCCommon.h, 1225 TEXTLINE_3 DisplayTextLineConstants, 776 NBCCommon.h, 1225 TEXTLINE_4 DisplayTextLineConstants, 776 NBCCommon.h, 1225 TEXTLINE_5 DisplayTextLineConstants, 776 NBCCommon.h, 1225 TEXTLINE_6 DisplayTextLineConstants, 777 NBCCommon.h, 1225 TEXTLINE_7 DisplayTextLineConstants, 777 NBCCommon.h, 1225 TEXTLINE_8 DisplayTextLineConstants, 777 NBCCommon.h, 1225 TEXTLINES DisplayTextLineConstants, 777 NBCCommon.h, 1225 TextOut DisplayModuleFunctions, 338 NXCDefs.h, 1776 TheSleepTimeoutMS SetSleepTimeoutType, 1002 Third-party NXT devices, 229 Time constants, 648 TimeConstants MIN_1, 649 MS_1, 649 MS_10, 650 MS_100, 650 MS_150, 650 MS_2, 650 MS_20, 650 MS_200, 650

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2154

MS_250, 651 MS_3, 651 MS_30, 651 MS_300, 651 MS_350, 651 MS_4, 651 MS_40, 651 MS_400, 651 MS_450, 651 MS_5, 652 MS_50, 652 MS_500, 652 MS_6, 652 MS_60, 652 MS_600, 652 MS_7, 652 MS_70, 653 MS_700, 653 MS_8, 653 MS_80, 653 MS_800, 653 MS_9, 653 MS_90, 653 MS_900, 653 SEC_1, 653 SEC_10, 654 SEC_15, 654 SEC_2, 654 SEC_20, 654 SEC_3, 654 SEC_30, 655 SEC_4, 655 SEC_5, 655 SEC_6, 655 SEC_7, 656 SEC_8, 656 SEC_9, 656 TIMES_UP CommandVMState, 659 NBCCommon.h, 1225 tolower ctypeAPI, 632 NXCDefs.h, 1777 Tone, 1008 Duration, 1009 Frequency, 1009

Tone constants, 685 TONE_A3 NBCCommon.h, 1226 ToneConstants, 687 TONE_A4 NBCCommon.h, 1226 ToneConstants, 687 TONE_A5 NBCCommon.h, 1226 ToneConstants, 687 TONE_A6 NBCCommon.h, 1226 ToneConstants, 687 TONE_A7 NBCCommon.h, 1226 ToneConstants, 687 TONE_AS3 NBCCommon.h, 1226 ToneConstants, 687 TONE_AS4 NBCCommon.h, 1226 ToneConstants, 688 TONE_AS5 NBCCommon.h, 1226 ToneConstants, 688 TONE_AS6 NBCCommon.h, 1226 ToneConstants, 688 TONE_AS7 NBCCommon.h, 1227 ToneConstants, 688 TONE_B3 NBCCommon.h, 1227 ToneConstants, 688 TONE_B4 NBCCommon.h, 1227 ToneConstants, 688 TONE_B5 NBCCommon.h, 1227 ToneConstants, 688 TONE_B6 NBCCommon.h, 1227 ToneConstants, 688 TONE_B7 NBCCommon.h, 1227 ToneConstants, 688

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2155

TONE_C4 NBCCommon.h, 1227 ToneConstants, 688 TONE_C5 NBCCommon.h, 1227 ToneConstants, 689 TONE_C6 NBCCommon.h, 1228 ToneConstants, 689 TONE_C7 NBCCommon.h, 1228 ToneConstants, 689 TONE_CS4 NBCCommon.h, 1228 ToneConstants, 689 TONE_CS5 NBCCommon.h, 1228 ToneConstants, 689 TONE_CS6 NBCCommon.h, 1228 ToneConstants, 689 TONE_CS7 NBCCommon.h, 1228 ToneConstants, 689 TONE_D4 NBCCommon.h, 1228 ToneConstants, 690 TONE_D5 NBCCommon.h, 1228 ToneConstants, 690 TONE_D6 NBCCommon.h, 1228 ToneConstants, 690 TONE_D7 NBCCommon.h, 1229 ToneConstants, 690 TONE_DS4 NBCCommon.h, 1229 ToneConstants, 690 TONE_DS5 NBCCommon.h, 1229 ToneConstants, 690 TONE_DS6 NBCCommon.h, 1229 ToneConstants, 690 TONE_DS7

NBCCommon.h, 1229 ToneConstants, 690 TONE_E4 NBCCommon.h, 1229 ToneConstants, 690 TONE_E5 NBCCommon.h, 1229 ToneConstants, 691 TONE_E6 NBCCommon.h, 1229 ToneConstants, 691 TONE_E7 NBCCommon.h, 1230 ToneConstants, 691 TONE_F4 NBCCommon.h, 1230 ToneConstants, 691 TONE_F5 NBCCommon.h, 1230 ToneConstants, 691 TONE_F6 NBCCommon.h, 1230 ToneConstants, 691 TONE_F7 NBCCommon.h, 1230 ToneConstants, 691 TONE_FS4 NBCCommon.h, 1230 ToneConstants, 691 TONE_FS5 NBCCommon.h, 1230 ToneConstants, 691 TONE_FS6 NBCCommon.h, 1230 ToneConstants, 692 TONE_FS7 NBCCommon.h, 1230 ToneConstants, 692 TONE_G4 NBCCommon.h, 1230 ToneConstants, 692 TONE_G5 NBCCommon.h, 1231 ToneConstants, 692 TONE_G6 NBCCommon.h, 1231

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2156

ToneConstants, 692 TONE_G7 NBCCommon.h, 1231 ToneConstants, 692 TONE_GS4 NBCCommon.h, 1231 ToneConstants, 692 TONE_GS5 NBCCommon.h, 1231 ToneConstants, 692 TONE_GS6 NBCCommon.h, 1231 ToneConstants, 693 TONE_GS7 NBCCommon.h, 1231 ToneConstants, 693 ToneConstants TONE_A3, 687 TONE_A4, 687 TONE_A5, 687 TONE_A6, 687 TONE_A7, 687 TONE_AS3, 687 TONE_AS4, 688 TONE_AS5, 688 TONE_AS6, 688 TONE_AS7, 688 TONE_B3, 688 TONE_B4, 688 TONE_B5, 688 TONE_B6, 688 TONE_B7, 688 TONE_C4, 688 TONE_C5, 689 TONE_C6, 689 TONE_C7, 689 TONE_CS4, 689 TONE_CS5, 689 TONE_CS6, 689 TONE_CS7, 689 TONE_D4, 690 TONE_D5, 690 TONE_D6, 690 TONE_D7, 690 TONE_DS4, 690 TONE_DS5, 690

TONE_DS6, 690 TONE_DS7, 690 TONE_E4, 690 TONE_E5, 691 TONE_E6, 691 TONE_E7, 691 TONE_F4, 691 TONE_F5, 691 TONE_F6, 691 TONE_F7, 691 TONE_FS4, 691 TONE_FS5, 691 TONE_FS6, 692 TONE_FS7, 692 TONE_G4, 692 TONE_G5, 692 TONE_G6, 692 TONE_G7, 692 TONE_GS4, 692 TONE_GS5, 692 TONE_GS6, 693 TONE_GS7, 693 TOPLINE DisplayModuleConstants, 766 NBCCommon.h, 1231 toupper ctypeAPI, 633 NXCDefs.h, 1777 TRAIN_CHANNEL_1 IRTrainChannels, 855 NBCCommon.h, 1232 TRAIN_CHANNEL_2 IRTrainChannels, 855 NBCCommon.h, 1232 TRAIN_CHANNEL_3 IRTrainChannels, 855 NBCCommon.h, 1232 TRAIN_CHANNEL_ALL IRTrainChannels, 855 NBCCommon.h, 1232 TRAIN_FUNC_DECR_SPEED IRTrainFuncs, 854 NBCCommon.h, 1232 TRAIN_FUNC_INCR_SPEED IRTrainFuncs, 854 NBCCommon.h, 1232

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2157

TRAIN_FUNC_STOP IRTrainFuncs, 854 NBCCommon.h, 1232 TRAIN_FUNC_TOGGLE_LIGHT IRTrainFuncs, 854 NBCCommon.h, 1232 TRUE MiscConstants, 229 NBCCommon.h, 1233 Trunc cmathAPI, 571 NXCDefs.h, 1352 trunc cmathAPI, 587 NXCDefs.h, 1778 TurnRatio OutputStateType, 995 TurnRatioField NBCCommon.h, 1233 OutputFieldConstants, 740 Type aliases, 239 TypeAliases s16, 240 s32, 240 s8, 240 u16, 240 u32, 240 u8, 240 TypeField InputFieldConstants, 715 NBCCommon.h, 1233 u16 NXCDefs.h, 1352 TypeAliases, 240 u32 NXCDefs.h, 1352 TypeAliases, 240 u8 NXCDefs.h, 1352 TypeAliases, 240 UCHAR_MAX NBCCommon.h, 1233 NXTLimits, 916 UF_PENDING_UPDATES NBCCommon.h, 1233

OutUFConstants, 727 UF_UPDATE_MODE NBCCommon.h, 1233 OutUFConstants, 727 UF_UPDATE_PID_VALUES NBCCommon.h, 1234 OutUFConstants, 727 UF_UPDATE_RESET_BLOCK_COUNT NBCCommon.h, 1234 OutUFConstants, 727 UF_UPDATE_RESET_COUNT NBCCommon.h, 1234 OutUFConstants, 728 UF_UPDATE_RESET_ROTATION_COUNT NBCCommon.h, 1234 OutUFConstants, 728 UF_UPDATE_SPEED NBCCommon.h, 1234 OutUFConstants, 728 UF_UPDATE_TACHO_LIMIT NBCCommon.h, 1234 OutUFConstants, 728 Ui module, 55 Ui module constants, 698 Ui module functions, 518 Ui module IOMAP offsets, 706 Ui module types, 517 UI_BT_CONNECT_REQUEST NBCCommon.h, 1234 UiBluetoothStateConstants, 704 UI_BT_ERROR_ATTENTION NBCCommon.h, 1234 UiBluetoothStateConstants, 704 UI_BT_PIN_REQUEST NBCCommon.h, 1234 UiBluetoothStateConstants, 705 UI_BT_STATE_CONNECTED NBCCommon.h, 1234 UiBluetoothStateConstants, 705 UI_BT_STATE_OFF NBCCommon.h, 1235 UiBluetoothStateConstants, 705 UI_BT_STATE_VISIBLE NBCCommon.h, 1235

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2158

UiBluetoothStateConstants, 705 UI_BUTTON_ENTER NBCCommon.h, 1235 UiButtonConstants, 703 UI_BUTTON_EXIT NBCCommon.h, 1235 UiButtonConstants, 703 UI_BUTTON_LEFT NBCCommon.h, 1235 UiButtonConstants, 704 UI_BUTTON_NONE NBCCommon.h, 1235 UiButtonConstants, 704 UI_BUTTON_RIGHT NBCCommon.h, 1235 UiButtonConstants, 704 UI_FLAGS_BUSY NBCCommon.h, 1235 UiFlagsConstants, 699 UI_FLAGS_DISABLE_EXIT NBCCommon.h, 1236 UiFlagsConstants, 699 UI_FLAGS_DISABLE_LEFT_RIGHT_ENTER NBCCommon.h, 1236 UiFlagsConstants, 699 UI_FLAGS_ENABLE_STATUS_UPDATE NBCCommon.h, 1236 UiFlagsConstants, 700 UI_FLAGS_EXECUTE_LMS_FILE NBCCommon.h, 1236 UiFlagsConstants, 700 UI_FLAGS_REDRAW_STATUS NBCCommon.h, 1236 UiFlagsConstants, 700 UI_FLAGS_RESET_SLEEP_TIMER NBCCommon.h, 1236 UiFlagsConstants, 700 UI_FLAGS_UPDATE NBCCommon.h, 1236 UiFlagsConstants, 700 UI_STATE_BT_ERROR NBCCommon.h, 1236 UiStateConstants, 701 UI_STATE_CONNECT_REQUEST

NBCCommon.h, 1236 UiStateConstants, 701 UI_STATE_DRAW_MENU NBCCommon.h, 1237 UiStateConstants, 701 UI_STATE_ENTER_PRESSED NBCCommon.h, 1237 UiStateConstants, 701 UI_STATE_EXECUTE_FILE NBCCommon.h, 1237 UiStateConstants, 701 UI_STATE_EXECUTING_FILE NBCCommon.h, 1237 UiStateConstants, 701 UI_STATE_EXIT_PRESSED NBCCommon.h, 1237 UiStateConstants, 702 UI_STATE_INIT_DISPLAY NBCCommon.h, 1237 UiStateConstants, 702 UI_STATE_INIT_INTRO NBCCommon.h, 1237 UiStateConstants, 702 UI_STATE_INIT_LOW_BATTERY NBCCommon.h, 1237 UiStateConstants, 702 UI_STATE_INIT_MENU NBCCommon.h, 1237 UiStateConstants, 702 UI_STATE_INIT_WAIT NBCCommon.h, 1237 UiStateConstants, 702 UI_STATE_LEFT_PRESSED NBCCommon.h, 1238 UiStateConstants, 702 UI_STATE_LOW_BATTERY NBCCommon.h, 1238 UiStateConstants, 702 UI_STATE_NEXT_MENU NBCCommon.h, 1238 UiStateConstants, 702 UI_STATE_RIGHT_PRESSED NBCCommon.h, 1238 UiStateConstants, 703 UI_STATE_TEST_BUTTONS NBCCommon.h, 1238

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2159

UiStateConstants, 703 UI_VM_IDLE NBCCommon.h, 1238 UiVMRunStateConstants, 706 UI_VM_RESET1 NBCCommon.h, 1238 UiVMRunStateConstants, 706 UI_VM_RESET2 NBCCommon.h, 1238 UiVMRunStateConstants, 706 UI_VM_RUN_FREE NBCCommon.h, 1238 UiVMRunStateConstants, 706 UI_VM_RUN_PAUSE NBCCommon.h, 1239 UiVMRunStateConstants, 706 UI_VM_RUN_SINGLE NBCCommon.h, 1239 UiVMRunStateConstants, 706 UiBluetoothStateConstants UI_BT_CONNECT_REQUEST, 704 UI_BT_ERROR_ATTENTION, 704 UI_BT_PIN_REQUEST, 705 UI_BT_STATE_CONNECTED, 705 UI_BT_STATE_OFF, 705 UI_BT_STATE_VISIBLE, 705 UIButton NXCDefs.h, 1778 UiModuleFunctions, 529 UIButton constants, 703 UiButtonConstants UI_BUTTON_ENTER, 703 UI_BUTTON_EXIT, 703 UI_BUTTON_LEFT, 704 UI_BUTTON_NONE, 704 UI_BUTTON_RIGHT, 704 UiFlagsConstants UI_FLAGS_BUSY, 699 UI_FLAGS_DISABLE_EXIT, 699 UI_FLAGS_DISABLE_LEFT_RIGHT_ENTER, 699 UI_FLAGS_ENABLE_STATUS_UPDATE, 700 UI_FLAGS_EXECUTE_LMS_FILE, 700

UI_FLAGS_REDRAW_STATUS, 700 UI_FLAGS_RESET_SLEEP_TIMER, 700 UI_FLAGS_UPDATE, 700 UiIOMAP UIOffsetAbortFlag, 707 UIOffsetBatteryState, 707 UIOffsetBatteryVoltage, 707 UIOffsetBluetoothState, 707 UIOffsetButton, 707 UIOffsetError, 708 UIOffsetFlags, 708 UIOffsetForceOff, 708 UIOffsetLMSlename, 708 UIOffsetOBPPointer, 708 UIOffsetPMenu, 708 UIOffsetRechargeable, 708 UIOffsetRunState, 708 UIOffsetSleepTimeout, 708 UIOffsetSleepTimer, 708 UIOffsetState, 709 UIOffsetUsbState, 709 UIOffsetVolume, 709 UiModuleFunctions AbortFlag, 520 BatteryLevel, 521 BatteryState, 521 BluetoothState, 521 CommandFlags, 521 ForceOff, 522 LongAbort, 522 OnBrickProgramPointer, 522 RechargeableBattery, 523 SetAbortFlag, 523 SetBatteryState, 523 SetBluetoothState, 524 SetCommandFlags, 524 SetLongAbort, 524 SetOnBrickProgramPointer, 525 SetSleepTime, 525 SetSleepTimeout, 526 SetSleepTimer, 526 SetUIButton, 526 SetUIState, 526 SetVMRunState, 527

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2160

SetVolume, 527 SleepTime, 527 SleepTimeout, 528 SleepTimer, 528 SysSetSleepTimeout, 528 UIButton, 529 UIState, 529 UsbState, 529 VMRunState, 530 Volume, 530 UIModuleID ModuleIDConstants, 227 NBCCommon.h, 1239 UIModuleName ModuleNameConstants, 225 NBCCommon.h, 1239 UINT_MAX NBCCommon.h, 1239 NXTLimits, 916 UIOffsetAbortFlag NBCCommon.h, 1239 UiIOMAP, 707 UIOffsetBatteryState NBCCommon.h, 1239 UiIOMAP, 707 UIOffsetBatteryVoltage NBCCommon.h, 1239 UiIOMAP, 707 UIOffsetBluetoothState NBCCommon.h, 1239 UiIOMAP, 707 UIOffsetButton NBCCommon.h, 1239 UiIOMAP, 707 UIOffsetError NBCCommon.h, 1240 UiIOMAP, 708 UIOffsetFlags NBCCommon.h, 1240 UiIOMAP, 708 UIOffsetForceOff NBCCommon.h, 1240 UiIOMAP, 708 UIOffsetLMSlename NBCCommon.h, 1240 UiIOMAP, 708

UIOffsetOBPPointer NBCCommon.h, 1240 UiIOMAP, 708 UIOffsetPMenu NBCCommon.h, 1240 UiIOMAP, 708 UIOffsetRechargeable NBCCommon.h, 1240 UiIOMAP, 708 UIOffsetRunState NBCCommon.h, 1240 UiIOMAP, 708 UIOffsetSleepTimeout NBCCommon.h, 1240 UiIOMAP, 708 UIOffsetSleepTimer NBCCommon.h, 1240 UiIOMAP, 708 UIOffsetState NBCCommon.h, 1241 UiIOMAP, 709 UIOffsetUsbState NBCCommon.h, 1241 UiIOMAP, 709 UIOffsetVolume NBCCommon.h, 1241 UiIOMAP, 709 UIState NXCDefs.h, 1778 UiModuleFunctions, 529 UIState constants, 700 UiStateConstants UI_STATE_BT_ERROR, 701 UI_STATE_CONNECT_REQUEST, 701 UI_STATE_DRAW_MENU, 701 UI_STATE_ENTER_PRESSED, 701 UI_STATE_EXECUTE_FILE, 701 UI_STATE_EXECUTING_FILE, 701 UI_STATE_EXIT_PRESSED, 702 UI_STATE_INIT_DISPLAY, 702 UI_STATE_INIT_INTRO, 702 UI_STATE_INIT_LOW_BATTERY, 702

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2161

UI_STATE_INIT_MENU, 702 UI_STATE_INIT_WAIT, 702 UI_STATE_LEFT_PRESSED, 702 UI_STATE_LOW_BATTERY, 702 UI_STATE_NEXT_MENU, 702 UI_STATE_RIGHT_PRESSED, 703 UI_STATE_TEST_BUTTONS, 703 UiVMRunStateConstants UI_VM_IDLE, 706 UI_VM_RESET1, 706 UI_VM_RESET2, 706 UI_VM_RUN_FREE, 706 UI_VM_RUN_PAUSE, 706 UI_VM_RUN_SINGLE, 706 ULONG_MAX NBCCommon.h, 1241 NXTLimits, 916 Ultrasonic sensor constants, 754 UnattenVar cstringAPI, 626 NXCDefs.h, 1779 UpdateCalibCacheInfo NBCCommon.h, 1241 SysCallConstants, 644 UpdateCalibCacheInfoType, 1009 MaxVal, 1010 MinVal, 1010 Name, 1010 Result, 1010 UpdateFlagsField NBCCommon.h, 1241 OutputFieldConstants, 740 US_CMD_CONTINUOUS NBCCommon.h, 1241 USI2CConstants, 755 US_CMD_EVENTCAPTURE NBCCommon.h, 1241 USI2CConstants, 755 US_CMD_OFF NBCCommon.h, 1241 USI2CConstants, 755 US_CMD_SINGLESHOT NBCCommon.h, 1242 USI2CConstants, 755 US_CMD_WARMRESET NBCCommon.h, 1242

USI2CConstants, 755 US_REG_ACTUAL_ZERO NBCCommon.h, 1242 USI2CConstants, 755 US_REG_CM_INTERVAL NBCCommon.h, 1242 USI2CConstants, 756 US_REG_FACTORY_ACTUAL_ZERO NBCCommon.h, 1242 USI2CConstants, 756 US_REG_FACTORY_SCALE_DIVISOR NBCCommon.h, 1242 USI2CConstants, 756 US_REG_FACTORY_SCALE_FACTOR NBCCommon.h, 1242 USI2CConstants, 756 US_REG_MEASUREMENT_UNITS NBCCommon.h, 1242 USI2CConstants, 756 US_REG_SCALE_DIVISOR NBCCommon.h, 1242 USI2CConstants, 756 US_REG_SCALE_FACTOR NBCCommon.h, 1243 USI2CConstants, 756 USB_CMD_READY CommStatusCodesConstants, 806 NBCCommon.h, 1243 USB_PROTOCOL_OVERHEAD CommMiscConstants, 783 NBCCommon.h, 1243 USBInputBufferInPtr CommModuleFunctions, 473 NXCDefs.h, 1779 USBInputBufferOutPtr CommModuleFunctions, 473 NXCDefs.h, 1780 USBOutputBufferInPtr CommModuleFunctions, 473 NXCDefs.h, 1780 USBOutputBufferOutPtr CommModuleFunctions, 474 NXCDefs.h, 1780 USBPollBufferInPtr CommModuleFunctions, 474

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2162

NXCDefs.h, 1780 USBPollBufferOutPtr CommModuleFunctions, 474 NXCDefs.h, 1781 USBState CommModuleFunctions, 475 NXCDefs.h, 1781 UsbState NXCDefs.h, 1781 UiModuleFunctions, 529 UseRS485 CommModuleFunctions, 475 NXCDefs.h, 1782 USHRT_MAX NBCCommon.h, 1243 NXTLimits, 916 USI2CConstants US_CMD_CONTINUOUS, 755 US_CMD_EVENTCAPTURE, 755 US_CMD_OFF, 755 US_CMD_SINGLESHOT, 755 US_CMD_WARMRESET, 755 US_REG_ACTUAL_ZERO, 755 US_REG_CM_INTERVAL, 756 US_REG_FACTORY_ACTUAL_ZERO, 756 US_REG_FACTORY_SCALE_DIVISOR, 756 US_REG_FACTORY_SCALE_FACTOR, 756 US_REG_MEASUREMENT_UNITS, 756 US_REG_SCALE_DIVISOR, 756 US_REG_SCALE_FACTOR, 756 Valid InputValuesType, 976 Variables DrawGraphicArrayType, 952 DrawGraphicType, 954 VM run state constants, 705 VM state constants, 658 VMRunState NXCDefs.h, 1782 UiModuleFunctions, 530 Volume

NXCDefs.h, 1782 UiModuleFunctions, 530 Wait CommandModuleFunctions, 410 NXCDefs.h, 1782 Width SizeType, 1003 Write LoaderModuleFunctions, 551 NXCDefs.h, 1783 WriteBytes LoaderModuleFunctions, 552 NXCDefs.h, 1784 WriteBytesEx LoaderModuleFunctions, 552 NXCDefs.h, 1784 WriteHandle FileResolveHandleType, 971 WriteI2CRegister LowSpeedModuleFunctions, 368 NXCDefs.h, 1785 WriteLn LoaderModuleFunctions, 553 NXCDefs.h, 1785 WriteLnString LoaderModuleFunctions, 553 NXCDefs.h, 1786 WriteNRLinkBytes MindSensorsAPI, 210 NXCDefs.h, 1786 WriteSemData NBCCommon.h, 1243 SysCallConstants, 644 WriteSemDataType, 1011 ClearBits, 1011 NewVal, 1011 Request, 1012 SemData, 1012 WriteString LoaderModuleFunctions, 554 NXCDefs.h, 1787 X LocationType, 989 X1

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

INDEX

2163

DisplayExecuteFunctionType, 945 X2 DisplayExecuteFunctionType, 945 Y LocationType, 989 Y1 DisplayExecuteFunctionType, 945 Y2 DisplayExecuteFunctionType, 945 Yield CommandModuleFunctions, 411 NXCDefs.h, 1787

Generated on Sun Mar 13 18:08:39 2011 for NXC by Doxygen

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy