Module: Lignite

Included in:
Assembler
Defined in:
lib/lignite.rb,
lib/lignite/bytes.rb,
lib/lignite/enums.rb,
lib/lignite/logger.rb,
lib/lignite/motors.rb,
lib/lignite/defines.rb,
lib/lignite/ev3_ops.rb,
lib/lignite/message.rb,
lib/lignite/version.rb,
lib/lignite/ev3_tool.rb,
lib/lignite/assembler.rb,
lib/lignite/condition.rb,
lib/lignite/variables.rb,
lib/lignite/connection.rb,
lib/lignite/rbf_object.rb,
lib/lignite/jump_offset.rb,
lib/lignite/op_compiler.rb,
lib/lignite/rbf_declarer.rb,
lib/lignite/body_compiler.rb,
lib/lignite/connection/tap.rb,
lib/lignite/connection/usb.rb,
lib/lignite/direct_commands.rb,
lib/lignite/system_commands.rb,
lib/lignite/connection/replay.rb,
lib/lignite/parameter_declarer.rb,
lib/lignite/connection/bluetooth.rb

Overview

This file is generated from ev3.yml. DO NOT EDIT.

Defined Under Namespace

Modules: Bytes, Ev3Ops, Logger, ParameterDeclarer, VariableDeclarer Classes: Always, Assembler, BodyCompiler, ByteString, Condition, Connection, DirectCommands, DirectReply, Ev3Tool, Flag, Gteq32, JumpOffset, Lt32, Message, Motors, Never, NoUsbDevice, NotFlag, OpCompiler, RbfDeclarer, RbfObject, SimpleAssembler, SystemCommands, SystemReply, VMError, Variables

Constant Summary collapse

LAYER_0 =
0
PORT_A =
1
PORT_B =
2
PORT_C =
4
PORT_D =
8
PORT_1 =
0
PORT_2 =
1
PORT_3 =
2
PORT_4 =
3
COAST =
0
BRAKE =
1
MODE_KEEP =

Mode value that won’t change mode in byte codes (convenient place to define)

-1
TYPE_KEEP =

Type value that won’t change type in byte codes

0
TYPE_NXT_TOUCH =

Device is NXT touch sensor

1
TYPE_NXT_LIGHT =

Device is NXT light sensor

2
TYPE_NXT_SOUND =

Device is NXT sound sensor

3
TYPE_NXT_COLOR =

Device is NXT color sensor

4
TYPE_NXT_ULTRASONIC =

Device is NXT ultra sonic sensor

5
TYPE_NXT_TEMPERATURE =

Device is NXT temperature sensor

6
TYPE_TACHO =

Device is EV3/NXT tacho motor

7
TYPE_MINITACHO =

Device is EV3 mini tacho motor

8
TYPE_NEWTACHO =

Device is EV3 new tacho motor

9
TYPE_TOUCH =

Device is EV3 touch sensor

16
TYPE_COLOR =

Device is EV3 color sensor

29
TYPE_ULTRASONIC =

Device is EV3 ultra sonic sensor

30
TYPE_GYRO =

Device is EV3 gyro sensor

32
TYPE_IR =

Device is EV3 IR sensor

33
TYPE_THIRD_PARTY_START =
50
TYPE_THIRD_PARTY_END =
98
TYPE_ENERGYMETER =

Device is energy meter

99
TYPE_IIC_UNKNOWN =

Device type is not known yet

100
TYPE_NXT_TEST =

Device is a NXT ADC test sensor

101
TYPE_NXT_IIC =

Device is NXT IIC sensor

123
TYPE_TERMINAL =

Port is connected to a terminal

124
TYPE_UNKNOWN =

Port not empty but type has not been determined

125
TYPE_NONE =

Port empty or not available

126
TYPE_ERROR =

Port not empty and type is invalid

127
GUI_SLOT =

Program slot reserved for executing the user interface

0
USER_SLOT =

Program slot used to execute user projects, apps and tools

1
CMD_SLOT =

Program slot used for direct commands coming from c_com

2
TERM_SLOT =

Program slot used for direct commands coming from c_ui

3
DEBUG_SLOT =

Program slot used to run the debug ui

4
SLOTS =

Maximum slots supported by the VM

5
CURRENT_SLOT =
-1
NO_BUTTON =

enum: BUTTONTYPE Button

0
UP_BUTTON =
1
ENTER_BUTTON =
2
DOWN_BUTTON =
3
RIGHT_BUTTON =
4
LEFT_BUTTON =
5
BACK_BUTTON =
6
ANY_BUTTON =
7
BUTTONTYPES =
8
BROWSE_FOLDERS =

Browser for folders

0
BROWSE_FOLDS_FILES =

Browser for folders and files

1
BROWSE_CACHE =

Browser for cached / recent files

2
BROWSE_FILES =

Browser for files

3
BROWSERTYPES =

Maximum browser types supported by the VM

4
NORMAL_FONT =

enum: FONTTYPE Font Types Avaliable

0
SMALL_FONT =
1
LARGE_FONT =
2
TINY_FONT =
3
FONTTYPES =

Maximum font types supported by the VM

4
NORMAL_ICON =

24x12_Files_Folders_Settings.bmp

0
SMALL_ICON =
1
LARGE_ICON =

24x22_Yes_No_OFF_FILEOps.bmp

2
3
ARROW_ICON =

8x12_miniArrows.bmp

4
ICONTYPES =

Maximum icon types supported by the VM

5
SICON_CHARGING =

enum: S_ICON_NO

0
SICON_BATT_4 =
1
SICON_BATT_3 =
2
SICON_BATT_2 =
3
SICON_BATT_1 =
4
SICON_BATT_0 =
5
SICON_WAIT1 =
6
SICON_WAIT2 =
7
SICON_BT_ON =
8
SICON_BT_VISIBLE =
9
SICON_BT_CONNECTED =
10
SICON_BT_CONNVISIB =
11
SICON_WIFI_3 =
12
SICON_WIFI_2 =
13
SICON_WIFI_1 =
14
SICON_WIFI_CONNECTED =
15
SICON_USB =
21
S_ICON_NOS =
22
ICON_NONE =

enum: N_ICON_NO

-1
ICON_RUN =
0
ICON_FOLDER =
1
ICON_FOLDER2 =
2
ICON_USB =
3
ICON_SD =
4
ICON_SOUND =
5
ICON_IMAGE =
6
ICON_SETTINGS =
7
ICON_ONOFF =
8
ICON_SEARCH =
9
ICON_WIFI =
10
ICON_CONNECTIONS =
11
ICON_ADD_HIDDEN =
12
ICON_TRASHBIN =
13
ICON_VISIBILITY =
14
ICON_KEY =
15
ICON_CONNECT =
16
ICON_DISCONNECT =
17
ICON_UP =
18
ICON_DOWN =
19
ICON_WAIT1 =
20
ICON_WAIT2 =
21
ICON_BLUETOOTH =
22
ICON_INFO =
23
ICON_TEXT =
24
ICON_QUESTIONMARK =
27
ICON_INFO_FILE =
28
ICON_DISC =
29
ICON_CONNECTED =
30
ICON_OBP =
31
ICON_OBD =
32
ICON_OPENFOLDER =
33
ICON_BRICK1 =
34
N_ICON_NOS =
35
YES_NOTSEL =

enum: L_ICON_NO

0
YES_SEL =
1
NO_NOTSEL =
2
NO_SEL =
3
OFF =
4
WAIT_VERT =
5
WAIT_HORZ =
6
TO_MANUAL =
7
WARNSIGN =
8
WARN_BATT =
9
WARN_POWER =
10
WARN_TEMP =
11
NO_USBSTICK =
12
TO_EXECUTE =
13
TO_BRICK =
14
TO_SDCARD =
15
TO_USBSTICK =
16
TO_BLUETOOTH =
17
TO_WIFI =
18
TO_TRASH =
19
TO_COPY =
20
TO_FILE =
21
CHAR_ERROR =
22
COPY_ERROR =
23
PROGRAM_ERROR =
24
WARN_MEMORY =
27
L_ICON_NOS =
28
ICON_STAR =

enum: M_ICON_NO

0
ICON_LOCKSTAR =
1
ICON_LOCK =
2
ICON_PC =

Bluetooth type PC

3
ICON_PHONE =

Bluetooth type PHONE

4
ICON_BRICK =

Bluetooth type BRICK

5
ICON_UNKNOWN =

Bluetooth type UNKNOWN

6
ICON_FROM_FOLDER =
7
ICON_CHECKBOX =
8
ICON_CHECKED =
9
ICON_XED =
10
M_ICON_NOS =
11
ICON_LEFT =

enum: A_ICON_NO

1
ICON_RIGHT =
2
A_ICON_NOS =
3
BTTYPE_PC =

Bluetooth type PC

3
BTTYPE_PHONE =

Bluetooth type PHONE

4
BTTYPE_BRICK =

Bluetooth type BRICK

5
BTTYPE_UNKNOWN =

Bluetooth type UNKNOWN

6
BTTYPES =
7
LED_BLACK =

enum: LEDPATTERN LED Pattern

0
LED_GREEN =
1
LED_RED =
2
LED_ORANGE =
3
LED_GREEN_FLASH =
4
LED_RED_FLASH =
5
LED_ORANGE_FLASH =
6
LED_GREEN_PULSE =
7
LED_RED_PULSE =
8
LED_ORANGE_PULSE =
9
LEDPATTERNS =
10
LED_ALL =

All LEDs

0
LED_RR =

Right red

1
LED_RG =

Right green

2
LED_LR =

Left red

3
LED_LG =

Left green

4
FILETYPE_UNKNOWN =

enum: FILETYPE File Types Avaliable

0
TYPE_FOLDER =
1
TYPE_SOUND =
2
TYPE_BYTECODE =
3
TYPE_GRAPHICS =
4
TYPE_DATALOG =
5
TYPE_PROGRAM =
6
TYPE_TEXT =
7
TYPE_SDCARD =
16
TYPE_USBSTICK =
32
FILETYPES =
33
TYPE_RESTART_BROWSER =
-1
TYPE_REFRESH_BROWSER =
-2
OK =

No errors to report

0
BUSY =

Busy - try again

1
FAIL =

Something failed

2
STOP =

Stopped

4
START =

Start

8
DATA_8 =

DATA8

0
DATA_16 =

DATA16

1
DATA_32 =

DATA32

2
DATA_F =

DATAF

3
DATA_S =

Zero terminated string

4
DATA_A =

Array handle

5
DATA_V =

Variable type

7
DATA_PCT =

Percent

16
DATA_RAW =

Raw

18
DATA_SI =

SI unit

19
DATA_FORMATS =
20
DEL_NONE =

No delimiter at all

0
DEL_TAB =

Use tab as delimiter

1
DEL_SPACE =

Use space as delimiter

2
DEL_RETURN =

Use return as delimiter

3
DEL_COLON =

Use colon as delimiter

4
DEL_COMMA =

Use comma as delimiter

5
DEL_LINEFEED =

Use line feed as delimiter

6
DEL_CRLF =

Use return+line feed as delimiter

7
DELS =
8
HW_USB =

enum: HWTYPE Hardware Transport Layer

1
HW_BT =
2
HW_WIFI =
3
HWTYPES =
4
ENCRYPT_NONE =

enum: ENCRYPT Encryption Types

0
ENCRYPT_WPA2 =
1
ENCRYPTS =
2
LMS_ENCRYPT_NONE =

enum: LMS_ENCRYPT Encryption Types

0
LMS_ENCRYPT_WPA2 =
1
LMS_ENCRYPTS =
2
RED =

enum: COLOR

0
GREEN =
1
BLUE =
2
BLANK =
3
COLORS =
4
BLACKCOLOR =

enum: NXTCOLOR Constants related to color sensor value using Color sensor as color detector

1
BLUECOLOR =
2
GREENCOLOR =
3
YELLOWCOLOR =
4
REDCOLOR =
5
WHITECOLOR =
6
WARNING_TEMP =

enum: WARNING Warnings

1
WARNING_CURRENT =
2
WARNING_VOLTAGE =
4
WARNING_MEMORY =
8
WARNING_DSPSTAT =
16
WARNING_RAM =
32
WARNING_BATTLOW =
64
WARNING_BUSY =
128
WARNINGS =
63
RUNNING =

Object code is running

16
WAITING =

Object is waiting for final trigger

32
STOPPED =

Object is stopped or not triggered yet

64
HALTED =

Object is halted because a call is in progress

128
DEVCMD_RESET =

UART device reset

17
DEVCMD_FIRE =

UART device fire (ultrasonic)

17
DEVCMD_CHANNEL =

UART device channel (IR seeker)

18
DEVCMDS =
19
OUTPUTS =

Number of output ports in the system

4
INPUTS =

Number of input ports in the system

4
BUTTONS =

Number of buttons in the system

6
LEDS =

Number of LEDs in the system

4
LCD_WIDTH =

LCD horizontal pixels

178
LCD_HEIGHT =

LCD vertical pixels

128
TOPLINE_HEIGHT =

Top line vertical pixels

10
LCD_STORE_LEVELS =

Store levels

3
DEFAULT_VOLUME =
100
DEFAULT_SLEEPMINUTES =
30
FG_COLOR =

Forground color

1
BG_COLOR =

Background color

0
CHAIN_DEPT =

Number of bricks in the USB daisy chain (master + slaves)

4
PATHSIZE =

Max path size excluding trailing forward slash including zero termination

84
NAMESIZE =

Max name size including zero termination (must be divideable by 4)

32
EXTSIZE =

Max extension size including dot and zero termination

5
FILENAMESIZE =

Max filename size including path, name, extension and termination (must be divideable by 4)

120
MACSIZE =

Max WIFI MAC size including zero termination

18
IPSIZE =

Max WIFI IP size including zero termination

16
BTADRSIZE =

Max bluetooth address size including zero termination

13
ERR_STRING_SIZE =

Inclusive zero termination

32
EVENT_NONE =
0
EVENT_BT_PIN =
1
EVENT_BT_REQ_CONF =
2
MAX_VALID_TYPE =

Highest valid device type

101
MEMORY_FOLDER =

Folder for non volatile user programs/data

"/mnt/ramdisk".freeze
PROGRAM_FOLDER =

Folder for On Brick Programming programs

"../prjs/BrkProg_SAVE".freeze
DATALOG_FOLDER =

Folder for On Brick Data log files

"../prjs/BrkDL_SAVE".freeze
SDCARD_FOLDER =

Folder for SD card mount

"../prjs/SD_Card".freeze
USBSTICK_FOLDER =

Folder for USB stick mount

"../prjs/USB_Stick".freeze
PRJS_DIR =

Project folder

"../prjs".freeze
APPS_DIR =

Apps folder

"../apps".freeze
TOOLS_DIR =

Tools folder

"../tools".freeze
TMP_DIR =

Temporary folder

"../tmp".freeze
SETTINGS_DIR =

Folder for non volatile settings

"../sys/settings".freeze
DIR_DEEPT =

Max directory items allocated including “.” and “..”

127
LASTRUN_FILE_NAME =

Last run filename

"lastrun".freeze
CALDATA_FILE_NAME =

Calibration data filename

"caldata".freeze
SLEEP_FILE_NAME =

File used in “Sleep” app to save status

"Sleep".freeze
VOLUME_FILE_NAME =

File used in “Volume” app to save status

"Volume".freeze
WIFI_FILE_NAME =

File used in “WiFi” app to save status

"WiFi".freeze
BLUETOOTH_FILE_NAME =

File used in “Bluetooth” app to save status

"Bluetooth".freeze
EXT_SOUND =

Robot Sound File

".rsf".freeze
EXT_GRAPHICS =

Robot Graphics File

".rgf".freeze
EXT_BYTECODE =

Robot Byte code File

".rbf".freeze
EXT_TEXT =

Robot Text File

".rtf".freeze
EXT_DATALOG =

Robot Datalog File

".rdf".freeze
EXT_PROGRAM =

Robot Program File

".rpf".freeze
EXT_CONFIG =

Robot Configuration File

".rcf".freeze
EXT_ARCHIVE =

Robot Archive File

".raf".freeze
BRICKNAMESIZE =

Brick name maximal size (including zero termination)

120
BTPASSKEYSIZE =

Bluetooth pass key size (including zero termination)

7
WIFIPASSKEYSIZE =

WiFi pass key size (including zero termination)

33
CHARSET_NAME =

Character set allowed in brick name and raw filenames

1
CHARSET_FILENAME =

Character set allowed in file names

2
CHARSET_BTPASSKEY =

Character set allowed in bluetooth pass key

4
CHARSET_WIFIPASSKEY =

Character set allowed in WiFi pass key

8
CHARSET_WIFISSID =

Character set allowed in WiFi ssid

16
DATA8_MIN =

DATA8 negative limit

-127
DATA8_MAX =

DATA8 positive limit

127
DATA16_MIN =

DATA16 negative limit

-32767
DATA16_MAX =

DATA16 positive limit

32767
DATA32_MIN =

DATA32 negative limit

-2147483647
DATA32_MAX =

DATA32 positive limit

2147483647
DATAF_MIN =

DATAF negative limit

-2147483647
DATAF_MAX =

DATAF positive limit

2147483647
DATA8_NAN =
128
DATA16_NAN =
32768
DATA32_NAN =
2147483648
DATAF_NAN =
2143289344
PULSE_GUI_BACKGROUND =
1
PULSE_BROWSER =
2
PULSE_KEY =
4
POP3_ABS_X =
16
POP3_ABS_Y =
50
POP3_ABS_WARN_ICON_X =
64
POP3_ABS_WARN_ICON_X1 =
40
POP3_ABS_WARN_ICON_X2 =
72
POP3_ABS_WARN_ICON_X3 =
104
POP3_ABS_WARN_ICON_Y =
60
POP3_ABS_WARN_SPEC_ICON_X =
88
POP3_ABS_WARN_SPEC_ICON_Y =
60
POP3_ABS_WARN_TEXT_X =
80
POP3_ABS_WARN_TEXT_Y =
68
POP3_ABS_WARN_YES_X =
72
POP3_ABS_WARN_YES_Y =
90
POP3_ABS_WARN_LINE_X =
21
POP3_ABS_WARN_LINE_Y =
89
POP3_ABS_WARN_LINE_ENDX =
155
OBJ_STOP =
0
OBJ_START =
4
GET_STATUS =
22
GET_SPEED =
23
GET_PRGRESULT =
24
SET_INSTR =

Set number of instructions before VMThread change

25
GET_PRGNAME =
26
SET_ERROR =
1
GET_ERROR =
2
ERRORTEXT =

Convert error number to text string

3
GET_VOLUME =
4
SET_VOLUME =
5
GET_MINUTES =
6
SET_MINUTES =
7
GET_SIZE =

Get size of string (not including zero termination)

1
ADD =

Add two strings (SOURCE1 + SOURCE2 -> DESTINATION)

2
COMPARE =

Compare two strings

3
DUPLICATE =

Duplicate a string (SOURCE1 -> DESTINATION)

5
VALUE_TO_STRING =

Convert floating point value to a string (strips trailing zeroes)

6
STRING_TO_VALUE =
7
STRIP =

Strip a string for spaces (SOURCE1 -> DESTINATION)

8
NUMBER_TO_STRING =

Convert integer value to a string

9
SUB =

Return DESTINATION: a substring from SOURCE1 that starts were SOURCE2 ends

10
VALUE_FORMATTED =

Convert floating point value to a formatted string

11
NUMBER_FORMATTED =

Convert integer number to a formatted string

12
GET_VBATT =
1
GET_IBATT =
2
GET_OS_VERS =

Get os version string

3
GET_EVENT =
4
GET_TBATT =
5
GET_IINT =
6
GET_IMOTOR =
7
GET_STRING =

Get string from terminal

8
GET_HW_VERS =

Get hardware version string

9
GET_FW_VERS =

Get firmware version string

10
GET_FW_BUILD =

Get firmware build string

11
GET_OS_BUILD =

Get os build string

12
GET_ADDRESS =
13
GET_CODE =
14
KEY =
15
GET_SHUTDOWN =
16
GET_WARNING =
17
GET_LBATT =

Get battery level in %

18
TEXTBOX_READ =
21
GET_VERSION =

Get version string

26
GET_IP =

Get IP address string

27
GET_POWER =
29
GET_SDCARD =
30
GET_USBSTICK =
31
WRITE_FLUSH =
1
FLOATVALUE =
2
STAMP =
3
PUT_STRING =
8
VALUE8 =
9
VALUE16 =
10
VALUE32 =
11
VALUEF =
12
ADDRESS =
13
CODE =
14
DOWNLOAD_END =

Send to brick when file down load is completed (plays sound and updates the UI browser)

15
SCREEN_BLOCK =

Set or clear screen block status (if screen blocked - all graphical screen action are disabled)

16
ALLOW_PULSE =
17
SET_PULSE =
18
TEXTBOX_APPEND =

Append line of text at the bottom of a text box

21
SET_BUSY =
22
SET_TESTPIN =
24
INIT_RUN =

Start the “Mindstorms” “run” screen

25
UPDATE_RUN =
26
LED =
27
POWER =
29
GRAPH_SAMPLE =

Update tick to scroll graph horizontally in memory when drawing graph in “scope” mode

30
TERMINAL =
31
SHORTPRESS =
1
LONGPRESS =
2
WAIT_FOR_PRESS =
3
FLUSH =
4
PRESS =
5
RELEASE =
6
GET_HORZ =
7
GET_VERT =
8
PRESSED =
9
SET_BACK_BLOCK =
10
GET_BACK_BLOCK =
11
TESTSHORTPRESS =
12
TESTLONGPRESS =
13
GET_BUMBED =
14
GET_BUMPED =
14
GET_CLICK =

Get and clear click sound request (internal use only)

15
UPDATE =
0
CLEAN =
1
PIXEL =
2
LINE =
3
CIRCLE =
4
TEXT =
5
ICON =
6
PICTURE =
7
VALUE =
8
FILLRECT =
9
RECT =
10
RECTANGLE =
10
NOTIFICATION =
11
QUESTION =
12
KEYBOARD =
13
BROWSE =
14
VERTBAR =
15
INVERSERECT =
16
SELECT_FONT =
17
TOPLINE =
18
FILLWINDOW =
19
SCROLL =
20
DOTLINE =
21
VIEW_VALUE =
22
VIEW_UNIT =
23
FILLCIRCLE =
24
STORE =
25
RESTORE =
26
ICON_QUESTION =
27
BMPFILE =
28
29
GRAPH_SETUP =
30
GRAPH_DRAW =
31
TEXTBOX =
32
EXP =

e^x r = expf(x)

1
MOD =

Modulo r = fmod(x,y)

2
FLOOR =

Floor r = floor(x)

3
CEIL =

Ceiling r = ceil(x)

4
ROUND =

Round r = round(x)

5
ABS =

Absolute r = fabs(x)

6
NEGATE =

Negate r = 0.0 - x

7
SQRT =

Squareroot r = sqrt(x)

8
LOG =

Log r = log10(x)

9
LN =

Ln r = log(x)

10
SIN =

Sin (R = sinf(X))

11
COS =

Cos (R = cos(X))

12
TAN =

Tan (R = tanf(X))

13
ASIN =

ASin (R = asinf(X))

14
ACOS =

ACos (R = acos(X))

15
ATAN =

ATan (R = atanf(X))

16
MOD8 =

Modulo DATA8 r = x % y

17
MOD16 =

Modulo DATA16 r = x % y

18
MOD32 =

Modulo DATA32 r = x % y

19
POW =

Exponent r = powf(x,y)

20
TRUNC =

Truncate r = (float)((int)(x * pow(y))) / pow(y)

21
COMMAND =
14
REPLY =
14
BREAK =
0
TONE =
1
PLAY =
2
REPEAT =

Could not define sound_play: Unhandled param type PARS

3
SERVICE =

Could not define sound_repeat: Unhandled param type PARS

4
INSERT_TYPE =

Insert type in table

1
GET_FORMAT =
2
CAL_MINMAX =

Apply new minimum and maximum raw value for device type to be used in scaling PCT and SI

3
CAL_DEFAULT =

Apply the default minimum and maximum raw value for device type to be used in scaling PCT and SI

4
GET_TYPEMODE =

Get device type and mode

5
GET_SYMBOL =
6
CAL_MIN =

Apply new minimum raw value for device type to be used in scaling PCT and SI

7
CAL_MAX =

Apply new maximum raw value for device type to be used in scaling PCT and SI

8
SETUP =

Generic setup/read IIC sensors

9
CLR_ALL =

Clear all devices (e.c. counters, angle, …)

10
GET_RAW =
11
GET_CONNECTION =

Get device connection type (for test)

12
STOP_ALL =

Stop all devices (e.c. motors, …)

13
SET_TYPEMODE =

Set new type and mode on existing devices

14
READY_IIC =

Generic setup/read IIC sensors with result

15
GET_NAME =
21
GET_MODENAME =
22
SET_RAW =
23
GET_FIGURES =
24
GET_CHANGES =
25
CLR_CHANGES =

Clear changes and bumps

26
READY_PCT =
27
READY_RAW =
28
READY_SI =
29
GET_MINMAX =
30
GET_BUMPS =
31
OPEN_APPEND =

Create file or open for append

0
OPEN_READ =

Open file for read

1
OPEN_WRITE =

Create file for write

2
READ_VALUE =

Read floating point value from file

3
WRITE_VALUE =

Write floating point value to file

4
READ_TEXT =

Read text from file

5
WRITE_TEXT =

Write text to file

6
CLOSE =

Close file

7
LOAD_IMAGE =
8
GET_HANDLE =

Get handle from filename

9
MAKE_FOLDER =

Make folder if not present

10
GET_POOL =
11
SET_LOG_SYNC_TIME =
12
GET_FOLDERS =
13
GET_LOG_SYNC_TIME =
14
GET_SUBFOLDER_NAME =
15
WRITE_LOG =

Write time slot samples to file

16
CLOSE_LOG =

Close data log file

17
GET_IMAGE =
18
GET_ITEM =
19
GET_CACHE_FILES =
20
PUT_CACHE_FILE =
21
GET_CACHE_FILE =
22
DEL_CACHE_FILE =
23
DEL_SUBFOLDER =
24
GET_LOG_NAME =

Get the current open log filename

25
OPEN_LOG =

Create file for data logging

27
READ_BYTES =

Read a number of bytes from file

28
WRITE_BYTES =

Write a number of bytes to file

29
REMOVE =

Delete file

30
MOVE =

Move file SOURCE to DEST

31
DELETE =
0
DESTROY =
0
CREATE8 =
1
CREATE16 =
2
CREATE32 =
3
CREATEF =
4
RESIZE =
5
FILL =
6
COPY =
7
INIT8 =
8
INIT16 =
9
INIT32 =
10
INITF =
11
SIZE =
12
SET_SIZE =
12
READ_CONTENT =
13
WRITE_CONTENT =
14
READ_SIZE =
15
EXIST =

Test if file exists

16
TOTALSIZE =

Calculate folder/file size

17
SPLIT =

Split filename into Folder, name, extension

18
MERGE =

Merge Folder, name, extension into filename

19
CHECK =

Check filename

20
PACK =

Pack file or folder into “raf” container

21
UNPACK =

Unpack “raf” container

22
GET_FOLDERNAME =

Get current folder name

23
GET_ON_OFF =

Get active state

1
GET_VISIBLE =

Get visibility state

2
GET_RESULT =

Get status.

4
GET_PIN =

Get pin code.

5
LIST_STATE =

Gets a list state value. This can be compared to previous values to determine if items are added or removed from a list since the last call.

7
SEARCH_ITEMS =

Get number of item from search.

8
SEARCH_ITEM =

Get search item informations.

9
FAVOUR_ITEMS =

Get no of item in favourite list.

10
FAVOUR_ITEM =

Get favourite item information.

11
GET_ID =

Get bluetooth address information

12
GET_BRICKNAME =

Gets the name of the brick

13
GET_NETWORK =

Gets the network information. WIFI only

14
GET_PRESENT =

Return if hardare is present. WIFI only

15
GET_ENCRYPT =

Returns the encryption mode of the hardware. WIFI only

16
CONNEC_ITEMS =
17
CONNEC_ITEM =
18
GET_INCOMING =

Returns the encryption mode of the hardware. WIFI only

19
GET_MODE2 =
20
SET_ON_OFF =

Set active state, either on or off

1
SET_VISIBLE =

Set visibility state - Only available for bluetooth

2
SET_SEARCH =

Starts or or stops the search for remote devices

3
SET_PIN =

Set pin code.

5
SET_PASSKEY =

Set pin code.

6
SET_CONNECTION =

Initiate or close the connection request to a remote device by the specified name.

7
SET_BRICKNAME =

Sets the name of the brick

8
SET_MOVEUP =

Moves the index in list one step up.

9
SET_MOVEDOWN =

Moves the index in list one step down.

10
SET_ENCRYPT =

Sets the encryption type for an item in a list.

11
SET_SSID =

Sets the SSID name. Only used for WIFI

12
SET_MODE2 =

Set active mode state, either active or not

13
TST_OPEN =

Enables test byte codes for 10 seconds

10
TST_CLOSE =

Disables test byte codes

11
TST_READ_PINS =

Read connector pin status

12
TST_WRITE_PINS =

Write to connector pin

13
TST_READ_ADC =

Read raw count from ADC

14
TST_WRITE_UART =

Write data to port through UART

15
TST_READ_UART =

Read data from port through UART

16
TST_ENABLE_UART =

Enable all UARTs

17
TST_DISABLE_UART =

Disable all UARTs

18
TST_ACCU_SWITCH =

Read accu switch state

19
TST_BOOT_MODE2 =

Turn on mode2

20
TST_POLL_MODE2 =

Read mode2 status

21
TST_CLOSE_MODE2 =

Closes mode2

22
TST_RAM_CHECK =

Read RAM test status status

23
VERSION =

Lignite version (uses [semantic versioning](semver.org/)).

File.read(File.dirname(__FILE__) + "/../../VERSION").strip

Class Method Summary collapse

Class Method Details

.program(&block) ⇒ Object



48
49
50
51
52
# File 'lib/lignite.rb', line 48

def program(&block)
  p = Assembler.new
  p.compile(&block)
  p
end