Command Bool Feature Pseudo-Code

void ACTION(boolean arg)

  • The Feature takes one boolean argument.
  • The Feature do not return anything.
  • The ACTION is performed on target.


Command Bool Panel


Command Bool Macro

Description:

Macro

Identifier

Displayed Name

Function Identifier

Group*

TRUE text

FALSE text


Example:

define_bool_command(

cmdSetRedLed,

"Set Red LED",

SetRedLed,

4,

"ON",

"OFF"

);


*optional argument Group. If Group is omitted the Group-Number will default to 0.

The unique message id is derived from the row number, in source file where the macro is used.



Command Bool XML Definition

Description

XML

Feature Root: Start

<F>

Command Bool: Start

<Cb>

ID

<I>BYTE</I>

SUB ID

<Is>BYTE</Is>

GROUP

<Gr>BYTE</Gr>

NAME

<N>STRING</N>

Panel TRUE-text

<B1>STRING</B1>

Panel FALSE-text

<B0>STRING</B0>

Command Bool: End

</Cb>

Feature Root: End

</F>



Command Bool Data Message

The Boolean argument has only two states TRUE or FALSE.


State

BOOL VALUE

TRUE

1

FALSE

0


The value is represented by one single byte in the message.

Byte#

0

1

2

3

4

5

6

Name

START

ID

SUB ID

BOOL VALUE

CRC MSB

CRC LSB

END

Value

0xAA

[0..255]

[0..255]

[0..1]

CRC16-CITT

0xBB