beautypg.com

Clickmsgcreate – Wavetronix Click 500 (programmable controller) (CLK-500) - Developer Guide User Manual

Page 167

background image

166

APPENDIX • CLICK 500 DEVELOPER GUIDE

ClickMsgCreate

This function creates a ClickMsgString.

˽

LIBRARY – click500message.LIB

˽

SYNTAX –

ClickMsgString ClickMsgCreate(char* message);

˽

PARAMETER1 – message: A pointer to a character string formatted according to the

CLK500 messaging specification.

˽

EXAMPLE –

ClickMessageString message1;
message1 = ClickMsgCreate(“);

By default the following rules apply to ClickMessageStrings, variables, and checksums.

However, in many cases you can override or edit the pre-compiler directives in Click500de-

faults.lib to change these rules. For example, if your program needs 64 total messages, you

can override the default limit of 32 by simply adding the line “#define NUM_MESSAGES

64” at the very beginning of your program. (Or you can go in and edit Click500defaults.lib

if you want to change the limits for all the programs you are developing.)

ClickMessageString rules:
1 The maximum message size is 256 (#define MAX_MESSAGE_SIZE). This maximum

can only be reduced.

2 The default maximum number of total messages is 32 (#define NUM_MESSAGES).

3 The default maximum number of total receive messages is 8 (#define MAX_RE-

CEIVE_MESSAGES).

Variable rules:
1 The default maximum number of single-value variables is 100 (#define NUM_VARS).

2 Single-value variables have a 32-bit maximum value of 4,294,967,296 (fixed).

3 The default maximum number of fixed-length array variables is 20 (#define NUM_AR-

RAY_VARS).

4 The default maximum length of fixed-length array variables is 32 bytes (#define MAX_

ARRAY_SIZE).

5 The default maximum number of variable-length array variables is 10 (#define NUM_

VAR_LENGTH_ARRAY_VARS).

6 The default maximum length of variable-length array variables is 200 bytes (#define

MAX_VAR_LEN_ARRAY_SIZE).

7 Variable labels [myBytes] can have a maximum length of 15 characters (fixed).