Module: Lignite::Ev3Ops

Included in:
OpCompiler
Defined in:
lib/lignite/ev3_ops.rb

Overview

Bytecodes implemented by EV3

Constant Summary collapse

MULTIPLEX_PROGRAM_INFO =
{
  0 => :obj_stop,
  4 => :obj_start,
  22 => :get_status,
  23 => :get_speed,
  24 => :get_prgresult,
  25 => :set_instr,
  26 => :get_prgname,
}.freeze
MULTIPLEX_INFO =
{
  1 => :set_error,
  2 => :get_error,
  3 => :errortext,
  4 => :get_volume,
  5 => :set_volume,
  6 => :get_minutes,
  7 => :set_minutes,
}.freeze
MULTIPLEX_STRINGS =
{
  1 => :get_size,
  2 => :add,
  3 => :compare,
  5 => :duplicate,
  6 => :value_to_string,
  7 => :string_to_value,
  8 => :strip,
  9 => :number_to_string,
  10 => :sub,
  11 => :value_formatted,
  12 => :number_formatted,
}.freeze
MULTIPLEX_UI_READ =
{
  1 => :get_vbatt,
  2 => :get_ibatt,
  3 => :get_os_vers,
  4 => :get_event,
  5 => :get_tbatt,
  6 => :get_iint,
  7 => :get_imotor,
  8 => :get_string,
  9 => :get_hw_vers,
  10 => :get_fw_vers,
  11 => :get_fw_build,
  12 => :get_os_build,
  13 => :get_address,
  14 => :get_code,
  15 => :key,
  16 => :get_shutdown,
  17 => :get_warning,
  18 => :get_lbatt,
  21 => :textbox_read,
  26 => :get_version,
  27 => :get_ip,
  29 => :get_power,
  30 => :get_sdcard,
  31 => :get_usbstick,
}.freeze
MULTIPLEX_UI_WRITE =
{
  1 => :write_flush,
  2 => :floatvalue,
  3 => :stamp,
  8 => :put_string,
  9 => :value8,
  10 => :value16,
  11 => :value32,
  12 => :valuef,
  13 => :address,
  14 => :code,
  15 => :download_end,
  16 => :screen_block,
  17 => :allow_pulse,
  18 => :set_pulse,
  21 => :textbox_append,
  22 => :set_busy,
  24 => :set_testpin,
  25 => :init_run,
  26 => :update_run,
  27 => :led,
  29 => :power,
  30 => :graph_sample,
  31 => :terminal,
}.freeze
MULTIPLEX_UI_BUTTON =
{
  1 => :shortpress,
  2 => :longpress,
  3 => :wait_for_press,
  4 => :flush,
  5 => :press,
  6 => :release,
  7 => :get_horz,
  8 => :get_vert,
  9 => :pressed,
  10 => :set_back_block,
  11 => :get_back_block,
  12 => :testshortpress,
  13 => :testlongpress,
  14 => :get_bumped,
  15 => :get_click,
}.freeze
MULTIPLEX_UI_DRAW =
{
  0 => :update,
  1 => :clean,
  2 => :pixel,
  3 => :line,
  4 => :circle,
  5 => :text,
  6 => :icon,
  7 => :picture,
  8 => :value,
  9 => :fillrect,
  10 => :rectangle,
  11 => :notification,
  12 => :question,
  13 => :keyboard,
  14 => :browse,
  15 => :vertbar,
  16 => :inverserect,
  17 => :select_font,
  18 => :topline,
  19 => :fillwindow,
  20 => :scroll,
  21 => :dotline,
  22 => :view_value,
  23 => :view_unit,
  24 => :fillcircle,
  25 => :store,
  26 => :restore,
  27 => :icon_question,
  28 => :bmpfile,
  29 => :popup,
  30 => :graph_setup,
  31 => :graph_draw,
  32 => :textbox,
}.freeze
MULTIPLEX_MATH =
{
  1 => :exp,
  2 => :mod,
  3 => :floor,
  4 => :ceil,
  5 => :round,
  6 => :abs,
  7 => :negate,
  8 => :sqrt,
  9 => :log,
  10 => :ln,
  11 => :sin,
  12 => :cos,
  13 => :tan,
  14 => :asin,
  15 => :acos,
  16 => :atan,
  17 => :mod8,
  18 => :mod16,
  19 => :mod32,
  20 => :pow,
  21 => :trunc,
}.freeze
MULTIPLEX_COM_READ =
{
  14 => :command,
}.freeze
MULTIPLEX_COM_WRITE =
{
  14 => :reply,
}.freeze
MULTIPLEX_SOUND =
{
  0 => :break,
  1 => :tone,
  2 => :play,
  3 => :repeat,
  4 => :service,
}.freeze
MULTIPLEX_INPUT_DEVICE =
{
  1 => :insert_type,
  2 => :get_format,
  3 => :cal_minmax,
  4 => :cal_default,
  5 => :get_typemode,
  6 => :get_symbol,
  7 => :cal_min,
  8 => :cal_max,
  9 => :setup,
  10 => :clr_all,
  11 => :get_raw,
  12 => :get_connection,
  13 => :stop_all,
  14 => :set_typemode,
  15 => :ready_iic,
  21 => :get_name,
  22 => :get_modename,
  23 => :set_raw,
  24 => :get_figures,
  25 => :get_changes,
  26 => :clr_changes,
  27 => :ready_pct,
  28 => :ready_raw,
  29 => :ready_si,
  30 => :get_minmax,
  31 => :get_bumps,
}.freeze
MULTIPLEX_FILE =
{
  0 => :open_append,
  1 => :open_read,
  2 => :open_write,
  3 => :read_value,
  4 => :write_value,
  5 => :read_text,
  6 => :write_text,
  7 => :close,
  8 => :load_image,
  9 => :get_handle,
  10 => :make_folder,
  11 => :get_pool,
  12 => :set_log_sync_time,
  13 => :get_folders,
  14 => :get_log_sync_time,
  15 => :get_subfolder_name,
  16 => :write_log,
  17 => :close_log,
  18 => :get_image,
  19 => :get_item,
  20 => :get_cache_files,
  21 => :put_cache_file,
  22 => :get_cache_file,
  23 => :del_cache_file,
  24 => :del_subfolder,
  25 => :get_log_name,
  27 => :open_log,
  28 => :read_bytes,
  29 => :write_bytes,
  30 => :remove,
  31 => :move,
}.freeze
MULTIPLEX_ARRAY =
{
  0 => :destroy,
  1 => :create8,
  2 => :create16,
  3 => :create32,
  4 => :createf,
  5 => :resize,
  6 => :fill,
  7 => :copy,
  8 => :init8,
  9 => :init16,
  10 => :init32,
  11 => :initf,
  12 => :set_size,
  13 => :read_content,
  14 => :write_content,
  15 => :read_size,
}.freeze
MULTIPLEX_FILENAME =
{
  16 => :exist,
  17 => :totalsize,
  18 => :split,
  19 => :merge,
  20 => :check,
  21 => :pack,
  22 => :unpack,
  23 => :get_foldername,
}.freeze
MULTIPLEX_COM_GET =
{
  1 => :get_on_off,
  2 => :get_visible,
  4 => :get_result,
  5 => :get_pin,
  7 => :list_state,
  8 => :search_items,
  9 => :search_item,
  10 => :favour_items,
  11 => :favour_item,
  12 => :get_id,
  13 => :get_brickname,
  14 => :get_network,
  15 => :get_present,
  16 => :get_encrypt,
  17 => :connec_items,
  18 => :connec_item,
  19 => :get_incoming,
  20 => :get_mode2,
}.freeze
MULTIPLEX_COM_SET =
{
  1 => :set_on_off,
  2 => :set_visible,
  3 => :set_search,
  5 => :set_pin,
  6 => :set_passkey,
  7 => :set_connection,
  8 => :set_brickname,
  9 => :set_moveup,
  10 => :set_movedown,
  11 => :set_encrypt,
  12 => :set_ssid,
  13 => :set_mode2,
}.freeze
MULTIPLEX_TST =
{
  10 => :tst_open,
  11 => :tst_close,
  12 => :tst_read_pins,
  13 => :tst_write_pins,
  14 => :tst_read_adc,
  15 => :tst_write_uart,
  16 => :tst_read_uart,
  17 => :tst_enable_uart,
  18 => :tst_disable_uart,
  19 => :tst_accu_switch,
  20 => :tst_boot_mode2,
  21 => :tst_poll_mode2,
  22 => :tst_close_mode2,
  23 => :tst_ram_check,
}.freeze

Instance Method Summary collapse

Instance Method Details

#add16(source1, source2, destination) ⇒ Object

Add two 16-bit values DESTINATION = SOURCE1 + SOURCE2

Parameters:

  • source1 (PAR16)

    (in)

  • source2 (PAR16)

    (in)

  • destination (PAR16)

    (out)



383
384
385
386
387
388
389
390
391
392
393
394
395
# File 'lib/lignite/ev3_ops.rb', line 383

def add16(source1, source2, destination)
  logger.debug do
    args = [source1, source2, destination]
    "called add16 with #{args.inspect}"
  end

  bytes = u8(0x11)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#add32(source1, source2, destination) ⇒ Object

Add two 32-bit values DESTINATION = SOURCE1 + SOURCE2

Parameters:

  • source1 (PAR32)

    (in)

  • source2 (PAR32)

    (in)

  • destination (PAR32)

    (out)



401
402
403
404
405
406
407
408
409
410
411
412
413
# File 'lib/lignite/ev3_ops.rb', line 401

def add32(source1, source2, destination)
  logger.debug do
    args = [source1, source2, destination]
    "called add32 with #{args.inspect}"
  end

  bytes = u8(0x12)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#add8(source1, source2, destination) ⇒ Object

Add two 8-bit values DESTINATION = SOURCE1 + SOURCE2

Parameters:

  • source1 (PAR8)

    (in)

  • source2 (PAR8)

    (in)

  • destination (PAR8)

    (out)



365
366
367
368
369
370
371
372
373
374
375
376
377
# File 'lib/lignite/ev3_ops.rb', line 365

def add8(source1, source2, destination)
  logger.debug do
    args = [source1, source2, destination]
    "called add8 with #{args.inspect}"
  end

  bytes = u8(0x10)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#addf(source1, source2, destination) ⇒ Object

Add two floating point values DESTINATION = SOURCE1 + SOURCE2

Parameters:

  • source1 (PARF)

    (in)

  • source2 (PARF)

    (in)

  • destination (PARF)

    (out)



419
420
421
422
423
424
425
426
427
428
429
430
431
# File 'lib/lignite/ev3_ops.rb', line 419

def addf(source1, source2, destination)
  logger.debug do
    args = [source1, source2, destination]
    "called addf with #{args.inspect}"
  end

  bytes = u8(0x13)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#and16(source1, source2, destination) ⇒ Object

And two 16 bit values DESTINATION = SOURCE1 & SOURCE2

Parameters:

  • source1 (PAR16)

    (in)

  • source2 (PAR16)

    (in)

  • destination (PAR16)

    (out)



725
726
727
728
729
730
731
732
733
734
735
736
737
# File 'lib/lignite/ev3_ops.rb', line 725

def and16(source1, source2, destination)
  logger.debug do
    args = [source1, source2, destination]
    "called and16 with #{args.inspect}"
  end

  bytes = u8(0x25)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#and32(source1, source2, destination) ⇒ Object

And two 32 bit values DESTINATION = SOURCE1 & SOURCE2

Parameters:

  • source1 (PAR32)

    (in)

  • source2 (PAR32)

    (in)

  • destination (PAR32)

    (out)



743
744
745
746
747
748
749
750
751
752
753
754
755
# File 'lib/lignite/ev3_ops.rb', line 743

def and32(source1, source2, destination)
  logger.debug do
    args = [source1, source2, destination]
    "called and32 with #{args.inspect}"
  end

  bytes = u8(0x26)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#and8(source1, source2, destination) ⇒ Object

And two 8 bit values DESTINATION = SOURCE1 & SOURCE2

Parameters:

  • source1 (PAR8)

    (in)

  • source2 (PAR8)

    (in)

  • destination (PAR8)

    (out)



707
708
709
710
711
712
713
714
715
716
717
718
719
# File 'lib/lignite/ev3_ops.rb', line 707

def and8(source1, source2, destination)
  logger.debug do
    args = [source1, source2, destination]
    "called and8 with #{args.inspect}"
  end

  bytes = u8(0x24)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#array(*args) ⇒ Object



7796
7797
7798
7799
7800
7801
# File 'lib/lignite/ev3_ops.rb', line 7796

def array(*args)
  logger.debug "called array with #{args.inspect}"
  cvalue = args.shift
  csym = MULTIPLEX_ARRAY.fetch(cvalue)
  __send__("array_#{csym}", *args)
end

#array_append(handle, value) ⇒ Object

Array element append

Parameters:

  • handle (PAR16)

    (in) Array handle

  • value (PARV)

    (in) Value (new element) to append - type depends on type of array



7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
# File 'lib/lignite/ev3_ops.rb', line 7842

def array_append(handle, value)
  logger.debug do
    args = [handle, value]
    "called array_append with #{args.inspect}"
  end

  bytes = u8(0xC4)
  bytes += param_simple(handle)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#array_copy(hsource, hdest) ⇒ Object

Parameters:

  • hsource (PAR16)

    (in) Source array Handle

  • hdest (PAR16)

    (out) Destination array handle



7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
# File 'lib/lignite/ev3_ops.rb', line 7562

def array_copy(hsource, hdest)
  logger.debug do
    args = [hsource, hdest]
    "called array_copy with #{args.inspect}"
  end

  bytes = u8(0xC1)
  bytes += param_simple(7)
  bytes += param_simple(hsource)
  bytes += param_simple(hdest)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#array_create16(elements, handle) ⇒ Object

Parameters:

  • elements (PAR32)

    (in) Number of elements

  • handle (PAR16)

    (out) Array handle



7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
# File 'lib/lignite/ev3_ops.rb', line 7467

def array_create16(elements, handle)
  logger.debug do
    args = [elements, handle]
    "called array_create16 with #{args.inspect}"
  end

  bytes = u8(0xC1)
  bytes += param_simple(2)
  bytes += param_simple(elements)
  bytes += param_simple(handle)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#array_create32(elements, handle) ⇒ Object

Parameters:

  • elements (PAR32)

    (in) Number of elements

  • handle (PAR16)

    (out) Array handle



7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
# File 'lib/lignite/ev3_ops.rb', line 7486

def array_create32(elements, handle)
  logger.debug do
    args = [elements, handle]
    "called array_create32 with #{args.inspect}"
  end

  bytes = u8(0xC1)
  bytes += param_simple(3)
  bytes += param_simple(elements)
  bytes += param_simple(handle)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#array_create8(elements, handle) ⇒ Object

Parameters:

  • elements (PAR32)

    (in) Number of elements

  • handle (PAR16)

    (out) Array handle



7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
# File 'lib/lignite/ev3_ops.rb', line 7448

def array_create8(elements, handle)
  logger.debug do
    args = [elements, handle]
    "called array_create8 with #{args.inspect}"
  end

  bytes = u8(0xC1)
  bytes += param_simple(1)
  bytes += param_simple(elements)
  bytes += param_simple(handle)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#array_createf(elements, handle) ⇒ Object

Parameters:

  • elements (PAR32)

    (in) Number of elements

  • handle (PAR16)

    (out) Array handle



7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
# File 'lib/lignite/ev3_ops.rb', line 7505

def array_createf(elements, handle)
  logger.debug do
    args = [elements, handle]
    "called array_createf with #{args.inspect}"
  end

  bytes = u8(0xC1)
  bytes += param_simple(4)
  bytes += param_simple(elements)
  bytes += param_simple(handle)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#array_delete(handle) ⇒ Object

Parameters:

  • handle (PAR16)

    (in) Array handle



7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
# File 'lib/lignite/ev3_ops.rb', line 7413

def array_delete(handle)
  logger.debug do
    args = [handle]
    "called array_delete with #{args.inspect}"
  end

  bytes = u8(0xC1)
  bytes += param_simple(0)
  bytes += param_simple(handle)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#array_destroy(handle) ⇒ Object

Parameters:

  • handle (PAR16)

    (in) Array handle



7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
# File 'lib/lignite/ev3_ops.rb', line 7430

def array_destroy(handle)
  logger.debug do
    args = [handle]
    "called array_destroy with #{args.inspect}"
  end

  bytes = u8(0xC1)
  bytes += param_simple(0)
  bytes += param_simple(handle)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#array_fill(handle, value) ⇒ Object

Parameters:

  • handle (PAR16)

    (in) Array handle

  • value (PARV)

    (in) Value to write - type depends on type of array



7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
# File 'lib/lignite/ev3_ops.rb', line 7543

def array_fill(handle, value)
  logger.debug do
    args = [handle, value]
    "called array_fill with #{args.inspect}"
  end

  bytes = u8(0xC1)
  bytes += param_simple(6)
  bytes += param_simple(handle)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#array_init16(handle, index, elements, *values) ⇒ Object

Parameters:

  • handle (PAR16)

    (in) Array handle

  • index (PAR32)

    (in) Index to element to write

  • elements (PAR32)

    (in) Number of elements to write

  • values (PARVALUES)

    (in)



7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
# File 'lib/lignite/ev3_ops.rb', line 7606

def array_init16(handle, index, elements, *values)
  logger.debug do
    args = [handle, index, elements, *values]
    "called array_init16 with #{args.inspect}"
  end

  bytes = u8(0xC1)
  bytes += param_simple(9)
  bytes += param_simple(handle)
  bytes += param_simple(index)
  bytes += param_simple(elements)
  bytes += param_multiple(*values)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#array_init32(handle, index, elements, *values) ⇒ Object

Parameters:

  • handle (PAR16)

    (in) Array handle

  • index (PAR32)

    (in) Index to element to write

  • elements (PAR32)

    (in) Number of elements to write

  • values (PARVALUES)

    (in)



7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
# File 'lib/lignite/ev3_ops.rb', line 7629

def array_init32(handle, index, elements, *values)
  logger.debug do
    args = [handle, index, elements, *values]
    "called array_init32 with #{args.inspect}"
  end

  bytes = u8(0xC1)
  bytes += param_simple(10)
  bytes += param_simple(handle)
  bytes += param_simple(index)
  bytes += param_simple(elements)
  bytes += param_multiple(*values)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#array_init8(handle, index, elements, *values) ⇒ Object

Parameters:

  • handle (PAR16)

    (in) Array handle

  • index (PAR32)

    (in) Index to element to write

  • elements (PAR32)

    (in) Number of elements to write

  • values (PARVALUES)

    (in)



7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
# File 'lib/lignite/ev3_ops.rb', line 7583

def array_init8(handle, index, elements, *values)
  logger.debug do
    args = [handle, index, elements, *values]
    "called array_init8 with #{args.inspect}"
  end

  bytes = u8(0xC1)
  bytes += param_simple(8)
  bytes += param_simple(handle)
  bytes += param_simple(index)
  bytes += param_simple(elements)
  bytes += param_multiple(*values)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#array_initf(handle, index, elements, *values) ⇒ Object

Parameters:

  • handle (PAR16)

    (in) Array handle

  • index (PAR32)

    (in) Index to element to write

  • elements (PAR32)

    (in) Number of elements to write

  • values (PARVALUES)

    (in)



7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
# File 'lib/lignite/ev3_ops.rb', line 7652

def array_initf(handle, index, elements, *values)
  logger.debug do
    args = [handle, index, elements, *values]
    "called array_initf with #{args.inspect}"
  end

  bytes = u8(0xC1)
  bytes += param_simple(11)
  bytes += param_simple(handle)
  bytes += param_simple(index)
  bytes += param_simple(elements)
  bytes += param_multiple(*values)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#array_read(handle, index, value) ⇒ Object

Array element read

Parameters:

  • handle (PAR16)

    (in) Array handle

  • index (PAR32)

    (in) Index to first byte to write

  • value (PARV)

    (out) Value to read - type depends on type of array



7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
# File 'lib/lignite/ev3_ops.rb', line 7825

def array_read(handle, index, value)
  logger.debug do
    args = [handle, index, value]
    "called array_read with #{args.inspect}"
  end

  bytes = u8(0xC3)
  bytes += param_simple(handle)
  bytes += param_simple(index)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#array_read_content(prgid, handle, index, bytes, array) ⇒ Object

Parameters:

  • prgid (PAR16)

    (in) Program slot number (must be running)

  • handle (PAR16)

    (in) Array handle

  • index (PAR32)

    (in) Index to first byte to read

  • bytes (PAR32)

    (in) Number of bytes to read

  • array (PAR8)

    (out) First byte of array to receive data



7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
# File 'lib/lignite/ev3_ops.rb', line 7714

def array_read_content(prgid, handle, index, bytes, array)
  logger.debug do
    args = [prgid, handle, index, bytes, array]
    "called array_read_content with #{args.inspect}"
  end

  bytes = u8(0xC1)
  bytes += param_simple(13)
  bytes += param_simple(prgid)
  bytes += param_simple(handle)
  bytes += param_simple(index)
  bytes += param_simple(bytes)
  bytes += param_simple(array)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#array_read_size(prgid, handle, bytes) ⇒ Object

Parameters:

  • prgid (PAR16)

    (in) Program slot number (must be running)

  • handle (PAR16)

    (in) Array handle

  • bytes (PAR32)

    (out) Number of bytes in array



7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
# File 'lib/lignite/ev3_ops.rb', line 7762

def array_read_size(prgid, handle, bytes)
  logger.debug do
    args = [prgid, handle, bytes]
    "called array_read_size with #{args.inspect}"
  end

  bytes = u8(0xC1)
  bytes += param_simple(15)
  bytes += param_simple(prgid)
  bytes += param_simple(handle)
  bytes += param_simple(bytes)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#array_resize(handle, elements) ⇒ Object

Parameters:

  • handle (PAR16)

    (in) Array handle

  • elements (PAR32)

    (in) Total number of elements



7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
# File 'lib/lignite/ev3_ops.rb', line 7524

def array_resize(handle, elements)
  logger.debug do
    args = [handle, elements]
    "called array_resize with #{args.inspect}"
  end

  bytes = u8(0xC1)
  bytes += param_simple(5)
  bytes += param_simple(handle)
  bytes += param_simple(elements)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#array_set_size(handle, elements) ⇒ Object

Parameters:

  • handle (PAR16)

    (in) Array handle

  • elements (PAR32)

    (out) Total number of elements in array



7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
# File 'lib/lignite/ev3_ops.rb', line 7692

def array_set_size(handle, elements)
  logger.debug do
    args = [handle, elements]
    "called array_set_size with #{args.inspect}"
  end

  bytes = u8(0xC1)
  bytes += param_simple(12)
  bytes += param_simple(handle)
  bytes += param_simple(elements)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#array_size(handle, elements) ⇒ Object

Parameters:

  • handle (PAR16)

    (in) Array handle

  • elements (PAR32)

    (out) Total number of elements in array



7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
# File 'lib/lignite/ev3_ops.rb', line 7673

def array_size(handle, elements)
  logger.debug do
    args = [handle, elements]
    "called array_size with #{args.inspect}"
  end

  bytes = u8(0xC1)
  bytes += param_simple(12)
  bytes += param_simple(handle)
  bytes += param_simple(elements)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#array_write(handle, index, value) ⇒ Object

Array element write

Parameters:

  • handle (PAR16)

    (in) Array handle

  • index (PAR32)

    (in) Index to first byte to write

  • value (PARV)

    (in) Value to write - type depends on type of array



7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
# File 'lib/lignite/ev3_ops.rb', line 7807

def array_write(handle, index, value)
  logger.debug do
    args = [handle, index, value]
    "called array_write with #{args.inspect}"
  end

  bytes = u8(0xC2)
  bytes += param_simple(handle)
  bytes += param_simple(index)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#array_write_content(prgid, handle, index, bytes, array) ⇒ Object

Parameters:

  • prgid (PAR16)

    (in) Program slot number (must be running)

  • handle (PAR16)

    (in) Array handle

  • index (PAR32)

    (in) Index to first byte to write

  • bytes (PAR32)

    (in) Number of bytes to write

  • array (PAR8)

    (in) First byte of array to deliver data



7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
# File 'lib/lignite/ev3_ops.rb', line 7739

def array_write_content(prgid, handle, index, bytes, array)
  logger.debug do
    args = [prgid, handle, index, bytes, array]
    "called array_write_content with #{args.inspect}"
  end

  bytes = u8(0xC1)
  bytes += param_simple(14)
  bytes += param_simple(prgid)
  bytes += param_simple(handle)
  bytes += param_simple(index)
  bytes += param_simple(bytes)
  bytes += param_simple(array)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#bp0Object

Display globals or object locals on terminal



4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
# File 'lib/lignite/ev3_ops.rb', line 4799

def bp0
  logger.debug do
    args = []
    "called bp0 with #{args.inspect}"
  end

  bytes = u8(0x88)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#bp1Object

Display globals or object locals on terminal



4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
# File 'lib/lignite/ev3_ops.rb', line 4811

def bp1
  logger.debug do
    args = []
    "called bp1 with #{args.inspect}"
  end

  bytes = u8(0x89)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#bp2Object

Display globals or object locals on terminal



4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
# File 'lib/lignite/ev3_ops.rb', line 4823

def bp2
  logger.debug do
    args = []
    "called bp2 with #{args.inspect}"
  end

  bytes = u8(0x8A)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#bp3Object

Display globals or object locals on terminal



4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
# File 'lib/lignite/ev3_ops.rb', line 4835

def bp3
  logger.debug do
    args = []
    "called bp3 with #{args.inspect}"
  end

  bytes = u8(0x8B)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#bp_set(prgid, no, address) ⇒ Object

Set break point in byte code program

Parameters:

  • prgid (PAR16)

    (in) Program slot number

  • no (PAR8)

    (in) Breakpoint number [0..2] (3 = trigger out on TP4)

  • address (PAR32)

    (in) Address (Offset from start of image) (0 = remove breakpoint)



4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
# File 'lib/lignite/ev3_ops.rb', line 4850

def bp_set(prgid, no, address)
  logger.debug do
    args = [prgid, no, address]
    "called bp_set with #{args.inspect}"
  end

  bytes = u8(0x8C)
  bytes += param_simple(prgid)
  bytes += param_simple(no)
  bytes += param_simple(address)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#call(objid, *parameters) ⇒ Object

Calls byte code subroutine

Parameters:

  • objid (PAR16)

    (in) Object id

  • parameters (PARNO)

    (in) Number of parameters



135
136
137
138
139
140
141
142
143
144
145
146
# File 'lib/lignite/ev3_ops.rb', line 135

def call(objid, *parameters)
  logger.debug do
    args = [objid, *parameters]
    "called call with #{args.inspect}"
  end

  bytes = u8(0x09)
  bytes += param_simple(objid)
  bytes += param_n_multiple(*parameters)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_get(*args) ⇒ Object



8664
8665
8666
8667
8668
8669
# File 'lib/lignite/ev3_ops.rb', line 8664

def com_get(*args)
  logger.debug "called com_get with #{args.inspect}"
  cvalue = args.shift
  csym = MULTIPLEX_COM_GET.fetch(cvalue)
  __send__("com_get_#{csym}", *args)
end

#com_get_connec_item(hardware, item, length, name, type) ⇒ Object

Parameters:

  • hardware (PAR8)

    ()

  • item (PAR8)

    ()

  • length (PAR8)

    ()

  • name (PAR8)

    ()

  • type (PAR8)

    ()



8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
# File 'lib/lignite/ev3_ops.rb', line 8584

def com_get_connec_item(hardware, item, length, name, type)
  logger.debug do
    args = [hardware, item, length, name, type]
    "called com_get_connec_item with #{args.inspect}"
  end

  bytes = u8(0xD3)
  bytes += param_simple(18)
  bytes += param_simple(hardware)
  bytes += param_simple(item)
  bytes += param_simple(length)
  bytes += param_simple(name)
  bytes += param_simple(type)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_get_connec_items(hardware, items) ⇒ Object

Parameters:

  • hardware (PAR8)

    ()

  • items (PAR8)

    ()



8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
# File 'lib/lignite/ev3_ops.rb', line 8562

def com_get_connec_items(hardware, items)
  logger.debug do
    args = [hardware, items]
    "called com_get_connec_items with #{args.inspect}"
  end

  bytes = u8(0xD3)
  bytes += param_simple(17)
  bytes += param_simple(hardware)
  bytes += param_simple(items)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_get_favour_item(hardware, item, length, name, paired, connected, type) ⇒ Object

Get favourite item information.

Parameters:

  • hardware (PAR8)

    (in) Hardware Transport Layer

  • item (PAR8)

    (in) Item - index in favourite list

  • length (PAR8)

    (in) Max length of returned string

  • name (PAR8)

    (out) First character in character string

  • paired (PAR8)

    (out) Paired [0,1]

  • connected (PAR8)

    (out) Connected [0,1]

  • type (PAR8)

    (out) Bluetooth Device Type



8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
# File 'lib/lignite/ev3_ops.rb', line 8433

def com_get_favour_item(hardware, item, length, name, paired, connected, type)
  logger.debug do
    args = [hardware, item, length, name, paired, connected, type]
    "called com_get_favour_item with #{args.inspect}"
  end

  bytes = u8(0xD3)
  bytes += param_simple(11)
  bytes += param_simple(hardware)
  bytes += param_simple(item)
  bytes += param_simple(length)
  bytes += param_simple(name)
  bytes += param_simple(paired)
  bytes += param_simple(connected)
  bytes += param_simple(type)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_get_favour_items(hardware, items) ⇒ Object

Get no of item in favourite list.

Parameters:

  • hardware (PAR8)

    (in) Hardware Transport Layer

  • items (PAR8)

    (out) No of items in seach list



8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
# File 'lib/lignite/ev3_ops.rb', line 8409

def com_get_favour_items(hardware, items)
  logger.debug do
    args = [hardware, items]
    "called com_get_favour_items with #{args.inspect}"
  end

  bytes = u8(0xD3)
  bytes += param_simple(10)
  bytes += param_simple(hardware)
  bytes += param_simple(items)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_get_get_brickname(length, name) ⇒ Object

Gets the name of the brick

Parameters:

  • length (PAR8)

    (in) Max length of returned string

  • name (PAR8)

    (out) First character in brick name



8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
# File 'lib/lignite/ev3_ops.rb', line 8478

def com_get_get_brickname(length, name)
  logger.debug do
    args = [length, name]
    "called com_get_get_brickname with #{args.inspect}"
  end

  bytes = u8(0xD3)
  bytes += param_simple(13)
  bytes += param_simple(length)
  bytes += param_simple(name)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_get_get_encrypt(hardware, item, type) ⇒ Object

Returns the encryption mode of the hardware. WIFI only

Parameters:

  • hardware (PAR8)

    (in) Hardware Transport Layer

  • item (PAR8)

    (in) Item - index in favourite list

  • type (PAR8)

    (out) Encryption type



8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
# File 'lib/lignite/ev3_ops.rb', line 8542

def com_get_get_encrypt(hardware, item, type)
  logger.debug do
    args = [hardware, item, type]
    "called com_get_get_encrypt with #{args.inspect}"
  end

  bytes = u8(0xD3)
  bytes += param_simple(16)
  bytes += param_simple(hardware)
  bytes += param_simple(item)
  bytes += param_simple(type)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_get_get_id(hardware, length, string) ⇒ Object

Get bluetooth address information

Parameters:

  • hardware (PAR8)

    (in) Hardware Transport Layer

  • length (PAR8)

    (in) Max length of returned string

  • string (PAR8)

    (out) First character in BT adr string



8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
# File 'lib/lignite/ev3_ops.rb', line 8458

def com_get_get_id(hardware, length, string)
  logger.debug do
    args = [hardware, length, string]
    "called com_get_get_id with #{args.inspect}"
  end

  bytes = u8(0xD3)
  bytes += param_simple(12)
  bytes += param_simple(hardware)
  bytes += param_simple(length)
  bytes += param_simple(string)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_get_get_incoming(hardware, length, name, type) ⇒ Object

Returns the encryption mode of the hardware. WIFI only

Parameters:

  • hardware (PAR8)

    (in) Hardware Transport Layer

  • length (PAR8)

    (in) Max length of returned string

  • name (PAR8)

    (in) First character in name

  • type (PAR8)

    (out) Encryption type



8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
# File 'lib/lignite/ev3_ops.rb', line 8608

def com_get_get_incoming(hardware, length, name, type)
  logger.debug do
    args = [hardware, length, name, type]
    "called com_get_get_incoming with #{args.inspect}"
  end

  bytes = u8(0xD3)
  bytes += param_simple(19)
  bytes += param_simple(hardware)
  bytes += param_simple(length)
  bytes += param_simple(name)
  bytes += param_simple(type)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_get_get_mode2(hardware, active) ⇒ Object

Parameters:

  • hardware (PAR8)

    (in) Hardware Transport Layer

  • active (PAR8)

    (out) Active [0,1], 1 = on, 0 = off



8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
# File 'lib/lignite/ev3_ops.rb', line 8629

def com_get_get_mode2(hardware, active)
  logger.debug do
    args = [hardware, active]
    "called com_get_get_mode2 with #{args.inspect}"
  end

  bytes = u8(0xD3)
  bytes += param_simple(20)
  bytes += param_simple(hardware)
  bytes += param_simple(active)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_get_get_network(hardware, length, name, mac, ip) ⇒ Object

Gets the network information. WIFI only

Parameters:

  • hardware (PAR8)

    (in) Hardware Transport Layer

  • length (PAR8)

    (in) Max length of returned string

  • name (PAR8)

    (out) First character in AP name

  • mac (PAR8)

    (out) First character in MAC address string

  • ip (PAR8)

    (out) First character in IP address string



8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
# File 'lib/lignite/ev3_ops.rb', line 8500

def com_get_get_network(hardware, length, name, mac, ip)
  logger.debug do
    args = [hardware, length, name, mac, ip]
    "called com_get_get_network with #{args.inspect}"
  end

  bytes = u8(0xD3)
  bytes += param_simple(14)
  bytes += param_simple(hardware)
  bytes += param_simple(length)
  bytes += param_simple(name)
  bytes += param_simple(mac)
  bytes += param_simple(ip)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_get_get_on_off(hardware, active) ⇒ Object

Get active state

Parameters:

  • hardware (PAR8)

    (in) Hardware Transport Layer

  • active (PAR8)

    (out) Active [0,1]



8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
# File 'lib/lignite/ev3_ops.rb', line 8258

def com_get_get_on_off(hardware, active)
  logger.debug do
    args = [hardware, active]
    "called com_get_get_on_off with #{args.inspect}"
  end

  bytes = u8(0xD3)
  bytes += param_simple(1)
  bytes += param_simple(hardware)
  bytes += param_simple(active)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_get_get_pin(hardware, name, length, pincode) ⇒ Object

Get pin code.

Parameters:

  • hardware (PAR8)

    (in) Hardware Transport Layer

  • name (PAR8)

    (in) First character in character string

  • length (PAR8)

    (in) Max length of returned string

  • pincode (PAR8)

    (out) First character in character string



8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
# File 'lib/lignite/ev3_ops.rb', line 8319

def com_get_get_pin(hardware, name, length, pincode)
  logger.debug do
    args = [hardware, name, length, pincode]
    "called com_get_get_pin with #{args.inspect}"
  end

  bytes = u8(0xD3)
  bytes += param_simple(5)
  bytes += param_simple(hardware)
  bytes += param_simple(name)
  bytes += param_simple(length)
  bytes += param_simple(pincode)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_get_get_present(hardware, ok) ⇒ Object

Return if hardare is present. WIFI only

Parameters:

  • hardware (PAR8)

    (in) Hardware Transport Layer

  • ok (PAR8)

    (out) Present [0,1]



8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
# File 'lib/lignite/ev3_ops.rb', line 8522

def com_get_get_present(hardware, ok)
  logger.debug do
    args = [hardware, ok]
    "called com_get_get_present with #{args.inspect}"
  end

  bytes = u8(0xD3)
  bytes += param_simple(15)
  bytes += param_simple(hardware)
  bytes += param_simple(ok)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_get_get_result(hardware, item, result) ⇒ Object

Get status.

Parameters:

  • hardware (PAR8)

    (in) Hardware Transport Layer

  • item (PAR8)

    (in) Name index

  • result (PAR8)

    (out) Results



8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
# File 'lib/lignite/ev3_ops.rb', line 8297

def com_get_get_result(hardware, item, result)
  logger.debug do
    args = [hardware, item, result]
    "called com_get_get_result with #{args.inspect}"
  end

  bytes = u8(0xD3)
  bytes += param_simple(4)
  bytes += param_simple(hardware)
  bytes += param_simple(item)
  bytes += param_simple(result)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_get_get_visible(hardware, visible) ⇒ Object

Get visibility state

Parameters:

  • hardware (PAR8)

    (in) Hardware Transport Layer

  • visible (PAR8)

    (out) Visible [0,1]



8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
# File 'lib/lignite/ev3_ops.rb', line 8277

def com_get_get_visible(hardware, visible)
  logger.debug do
    args = [hardware, visible]
    "called com_get_get_visible with #{args.inspect}"
  end

  bytes = u8(0xD3)
  bytes += param_simple(2)
  bytes += param_simple(hardware)
  bytes += param_simple(visible)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_get_list_state(hardware, state) ⇒ Object

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.

Parameters:

  • hardware (PAR8)

    (in) Hardware Transport Layer

  • state (PAR16)

    (out) Value that represents the current state



8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
# File 'lib/lignite/ev3_ops.rb', line 8340

def com_get_list_state(hardware, state)
  logger.debug do
    args = [hardware, state]
    "called com_get_list_state with #{args.inspect}"
  end

  bytes = u8(0xD3)
  bytes += param_simple(7)
  bytes += param_simple(hardware)
  bytes += param_simple(state)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_get_search_item(hardware, item, length, name, paired, connected, type, visible) ⇒ Object

Get search item informations.

Parameters:

  • hardware (PAR8)

    (in) Hardware Transport Layer

  • item (PAR8)

    (in) Item - index in search list

  • length (PAR8)

    (in) Max length of returned string

  • name (PAR8)

    (out) First character in character string

  • paired (PAR8)

    (out) Paired [0,1]

  • connected (PAR8)

    (out) Connected [0,1]

  • type (PAR8)

    (out) Bluetooth Device Type

  • visible (PAR8)

    (out) Visible [0,1]



8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
# File 'lib/lignite/ev3_ops.rb', line 8384

def com_get_search_item(hardware, item, length, name, paired, connected, type, visible)
  logger.debug do
    args = [hardware, item, length, name, paired, connected, type, visible]
    "called com_get_search_item with #{args.inspect}"
  end

  bytes = u8(0xD3)
  bytes += param_simple(9)
  bytes += param_simple(hardware)
  bytes += param_simple(item)
  bytes += param_simple(length)
  bytes += param_simple(name)
  bytes += param_simple(paired)
  bytes += param_simple(connected)
  bytes += param_simple(type)
  bytes += param_simple(visible)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_get_search_items(hardware, items) ⇒ Object

Get number of item from search.

Parameters:

  • hardware (PAR8)

    (in) Hardware Transport Layer

  • items (PAR8)

    (out) No of items in seach list



8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
# File 'lib/lignite/ev3_ops.rb', line 8359

def com_get_search_items(hardware, items)
  logger.debug do
    args = [hardware, items]
    "called com_get_search_items with #{args.inspect}"
  end

  bytes = u8(0xD3)
  bytes += param_simple(8)
  bytes += param_simple(hardware)
  bytes += param_simple(items)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_read(*args) ⇒ Object



5381
5382
5383
5384
5385
5386
# File 'lib/lignite/ev3_ops.rb', line 5381

def com_read(*args)
  logger.debug "called com_read with #{args.inspect}"
  cvalue = args.shift
  csym = MULTIPLEX_COM_READ.fetch(cvalue)
  __send__("com_read_#{csym}", *args)
end

#com_read_command(length, image, global, flag) ⇒ Object

Parameters:

  • length (PAR32)

    (in) Maximal code stream length

  • image (PAR32)

    (out) Address of image

  • global (PAR32)

    (out) Address of global variables

  • flag (PAR8)

    (out) Flag that tells if image is ready



5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
# File 'lib/lignite/ev3_ops.rb', line 5361

def com_read_command(length, image, global, flag)
  logger.debug do
    args = [length, image, global, flag]
    "called com_read_command with #{args.inspect}"
  end

  bytes = u8(0x91)
  bytes += param_simple(14)
  bytes += param_simple(length)
  bytes += param_simple(image)
  bytes += param_simple(global)
  bytes += param_simple(flag)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_readdata(value1, value2, value3, value4) ⇒ Object

This code does not exist in normal program

Parameters:

  • value1 (PAR8)

    ()

  • value2 (PAR8)

    ()

  • value3 (PAR16)

    ()

  • value4 (PAR8)

    ()



8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
# File 'lib/lignite/ev3_ops.rb', line 8217

def com_readdata(value1, value2, value3, value4)
  logger.debug do
    args = [value1, value2, value3, value4]
    "called com_readdata with #{args.inspect}"
  end

  bytes = u8(0xD1)
  bytes += param_simple(value1)
  bytes += param_simple(value2)
  bytes += param_simple(value3)
  bytes += param_simple(value4)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_ready(hardware, name) ⇒ Object

Test if communication is busy

Parameters:

  • hardware (PAR8)

    (in) Hardware transport layer

  • name (PAR8)

    (in) Name of the remote/own device



8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
# File 'lib/lignite/ev3_ops.rb', line 8199

def com_ready(hardware, name)
  logger.debug do
    args = [hardware, name]
    "called com_ready with #{args.inspect}"
  end

  bytes = u8(0xD0)
  bytes += param_simple(hardware)
  bytes += param_simple(name)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_remove(hardware, remote_name) ⇒ Object

Removes a know remote device from the brick

Parameters:

  • hardware (PAR8)

    ()

  • remote_name (PAR8)

    () Pointer to remote brick name



8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
# File 'lib/lignite/ev3_ops.rb', line 8947

def com_remove(hardware, remote_name)
  logger.debug do
    args = [hardware, remote_name]
    "called com_remove with #{args.inspect}"
  end

  bytes = u8(0xD6)
  bytes += param_simple(hardware)
  bytes += param_simple(remote_name)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_set(*args) ⇒ Object



8919
8920
8921
8922
8923
8924
# File 'lib/lignite/ev3_ops.rb', line 8919

def com_set(*args)
  logger.debug "called com_set with #{args.inspect}"
  cvalue = args.shift
  csym = MULTIPLEX_COM_SET.fetch(cvalue)
  __send__("com_set_#{csym}", *args)
end

#com_set_set_brickname(name) ⇒ Object

Sets the name of the brick

Parameters:

  • name (PAR8)

    (in) First character in character string



8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
# File 'lib/lignite/ev3_ops.rb', line 8794

def com_set_set_brickname(name)
  logger.debug do
    args = [name]
    "called com_set_set_brickname with #{args.inspect}"
  end

  bytes = u8(0xD4)
  bytes += param_simple(8)
  bytes += param_simple(name)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_set_set_connection(hardware, name, connection) ⇒ Object

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

Parameters:

  • hardware (PAR8)

    (in) Hardware Transport Layer

  • name (PAR8)

    (in) First character in character string

  • connection (PAR8)

    (in) Connect [0,1], 1 = Connect, 0 = Disconnect



8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
# File 'lib/lignite/ev3_ops.rb', line 8775

def com_set_set_connection(hardware, name, connection)
  logger.debug do
    args = [hardware, name, connection]
    "called com_set_set_connection with #{args.inspect}"
  end

  bytes = u8(0xD4)
  bytes += param_simple(7)
  bytes += param_simple(hardware)
  bytes += param_simple(name)
  bytes += param_simple(connection)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_set_set_encrypt(hardware, item, encrypt) ⇒ Object

Sets the encryption type for an item in a list.

Parameters:

  • hardware (PAR8)

    (in) Hardware Transport Layer

  • item (PAR8)

    (in) Index in table

  • encrypt (PAR8)

    (in) Encryption type



8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
# File 'lib/lignite/ev3_ops.rb', line 8851

def com_set_set_encrypt(hardware, item, encrypt)
  logger.debug do
    args = [hardware, item, encrypt]
    "called com_set_set_encrypt with #{args.inspect}"
  end

  bytes = u8(0xD4)
  bytes += param_simple(11)
  bytes += param_simple(hardware)
  bytes += param_simple(item)
  bytes += param_simple(encrypt)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_set_set_mode2(hardware, active) ⇒ Object

Set active mode state, either active or not

Parameters:

  • hardware (PAR8)

    (in) Hardware Transport Layer

  • active (PAR8)

    (in) Active [0,1], 1 = on, 0 = off



8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
# File 'lib/lignite/ev3_ops.rb', line 8890

def com_set_set_mode2(hardware, active)
  logger.debug do
    args = [hardware, active]
    "called com_set_set_mode2 with #{args.inspect}"
  end

  bytes = u8(0xD4)
  bytes += param_simple(13)
  bytes += param_simple(hardware)
  bytes += param_simple(active)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_set_set_movedown(hardware, item) ⇒ Object

Moves the index in list one step down.

Parameters:

  • hardware (PAR8)

    (in) Hardware Transport Layer

  • item (PAR8)

    (in) Index in table



8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
# File 'lib/lignite/ev3_ops.rb', line 8831

def com_set_set_movedown(hardware, item)
  logger.debug do
    args = [hardware, item]
    "called com_set_set_movedown with #{args.inspect}"
  end

  bytes = u8(0xD4)
  bytes += param_simple(10)
  bytes += param_simple(hardware)
  bytes += param_simple(item)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_set_set_moveup(hardware, item) ⇒ Object

Moves the index in list one step up.

Parameters:

  • hardware (PAR8)

    (in) Hardware Transport Layer

  • item (PAR8)

    (in) Index in table



8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
# File 'lib/lignite/ev3_ops.rb', line 8812

def com_set_set_moveup(hardware, item)
  logger.debug do
    args = [hardware, item]
    "called com_set_set_moveup with #{args.inspect}"
  end

  bytes = u8(0xD4)
  bytes += param_simple(9)
  bytes += param_simple(hardware)
  bytes += param_simple(item)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_set_set_on_off(hardware, active) ⇒ Object

Set active state, either on or off

Parameters:

  • hardware (PAR8)

    (in) Hardware Transport Layer

  • active (PAR8)

    (in) Active [0,1], 1 = on, 0 = off



8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
# File 'lib/lignite/ev3_ops.rb', line 8677

def com_set_set_on_off(hardware, active)
  logger.debug do
    args = [hardware, active]
    "called com_set_set_on_off with #{args.inspect}"
  end

  bytes = u8(0xD4)
  bytes += param_simple(1)
  bytes += param_simple(hardware)
  bytes += param_simple(active)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_set_set_passkey(hardware, accept) ⇒ Object

Set pin code.

Parameters:

  • hardware (PAR8)

    (in) Hardware Transport Layer

  • accept (PAR8)

    (in) Acceptance [0,1] 0 = reject 1 = accept



8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
# File 'lib/lignite/ev3_ops.rb', line 8755

def com_set_set_passkey(hardware, accept)
  logger.debug do
    args = [hardware, accept]
    "called com_set_set_passkey with #{args.inspect}"
  end

  bytes = u8(0xD4)
  bytes += param_simple(6)
  bytes += param_simple(hardware)
  bytes += param_simple(accept)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_set_set_pin(hardware, name, pincode) ⇒ Object

Set pin code.

Parameters:

  • hardware (PAR8)

    (in) Hardware Transport Layer

  • name (PAR8)

    (in) First character in character string

  • pincode (PAR8)

    (in) First character in character string



8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
# File 'lib/lignite/ev3_ops.rb', line 8735

def com_set_set_pin(hardware, name, pincode)
  logger.debug do
    args = [hardware, name, pincode]
    "called com_set_set_pin with #{args.inspect}"
  end

  bytes = u8(0xD4)
  bytes += param_simple(5)
  bytes += param_simple(hardware)
  bytes += param_simple(name)
  bytes += param_simple(pincode)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_set_set_search(hardware, search) ⇒ Object

Starts or or stops the search for remote devices

Parameters:

  • hardware (PAR8)

    (in) Hardware Transport Layer

  • search (PAR8)

    (in) Search [0,1] 0 = stop search, 1 = start search



8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
# File 'lib/lignite/ev3_ops.rb', line 8715

def com_set_set_search(hardware, search)
  logger.debug do
    args = [hardware, search]
    "called com_set_set_search with #{args.inspect}"
  end

  bytes = u8(0xD4)
  bytes += param_simple(3)
  bytes += param_simple(hardware)
  bytes += param_simple(search)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_set_set_ssid(hardware, name) ⇒ Object

Sets the SSID name. Only used for WIFI

Parameters:

  • hardware (PAR8)

    (in) Hardware Transport Layer

  • name (PAR8)

    (in) First character in character string



8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
# File 'lib/lignite/ev3_ops.rb', line 8871

def com_set_set_ssid(hardware, name)
  logger.debug do
    args = [hardware, name]
    "called com_set_set_ssid with #{args.inspect}"
  end

  bytes = u8(0xD4)
  bytes += param_simple(12)
  bytes += param_simple(hardware)
  bytes += param_simple(name)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_set_set_visible(hardware, visible) ⇒ Object

Set visibility state - Only available for bluetooth

Parameters:

  • hardware (PAR8)

    (in) Hardware Transport Layer

  • visible (PAR8)

    (in) Visible [0,1], 1 = visible, 0 = invisible



8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
# File 'lib/lignite/ev3_ops.rb', line 8696

def com_set_set_visible(hardware, visible)
  logger.debug do
    args = [hardware, visible]
    "called com_set_set_visible with #{args.inspect}"
  end

  bytes = u8(0xD4)
  bytes += param_simple(2)
  bytes += param_simple(hardware)
  bytes += param_simple(visible)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_test(hardware, name, busy) ⇒ Object

Test if communication is busy

Parameters:

  • hardware (PAR8)

    (in) Hardware transport layer

  • name (PAR8)

    (in) Name of the remote/own device

  • busy (PAR8)

    (out) Busy flag



8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
# File 'lib/lignite/ev3_ops.rb', line 8930

def com_test(hardware, name, busy)
  logger.debug do
    args = [hardware, name, busy]
    "called com_test with #{args.inspect}"
  end

  bytes = u8(0xD5)
  bytes += param_simple(hardware)
  bytes += param_simple(name)
  bytes += param_simple(busy)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_write(*args) ⇒ Object



5414
5415
5416
5417
5418
5419
# File 'lib/lignite/ev3_ops.rb', line 5414

def com_write(*args)
  logger.debug "called com_write with #{args.inspect}"
  cvalue = args.shift
  csym = MULTIPLEX_COM_WRITE.fetch(cvalue)
  __send__("com_write_#{csym}", *args)
end

#com_write_reply(image, global, status) ⇒ Object

Parameters:

  • image (PAR32)

    (in) Address of image

  • global (PAR32)

    (in) Address of global variables

  • status (PAR8)

    (in) Status



5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
# File 'lib/lignite/ev3_ops.rb', line 5395

def com_write_reply(image, global, status)
  logger.debug do
    args = [image, global, status]
    "called com_write_reply with #{args.inspect}"
  end

  bytes = u8(0x92)
  bytes += param_simple(14)
  bytes += param_simple(image)
  bytes += param_simple(global)
  bytes += param_simple(status)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_writedata(value1, value2, value3, value4) ⇒ Object

This code does not exist in normal program

Parameters:

  • value1 (PAR8)

    ()

  • value2 (PAR8)

    ()

  • value3 (PAR16)

    ()

  • value4 (PAR8)

    ()



8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
# File 'lib/lignite/ev3_ops.rb', line 8237

def com_writedata(value1, value2, value3, value4)
  logger.debug do
    args = [value1, value2, value3, value4]
    "called com_writedata with #{args.inspect}"
  end

  bytes = u8(0xD2)
  bytes += param_simple(value1)
  bytes += param_simple(value2)
  bytes += param_simple(value3)
  bytes += param_simple(value4)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#com_writefile(hardware, remote_name, file_name, file_type) ⇒ Object

Sends a file or folder to remote brick.

Parameters:

  • hardware (PAR8)

    ()

  • remote_name (PAR8)

    () Pointer to remote brick name

  • file_name (PAR8)

    () File/folder name to send

  • file_type (PAR8)

    () File or folder type to send



8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
# File 'lib/lignite/ev3_ops.rb', line 8965

def com_writefile(hardware, remote_name, file_name, file_type)
  logger.debug do
    args = [hardware, remote_name, file_name, file_type]
    "called com_writefile with #{args.inspect}"
  end

  bytes = u8(0xD7)
  bytes += param_simple(hardware)
  bytes += param_simple(remote_name)
  bytes += param_simple(file_name)
  bytes += param_simple(file_type)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#cp_eq16(left, right, flag) ⇒ Object

If LEFT is equal to RIGTH - set FLAG

Parameters:

  • left (PAR16)

    (in)

  • right (PAR16)

    (in)

  • flag (PAR8)

    (out)



1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
# File 'lib/lignite/ev3_ops.rb', line 1367

def cp_eq16(left, right, flag)
  logger.debug do
    args = [left, right, flag]
    "called cp_eq16 with #{args.inspect}"
  end

  bytes = u8(0x4D)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(flag)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#cp_eq32(left, right, flag) ⇒ Object

If LEFT is equal to RIGTH - set FLAG

Parameters:

  • left (PAR32)

    (in)

  • right (PAR32)

    (in)

  • flag (PAR8)

    (out)



1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
# File 'lib/lignite/ev3_ops.rb', line 1385

def cp_eq32(left, right, flag)
  logger.debug do
    args = [left, right, flag]
    "called cp_eq32 with #{args.inspect}"
  end

  bytes = u8(0x4E)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(flag)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#cp_eq8(left, right, flag) ⇒ Object

If LEFT is equal to RIGTH - set FLAG

Parameters:

  • left (PAR8)

    (in)

  • right (PAR8)

    (in)

  • flag (PAR8)

    (out)



1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
# File 'lib/lignite/ev3_ops.rb', line 1349

def cp_eq8(left, right, flag)
  logger.debug do
    args = [left, right, flag]
    "called cp_eq8 with #{args.inspect}"
  end

  bytes = u8(0x4C)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(flag)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#cp_eqf(left, right, flag) ⇒ Object

If LEFT is equal to RIGTH - set FLAG

Parameters:

  • left (PARF)

    (in)

  • right (PARF)

    (in)

  • flag (PAR8)

    (out)



1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
# File 'lib/lignite/ev3_ops.rb', line 1403

def cp_eqf(left, right, flag)
  logger.debug do
    args = [left, right, flag]
    "called cp_eqf with #{args.inspect}"
  end

  bytes = u8(0x4F)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(flag)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#cp_gt16(left, right, flag) ⇒ Object

If LEFT is greater than RIGTH - set FLAG

Parameters:

  • left (PAR16)

    (in)

  • right (PAR16)

    (in)

  • flag (PAR8)

    (out)



1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
# File 'lib/lignite/ev3_ops.rb', line 1295

def cp_gt16(left, right, flag)
  logger.debug do
    args = [left, right, flag]
    "called cp_gt16 with #{args.inspect}"
  end

  bytes = u8(0x49)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(flag)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#cp_gt32(left, right, flag) ⇒ Object

If LEFT is greater than RIGTH - set FLAG

Parameters:

  • left (PAR32)

    (in)

  • right (PAR32)

    (in)

  • flag (PAR8)

    (out)



1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
# File 'lib/lignite/ev3_ops.rb', line 1313

def cp_gt32(left, right, flag)
  logger.debug do
    args = [left, right, flag]
    "called cp_gt32 with #{args.inspect}"
  end

  bytes = u8(0x4A)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(flag)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#cp_gt8(left, right, flag) ⇒ Object

If LEFT is greater than RIGTH - set FLAG

Parameters:

  • left (PAR8)

    (in)

  • right (PAR8)

    (in)

  • flag (PAR8)

    (out)



1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
# File 'lib/lignite/ev3_ops.rb', line 1277

def cp_gt8(left, right, flag)
  logger.debug do
    args = [left, right, flag]
    "called cp_gt8 with #{args.inspect}"
  end

  bytes = u8(0x48)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(flag)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#cp_gteq16(left, right, flag) ⇒ Object

If LEFT is greater than or equal to RIGTH - set FLAG

Parameters:

  • left (PAR16)

    (in)

  • right (PAR16)

    (in)

  • flag (PAR8)

    (out)



1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
# File 'lib/lignite/ev3_ops.rb', line 1583

def cp_gteq16(left, right, flag)
  logger.debug do
    args = [left, right, flag]
    "called cp_gteq16 with #{args.inspect}"
  end

  bytes = u8(0x59)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(flag)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#cp_gteq32(left, right, flag) ⇒ Object

If LEFT is greater than or equal to RIGTH - set FLAG

Parameters:

  • left (PAR32)

    (in)

  • right (PAR32)

    (in)

  • flag (PAR8)

    (out)



1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
# File 'lib/lignite/ev3_ops.rb', line 1601

def cp_gteq32(left, right, flag)
  logger.debug do
    args = [left, right, flag]
    "called cp_gteq32 with #{args.inspect}"
  end

  bytes = u8(0x5A)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(flag)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#cp_gteq8(left, right, flag) ⇒ Object

If LEFT is greater than or equal to RIGTH - set FLAG

Parameters:

  • left (PAR8)

    (in)

  • right (PAR8)

    (in)

  • flag (PAR8)

    (out)



1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
# File 'lib/lignite/ev3_ops.rb', line 1565

def cp_gteq8(left, right, flag)
  logger.debug do
    args = [left, right, flag]
    "called cp_gteq8 with #{args.inspect}"
  end

  bytes = u8(0x58)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(flag)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#cp_gteqf(left, right, flag) ⇒ Object

If LEFT is greater than or equal to RIGTH - set FLAG

Parameters:

  • left (PARF)

    (in)

  • right (PARF)

    (in)

  • flag (PAR8)

    (out)



1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
# File 'lib/lignite/ev3_ops.rb', line 1619

def cp_gteqf(left, right, flag)
  logger.debug do
    args = [left, right, flag]
    "called cp_gteqf with #{args.inspect}"
  end

  bytes = u8(0x5B)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(flag)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#cp_gtf(left, right, flag) ⇒ Object

If LEFT is greater than RIGTH - set FLAG

Parameters:

  • left (PARF)

    (in)

  • right (PARF)

    (in)

  • flag (PAR8)

    (out)



1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
# File 'lib/lignite/ev3_ops.rb', line 1331

def cp_gtf(left, right, flag)
  logger.debug do
    args = [left, right, flag]
    "called cp_gtf with #{args.inspect}"
  end

  bytes = u8(0x4B)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(flag)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#cp_lt16(left, right, flag) ⇒ Object

If LEFT is less than RIGTH - set FLAG

Parameters:

  • left (PAR16)

    (in)

  • right (PAR16)

    (in)

  • flag (PAR8)

    (out)



1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
# File 'lib/lignite/ev3_ops.rb', line 1223

def cp_lt16(left, right, flag)
  logger.debug do
    args = [left, right, flag]
    "called cp_lt16 with #{args.inspect}"
  end

  bytes = u8(0x45)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(flag)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#cp_lt32(left, right, flag) ⇒ Object

If LEFT is less than RIGTH - set FLAG

Parameters:

  • left (PAR32)

    (in)

  • right (PAR32)

    (in)

  • flag (PAR8)

    (out)



1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
# File 'lib/lignite/ev3_ops.rb', line 1241

def cp_lt32(left, right, flag)
  logger.debug do
    args = [left, right, flag]
    "called cp_lt32 with #{args.inspect}"
  end

  bytes = u8(0x46)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(flag)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#cp_lt8(left, right, flag) ⇒ Object

If LEFT is less than RIGTH - set FLAG

Parameters:

  • left (PAR8)

    (in)

  • right (PAR8)

    (in)

  • flag (PAR8)

    (out)



1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
# File 'lib/lignite/ev3_ops.rb', line 1205

def cp_lt8(left, right, flag)
  logger.debug do
    args = [left, right, flag]
    "called cp_lt8 with #{args.inspect}"
  end

  bytes = u8(0x44)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(flag)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#cp_lteq16(left, right, flag) ⇒ Object

If LEFT is less than or equal to RIGTH - set FLAG

Parameters:

  • left (PAR16)

    (in)

  • right (PAR16)

    (in)

  • flag (PAR8)

    (out)



1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
# File 'lib/lignite/ev3_ops.rb', line 1511

def cp_lteq16(left, right, flag)
  logger.debug do
    args = [left, right, flag]
    "called cp_lteq16 with #{args.inspect}"
  end

  bytes = u8(0x55)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(flag)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#cp_lteq32(left, right, flag) ⇒ Object

If LEFT is less than or equal to RIGTH - set FLAG

Parameters:

  • left (PAR32)

    (in)

  • right (PAR32)

    (in)

  • flag (PAR8)

    (out)



1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
# File 'lib/lignite/ev3_ops.rb', line 1529

def cp_lteq32(left, right, flag)
  logger.debug do
    args = [left, right, flag]
    "called cp_lteq32 with #{args.inspect}"
  end

  bytes = u8(0x56)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(flag)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#cp_lteq8(left, right, flag) ⇒ Object

If LEFT is less than or equal to RIGTH - set FLAG

Parameters:

  • left (PAR8)

    (in)

  • right (PAR8)

    (in)

  • flag (PAR8)

    (out)



1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
# File 'lib/lignite/ev3_ops.rb', line 1493

def cp_lteq8(left, right, flag)
  logger.debug do
    args = [left, right, flag]
    "called cp_lteq8 with #{args.inspect}"
  end

  bytes = u8(0x54)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(flag)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#cp_lteqf(left, right, flag) ⇒ Object

If LEFT is less than or equal to RIGTH - set FLAG

Parameters:

  • left (PARF)

    (in)

  • right (PARF)

    (in)

  • flag (PAR8)

    (out)



1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
# File 'lib/lignite/ev3_ops.rb', line 1547

def cp_lteqf(left, right, flag)
  logger.debug do
    args = [left, right, flag]
    "called cp_lteqf with #{args.inspect}"
  end

  bytes = u8(0x57)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(flag)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#cp_ltf(left, right, flag) ⇒ Object

If LEFT is less than RIGTH - set FLAG

Parameters:

  • left (PARF)

    (in)

  • right (PARF)

    (in)

  • flag (PAR8)

    (out)



1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
# File 'lib/lignite/ev3_ops.rb', line 1259

def cp_ltf(left, right, flag)
  logger.debug do
    args = [left, right, flag]
    "called cp_ltf with #{args.inspect}"
  end

  bytes = u8(0x47)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(flag)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#cp_neq16(left, right, flag) ⇒ Object

If LEFT is not equal to RIGTH - set FLAG

Parameters:

  • left (PAR16)

    (in)

  • right (PAR16)

    (in)

  • flag (PAR8)

    (out)



1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
# File 'lib/lignite/ev3_ops.rb', line 1439

def cp_neq16(left, right, flag)
  logger.debug do
    args = [left, right, flag]
    "called cp_neq16 with #{args.inspect}"
  end

  bytes = u8(0x51)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(flag)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#cp_neq32(left, right, flag) ⇒ Object

If LEFT is not equal to RIGTH - set FLAG

Parameters:

  • left (PAR32)

    (in)

  • right (PAR32)

    (in)

  • flag (PAR8)

    (out)



1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
# File 'lib/lignite/ev3_ops.rb', line 1457

def cp_neq32(left, right, flag)
  logger.debug do
    args = [left, right, flag]
    "called cp_neq32 with #{args.inspect}"
  end

  bytes = u8(0x52)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(flag)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#cp_neq8(left, right, flag) ⇒ Object

If LEFT is not equal to RIGTH - set FLAG

Parameters:

  • left (PAR8)

    (in)

  • right (PAR8)

    (in)

  • flag (PAR8)

    (out)



1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
# File 'lib/lignite/ev3_ops.rb', line 1421

def cp_neq8(left, right, flag)
  logger.debug do
    args = [left, right, flag]
    "called cp_neq8 with #{args.inspect}"
  end

  bytes = u8(0x50)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(flag)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#cp_neqf(left, right, flag) ⇒ Object

If LEFT is not equal to RIGTH - set FLAG

Parameters:

  • left (PARF)

    (in)

  • right (PARF)

    (in)

  • flag (PAR8)

    (out)



1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
# File 'lib/lignite/ev3_ops.rb', line 1475

def cp_neqf(left, right, flag)
  logger.debug do
    args = [left, right, flag]
    "called cp_neqf with #{args.inspect}"
  end

  bytes = u8(0x53)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(flag)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#div16(source1, source2, destination) ⇒ Object

Divide two 16 bit values DESTINATION = SOURCE1 / SOURCE2

Parameters:

  • source1 (PAR16)

    (in)

  • source2 (PAR16)

    (in)

  • destination (PAR16)

    (out)



599
600
601
602
603
604
605
606
607
608
609
610
611
# File 'lib/lignite/ev3_ops.rb', line 599

def div16(source1, source2, destination)
  logger.debug do
    args = [source1, source2, destination]
    "called div16 with #{args.inspect}"
  end

  bytes = u8(0x1D)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#div32(source1, source2, destination) ⇒ Object

Divide two 32 bit values DESTINATION = SOURCE1 / SOURCE2

Parameters:

  • source1 (PAR32)

    (in)

  • source2 (PAR32)

    (in)

  • destination (PAR32)

    (out)



617
618
619
620
621
622
623
624
625
626
627
628
629
# File 'lib/lignite/ev3_ops.rb', line 617

def div32(source1, source2, destination)
  logger.debug do
    args = [source1, source2, destination]
    "called div32 with #{args.inspect}"
  end

  bytes = u8(0x1E)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#div8(source1, source2, destination) ⇒ Object

Divide two 8 bit values DESTINATION = SOURCE1 / SOURCE2

Parameters:

  • source1 (PAR8)

    (in)

  • source2 (PAR8)

    (in)

  • destination (PAR8)

    (out)



581
582
583
584
585
586
587
588
589
590
591
592
593
# File 'lib/lignite/ev3_ops.rb', line 581

def div8(source1, source2, destination)
  logger.debug do
    args = [source1, source2, destination]
    "called div8 with #{args.inspect}"
  end

  bytes = u8(0x1C)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#divf(source1, source2, destination) ⇒ Object

Divide two floating point values DESTINATION = SOURCE1 / SOURCE2

Parameters:

  • source1 (PARF)

    (in)

  • source2 (PARF)

    (in)

  • destination (PARF)

    (out)



635
636
637
638
639
640
641
642
643
644
645
646
647
# File 'lib/lignite/ev3_ops.rb', line 635

def divf(source1, source2, destination)
  logger.debug do
    args = [source1, source2, destination]
    "called divf with #{args.inspect}"
  end

  bytes = u8(0x1F)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#do(prgid, image, global) ⇒ Object

Run byte code snippet

Parameters:

  • prgid (PAR16)

    (in) Program slot number

  • image (PAR32)

    (in) Address of image

  • global (PAR32)

    (in) Address of global variables



347
348
349
350
351
352
353
354
355
356
357
358
359
# File 'lib/lignite/ev3_ops.rb', line 347

def do(prgid, image, global)
  logger.debug do
    args = [prgid, image, global]
    "called do with #{args.inspect}"
  end

  bytes = u8(0x0F)
  bytes += param_simple(prgid)
  bytes += param_simple(image)
  bytes += param_simple(global)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#dynload_entry_0(cmd, length_in, length_out, value) ⇒ Object

Execute Entry Point function 0 in Third Party VM

Parameters:

  • cmd (PAR8)

    (in) Sub command to be executed

  • length_in (PAR8)

    (in) Amount of data passed to this opcode

  • length_out (PAR16)

    (out) Amount of data returned

  • value (PARV)

    (out) Data from opcode



9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
# File 'lib/lignite/ev3_ops.rb', line 9253

def dynload_entry_0(cmd, length_in, length_out, value)
  logger.debug do
    args = [cmd, length_in, length_out, value]
    "called dynload_entry_0 with #{args.inspect}"
  end

  bytes = u8(0xF2)
  bytes += param_simple(cmd)
  bytes += param_simple(length_in)
  bytes += param_simple(length_out)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#dynload_entry_1(cmd, length_in, length_out, value) ⇒ Object

Execute Entry Point function 1 in Third Party VM

Parameters:

  • cmd (PAR8)

    (in) Sub command to be executed

  • length_in (PAR8)

    (in) Amount of data passed to this opcode

  • length_out (PAR16)

    (out) Amount of data returned

  • value (PARV)

    (out) Data from opcode



9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
# File 'lib/lignite/ev3_ops.rb', line 9273

def dynload_entry_1(cmd, length_in, length_out, value)
  logger.debug do
    args = [cmd, length_in, length_out, value]
    "called dynload_entry_1 with #{args.inspect}"
  end

  bytes = u8(0xF3)
  bytes += param_simple(cmd)
  bytes += param_simple(length_in)
  bytes += param_simple(length_out)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#dynload_entry_2(cmd, length_in, length_out, value) ⇒ Object

Execute Entry Point function 2 in Third Party VM

Parameters:

  • cmd (PAR8)

    (in) Sub command to be executed

  • length_in (PAR8)

    (in) Amount of data passed to this opcode

  • length_out (PAR16)

    (out) Amount of data returned

  • value (PARV)

    (out) Data from opcode



9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
# File 'lib/lignite/ev3_ops.rb', line 9293

def dynload_entry_2(cmd, length_in, length_out, value)
  logger.debug do
    args = [cmd, length_in, length_out, value]
    "called dynload_entry_2 with #{args.inspect}"
  end

  bytes = u8(0xF4)
  bytes += param_simple(cmd)
  bytes += param_simple(length_in)
  bytes += param_simple(length_out)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#dynload_entry_3(cmd, length_in, length_out, value) ⇒ Object

Execute Entry Point function 3 in Third Party VM

Parameters:

  • cmd (PAR8)

    (in) Sub command to be executed

  • length_in (PAR8)

    (in) Amount of data passed to this opcode

  • length_out (PAR16)

    (out) Amount of data returned

  • value (PARV)

    (out) Data from opcode



9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
# File 'lib/lignite/ev3_ops.rb', line 9313

def dynload_entry_3(cmd, length_in, length_out, value)
  logger.debug do
    args = [cmd, length_in, length_out, value]
    "called dynload_entry_3 with #{args.inspect}"
  end

  bytes = u8(0xF5)
  bytes += param_simple(cmd)
  bytes += param_simple(length_in)
  bytes += param_simple(length_out)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#dynload_entry_4(cmd, length_in, length_out, value) ⇒ Object

Execute Entry Point function 4 in Third Party VM

Parameters:

  • cmd (PAR8)

    (in) Sub command to be executed

  • length_in (PAR8)

    (in) Amount of data passed to this opcode

  • length_out (PAR16)

    (out) Amount of data returned

  • value (PARV)

    (out) Data from opcode



9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
# File 'lib/lignite/ev3_ops.rb', line 9333

def dynload_entry_4(cmd, length_in, length_out, value)
  logger.debug do
    args = [cmd, length_in, length_out, value]
    "called dynload_entry_4 with #{args.inspect}"
  end

  bytes = u8(0xF6)
  bytes += param_simple(cmd)
  bytes += param_simple(length_in)
  bytes += param_simple(length_out)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#dynload_entry_5(cmd, length_in, length_out, value) ⇒ Object

Execute Entry Point function 5 in Third Party VM

Parameters:

  • cmd (PAR8)

    (in) Sub command to be executed

  • length_in (PAR8)

    (in) Amount of data passed to this opcode

  • length_out (PAR16)

    (out) Amount of data returned

  • value (PARV)

    (out) Data from opcode



9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
# File 'lib/lignite/ev3_ops.rb', line 9353

def dynload_entry_5(cmd, length_in, length_out, value)
  logger.debug do
    args = [cmd, length_in, length_out, value]
    "called dynload_entry_5 with #{args.inspect}"
  end

  bytes = u8(0xF7)
  bytes += param_simple(cmd)
  bytes += param_simple(length_in)
  bytes += param_simple(length_out)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#dynload_entry_6(cmd, length_in, length_out, value) ⇒ Object

Execute Entry Point function 6 in Third Party VM

Parameters:

  • cmd (PAR8)

    (in) Sub command to be executed

  • length_in (PAR8)

    (in) Amount of data passed to this opcode

  • length_out (PAR16)

    (out) Amount of data returned

  • value (PARV)

    (out) Data from opcode



9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
# File 'lib/lignite/ev3_ops.rb', line 9373

def dynload_entry_6(cmd, length_in, length_out, value)
  logger.debug do
    args = [cmd, length_in, length_out, value]
    "called dynload_entry_6 with #{args.inspect}"
  end

  bytes = u8(0xF8)
  bytes += param_simple(cmd)
  bytes += param_simple(length_in)
  bytes += param_simple(length_out)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#dynload_entry_7(cmd, length_in, length_out, value) ⇒ Object

Execute Entry Point function 7 in Third Party VM

Parameters:

  • cmd (PAR8)

    (in) Sub command to be executed

  • length_in (PAR8)

    (in) Amount of data passed to this opcode

  • length_out (PAR16)

    (out) Amount of data returned

  • value (PARV)

    (out) Data from opcode



9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
# File 'lib/lignite/ev3_ops.rb', line 9393

def dynload_entry_7(cmd, length_in, length_out, value)
  logger.debug do
    args = [cmd, length_in, length_out, value]
    "called dynload_entry_7 with #{args.inspect}"
  end

  bytes = u8(0xF9)
  bytes += param_simple(cmd)
  bytes += param_simple(length_in)
  bytes += param_simple(length_out)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#dynload_entry_8(cmd, length_in, length_out, value) ⇒ Object

Execute Entry Point function 8 in Third Party VM

Parameters:

  • cmd (PAR8)

    (in) Sub command to be executed

  • length_in (PAR8)

    (in) Amount of data passed to this opcode

  • length_out (PAR16)

    (out) Amount of data returned

  • value (PARV)

    (out) Data from opcode



9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
# File 'lib/lignite/ev3_ops.rb', line 9413

def dynload_entry_8(cmd, length_in, length_out, value)
  logger.debug do
    args = [cmd, length_in, length_out, value]
    "called dynload_entry_8 with #{args.inspect}"
  end

  bytes = u8(0xFA)
  bytes += param_simple(cmd)
  bytes += param_simple(length_in)
  bytes += param_simple(length_out)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#dynload_entry_9(cmd, length_in, length_out, value) ⇒ Object

Execute Entry Point function 9 in Third Party VM

Parameters:

  • cmd (PAR8)

    (in) Sub command to be executed

  • length_in (PAR8)

    (in) Amount of data passed to this opcode

  • length_out (PAR16)

    (out) Amount of data returned

  • value (PARV)

    (out) Data from opcode



9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
# File 'lib/lignite/ev3_ops.rb', line 9433

def dynload_entry_9(cmd, length_in, length_out, value)
  logger.debug do
    args = [cmd, length_in, length_out, value]
    "called dynload_entry_9 with #{args.inspect}"
  end

  bytes = u8(0xFB)
  bytes += param_simple(cmd)
  bytes += param_simple(length_in)
  bytes += param_simple(length_out)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#dynload_get_vm(result) ⇒ Object

Get the index of the currently loaded VM

Parameters:

  • result (PAR8)

    (out) VM Index, Robotc = 0, Labview = 1, -1 for no loaded VM



9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
# File 'lib/lignite/ev3_ops.rb', line 9450

def dynload_get_vm(result)
  logger.debug do
    args = [result]
    "called dynload_get_vm with #{args.inspect}"
  end

  bytes = u8(0xFC)
  bytes += param_simple(result)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#dynload_vmexitObject

Clean up the dynamic VM loading system



9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
# File 'lib/lignite/ev3_ops.rb', line 9237

def dynload_vmexit
  logger.debug do
    args = []
    "called dynload_vmexit with #{args.inspect}"
  end

  bytes = u8(0xF1)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#dynload_vmload(vmindex, result) ⇒ Object

Load the selected VM

Parameters:

  • vmindex (PAR8)

    (in) VM Index, Robotc = 0, Labview = 1

  • result (PAR8)

    (out) OK if VM loaded ok FAIL if it did not.



9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
# File 'lib/lignite/ev3_ops.rb', line 9223

def dynload_vmload(vmindex, result)
  logger.debug do
    args = [vmindex, result]
    "called dynload_vmload with #{args.inspect}"
  end

  bytes = u8(0xF0)
  bytes += param_simple(vmindex)
  bytes += param_simple(result)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#errorObject

This code does not exist in normal program



7
8
9
10
11
12
13
14
15
16
# File 'lib/lignite/ev3_ops.rb', line 7

def error
  logger.debug do
    args = []
    "called error with #{args.inspect}"
  end

  bytes = u8(0x00)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file(*args) ⇒ Object



7401
7402
7403
7404
7405
7406
# File 'lib/lignite/ev3_ops.rb', line 7401

def file(*args)
  logger.debug "called file with #{args.inspect}"
  cvalue = args.shift
  csym = MULTIPLEX_FILE.fetch(cvalue)
  __send__("file_#{csym}", *args)
end

#file_close(handle) ⇒ Object

Close file

Parameters:

  • handle (PAR16)

    (in) Handle to file



6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
# File 'lib/lignite/ev3_ops.rb', line 6885

def file_close(handle)
  logger.debug do
    args = [handle]
    "called file_close with #{args.inspect}"
  end

  bytes = u8(0xC0)
  bytes += param_simple(7)
  bytes += param_simple(handle)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file_close_log(handle, name) ⇒ Object

Close data log file

Parameters:

  • handle (PAR16)

    (in) Handle to file

  • name (PAR8)

    (in) First character in file name (character string)



7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
# File 'lib/lignite/ev3_ops.rb', line 7090

def file_close_log(handle, name)
  logger.debug do
    args = [handle, name]
    "called file_close_log with #{args.inspect}"
  end

  bytes = u8(0xC0)
  bytes += param_simple(17)
  bytes += param_simple(handle)
  bytes += param_simple(name)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file_del_cache_file(string) ⇒ Object

Parameters:

  • string (PAR8)

    (out) First character in character string



7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
# File 'lib/lignite/ev3_ops.rb', line 7207

def file_del_cache_file(string)
  logger.debug do
    args = [string]
    "called file_del_cache_file with #{args.inspect}"
  end

  bytes = u8(0xC0)
  bytes += param_simple(23)
  bytes += param_simple(string)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file_del_subfolder(name, item) ⇒ Object

Parameters:

  • name (PAR8)

    (in) First character in folder name (ex “../prjs/”)

  • item (PAR8)

    (in) Sub folder index [1..ITEMS]



7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
# File 'lib/lignite/ev3_ops.rb', line 7225

def file_del_subfolder(name, item)
  logger.debug do
    args = [name, item]
    "called file_del_subfolder with #{args.inspect}"
  end

  bytes = u8(0xC0)
  bytes += param_simple(24)
  bytes += param_simple(name)
  bytes += param_simple(item)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file_get_cache_file(item, length, string) ⇒ Object

Parameters:

  • item (PAR8)

    (in) Cache index [1..ITEMS]

  • length (PAR8)

    (in) Maximal string length

  • string (PAR8)

    (out) First character in character string



7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
# File 'lib/lignite/ev3_ops.rb', line 7188

def file_get_cache_file(item, length, string)
  logger.debug do
    args = [item, length, string]
    "called file_get_cache_file with #{args.inspect}"
  end

  bytes = u8(0xC0)
  bytes += param_simple(22)
  bytes += param_simple(item)
  bytes += param_simple(length)
  bytes += param_simple(string)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file_get_cache_files(items) ⇒ Object

Parameters:

  • items (PAR8)

    (out) Number of files in cache



7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
# File 'lib/lignite/ev3_ops.rb', line 7152

def file_get_cache_files(items)
  logger.debug do
    args = [items]
    "called file_get_cache_files with #{args.inspect}"
  end

  bytes = u8(0xC0)
  bytes += param_simple(20)
  bytes += param_simple(items)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file_get_folders(name, items) ⇒ Object

Parameters:

  • name (PAR8)

    (in) First character in folder name (ex “../prjs/”)

  • items (PAR8)

    (out) No of sub folders



7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
# File 'lib/lignite/ev3_ops.rb', line 7006

def file_get_folders(name, items)
  logger.debug do
    args = [name, items]
    "called file_get_folders with #{args.inspect}"
  end

  bytes = u8(0xC0)
  bytes += param_simple(13)
  bytes += param_simple(name)
  bytes += param_simple(items)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file_get_handle(name, handle, write) ⇒ Object

Get handle from filename

Parameters:

  • name (PAR8)

    (in) First character in file name (character string)

  • handle (PAR16)

    (out) Handle to file

  • write (PAR8)

    (out) Open for write / append (0 = no, 1 = yes)



6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
# File 'lib/lignite/ev3_ops.rb', line 6927

def file_get_handle(name, handle, write)
  logger.debug do
    args = [name, handle, write]
    "called file_get_handle with #{args.inspect}"
  end

  bytes = u8(0xC0)
  bytes += param_simple(9)
  bytes += param_simple(name)
  bytes += param_simple(handle)
  bytes += param_simple(write)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file_get_image(name, prgid, item, ip) ⇒ Object

Parameters:

  • name (PAR8)

    (in) First character in name (character string)

  • prgid (PAR16)

    (in) Program id

  • item (PAR8)

    (in) Sub folder index [1..ITEMS]

  • ip (PAR32)

    (out) Address of image



7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
# File 'lib/lignite/ev3_ops.rb', line 7111

def file_get_image(name, prgid, item, ip)
  logger.debug do
    args = [name, prgid, item, ip]
    "called file_get_image with #{args.inspect}"
  end

  bytes = u8(0xC0)
  bytes += param_simple(18)
  bytes += param_simple(name)
  bytes += param_simple(prgid)
  bytes += param_simple(item)
  bytes += param_simple(ip)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file_get_item(name, string, item) ⇒ Object

Parameters:

  • name (PAR8)

    (in) First character in name (character string)

  • string (PAR8)

    (in) First character in item name string

  • item (PAR8)

    (out) Sub folder index [1..ITEMS]



7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
# File 'lib/lignite/ev3_ops.rb', line 7133

def file_get_item(name, string, item)
  logger.debug do
    args = [name, string, item]
    "called file_get_item with #{args.inspect}"
  end

  bytes = u8(0xC0)
  bytes += param_simple(19)
  bytes += param_simple(name)
  bytes += param_simple(string)
  bytes += param_simple(item)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file_get_log_name(length, name) ⇒ Object

Get the current open log filename

Parameters:

  • length (PAR8)

    (in) Max string length (don’t care if NAME is a HND)

  • name (PAR8)

    (in) First First character in file name (character string or HND)



7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
# File 'lib/lignite/ev3_ops.rb', line 7244

def file_get_log_name(length, name)
  logger.debug do
    args = [length, name]
    "called file_get_log_name with #{args.inspect}"
  end

  bytes = u8(0xC0)
  bytes += param_simple(25)
  bytes += param_simple(length)
  bytes += param_simple(name)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file_get_log_sync_time(time, tick) ⇒ Object

Parameters:

  • time (PAR32)

    (out) Sync time used in data log files

  • tick (PAR32)

    (out) Sync tick used in data log files



7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
# File 'lib/lignite/ev3_ops.rb', line 7025

def file_get_log_sync_time(time, tick)
  logger.debug do
    args = [time, tick]
    "called file_get_log_sync_time with #{args.inspect}"
  end

  bytes = u8(0xC0)
  bytes += param_simple(14)
  bytes += param_simple(time)
  bytes += param_simple(tick)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file_get_pool(size, handle, ip) ⇒ Object

Parameters:

  • size (PAR32)

    (in) Size of pool

  • handle (PAR16)

    (out) Handle to file

  • ip (PAR32)

    (out) Address of image



6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
# File 'lib/lignite/ev3_ops.rb', line 6967

def file_get_pool(size, handle, ip)
  logger.debug do
    args = [size, handle, ip]
    "called file_get_pool with #{args.inspect}"
  end

  bytes = u8(0xC0)
  bytes += param_simple(11)
  bytes += param_simple(size)
  bytes += param_simple(handle)
  bytes += param_simple(ip)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file_get_subfolder_name(name, item, length, string) ⇒ Object

Parameters:

  • name (PAR8)

    (in) First character in folder name (ex “../prjs/”)

  • item (PAR8)

    (in) Sub folder index [1..ITEMS]

  • length (PAR8)

    (in) Maximal string length

  • string (PAR8)

    (out) First character in character string



7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
# File 'lib/lignite/ev3_ops.rb', line 7046

def file_get_subfolder_name(name, item, length, string)
  logger.debug do
    args = [name, item, length, string]
    "called file_get_subfolder_name with #{args.inspect}"
  end

  bytes = u8(0xC0)
  bytes += param_simple(15)
  bytes += param_simple(name)
  bytes += param_simple(item)
  bytes += param_simple(length)
  bytes += param_simple(string)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file_load_image(prgid, name, size, ip) ⇒ Object

Parameters:

  • prgid (PAR16)

    (in) Program id

  • name (PAR8)

    (in) First character in name (character string)

  • size (PAR32)

    (out) Size

  • ip (PAR32)

    (out) Address of image



6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
# File 'lib/lignite/ev3_ops.rb', line 6905

def file_load_image(prgid, name, size, ip)
  logger.debug do
    args = [prgid, name, size, ip]
    "called file_load_image with #{args.inspect}"
  end

  bytes = u8(0xC0)
  bytes += param_simple(8)
  bytes += param_simple(prgid)
  bytes += param_simple(name)
  bytes += param_simple(size)
  bytes += param_simple(ip)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file_make_folder(name, success) ⇒ Object

Make folder if not present

Parameters:

  • name (PAR8)

    (in) First character in folder name (character string)

  • success (PAR8)

    (out) Success (0 = no, 1 = yes)



6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
# File 'lib/lignite/ev3_ops.rb', line 6947

def file_make_folder(name, success)
  logger.debug do
    args = [name, success]
    "called file_make_folder with #{args.inspect}"
  end

  bytes = u8(0xC0)
  bytes += param_simple(10)
  bytes += param_simple(name)
  bytes += param_simple(success)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file_md5sum(name, md5sum, success) ⇒ Object

Get md5 sum of a file

Parameters:

  • name (PAR8)

    (in) First character in file name (character string)

  • md5sum (PAR8)

    (out) First byte in md5 sum (byte array)

  • success (PAR8)

    (out) Success flag (0 = no, 1 = yes)



9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
# File 'lib/lignite/ev3_ops.rb', line 9206

def file_md5sum(name, md5sum, success)
  logger.debug do
    args = [name, md5sum, success]
    "called file_md5sum with #{args.inspect}"
  end

  bytes = u8(0xE6)
  bytes += param_simple(name)
  bytes += param_simple(md5sum)
  bytes += param_simple(success)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file_move(source, dest) ⇒ Object

Move file SOURCE to DEST

Parameters:

  • source (PAR8)

    (in) First character in source file name (character string)

  • dest (PAR8)

    (in) First character in destination file name (character string)



7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
# File 'lib/lignite/ev3_ops.rb', line 7353

def file_move(source, dest)
  logger.debug do
    args = [source, dest]
    "called file_move with #{args.inspect}"
  end

  bytes = u8(0xC0)
  bytes += param_simple(31)
  bytes += param_simple(source)
  bytes += param_simple(dest)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file_open_append(name, handle) ⇒ Object

Create file or open for append

Parameters:

  • name (PAR8)

    (in) First character in file name (character string)

  • handle (PAR16)

    (out) Handle to file



6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
# File 'lib/lignite/ev3_ops.rb', line 6737

def file_open_append(name, handle)
  logger.debug do
    args = [name, handle]
    "called file_open_append with #{args.inspect}"
  end

  bytes = u8(0xC0)
  bytes += param_simple(0)
  bytes += param_simple(name)
  bytes += param_simple(handle)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file_open_log(name, syncedtime, syncedtick, nowtick, sample_interval_in_ms, duration_in_ms, sdata, handle) ⇒ Object

Create file for data logging

Parameters:

  • name (PAR8)

    (in) First character in file name (character string)

  • syncedtime (PAR32)

    (in)

  • syncedtick (PAR32)

    (in)

  • nowtick (PAR32)

    (in)

  • sample_interval_in_ms (PAR32)

    (in)

  • duration_in_ms (PAR32)

    (in)

  • sdata (PAR8)

    (in) First character in sensor type data (character string)

  • handle (PAR16)

    (out) Handle to file



7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
# File 'lib/lignite/ev3_ops.rb', line 7269

def file_open_log(name, syncedtime, syncedtick, nowtick, sample_interval_in_ms, duration_in_ms, sdata, handle)
  logger.debug do
    args = [name, syncedtime, syncedtick, nowtick, sample_interval_in_ms, duration_in_ms, sdata, handle]
    "called file_open_log with #{args.inspect}"
  end

  bytes = u8(0xC0)
  bytes += param_simple(27)
  bytes += param_simple(name)
  bytes += param_simple(syncedtime)
  bytes += param_simple(syncedtick)
  bytes += param_simple(nowtick)
  bytes += param_simple(sample_interval_in_ms)
  bytes += param_simple(duration_in_ms)
  bytes += param_simple(sdata)
  bytes += param_simple(handle)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file_open_read(name, handle, size) ⇒ Object

Open file for read

Parameters:

  • name (PAR8)

    (in) First character in file name (character string)

  • handle (PAR16)

    (out) Handle to file

  • size (PAR32)

    (out) File size (0 = not found)



6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
# File 'lib/lignite/ev3_ops.rb', line 6757

def file_open_read(name, handle, size)
  logger.debug do
    args = [name, handle, size]
    "called file_open_read with #{args.inspect}"
  end

  bytes = u8(0xC0)
  bytes += param_simple(1)
  bytes += param_simple(name)
  bytes += param_simple(handle)
  bytes += param_simple(size)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file_open_write(name, handle) ⇒ Object

Create file for write

Parameters:

  • name (PAR8)

    (in) First character in file name (character string)

  • handle (PAR16)

    (out) Handle to file



6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
# File 'lib/lignite/ev3_ops.rb', line 6777

def file_open_write(name, handle)
  logger.debug do
    args = [name, handle]
    "called file_open_write with #{args.inspect}"
  end

  bytes = u8(0xC0)
  bytes += param_simple(2)
  bytes += param_simple(name)
  bytes += param_simple(handle)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file_put_cache_file(string) ⇒ Object

Parameters:

  • string (PAR8)

    (in) First character in character string



7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
# File 'lib/lignite/ev3_ops.rb', line 7169

def file_put_cache_file(string)
  logger.debug do
    args = [string]
    "called file_put_cache_file with #{args.inspect}"
  end

  bytes = u8(0xC0)
  bytes += param_simple(21)
  bytes += param_simple(string)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file_read_bytes(handle, bytes, destination) ⇒ Object

Read a number of bytes from file

Parameters:

  • handle (PAR16)

    (in) Handle to file

  • bytes (PAR16)

    (in) Number of bytes to read

  • destination (PAR8)

    (out) First byte in byte stream



7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
# File 'lib/lignite/ev3_ops.rb', line 7295

def file_read_bytes(handle, bytes, destination)
  logger.debug do
    args = [handle, bytes, destination]
    "called file_read_bytes with #{args.inspect}"
  end

  bytes = u8(0xC0)
  bytes += param_simple(28)
  bytes += param_simple(handle)
  bytes += param_simple(bytes)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file_read_text(handle, del, length, text) ⇒ Object

Read text from file

Parameters:

  • handle (PAR16)

    (in) Handle to file

  • del (PAR8)

    (in) Delimiter code

  • length (PAR16)

    (in) Maximal string length

  • text (PAR8)

    (out) First character in text to read (character string)



6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
# File 'lib/lignite/ev3_ops.rb', line 6844

def file_read_text(handle, del, length, text)
  logger.debug do
    args = [handle, del, length, text]
    "called file_read_text with #{args.inspect}"
  end

  bytes = u8(0xC0)
  bytes += param_simple(5)
  bytes += param_simple(handle)
  bytes += param_simple(del)
  bytes += param_simple(length)
  bytes += param_simple(text)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file_read_value(handle, del, value) ⇒ Object

Read floating point value from file

Parameters:

  • handle (PAR16)

    (in) Handle to file

  • del (PAR8)

    (in) Delimiter code

  • value (PARF)

    (out) Value read



6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
# File 'lib/lignite/ev3_ops.rb', line 6797

def file_read_value(handle, del, value)
  logger.debug do
    args = [handle, del, value]
    "called file_read_value with #{args.inspect}"
  end

  bytes = u8(0xC0)
  bytes += param_simple(3)
  bytes += param_simple(handle)
  bytes += param_simple(del)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file_remove(name) ⇒ Object

Delete file

Parameters:

  • name (PAR8)

    (in) First character in file name (character string)



7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
# File 'lib/lignite/ev3_ops.rb', line 7335

def file_remove(name)
  logger.debug do
    args = [name]
    "called file_remove with #{args.inspect}"
  end

  bytes = u8(0xC0)
  bytes += param_simple(30)
  bytes += param_simple(name)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file_set_log_sync_time(time, tick) ⇒ Object

Parameters:

  • time (PAR32)

    (in) Sync time used in data log files

  • tick (PAR32)

    (in) Sync tick used in data log files



6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
# File 'lib/lignite/ev3_ops.rb', line 6987

def file_set_log_sync_time(time, tick)
  logger.debug do
    args = [time, tick]
    "called file_set_log_sync_time with #{args.inspect}"
  end

  bytes = u8(0xC0)
  bytes += param_simple(12)
  bytes += param_simple(time)
  bytes += param_simple(tick)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file_write_bytes(handle, bytes, source) ⇒ Object

Write a number of bytes to file

Parameters:

  • handle (PAR16)

    (in) Handle to file

  • bytes (PAR16)

    (in) Number of bytes to write

  • source (PAR8)

    (in) First byte in byte stream to write



7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
# File 'lib/lignite/ev3_ops.rb', line 7316

def file_write_bytes(handle, bytes, source)
  logger.debug do
    args = [handle, bytes, source]
    "called file_write_bytes with #{args.inspect}"
  end

  bytes = u8(0xC0)
  bytes += param_simple(29)
  bytes += param_simple(handle)
  bytes += param_simple(bytes)
  bytes += param_simple(source)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file_write_log(handle, time, items, values) ⇒ Object

Write time slot samples to file

Parameters:

  • handle (PAR16)

    (in) Handle to file

  • time (PAR32)

    (in) Relative time in mS

  • items (PAR8)

    (in) Total number of values in this time slot

  • values (PARF)

    (in) DATAF array (handle) containing values



7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
# File 'lib/lignite/ev3_ops.rb', line 7069

def file_write_log(handle, time, items, values)
  logger.debug do
    args = [handle, time, items, values]
    "called file_write_log with #{args.inspect}"
  end

  bytes = u8(0xC0)
  bytes += param_simple(16)
  bytes += param_simple(handle)
  bytes += param_simple(time)
  bytes += param_simple(items)
  bytes += param_simple(values)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file_write_text(handle, del, text) ⇒ Object

Write text to file

Parameters:

  • handle (PAR16)

    (in) Handle to file

  • del (PAR8)

    (in) Delimiter code

  • text (PAR8)

    (in) First character in text to write (character string)



6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
# File 'lib/lignite/ev3_ops.rb', line 6866

def file_write_text(handle, del, text)
  logger.debug do
    args = [handle, del, text]
    "called file_write_text with #{args.inspect}"
  end

  bytes = u8(0xC0)
  bytes += param_simple(6)
  bytes += param_simple(handle)
  bytes += param_simple(del)
  bytes += param_simple(text)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#file_write_value(handle, del, value, figures, decimals) ⇒ Object

Write floating point value to file

Parameters:

  • handle (PAR16)

    (in) Handle to file

  • del (PAR8)

    (in) Delimiter code

  • value (PARF)

    (in) Value to write

  • figures (PAR8)

    (in) Total number of figures inclusive decimal point

  • decimals (PAR8)

    (in) Number of decimals



6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
# File 'lib/lignite/ev3_ops.rb', line 6820

def file_write_value(handle, del, value, figures, decimals)
  logger.debug do
    args = [handle, del, value, figures, decimals]
    "called file_write_value with #{args.inspect}"
  end

  bytes = u8(0xC0)
  bytes += param_simple(4)
  bytes += param_simple(handle)
  bytes += param_simple(del)
  bytes += param_simple(value)
  bytes += param_simple(figures)
  bytes += param_simple(decimals)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#filename(*args) ⇒ Object



8045
8046
8047
8048
8049
8050
# File 'lib/lignite/ev3_ops.rb', line 8045

def filename(*args)
  logger.debug "called filename with #{args.inspect}"
  cvalue = args.shift
  csym = MULTIPLEX_FILENAME.fetch(cvalue)
  __send__("filename_#{csym}", *args)
end

#filename_check(filename, ok) ⇒ Object

Check filename

Parameters:

  • filename (PAR8)

    (in) First character in file name (character string)

  • ok (PAR8)

    (out) Filename ok (0 = FAIL, 1 = OK)



7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
# File 'lib/lignite/ev3_ops.rb', line 7967

def filename_check(filename, ok)
  logger.debug do
    args = [filename, ok]
    "called filename_check with #{args.inspect}"
  end

  bytes = u8(0xC6)
  bytes += param_simple(20)
  bytes += param_simple(filename)
  bytes += param_simple(ok)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#filename_exist(name, flag) ⇒ Object

Test if file exists

Parameters:

  • name (PAR8)

    (in) First character in file name (character string)

  • flag (PAR8)

    (out) Exist (0 = no, 1 = yes)



7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
# File 'lib/lignite/ev3_ops.rb', line 7877

def filename_exist(name, flag)
  logger.debug do
    args = [name, flag]
    "called filename_exist with #{args.inspect}"
  end

  bytes = u8(0xC6)
  bytes += param_simple(16)
  bytes += param_simple(name)
  bytes += param_simple(flag)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#filename_get_foldername(length, foldername) ⇒ Object

Get current folder name

Parameters:

  • length (PAR8)

    (in) Maximal length for the below parameter

  • foldername (PAR8)

    (out) First character in folder name (character string)



8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
# File 'lib/lignite/ev3_ops.rb', line 8020

def filename_get_foldername(length, foldername)
  logger.debug do
    args = [length, foldername]
    "called filename_get_foldername with #{args.inspect}"
  end

  bytes = u8(0xC6)
  bytes += param_simple(23)
  bytes += param_simple(length)
  bytes += param_simple(foldername)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#filename_merge(folder, name, ext, length, filename) ⇒ Object

Merge Folder, name, extension into filename

Parameters:

  • folder (PAR8)

    (in) First character in folder name (character string)

  • name (PAR8)

    (in) First character in name (character string)

  • ext (PAR8)

    (in) First character in extension (character string)

  • length (PAR8)

    (in) Maximal length for the below parameter

  • filename (PAR8)

    (out) First character in file name (character string)



7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
# File 'lib/lignite/ev3_ops.rb', line 7945

def filename_merge(folder, name, ext, length, filename)
  logger.debug do
    args = [folder, name, ext, length, filename]
    "called filename_merge with #{args.inspect}"
  end

  bytes = u8(0xC6)
  bytes += param_simple(19)
  bytes += param_simple(folder)
  bytes += param_simple(name)
  bytes += param_simple(ext)
  bytes += param_simple(length)
  bytes += param_simple(filename)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#filename_pack(filename) ⇒ Object

Pack file or folder into “raf” container

Parameters:

  • filename (PAR8)

    (in) First character in file name (character string)



7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
# File 'lib/lignite/ev3_ops.rb', line 7985

def filename_pack(filename)
  logger.debug do
    args = [filename]
    "called filename_pack with #{args.inspect}"
  end

  bytes = u8(0xC6)
  bytes += param_simple(21)
  bytes += param_simple(filename)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#filename_split(filename, length, folder, name, ext) ⇒ Object

Split filename into Folder, name, extension

Parameters:

  • filename (PAR8)

    (in) First character in file name (character string)

  • length (PAR8)

    (in) Maximal length for each of the below parameters

  • folder (PAR8)

    (out) First character in folder name (character string)

  • name (PAR8)

    (out) First character in name (character string)

  • ext (PAR8)

    (out) First character in extension (character string)



7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
# File 'lib/lignite/ev3_ops.rb', line 7920

def filename_split(filename, length, folder, name, ext)
  logger.debug do
    args = [filename, length, folder, name, ext]
    "called filename_split with #{args.inspect}"
  end

  bytes = u8(0xC6)
  bytes += param_simple(18)
  bytes += param_simple(filename)
  bytes += param_simple(length)
  bytes += param_simple(folder)
  bytes += param_simple(name)
  bytes += param_simple(ext)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#filename_totalsize(name, files, size) ⇒ Object

Calculate folder/file size

Parameters:

  • name (PAR8)

    (in) First character in file name (character string)

  • files (PAR32)

    (out) Total number of files

  • size (PAR32)

    (out) Total folder size [KB]



7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
# File 'lib/lignite/ev3_ops.rb', line 7897

def filename_totalsize(name, files, size)
  logger.debug do
    args = [name, files, size]
    "called filename_totalsize with #{args.inspect}"
  end

  bytes = u8(0xC6)
  bytes += param_simple(17)
  bytes += param_simple(name)
  bytes += param_simple(files)
  bytes += param_simple(size)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#filename_unpack(filename) ⇒ Object

Unpack “raf” container

Parameters:

  • filename (PAR8)

    (in) First character in file name (character string)



8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
# File 'lib/lignite/ev3_ops.rb', line 8002

def filename_unpack(filename)
  logger.debug do
    args = [filename]
    "called filename_unpack with #{args.inspect}"
  end

  bytes = u8(0xC6)
  bytes += param_simple(22)
  bytes += param_simple(filename)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#info(*args) ⇒ Object



2349
2350
2351
2352
2353
2354
# File 'lib/lignite/ev3_ops.rb', line 2349

def info(*args)
  logger.debug "called info with #{args.inspect}"
  cvalue = args.shift
  csym = MULTIPLEX_INFO.fetch(cvalue)
  __send__("info_#{csym}", *args)
end

#info_errortext(number, length, destination) ⇒ Object

Convert error number to text string

Parameters:

  • number (PAR8)

    (in) Error number

  • length (PAR8)

    (in) Maximal length of string returned (-1 = no check)

  • destination (PAR8)

    (out) String variable or handle to string



2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
# File 'lib/lignite/ev3_ops.rb', line 2256

def info_errortext(number, length, destination)
  logger.debug do
    args = [number, length, destination]
    "called info_errortext with #{args.inspect}"
  end

  bytes = u8(0x7C)
  bytes += param_simple(3)
  bytes += param_simple(number)
  bytes += param_simple(length)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#info_get_error(number) ⇒ Object

Parameters:

  • number (PAR8)

    (out) Error number



2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
# File 'lib/lignite/ev3_ops.rb', line 2237

def info_get_error(number)
  logger.debug do
    args = [number]
    "called info_get_error with #{args.inspect}"
  end

  bytes = u8(0x7C)
  bytes += param_simple(2)
  bytes += param_simple(number)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#info_get_minutes(value) ⇒ Object

Parameters:

  • value (PAR8)

    (out) Minutes to sleep [0..120min] (0 = never)



2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
# File 'lib/lignite/ev3_ops.rb', line 2309

def info_get_minutes(value)
  logger.debug do
    args = [value]
    "called info_get_minutes with #{args.inspect}"
  end

  bytes = u8(0x7C)
  bytes += param_simple(6)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#info_get_volume(value) ⇒ Object

Parameters:

  • value (PAR8)

    (out) Volume [0..100%]



2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
# File 'lib/lignite/ev3_ops.rb', line 2275

def info_get_volume(value)
  logger.debug do
    args = [value]
    "called info_get_volume with #{args.inspect}"
  end

  bytes = u8(0x7C)
  bytes += param_simple(4)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#info_set_error(number) ⇒ Object

Parameters:

  • number (PAR8)

    (in) Error number



2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
# File 'lib/lignite/ev3_ops.rb', line 2220

def info_set_error(number)
  logger.debug do
    args = [number]
    "called info_set_error with #{args.inspect}"
  end

  bytes = u8(0x7C)
  bytes += param_simple(1)
  bytes += param_simple(number)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#info_set_minutes(value) ⇒ Object

Parameters:

  • value (PAR8)

    (in) Minutes to sleep [0..120min] (0 = never)



2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
# File 'lib/lignite/ev3_ops.rb', line 2326

def info_set_minutes(value)
  logger.debug do
    args = [value]
    "called info_set_minutes with #{args.inspect}"
  end

  bytes = u8(0x7C)
  bytes += param_simple(7)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#info_set_volume(value) ⇒ Object

Parameters:

  • value (PAR8)

    (in) Volume [0..100%]



2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
# File 'lib/lignite/ev3_ops.rb', line 2292

def info_set_volume(value)
  logger.debug do
    args = [value]
    "called info_set_volume with #{args.inspect}"
  end

  bytes = u8(0x7C)
  bytes += param_simple(5)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#init_bytes(destination, length, *source) ⇒ Object

Move LENGTH number of DATA8 from BYTE STREAM to memory DESTINATION START

Parameters:

  • destination (PAR8)

    (out) First element in DATA8 array to be initiated

  • length (PAR32)

    (in) Number of elements to initiate

  • source (PARVALUES)

    (in) First element to initiate DATA8 array with



869
870
871
872
873
874
875
876
877
878
879
880
881
# File 'lib/lignite/ev3_ops.rb', line 869

def init_bytes(destination, length, *source)
  logger.debug do
    args = [destination, length, *source]
    "called init_bytes with #{args.inspect}"
  end

  bytes = u8(0x2F)
  bytes += param_simple(destination)
  bytes += param_simple(length)
  bytes += param_multiple(*source)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_device(*args) ⇒ Object



6192
6193
6194
6195
6196
6197
# File 'lib/lignite/ev3_ops.rb', line 6192

def input_device(*args)
  logger.debug "called input_device with #{args.inspect}"
  cvalue = args.shift
  csym = MULTIPLEX_INPUT_DEVICE.fetch(cvalue)
  __send__("input_device_#{csym}", *args)
end

#input_device_cal_default(type, mode) ⇒ Object

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

Parameters:

  • type (PAR8)

    (in) Device type id from typedata.rcf

  • mode (PAR8)

    (in) Device mode [0..7]



5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
# File 'lib/lignite/ev3_ops.rb', line 5646

def input_device_cal_default(type, mode)
  logger.debug do
    args = [type, mode]
    "called input_device_cal_default with #{args.inspect}"
  end

  bytes = u8(0x99)
  bytes += param_simple(4)
  bytes += param_simple(type)
  bytes += param_simple(mode)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_device_cal_max(type, mode, cal_max) ⇒ Object

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

Parameters:

  • type (PAR8)

    (in) Device type id from typedata.rcf

  • mode (PAR8)

    (in) Device mode [0..7]

  • cal_max (PAR32)

    (in) 32 bit SI maximum value (Full scale)



5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
# File 'lib/lignite/ev3_ops.rb', line 5733

def input_device_cal_max(type, mode, cal_max)
  logger.debug do
    args = [type, mode, cal_max]
    "called input_device_cal_max with #{args.inspect}"
  end

  bytes = u8(0x99)
  bytes += param_simple(8)
  bytes += param_simple(type)
  bytes += param_simple(mode)
  bytes += param_simple(cal_max)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_device_cal_min(type, mode, cal_min) ⇒ Object

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

Parameters:

  • type (PAR8)

    (in) Device type id from typedata.rcf

  • mode (PAR8)

    (in) Device mode [0..7]

  • cal_min (PAR32)

    (in) 32 bit raw minimum value (Zero)



5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
# File 'lib/lignite/ev3_ops.rb', line 5712

def input_device_cal_min(type, mode, cal_min)
  logger.debug do
    args = [type, mode, cal_min]
    "called input_device_cal_min with #{args.inspect}"
  end

  bytes = u8(0x99)
  bytes += param_simple(7)
  bytes += param_simple(type)
  bytes += param_simple(mode)
  bytes += param_simple(cal_min)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_device_cal_minmax(type, mode, cal_min, cal_max) ⇒ Object

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

Parameters:

  • type (PAR8)

    (in) Device type id from typedata.rcf

  • mode (PAR8)

    (in) Device mode [0..7]

  • cal_min (PAR32)

    (in) 32 bit raw minimum value (Zero)

  • cal_max (PAR32)

    (in) 32 bit raw maximum value (Full scale)



5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
# File 'lib/lignite/ev3_ops.rb', line 5625

def input_device_cal_minmax(type, mode, cal_min, cal_max)
  logger.debug do
    args = [type, mode, cal_min, cal_max]
    "called input_device_cal_minmax with #{args.inspect}"
  end

  bytes = u8(0x99)
  bytes += param_simple(3)
  bytes += param_simple(type)
  bytes += param_simple(mode)
  bytes += param_simple(cal_min)
  bytes += param_simple(cal_max)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_device_clr_all(layer) ⇒ Object

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

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]



5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
# File 'lib/lignite/ev3_ops.rb', line 5783

def input_device_clr_all(layer)
  logger.debug do
    args = [layer]
    "called input_device_clr_all with #{args.inspect}"
  end

  bytes = u8(0x99)
  bytes += param_simple(10)
  bytes += param_simple(layer)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_device_clr_changes(layer, no) ⇒ Object

Clear changes and bumps

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • no (PAR8)

    (in) Port number



6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
# File 'lib/lignite/ev3_ops.rb', line 6030

def input_device_clr_changes(layer, no)
  logger.debug do
    args = [layer, no]
    "called input_device_clr_changes with #{args.inspect}"
  end

  bytes = u8(0x99)
  bytes += param_simple(26)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_device_get_bumps(layer, no, value) ⇒ Object

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • no (PAR8)

    (in) Port number

  • value (PARF)

    (out) Negative changes since last clear



6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
# File 'lib/lignite/ev3_ops.rb', line 6148

def input_device_get_bumps(layer, no, value)
  logger.debug do
    args = [layer, no, value]
    "called input_device_get_bumps with #{args.inspect}"
  end

  bytes = u8(0x99)
  bytes += param_simple(31)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_device_get_changes(layer, no, value) ⇒ Object

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • no (PAR8)

    (in) Port number

  • value (PARF)

    (out) Positive changes since last clear



6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
# File 'lib/lignite/ev3_ops.rb', line 6010

def input_device_get_changes(layer, no, value)
  logger.debug do
    args = [layer, no, value]
    "called input_device_get_changes with #{args.inspect}"
  end

  bytes = u8(0x99)
  bytes += param_simple(25)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_device_get_connection(layer, no, conn) ⇒ Object

Get device connection type (for test)

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • no (PAR8)

    (in) Port number

  • conn (PAR8)

    (out) Connection type



5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
# File 'lib/lignite/ev3_ops.rb', line 5823

def input_device_get_connection(layer, no, conn)
  logger.debug do
    args = [layer, no, conn]
    "called input_device_get_connection with #{args.inspect}"
  end

  bytes = u8(0x99)
  bytes += param_simple(12)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  bytes += param_simple(conn)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_device_get_figures(layer, no, figures, decimals) ⇒ Object

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • no (PAR8)

    (in) Port number

  • figures (PAR8)

    (out) Total number of figures (inclusive decimal point and decimals)

  • decimals (PAR8)

    (out) Number of decimals



5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
# File 'lib/lignite/ev3_ops.rb', line 5988

def input_device_get_figures(layer, no, figures, decimals)
  logger.debug do
    args = [layer, no, figures, decimals]
    "called input_device_get_figures with #{args.inspect}"
  end

  bytes = u8(0x99)
  bytes += param_simple(24)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  bytes += param_simple(figures)
  bytes += param_simple(decimals)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_device_get_format(layer, no, datasets, format, modes, views) ⇒ Object

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • no (PAR8)

    (in) Port number

  • datasets (PAR8)

    (out) Number of data sets

  • format (PAR8)

    (out) Format [0..3]

  • modes (PAR8)

    (out) Number of modes [1..8]

  • views (PAR8)

    (out) Number of views [1..8]



5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
# File 'lib/lignite/ev3_ops.rb', line 5600

def input_device_get_format(layer, no, datasets, format, modes, views)
  logger.debug do
    args = [layer, no, datasets, format, modes, views]
    "called input_device_get_format with #{args.inspect}"
  end

  bytes = u8(0x99)
  bytes += param_simple(2)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  bytes += param_simple(datasets)
  bytes += param_simple(format)
  bytes += param_simple(modes)
  bytes += param_simple(views)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_device_get_minmax(layer, no, min, max) ⇒ Object

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • no (PAR8)

    (in) Port number

  • min (PARF)

    (out) Min SI value

  • max (PARF)

    (out) Max SI value



6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
# File 'lib/lignite/ev3_ops.rb', line 6126

def input_device_get_minmax(layer, no, min, max)
  logger.debug do
    args = [layer, no, min, max]
    "called input_device_get_minmax with #{args.inspect}"
  end

  bytes = u8(0x99)
  bytes += param_simple(30)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  bytes += param_simple(min)
  bytes += param_simple(max)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_device_get_modename(layer, no, mode, length, destination) ⇒ Object

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • no (PAR8)

    (in) Port number

  • mode (PAR8)

    (in) Mode

  • length (PAR8)

    (in) Maximal length of string returned (-1 = no check)

  • destination (PAR8)

    (out) String variable or handle to string



5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
# File 'lib/lignite/ev3_ops.rb', line 5941

def input_device_get_modename(layer, no, mode, length, destination)
  logger.debug do
    args = [layer, no, mode, length, destination]
    "called input_device_get_modename with #{args.inspect}"
  end

  bytes = u8(0x99)
  bytes += param_simple(22)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  bytes += param_simple(mode)
  bytes += param_simple(length)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_device_get_name(layer, no, length, destination) ⇒ Object

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • no (PAR8)

    (in) Port number

  • length (PAR8)

    (in) Maximal length of string returned (-1 = no check)

  • destination (PAR8)

    (out) String variable or handle to string



5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
# File 'lib/lignite/ev3_ops.rb', line 5917

def input_device_get_name(layer, no, length, destination)
  logger.debug do
    args = [layer, no, length, destination]
    "called input_device_get_name with #{args.inspect}"
  end

  bytes = u8(0x99)
  bytes += param_simple(21)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  bytes += param_simple(length)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_device_get_raw(layer, no, value) ⇒ Object

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • no (PAR8)

    (in) Port number

  • value (PAR32)

    (out) 32 bit raw value



5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
# File 'lib/lignite/ev3_ops.rb', line 5802

def input_device_get_raw(layer, no, value)
  logger.debug do
    args = [layer, no, value]
    "called input_device_get_raw with #{args.inspect}"
  end

  bytes = u8(0x99)
  bytes += param_simple(11)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_device_get_symbol(layer, no, length, destination) ⇒ Object

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • no (PAR8)

    (in) Port number

  • length (PAR8)

    (in) Maximal length of string returned (-1 = no check)

  • destination (PAR8)

    (out) String variable or handle to string



5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
# File 'lib/lignite/ev3_ops.rb', line 5690

def input_device_get_symbol(layer, no, length, destination)
  logger.debug do
    args = [layer, no, length, destination]
    "called input_device_get_symbol with #{args.inspect}"
  end

  bytes = u8(0x99)
  bytes += param_simple(6)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  bytes += param_simple(length)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_device_get_typemode(layer, no, type, mode) ⇒ Object

Get device type and mode

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • no (PAR8)

    (in) Port number

  • type (PAR8)

    (out) Device type id from typedata.rcf

  • mode (PAR8)

    (out) Device mode [0..7]



5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
# File 'lib/lignite/ev3_ops.rb', line 5667

def input_device_get_typemode(layer, no, type, mode)
  logger.debug do
    args = [layer, no, type, mode]
    "called input_device_get_typemode with #{args.inspect}"
  end

  bytes = u8(0x99)
  bytes += param_simple(5)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  bytes += param_simple(type)
  bytes += param_simple(mode)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_device_insert_type(typedata, force, error) ⇒ Object

Insert type in table

Parameters:

  • typedata (PAR8)

    (in) String variable or handle to string containing type data

  • force (PAR8)

    (in) Force type insert even if present (0 = don’t force, 1 = force)

  • error (PAR8)

    (out) Error if not Third Party type (0 = no error, 1 = error or known)



5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
# File 'lib/lignite/ev3_ops.rb', line 5576

def input_device_insert_type(typedata, force, error)
  logger.debug do
    args = [typedata, force, error]
    "called input_device_insert_type with #{args.inspect}"
  end

  bytes = u8(0x99)
  bytes += param_simple(1)
  bytes += param_simple(typedata)
  bytes += param_simple(force)
  bytes += param_simple(error)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_device_list(length, array, changed) ⇒ Object

Read all available devices on input and output(chain)

Parameters:

  • length (PAR8)

    (in) Maximum number of device types (normally 32)

  • array (PAR8)

    (out) First element of DATA8 array of types (normally 32)

  • changed (PAR8)

    (out) Changed status



5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
# File 'lib/lignite/ev3_ops.rb', line 5555

def input_device_list(length, array, changed)
  logger.debug do
    args = [length, array, changed]
    "called input_device_list with #{args.inspect}"
  end

  bytes = u8(0x98)
  bytes += param_simple(length)
  bytes += param_simple(array)
  bytes += param_simple(changed)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_device_ready_iic(layer, no, wrlng, wrdata, rdlng, rddata, result) ⇒ Object

Generic setup/read IIC sensors with result

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • no (PAR8)

    (in) Port number

  • wrlng (PAR8)

    (in) No of bytes to write

  • wrdata (PAR8)

    (in) DATA8 array (handle) of data to write

  • rdlng (PAR8)

    (in) No of bytes to read (if negative -> byte order is reversed)

  • rddata (PAR8)

    (out) DATA8 array (handle) to read into

  • result (PAR8)

    (out) Write/read result (OK, FAIL)



5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
# File 'lib/lignite/ev3_ops.rb', line 5891

def input_device_ready_iic(layer, no, wrlng, wrdata, rdlng, rddata, result)
  logger.debug do
    args = [layer, no, wrlng, wrdata, rdlng, rddata, result]
    "called input_device_ready_iic with #{args.inspect}"
  end

  bytes = u8(0x99)
  bytes += param_simple(15)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  bytes += param_simple(wrlng)
  bytes += param_simple(wrdata)
  bytes += param_simple(rdlng)
  bytes += param_simple(rddata)
  bytes += param_simple(result)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_device_ready_pct(layer, no, type, mode, *values) ⇒ Object

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • no (PAR8)

    (in) Port number

  • type (PAR8)

    (in) Device type id (0 = don’t change type)

  • mode (PAR8)

    (in) Device mode [0..7] (-1 = don’t change mode)

  • values (PARNO)

    (in) Number of return values



6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
# File 'lib/lignite/ev3_ops.rb', line 6052

def input_device_ready_pct(layer, no, type, mode, *values)
  logger.debug do
    args = [layer, no, type, mode, *values]
    "called input_device_ready_pct with #{args.inspect}"
  end

  bytes = u8(0x99)
  bytes += param_simple(27)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  bytes += param_simple(type)
  bytes += param_simple(mode)
  bytes += param_n_multiple(*values)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_device_ready_raw(layer, no, type, mode, *values) ⇒ Object

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • no (PAR8)

    (in) Port number

  • type (PAR8)

    (in) Device type id (0 = don’t change type)

  • mode (PAR8)

    (in) Device mode [0..7] (-1 = don’t change mode)

  • values (PARNO)

    (in) Number of return values



6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
# File 'lib/lignite/ev3_ops.rb', line 6077

def input_device_ready_raw(layer, no, type, mode, *values)
  logger.debug do
    args = [layer, no, type, mode, *values]
    "called input_device_ready_raw with #{args.inspect}"
  end

  bytes = u8(0x99)
  bytes += param_simple(28)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  bytes += param_simple(type)
  bytes += param_simple(mode)
  bytes += param_n_multiple(*values)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_device_ready_si(layer, no, type, mode, *values) ⇒ Object

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • no (PAR8)

    (in) Port number

  • type (PAR8)

    (in) Device type id (0 = don’t change type)

  • mode (PAR8)

    (in) Device mode [0..7] (-1 = don’t change mode)

  • values (PARNO)

    (in) Number of return values



6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
# File 'lib/lignite/ev3_ops.rb', line 6102

def input_device_ready_si(layer, no, type, mode, *values)
  logger.debug do
    args = [layer, no, type, mode, *values]
    "called input_device_ready_si with #{args.inspect}"
  end

  bytes = u8(0x99)
  bytes += param_simple(29)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  bytes += param_simple(type)
  bytes += param_simple(mode)
  bytes += param_n_multiple(*values)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_device_set_raw(layer, no, type, value) ⇒ Object

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • no (PAR8)

    (in) Port number

  • type (PAR8)

    (in) Device type id (0 = don’t change type)

  • value (PAR32)

    (in)



5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
# File 'lib/lignite/ev3_ops.rb', line 5965

def input_device_set_raw(layer, no, type, value)
  logger.debug do
    args = [layer, no, type, value]
    "called input_device_set_raw with #{args.inspect}"
  end

  bytes = u8(0x99)
  bytes += param_simple(23)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  bytes += param_simple(type)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_device_set_typemode(type, mode, newtype, newmode, error) ⇒ Object

Set new type and mode on existing devices

Parameters:

  • type (PAR8)

    (in) Existing type

  • mode (PAR8)

    (in) Existing mode

  • newtype (PAR8)

    (in) New type

  • newmode (PAR8)

    (in) New mode

  • error (PAR8)

    (out) Error if not Third Party type (0 = no error, 1 = error or not found)



5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
# File 'lib/lignite/ev3_ops.rb', line 5864

def input_device_set_typemode(type, mode, newtype, newmode, error)
  logger.debug do
    args = [type, mode, newtype, newmode, error]
    "called input_device_set_typemode with #{args.inspect}"
  end

  bytes = u8(0x99)
  bytes += param_simple(14)
  bytes += param_simple(type)
  bytes += param_simple(mode)
  bytes += param_simple(newtype)
  bytes += param_simple(newmode)
  bytes += param_simple(error)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_device_setup(layer, no, repeat, time, write_len, write_data, read_len, read_data) ⇒ Object

Generic setup/read IIC sensors

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • no (PAR8)

    (in) Port number

  • repeat (PAR8)

    (in) Repeat setup/read “REPEAT” times (0 = infinite)

  • time (PAR16)

    (in) Time between repeats [10..1000mS] (0 = 10)

  • write_len (PAR8)

    (in) No of bytes to write

  • write_data (PAR8)

    (in) DATA8 array (handle) of data to write

  • read_len (PAR8)

    (in) No of bytes to read

  • read_data (PAR8)

    (out) DATA8 array (handle) to read into



5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
# File 'lib/lignite/ev3_ops.rb', line 5759

def input_device_setup(layer, no, repeat, time, write_len, write_data, read_len, read_data)
  logger.debug do
    args = [layer, no, repeat, time, write_len, write_data, read_len, read_data]
    "called input_device_setup with #{args.inspect}"
  end

  bytes = u8(0x99)
  bytes += param_simple(9)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  bytes += param_simple(repeat)
  bytes += param_simple(time)
  bytes += param_simple(write_len)
  bytes += param_simple(write_data)
  bytes += param_simple(read_len)
  bytes += param_simple(read_data)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_device_stop_all(layer) ⇒ Object

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

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]



5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
# File 'lib/lignite/ev3_ops.rb', line 5842

def input_device_stop_all(layer)
  logger.debug do
    args = [layer]
    "called input_device_stop_all with #{args.inspect}"
  end

  bytes = u8(0x99)
  bytes += param_simple(13)
  bytes += param_simple(layer)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_iic_read(layer, no, rdlng, rddata, result) ⇒ Object

Read I2C data from specified port

Parameters:

  • layer (PAR8)

    (in) Chain layer number [0..3]

  • no (PAR8)

    (in) Port number

  • rdlng (PAR8)

    (in) No of bytes to read

  • rddata (PAR8)

    (out) DATA8 array (handle) to read into

  • result (PAR8)

    (out) Write/read result (OK, FAIL, BUSY, STOP)



9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
# File 'lib/lignite/ev3_ops.rb', line 9110

def input_iic_read(layer, no, rdlng, rddata, result)
  logger.debug do
    args = [layer, no, rdlng, rddata, result]
    "called input_iic_read with #{args.inspect}"
  end

  bytes = u8(0xE1)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  bytes += param_simple(rdlng)
  bytes += param_simple(rddata)
  bytes += param_simple(result)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_iic_status(layer, no, result) ⇒ Object

Read I2C status of specified port

Parameters:

  • layer (PAR8)

    (in) Chain layer number [0..3]

  • no (PAR8)

    (in) Port number

  • result (PAR8)

    (out) Current I2C bus status (OK, FAIL, BUSY, STOP)



9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
# File 'lib/lignite/ev3_ops.rb', line 9130

def input_iic_status(layer, no, result)
  logger.debug do
    args = [layer, no, result]
    "called input_iic_status with #{args.inspect}"
  end

  bytes = u8(0xE2)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  bytes += param_simple(result)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_iic_write(layer, no, wrlng, wrdata, rdlng, result) ⇒ Object

Write I2C data to specified port

Parameters:

  • layer (PAR8)

    (in) Chain layer number [0..3]

  • no (PAR8)

    (in) Port number

  • wrlng (PAR8)

    (in) No of bytes to write

  • wrdata (PAR8)

    (in) DATA8 array (handle) of data to write

  • rdlng (PAR8)

    (in) No of bytes to read

  • result (PAR8)

    (out) Write/read result (OK, FAIL, BUSY, STOP)



9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
# File 'lib/lignite/ev3_ops.rb', line 9151

def input_iic_write(layer, no, wrlng, wrdata, rdlng, result)
  logger.debug do
    args = [layer, no, wrlng, wrdata, rdlng, result]
    "called input_iic_write with #{args.inspect}"
  end

  bytes = u8(0xE3)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  bytes += param_simple(wrlng)
  bytes += param_simple(wrdata)
  bytes += param_simple(rdlng)
  bytes += param_simple(result)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_read(layer, no, type, mode, pct) ⇒ Object

Read device value in Percent

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • no (PAR8)

    (in) Port number

  • type (PAR8)

    (in) Device type id (0 = don’t change type)

  • mode (PAR8)

    (in) Device mode [0..7] (-1 = don’t change mode)

  • pct (PAR8)

    (out) Percent value from device



6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
# File 'lib/lignite/ev3_ops.rb', line 6205

def input_read(layer, no, type, mode, pct)
  logger.debug do
    args = [layer, no, type, mode, pct]
    "called input_read with #{args.inspect}"
  end

  bytes = u8(0x9A)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  bytes += param_simple(type)
  bytes += param_simple(mode)
  bytes += param_simple(pct)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_readext(layer, no, type, mode, format, *values) ⇒ Object

Read device value

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • no (PAR8)

    (in) Port number

  • type (PAR8)

    (in) Device type id (0 = don’t change type)

  • mode (PAR8)

    (in) Device mode [0..7] (-1 = don’t change mode)

  • format (PAR8)

    (in) Format (PCT, RAW, SI …)

  • values (PARNO)

    (in) Number of return values



6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
# File 'lib/lignite/ev3_ops.rb', line 6284

def input_readext(layer, no, type, mode, format, *values)
  logger.debug do
    args = [layer, no, type, mode, format, *values]
    "called input_readext with #{args.inspect}"
  end

  bytes = u8(0x9E)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  bytes += param_simple(type)
  bytes += param_simple(mode)
  bytes += param_simple(format)
  bytes += param_n_multiple(*values)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_readsi(layer, no, type, mode, si) ⇒ Object

Read device value in SI units

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • no (PAR8)

    (in) Port number

  • type (PAR8)

    (in) Device type id (0 = don’t change type)

  • mode (PAR8)

    (in) Device mode [0..7] (-1 = don’t change mode)

  • si (PARF)

    (out) SI unit value from device



6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
# File 'lib/lignite/ev3_ops.rb', line 6261

def input_readsi(layer, no, type, mode, si)
  logger.debug do
    args = [layer, no, type, mode, si]
    "called input_readsi with #{args.inspect}"
  end

  bytes = u8(0x9D)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  bytes += param_simple(type)
  bytes += param_simple(mode)
  bytes += param_simple(si)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_ready(layer, no) ⇒ Object

Wait for device ready (wait for valid data)

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • no (PAR8)

    (in) Port number



6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
# File 'lib/lignite/ev3_ops.rb', line 6242

def input_ready(layer, no)
  logger.debug do
    args = [layer, no]
    "called input_ready with #{args.inspect}"
  end

  bytes = u8(0x9C)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_sample(time, samples, init, devices, types, modes, datasets, values) ⇒ Object

Parameters:

  • devices (PAR8)

    (in) DATA8 array (handle) with devices to sample

  • types (PAR8)

    (in) DATA8 array (handle) with types

  • modes (PAR8)

    (in) DATA8 array (handle) with modes

  • datasets (PAR8)

    (in) DATA8 array (handle) with data sets

  • values (PARF)

    (out) DATAF array (handle) with values



5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
# File 'lib/lignite/ev3_ops.rb', line 5532

def input_sample(time, samples, init, devices, types, modes, datasets, values)
  logger.debug do
    args = [time, samples, init, devices, types, modes, datasets, values]
    "called input_sample with #{args.inspect}"
  end

  bytes = u8(0x97)
  bytes += param_simple(time)
  bytes += param_simple(samples)
  bytes += param_simple(init)
  bytes += param_simple(devices)
  bytes += param_simple(types)
  bytes += param_simple(modes)
  bytes += param_simple(datasets)
  bytes += param_simple(values)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_set_autoid(layer, no, enable) ⇒ Object

Enabled or disable auto-id for a specific sensor port

Parameters:

  • layer (PAR8)

    (in) Chain layer number [0..3]

  • no (PAR8)

    (in) Port number

  • enable (PAR8)

    (in) Boolean (0 disabled, 1 enable)



9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
# File 'lib/lignite/ev3_ops.rb', line 9172

def input_set_autoid(layer, no, enable)
  logger.debug do
    args = [layer, no, enable]
    "called input_set_autoid with #{args.inspect}"
  end

  bytes = u8(0xE4)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  bytes += param_simple(enable)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_set_conn(layer, no, conn) ⇒ Object

Set the connection type for a specific port

Parameters:

  • layer (PAR8)

    (in) Chain layer number [0..3]

  • no (PAR8)

    (in) Port number

  • conn (PAR8)

    (in) Connection type (CONN_NXT_IIC, CONN_NXT_DUMB or CONN_INPUT_DUMB)



9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
# File 'lib/lignite/ev3_ops.rb', line 9090

def input_set_conn(layer, no, conn)
  logger.debug do
    args = [layer, no, conn]
    "called input_set_conn with #{args.inspect}"
  end

  bytes = u8(0xE0)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  bytes += param_simple(conn)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_test(layer, no, busy) ⇒ Object

Test if device busy (changing type or mode)

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • no (PAR8)

    (in) Port number

  • busy (PAR8)

    (out) Device busy flag (0 = ready, 1 = busy)



6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
# File 'lib/lignite/ev3_ops.rb', line 6225

def input_test(layer, no, busy)
  logger.debug do
    args = [layer, no, busy]
    "called input_test with #{args.inspect}"
  end

  bytes = u8(0x9B)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  bytes += param_simple(busy)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#input_write(layer, no, bytes, data) ⇒ Object

Write data to device (only UART devices)

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • no (PAR8)

    (in) Port number

  • bytes (PAR8)

    (in) No of bytes to write [1..32]

  • data (PAR8)

    (in) First byte in DATA8 array to write



6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
# File 'lib/lignite/ev3_ops.rb', line 6306

def input_write(layer, no, bytes, data)
  logger.debug do
    args = [layer, no, bytes, data]
    "called input_write with #{args.inspect}"
  end

  bytes = u8(0x9F)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  bytes += param_simple(bytes)
  bytes += param_simple(data)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#jr(offset) ⇒ Object

Branch unconditionally relative

Parameters:

  • offset (PAR32)

    (in)



1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
# File 'lib/lignite/ev3_ops.rb', line 1141

def jr(offset)
  logger.debug do
    args = [offset]
    "called jr with #{args.inspect}"
  end

  bytes = u8(0x40)
  bytes += param_simple(offset)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#jr_eq16(left, right, offset) ⇒ Object

Branch relative OFFSET if LEFT is equal to RIGHT

Parameters:

  • left (PAR16)

    (in)

  • right (PAR16)

    (in)

  • offset (PAR32)

    (in)



1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
# File 'lib/lignite/ev3_ops.rb', line 1949

def jr_eq16(left, right, offset)
  logger.debug do
    args = [left, right, offset]
    "called jr_eq16 with #{args.inspect}"
  end

  bytes = u8(0x6D)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(offset)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#jr_eq32(left, right, offset) ⇒ Object

Branch relative OFFSET if LEFT is equal to RIGHT

Parameters:

  • left (PAR32)

    (in)

  • right (PAR32)

    (in)

  • offset (PAR32)

    (in)



1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
# File 'lib/lignite/ev3_ops.rb', line 1967

def jr_eq32(left, right, offset)
  logger.debug do
    args = [left, right, offset]
    "called jr_eq32 with #{args.inspect}"
  end

  bytes = u8(0x6E)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(offset)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#jr_eq8(left, right, offset) ⇒ Object

Branch relative OFFSET if LEFT is equal to RIGHT

Parameters:

  • left (PAR8)

    (in)

  • right (PAR8)

    (in)

  • offset (PAR32)

    (in)



1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
# File 'lib/lignite/ev3_ops.rb', line 1931

def jr_eq8(left, right, offset)
  logger.debug do
    args = [left, right, offset]
    "called jr_eq8 with #{args.inspect}"
  end

  bytes = u8(0x6C)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(offset)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#jr_eqf(left, right, offset) ⇒ Object

Branch relative OFFSET if LEFT is equal to RIGHT

Parameters:

  • left (PARF)

    (in)

  • right (PARF)

    (in)

  • offset (PAR32)

    (in)



1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
# File 'lib/lignite/ev3_ops.rb', line 1985

def jr_eqf(left, right, offset)
  logger.debug do
    args = [left, right, offset]
    "called jr_eqf with #{args.inspect}"
  end

  bytes = u8(0x6F)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(offset)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#jr_false(flag, offset) ⇒ Object

Branch relative if FLAG is FALSE (zero)

Parameters:

  • flag (PAR8)

    (in)

  • offset (PAR32)

    (in)



1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
# File 'lib/lignite/ev3_ops.rb', line 1156

def jr_false(flag, offset)
  logger.debug do
    args = [flag, offset]
    "called jr_false with #{args.inspect}"
  end

  bytes = u8(0x41)
  bytes += param_simple(flag)
  bytes += param_simple(offset)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#jr_gt16(left, right, offset) ⇒ Object

Branch relative OFFSET if LEFT is greater than RIGHT

Parameters:

  • left (PAR16)

    (in)

  • right (PAR16)

    (in)

  • offset (PAR32)

    (in)



1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
# File 'lib/lignite/ev3_ops.rb', line 1877

def jr_gt16(left, right, offset)
  logger.debug do
    args = [left, right, offset]
    "called jr_gt16 with #{args.inspect}"
  end

  bytes = u8(0x69)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(offset)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#jr_gt32(left, right, offset) ⇒ Object

Branch relative OFFSET if LEFT is greater than RIGHT

Parameters:

  • left (PAR32)

    (in)

  • right (PAR32)

    (in)

  • offset (PAR32)

    (in)



1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
# File 'lib/lignite/ev3_ops.rb', line 1895

def jr_gt32(left, right, offset)
  logger.debug do
    args = [left, right, offset]
    "called jr_gt32 with #{args.inspect}"
  end

  bytes = u8(0x6A)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(offset)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#jr_gt8(left, right, offset) ⇒ Object

Branch relative OFFSET if LEFT is greater than RIGHT

Parameters:

  • left (PAR8)

    (in)

  • right (PAR8)

    (in)

  • offset (PAR32)

    (in)



1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
# File 'lib/lignite/ev3_ops.rb', line 1859

def jr_gt8(left, right, offset)
  logger.debug do
    args = [left, right, offset]
    "called jr_gt8 with #{args.inspect}"
  end

  bytes = u8(0x68)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(offset)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#jr_gteq16(left, right, offset) ⇒ Object

Branch relative OFFSET if LEFT is greater than or equal to RIGHT

Parameters:

  • left (PAR16)

    (in)

  • right (PAR16)

    (in)

  • offset (PAR32)

    (in)



2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
# File 'lib/lignite/ev3_ops.rb', line 2165

def jr_gteq16(left, right, offset)
  logger.debug do
    args = [left, right, offset]
    "called jr_gteq16 with #{args.inspect}"
  end

  bytes = u8(0x79)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(offset)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#jr_gteq32(left, right, offset) ⇒ Object

Branch relative OFFSET if LEFT is greater than or equal to RIGHT

Parameters:

  • left (PAR32)

    (in)

  • right (PAR32)

    (in)

  • offset (PAR32)

    (in)



2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
# File 'lib/lignite/ev3_ops.rb', line 2183

def jr_gteq32(left, right, offset)
  logger.debug do
    args = [left, right, offset]
    "called jr_gteq32 with #{args.inspect}"
  end

  bytes = u8(0x7A)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(offset)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#jr_gteq8(left, right, offset) ⇒ Object

Branch relative OFFSET if LEFT is greater than or equal to RIGHT

Parameters:

  • left (PAR8)

    (in)

  • right (PAR8)

    (in)

  • offset (PAR32)

    (in)



2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
# File 'lib/lignite/ev3_ops.rb', line 2147

def jr_gteq8(left, right, offset)
  logger.debug do
    args = [left, right, offset]
    "called jr_gteq8 with #{args.inspect}"
  end

  bytes = u8(0x78)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(offset)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#jr_gteqf(left, right, offset) ⇒ Object

Branch relative OFFSET if LEFT is greater than or equal to RIGHT

Parameters:

  • left (PARF)

    (in)

  • right (PARF)

    (in)

  • offset (PAR32)

    (in)



2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
# File 'lib/lignite/ev3_ops.rb', line 2201

def jr_gteqf(left, right, offset)
  logger.debug do
    args = [left, right, offset]
    "called jr_gteqf with #{args.inspect}"
  end

  bytes = u8(0x7B)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(offset)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#jr_gtf(left, right, offset) ⇒ Object

Branch relative OFFSET if LEFT is greater than RIGHT

Parameters:

  • left (PARF)

    (in)

  • right (PARF)

    (in)

  • offset (PAR32)

    (in)



1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
# File 'lib/lignite/ev3_ops.rb', line 1913

def jr_gtf(left, right, offset)
  logger.debug do
    args = [left, right, offset]
    "called jr_gtf with #{args.inspect}"
  end

  bytes = u8(0x6B)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(offset)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#jr_lt16(left, right, offset) ⇒ Object

Branch relative OFFSET if LEFT is less than RIGHT

Parameters:

  • left (PAR16)

    (in)

  • right (PAR16)

    (in)

  • offset (PAR32)

    (in)



1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
# File 'lib/lignite/ev3_ops.rb', line 1805

def jr_lt16(left, right, offset)
  logger.debug do
    args = [left, right, offset]
    "called jr_lt16 with #{args.inspect}"
  end

  bytes = u8(0x65)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(offset)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#jr_lt32(left, right, offset) ⇒ Object

Branch relative OFFSET if LEFT is less than RIGHT

Parameters:

  • left (PAR32)

    (in)

  • right (PAR32)

    (in)

  • offset (PAR32)

    (in)



1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
# File 'lib/lignite/ev3_ops.rb', line 1823

def jr_lt32(left, right, offset)
  logger.debug do
    args = [left, right, offset]
    "called jr_lt32 with #{args.inspect}"
  end

  bytes = u8(0x66)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(offset)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#jr_lt8(left, right, offset) ⇒ Object

Branch relative OFFSET if LEFT is less than RIGHT

Parameters:

  • left (PAR8)

    (in)

  • right (PAR8)

    (in)

  • offset (PAR32)

    (in)



1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
# File 'lib/lignite/ev3_ops.rb', line 1787

def jr_lt8(left, right, offset)
  logger.debug do
    args = [left, right, offset]
    "called jr_lt8 with #{args.inspect}"
  end

  bytes = u8(0x64)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(offset)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#jr_lteq16(left, right, offset) ⇒ Object

Branch relative OFFSET if LEFT is less than or equal to RIGHT

Parameters:

  • left (PAR16)

    (in)

  • right (PAR16)

    (in)

  • offset (PAR32)

    (in)



2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
# File 'lib/lignite/ev3_ops.rb', line 2093

def jr_lteq16(left, right, offset)
  logger.debug do
    args = [left, right, offset]
    "called jr_lteq16 with #{args.inspect}"
  end

  bytes = u8(0x75)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(offset)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#jr_lteq32(left, right, offset) ⇒ Object

Branch relative OFFSET if LEFT is less than or equal to RIGHT

Parameters:

  • left (PAR32)

    (in)

  • right (PAR32)

    (in)

  • offset (PAR32)

    (in)



2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
# File 'lib/lignite/ev3_ops.rb', line 2111

def jr_lteq32(left, right, offset)
  logger.debug do
    args = [left, right, offset]
    "called jr_lteq32 with #{args.inspect}"
  end

  bytes = u8(0x76)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(offset)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#jr_lteq8(left, right, offset) ⇒ Object

Branch relative OFFSET if LEFT is less than or equal to RIGHT

Parameters:

  • left (PAR8)

    (in)

  • right (PAR8)

    (in)

  • offset (PAR32)

    (in)



2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
# File 'lib/lignite/ev3_ops.rb', line 2075

def jr_lteq8(left, right, offset)
  logger.debug do
    args = [left, right, offset]
    "called jr_lteq8 with #{args.inspect}"
  end

  bytes = u8(0x74)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(offset)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#jr_lteqf(left, right, offset) ⇒ Object

Branch relative OFFSET if LEFT is less than or equal to RIGHT

Parameters:

  • left (PARF)

    (in)

  • right (PARF)

    (in)

  • offset (PAR32)

    (in)



2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
# File 'lib/lignite/ev3_ops.rb', line 2129

def jr_lteqf(left, right, offset)
  logger.debug do
    args = [left, right, offset]
    "called jr_lteqf with #{args.inspect}"
  end

  bytes = u8(0x77)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(offset)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#jr_ltf(left, right, offset) ⇒ Object

Branch relative OFFSET if LEFT is less than RIGHT

Parameters:

  • left (PARF)

    (in)

  • right (PARF)

    (in)

  • offset (PAR32)

    (in)



1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
# File 'lib/lignite/ev3_ops.rb', line 1841

def jr_ltf(left, right, offset)
  logger.debug do
    args = [left, right, offset]
    "called jr_ltf with #{args.inspect}"
  end

  bytes = u8(0x67)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(offset)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#jr_nan(value, offset) ⇒ Object

Branch relative if VALUE is NAN (not a number)

Parameters:

  • value (PARF)

    (in)

  • offset (PAR32)

    (in)



1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
# File 'lib/lignite/ev3_ops.rb', line 1188

def jr_nan(value, offset)
  logger.debug do
    args = [value, offset]
    "called jr_nan with #{args.inspect}"
  end

  bytes = u8(0x43)
  bytes += param_simple(value)
  bytes += param_simple(offset)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#jr_neq16(left, right, offset) ⇒ Object

Branch relative OFFSET if LEFT is not equal to RIGHT

Parameters:

  • left (PAR16)

    (in)

  • right (PAR16)

    (in)

  • offset (PAR32)

    (in)



2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
# File 'lib/lignite/ev3_ops.rb', line 2021

def jr_neq16(left, right, offset)
  logger.debug do
    args = [left, right, offset]
    "called jr_neq16 with #{args.inspect}"
  end

  bytes = u8(0x71)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(offset)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#jr_neq32(left, right, offset) ⇒ Object

Branch relative OFFSET if LEFT is not equal to RIGHT

Parameters:

  • left (PAR32)

    (in)

  • right (PAR32)

    (in)

  • offset (PAR32)

    (in)



2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
# File 'lib/lignite/ev3_ops.rb', line 2039

def jr_neq32(left, right, offset)
  logger.debug do
    args = [left, right, offset]
    "called jr_neq32 with #{args.inspect}"
  end

  bytes = u8(0x72)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(offset)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#jr_neq8(left, right, offset) ⇒ Object

Branch relative OFFSET if LEFT is not equal to RIGHT

Parameters:

  • left (PAR8)

    (in)

  • right (PAR8)

    (in)

  • offset (PAR32)

    (in)



2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
# File 'lib/lignite/ev3_ops.rb', line 2003

def jr_neq8(left, right, offset)
  logger.debug do
    args = [left, right, offset]
    "called jr_neq8 with #{args.inspect}"
  end

  bytes = u8(0x70)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(offset)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#jr_neqf(left, right, offset) ⇒ Object

Branch relative OFFSET if LEFT is not equal to RIGHT

Parameters:

  • left (PARF)

    (in)

  • right (PARF)

    (in)

  • offset (PAR32)

    (in)



2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
# File 'lib/lignite/ev3_ops.rb', line 2057

def jr_neqf(left, right, offset)
  logger.debug do
    args = [left, right, offset]
    "called jr_neqf with #{args.inspect}"
  end

  bytes = u8(0x73)
  bytes += param_simple(left)
  bytes += param_simple(right)
  bytes += param_simple(offset)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#jr_true(flag, offset) ⇒ Object

Branch relative if FLAG is TRUE (non zero)

Parameters:

  • flag (PAR8)

    (in)

  • offset (PAR32)

    (in)



1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
# File 'lib/lignite/ev3_ops.rb', line 1172

def jr_true(flag, offset)
  logger.debug do
    args = [flag, offset]
    "called jr_true with #{args.inspect}"
  end

  bytes = u8(0x42)
  bytes += param_simple(flag)
  bytes += param_simple(offset)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#keep_alive(minutes) ⇒ Object

Keep alive

Parameters:

  • minutes (PAR8)

    (out) Number of minutes before sleep



5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
# File 'lib/lignite/ev3_ops.rb', line 5341

def keep_alive(minutes)
  logger.debug do
    args = [minutes]
    "called keep_alive with #{args.inspect}"
  end

  bytes = u8(0x90)
  bytes += param_simple(minutes)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#mailbox_close(no) ⇒ Object

Closes mailbox indicated by NO

Parameters:

  • no (PAR8)

    (in) Reference ID mailbox number



9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
# File 'lib/lignite/ev3_ops.rb', line 9074

def mailbox_close(no)
  logger.debug do
    args = [no]
    "called mailbox_close with #{args.inspect}"
  end

  bytes = u8(0xDD)
  bytes += param_simple(no)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#mailbox_open(no, boxname, types, fifosize, values) ⇒ Object

Open a mail box on the brick

Parameters:

  • no (PAR8)

    (in) Reference ID for the mailbox. Maximum number of mailboxes is 30

  • boxname (PAR8)

    (in) Zero terminated string with the mailbox name

  • types (PAR8)

    (in) Data type of the content of the mailbox

  • fifosize (PAR8)

    (in) Not used

  • values (PAR8)

    (in) Number of values of the type (specified by TYPE).



8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
# File 'lib/lignite/ev3_ops.rb', line 8986

def mailbox_open(no, boxname, types, fifosize, values)
  logger.debug do
    args = [no, boxname, types, fifosize, values]
    "called mailbox_open with #{args.inspect}"
  end

  bytes = u8(0xD8)
  bytes += param_simple(no)
  bytes += param_simple(boxname)
  bytes += param_simple(types)
  bytes += param_simple(fifosize)
  bytes += param_simple(values)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#mailbox_read(no, length, *values) ⇒ Object

Read data from mailbox specified by NO

Parameters:

  • no (PAR8)

    (in) Messagebox ID of the message box you want to read

  • length (PAR8)

    (in) Maximum bytes to be read

  • values (PARNO)

    (in) Number of value to read



9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
# File 'lib/lignite/ev3_ops.rb', line 9028

def mailbox_read(no, length, *values)
  logger.debug do
    args = [no, length, *values]
    "called mailbox_read with #{args.inspect}"
  end

  bytes = u8(0xDA)
  bytes += param_simple(no)
  bytes += param_simple(length)
  bytes += param_n_multiple(*values)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#mailbox_ready(no) ⇒ Object

Waiting from message to be read

Parameters:

  • no (PAR8)

    (in) Reference ID mailbox number



9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
# File 'lib/lignite/ev3_ops.rb', line 9060

def mailbox_ready(no)
  logger.debug do
    args = [no]
    "called mailbox_ready with #{args.inspect}"
  end

  bytes = u8(0xDC)
  bytes += param_simple(no)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#mailbox_size(no, size) ⇒ Object

Returns the size of the mailbox.

Parameters:

  • no (PAR8)

    (in) Reference ID mailbox number

  • size (PAR8)

    (out) Size in bytes of the contents of mailbox NO



9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
# File 'lib/lignite/ev3_ops.rb', line 9189

def mailbox_size(no, size)
  logger.debug do
    args = [no, size]
    "called mailbox_size with #{args.inspect}"
  end

  bytes = u8(0xE5)
  bytes += param_simple(no)
  bytes += param_simple(size)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#mailbox_test(no, busy) ⇒ Object

Tests if new message has been read

Parameters:

  • no (PAR8)

    (in) Reference ID mailbox number

  • busy (PAR8)

    (out) If Busy = TRUE then no new messages are received



9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
# File 'lib/lignite/ev3_ops.rb', line 9045

def mailbox_test(no, busy)
  logger.debug do
    args = [no, busy]
    "called mailbox_test with #{args.inspect}"
  end

  bytes = u8(0xDB)
  bytes += param_simple(no)
  bytes += param_simple(busy)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#mailbox_write(brickname, hardware, boxname, type, *values) ⇒ Object

Write to mailbox in remote brick

Parameters:

  • brickname (PAR8)

    (in) Zero terminated string name of the receiving brick

  • hardware (PAR8)

    (in) Transportation media

  • boxname (PAR8)

    (in) Zero terminated string name of the receiving mailbox

  • type (PAR8)

    (in) Data type of the values

  • values (PARNO)

    (in) Number of values of the specified type to send



9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
# File 'lib/lignite/ev3_ops.rb', line 9008

def mailbox_write(brickname, hardware, boxname, type, *values)
  logger.debug do
    args = [brickname, hardware, boxname, type, *values]
    "called mailbox_write with #{args.inspect}"
  end

  bytes = u8(0xD9)
  bytes += param_simple(brickname)
  bytes += param_simple(hardware)
  bytes += param_simple(boxname)
  bytes += param_simple(type)
  bytes += param_n_multiple(*values)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#math(*args) ⇒ Object



5300
5301
5302
5303
5304
5305
# File 'lib/lignite/ev3_ops.rb', line 5300

def math(*args)
  logger.debug "called math with #{args.inspect}"
  cvalue = args.shift
  csym = MULTIPLEX_MATH.fetch(cvalue)
  __send__("math_#{csym}", *args)
end

#math_abs(x, r) ⇒ Object

Absolute r = fabs(x)

Parameters:

  • x (PARF)

    (in)

  • r (PARF)

    (out)



4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
# File 'lib/lignite/ev3_ops.rb', line 4967

def math_abs(x, r)
  logger.debug do
    args = [x, r]
    "called math_abs with #{args.inspect}"
  end

  bytes = u8(0x8D)
  bytes += param_simple(6)
  bytes += param_simple(x)
  bytes += param_simple(r)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#math_acos(x, r) ⇒ Object

ACos (R = acos(X))

Parameters:

  • x (PARF)

    (in)

  • r (PARF)

    (out)



5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
# File 'lib/lignite/ev3_ops.rb', line 5138

def math_acos(x, r)
  logger.debug do
    args = [x, r]
    "called math_acos with #{args.inspect}"
  end

  bytes = u8(0x8D)
  bytes += param_simple(15)
  bytes += param_simple(x)
  bytes += param_simple(r)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#math_asin(x, r) ⇒ Object

ASin (R = asinf(X))

Parameters:

  • x (PARF)

    (in)

  • r (PARF)

    (out)



5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
# File 'lib/lignite/ev3_ops.rb', line 5119

def math_asin(x, r)
  logger.debug do
    args = [x, r]
    "called math_asin with #{args.inspect}"
  end

  bytes = u8(0x8D)
  bytes += param_simple(14)
  bytes += param_simple(x)
  bytes += param_simple(r)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#math_atan(x, r) ⇒ Object

ATan (R = atanf(X))

Parameters:

  • x (PARF)

    (in)

  • r (PARF)

    (out)



5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
# File 'lib/lignite/ev3_ops.rb', line 5157

def math_atan(x, r)
  logger.debug do
    args = [x, r]
    "called math_atan with #{args.inspect}"
  end

  bytes = u8(0x8D)
  bytes += param_simple(16)
  bytes += param_simple(x)
  bytes += param_simple(r)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#math_ceil(x, r) ⇒ Object

Ceiling r = ceil(x)

Parameters:

  • x (PARF)

    (in)

  • r (PARF)

    (out)



4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
# File 'lib/lignite/ev3_ops.rb', line 4929

def math_ceil(x, r)
  logger.debug do
    args = [x, r]
    "called math_ceil with #{args.inspect}"
  end

  bytes = u8(0x8D)
  bytes += param_simple(4)
  bytes += param_simple(x)
  bytes += param_simple(r)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#math_cos(x, r) ⇒ Object

Cos (R = cos(X))

Parameters:

  • x (PARF)

    (in)

  • r (PARF)

    (out)



5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
# File 'lib/lignite/ev3_ops.rb', line 5081

def math_cos(x, r)
  logger.debug do
    args = [x, r]
    "called math_cos with #{args.inspect}"
  end

  bytes = u8(0x8D)
  bytes += param_simple(12)
  bytes += param_simple(x)
  bytes += param_simple(r)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#math_exp(x, r) ⇒ Object

e^x r = expf(x)

Parameters:

  • x (PARF)

    (in)

  • r (PARF)

    (out)



4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
# File 'lib/lignite/ev3_ops.rb', line 4870

def math_exp(x, r)
  logger.debug do
    args = [x, r]
    "called math_exp with #{args.inspect}"
  end

  bytes = u8(0x8D)
  bytes += param_simple(1)
  bytes += param_simple(x)
  bytes += param_simple(r)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#math_floor(x, r) ⇒ Object

Floor r = floor(x)

Parameters:

  • x (PARF)

    (in)

  • r (PARF)

    (out)



4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
# File 'lib/lignite/ev3_ops.rb', line 4910

def math_floor(x, r)
  logger.debug do
    args = [x, r]
    "called math_floor with #{args.inspect}"
  end

  bytes = u8(0x8D)
  bytes += param_simple(3)
  bytes += param_simple(x)
  bytes += param_simple(r)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#math_ln(x, r) ⇒ Object

Ln r = log(x)

Parameters:

  • x (PARF)

    (in)

  • r (PARF)

    (out)



5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
# File 'lib/lignite/ev3_ops.rb', line 5043

def math_ln(x, r)
  logger.debug do
    args = [x, r]
    "called math_ln with #{args.inspect}"
  end

  bytes = u8(0x8D)
  bytes += param_simple(10)
  bytes += param_simple(x)
  bytes += param_simple(r)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#math_log(x, r) ⇒ Object

Log r = log10(x)

Parameters:

  • x (PARF)

    (in)

  • r (PARF)

    (out)



5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
# File 'lib/lignite/ev3_ops.rb', line 5024

def math_log(x, r)
  logger.debug do
    args = [x, r]
    "called math_log with #{args.inspect}"
  end

  bytes = u8(0x8D)
  bytes += param_simple(9)
  bytes += param_simple(x)
  bytes += param_simple(r)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#math_mod(x, y, r) ⇒ Object

Modulo r = fmod(x,y)

Parameters:

  • x (PARF)

    (in)

  • y (PARF)

    (in)

  • r (PARF)

    (out)



4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
# File 'lib/lignite/ev3_ops.rb', line 4890

def math_mod(x, y, r)
  logger.debug do
    args = [x, y, r]
    "called math_mod with #{args.inspect}"
  end

  bytes = u8(0x8D)
  bytes += param_simple(2)
  bytes += param_simple(x)
  bytes += param_simple(y)
  bytes += param_simple(r)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#math_mod16(x, y, r) ⇒ Object

Modulo DATA16 r = x % y

Parameters:

  • x (PAR16)

    (in)

  • y (PAR16)

    (in)

  • r (PAR16)

    (out)



5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
# File 'lib/lignite/ev3_ops.rb', line 5198

def math_mod16(x, y, r)
  logger.debug do
    args = [x, y, r]
    "called math_mod16 with #{args.inspect}"
  end

  bytes = u8(0x8D)
  bytes += param_simple(18)
  bytes += param_simple(x)
  bytes += param_simple(y)
  bytes += param_simple(r)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#math_mod32(x, y, r) ⇒ Object

Modulo DATA32 r = x % y

Parameters:

  • x (PAR32)

    (in)

  • y (PAR32)

    (in)

  • r (PAR32)

    (out)



5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
# File 'lib/lignite/ev3_ops.rb', line 5219

def math_mod32(x, y, r)
  logger.debug do
    args = [x, y, r]
    "called math_mod32 with #{args.inspect}"
  end

  bytes = u8(0x8D)
  bytes += param_simple(19)
  bytes += param_simple(x)
  bytes += param_simple(y)
  bytes += param_simple(r)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#math_mod8(x, y, r) ⇒ Object

Modulo DATA8 r = x % y

Parameters:

  • x (PAR8)

    (in)

  • y (PAR8)

    (in)

  • r (PAR8)

    (out)



5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
# File 'lib/lignite/ev3_ops.rb', line 5177

def math_mod8(x, y, r)
  logger.debug do
    args = [x, y, r]
    "called math_mod8 with #{args.inspect}"
  end

  bytes = u8(0x8D)
  bytes += param_simple(17)
  bytes += param_simple(x)
  bytes += param_simple(y)
  bytes += param_simple(r)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#math_negate(x, r) ⇒ Object

Negate r = 0.0 - x

Parameters:

  • x (PARF)

    (in)

  • r (PARF)

    (out)



4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
# File 'lib/lignite/ev3_ops.rb', line 4986

def math_negate(x, r)
  logger.debug do
    args = [x, r]
    "called math_negate with #{args.inspect}"
  end

  bytes = u8(0x8D)
  bytes += param_simple(7)
  bytes += param_simple(x)
  bytes += param_simple(r)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#math_pow(x, y, r) ⇒ Object

Exponent r = powf(x,y)

Parameters:

  • x (PARF)

    (in)

  • y (PARF)

    (in)

  • r (PARF)

    (out)



5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
# File 'lib/lignite/ev3_ops.rb', line 5240

def math_pow(x, y, r)
  logger.debug do
    args = [x, y, r]
    "called math_pow with #{args.inspect}"
  end

  bytes = u8(0x8D)
  bytes += param_simple(20)
  bytes += param_simple(x)
  bytes += param_simple(y)
  bytes += param_simple(r)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#math_round(x, r) ⇒ Object

Round r = round(x)

Parameters:

  • x (PARF)

    (in)

  • r (PARF)

    (out)



4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
# File 'lib/lignite/ev3_ops.rb', line 4948

def math_round(x, r)
  logger.debug do
    args = [x, r]
    "called math_round with #{args.inspect}"
  end

  bytes = u8(0x8D)
  bytes += param_simple(5)
  bytes += param_simple(x)
  bytes += param_simple(r)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#math_sin(x, r) ⇒ Object

Sin (R = sinf(X))

Parameters:

  • x (PARF)

    (in)

  • r (PARF)

    (out)



5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
# File 'lib/lignite/ev3_ops.rb', line 5062

def math_sin(x, r)
  logger.debug do
    args = [x, r]
    "called math_sin with #{args.inspect}"
  end

  bytes = u8(0x8D)
  bytes += param_simple(11)
  bytes += param_simple(x)
  bytes += param_simple(r)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#math_sqrt(x, r) ⇒ Object

Squareroot r = sqrt(x)

Parameters:

  • x (PARF)

    (in)

  • r (PARF)

    (out)



5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
# File 'lib/lignite/ev3_ops.rb', line 5005

def math_sqrt(x, r)
  logger.debug do
    args = [x, r]
    "called math_sqrt with #{args.inspect}"
  end

  bytes = u8(0x8D)
  bytes += param_simple(8)
  bytes += param_simple(x)
  bytes += param_simple(r)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#math_tan(x, r) ⇒ Object

Tan (R = tanf(X))

Parameters:

  • x (PARF)

    (in)

  • r (PARF)

    (out)



5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
# File 'lib/lignite/ev3_ops.rb', line 5100

def math_tan(x, r)
  logger.debug do
    args = [x, r]
    "called math_tan with #{args.inspect}"
  end

  bytes = u8(0x8D)
  bytes += param_simple(13)
  bytes += param_simple(x)
  bytes += param_simple(r)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#math_trunc(x, p, r) ⇒ Object

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

Parameters:

  • x (PARF)

    (in) Value

  • p (PAR8)

    (in) Precision [0..9]

  • r (PARF)

    (out) Result



5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
# File 'lib/lignite/ev3_ops.rb', line 5261

def math_trunc(x, p, r)
  logger.debug do
    args = [x, p, r]
    "called math_trunc with #{args.inspect}"
  end

  bytes = u8(0x8D)
  bytes += param_simple(21)
  bytes += param_simple(x)
  bytes += param_simple(p)
  bytes += param_simple(r)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#memory_read(prgid, objid, offset, size, array) ⇒ Object

Read VM memory

Parameters:

  • prgid (PAR16)

    (in) Program slot number (must be running)

  • objid (PAR16)

    (in) Object id (zero means globals)

  • offset (PAR32)

    (in) Offset (start from)

  • size (PAR32)

    (in) Size (length of array to read)

  • array (PAR8)

    (out) First element of DATA8 array to receive data



2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
# File 'lib/lignite/ev3_ops.rb', line 2636

def memory_read(prgid, objid, offset, size, array)
  logger.debug do
    args = [prgid, objid, offset, size, array]
    "called memory_read with #{args.inspect}"
  end

  bytes = u8(0x7F)
  bytes += param_simple(prgid)
  bytes += param_simple(objid)
  bytes += param_simple(offset)
  bytes += param_simple(size)
  bytes += param_simple(array)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#memory_usage(total, free) ⇒ Object

Get memory usage

Parameters:

  • total (PAR32)

    (out) Total memory [KB]

  • free (PAR32)

    (out) Free memory [KB]



7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
# File 'lib/lignite/ev3_ops.rb', line 7858

def memory_usage(total, free)
  logger.debug do
    args = [total, free]
    "called memory_usage with #{args.inspect}"
  end

  bytes = u8(0xC5)
  bytes += param_simple(total)
  bytes += param_simple(free)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#memory_write(prgid, objid, offset, size, array) ⇒ Object

Write VM memory

Parameters:

  • prgid (PAR16)

    (in) Program slot number (must be running)

  • objid (PAR16)

    (in) Object id (zero means globals)

  • offset (PAR32)

    (in) Offset (start from)

  • size (PAR32)

    (in) Size (length of array to write)

  • array (PAR8)

    (in) First element of DATA8 array to write



2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
# File 'lib/lignite/ev3_ops.rb', line 2614

def memory_write(prgid, objid, offset, size, array)
  logger.debug do
    args = [prgid, objid, offset, size, array]
    "called memory_write with #{args.inspect}"
  end

  bytes = u8(0x7E)
  bytes += param_simple(prgid)
  bytes += param_simple(objid)
  bytes += param_simple(offset)
  bytes += param_simple(size)
  bytes += param_simple(array)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#move16_16(source, destination) ⇒ Object

Move 16 bit value from SOURCE to DESTINATION

Parameters:

  • source (PAR16)

    (in)

  • destination (PAR16)

    (out)



966
967
968
969
970
971
972
973
974
975
976
977
# File 'lib/lignite/ev3_ops.rb', line 966

def move16_16(source, destination)
  logger.debug do
    args = [source, destination]
    "called move16_16 with #{args.inspect}"
  end

  bytes = u8(0x35)
  bytes += param_simple(source)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#move16_32(source, destination) ⇒ Object

Move 16 bit value from SOURCE to DESTINATION

Parameters:

  • source (PAR16)

    (in)

  • destination (PAR32)

    (out)



982
983
984
985
986
987
988
989
990
991
992
993
# File 'lib/lignite/ev3_ops.rb', line 982

def move16_32(source, destination)
  logger.debug do
    args = [source, destination]
    "called move16_32 with #{args.inspect}"
  end

  bytes = u8(0x36)
  bytes += param_simple(source)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#move16_8(source, destination) ⇒ Object

Move 16 bit value from SOURCE to DESTINATION

Parameters:

  • source (PAR16)

    (in)

  • destination (PAR8)

    (out)



950
951
952
953
954
955
956
957
958
959
960
961
# File 'lib/lignite/ev3_ops.rb', line 950

def move16_8(source, destination)
  logger.debug do
    args = [source, destination]
    "called move16_8 with #{args.inspect}"
  end

  bytes = u8(0x34)
  bytes += param_simple(source)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#move16_f(source, destination) ⇒ Object

Move 16 bit value from SOURCE to DESTINATION

Parameters:

  • source (PAR16)

    (in)

  • destination (PARF)

    (out)



998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
# File 'lib/lignite/ev3_ops.rb', line 998

def move16_f(source, destination)
  logger.debug do
    args = [source, destination]
    "called move16_f with #{args.inspect}"
  end

  bytes = u8(0x37)
  bytes += param_simple(source)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#move32_16(source, destination) ⇒ Object

Move 32 bit value from SOURCE to DESTINATION

Parameters:

  • source (PAR32)

    (in)

  • destination (PAR16)

    (out)



1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
# File 'lib/lignite/ev3_ops.rb', line 1030

def move32_16(source, destination)
  logger.debug do
    args = [source, destination]
    "called move32_16 with #{args.inspect}"
  end

  bytes = u8(0x39)
  bytes += param_simple(source)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#move32_32(source, destination) ⇒ Object

Move 32 bit value from SOURCE to DESTINATION

Parameters:

  • source (PAR32)

    (in)

  • destination (PAR32)

    (out)



1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
# File 'lib/lignite/ev3_ops.rb', line 1046

def move32_32(source, destination)
  logger.debug do
    args = [source, destination]
    "called move32_32 with #{args.inspect}"
  end

  bytes = u8(0x3A)
  bytes += param_simple(source)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#move32_8(source, destination) ⇒ Object

Move 32 bit value from SOURCE to DESTINATION

Parameters:

  • source (PAR32)

    (in)

  • destination (PAR8)

    (out)



1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
# File 'lib/lignite/ev3_ops.rb', line 1014

def move32_8(source, destination)
  logger.debug do
    args = [source, destination]
    "called move32_8 with #{args.inspect}"
  end

  bytes = u8(0x38)
  bytes += param_simple(source)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#move32_f(source, destination) ⇒ Object

Move 32 bit value from SOURCE to DESTINATION

Parameters:

  • source (PAR32)

    (in)

  • destination (PARF)

    (out)



1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
# File 'lib/lignite/ev3_ops.rb', line 1062

def move32_f(source, destination)
  logger.debug do
    args = [source, destination]
    "called move32_f with #{args.inspect}"
  end

  bytes = u8(0x3B)
  bytes += param_simple(source)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#move8_16(source, destination) ⇒ Object

Move 8 bit value from SOURCE to DESTINATION

Parameters:

  • source (PAR8)

    (in)

  • destination (PAR16)

    (out)



902
903
904
905
906
907
908
909
910
911
912
913
# File 'lib/lignite/ev3_ops.rb', line 902

def move8_16(source, destination)
  logger.debug do
    args = [source, destination]
    "called move8_16 with #{args.inspect}"
  end

  bytes = u8(0x31)
  bytes += param_simple(source)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#move8_32(source, destination) ⇒ Object

Move 8 bit value from SOURCE to DESTINATION

Parameters:

  • source (PAR8)

    (in)

  • destination (PAR32)

    (out)



918
919
920
921
922
923
924
925
926
927
928
929
# File 'lib/lignite/ev3_ops.rb', line 918

def move8_32(source, destination)
  logger.debug do
    args = [source, destination]
    "called move8_32 with #{args.inspect}"
  end

  bytes = u8(0x32)
  bytes += param_simple(source)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#move8_8(source, destination) ⇒ Object

Move 8 bit value from SOURCE to DESTINATION

Parameters:

  • source (PAR8)

    (in)

  • destination (PAR8)

    (out)



886
887
888
889
890
891
892
893
894
895
896
897
# File 'lib/lignite/ev3_ops.rb', line 886

def move8_8(source, destination)
  logger.debug do
    args = [source, destination]
    "called move8_8 with #{args.inspect}"
  end

  bytes = u8(0x30)
  bytes += param_simple(source)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#move8_f(source, destination) ⇒ Object

Move 8 bit value from SOURCE to DESTINATION

Parameters:

  • source (PAR8)

    (in)

  • destination (PARF)

    (out)



934
935
936
937
938
939
940
941
942
943
944
945
# File 'lib/lignite/ev3_ops.rb', line 934

def move8_f(source, destination)
  logger.debug do
    args = [source, destination]
    "called move8_f with #{args.inspect}"
  end

  bytes = u8(0x33)
  bytes += param_simple(source)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#movef_16(source, destination) ⇒ Object

Move floating point value from SOURCE to DESTINATION

Parameters:

  • source (PARF)

    (in)

  • destination (PAR16)

    (out)



1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
# File 'lib/lignite/ev3_ops.rb', line 1094

def movef_16(source, destination)
  logger.debug do
    args = [source, destination]
    "called movef_16 with #{args.inspect}"
  end

  bytes = u8(0x3D)
  bytes += param_simple(source)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#movef_32(source, destination) ⇒ Object

Move floating point value from SOURCE to DESTINATION

Parameters:

  • source (PARF)

    (in)

  • destination (PAR32)

    (out)



1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
# File 'lib/lignite/ev3_ops.rb', line 1110

def movef_32(source, destination)
  logger.debug do
    args = [source, destination]
    "called movef_32 with #{args.inspect}"
  end

  bytes = u8(0x3E)
  bytes += param_simple(source)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#movef_8(source, destination) ⇒ Object

Move floating point value from SOURCE to DESTINATION

Parameters:

  • source (PARF)

    (in)

  • destination (PAR8)

    (out)



1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
# File 'lib/lignite/ev3_ops.rb', line 1078

def movef_8(source, destination)
  logger.debug do
    args = [source, destination]
    "called movef_8 with #{args.inspect}"
  end

  bytes = u8(0x3C)
  bytes += param_simple(source)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#movef_f(source, destination) ⇒ Object

Move floating point value from SOURCE to DESTINATION

Parameters:

  • source (PARF)

    (in)

  • destination (PARF)

    (out)



1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
# File 'lib/lignite/ev3_ops.rb', line 1126

def movef_f(source, destination)
  logger.debug do
    args = [source, destination]
    "called movef_f with #{args.inspect}"
  end

  bytes = u8(0x3F)
  bytes += param_simple(source)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#mul16(source1, source2, destination) ⇒ Object

Multiply two 16 bit values DESTINATION = SOURCE1 * SOURCE2

Parameters:

  • source1 (PAR16)

    (in)

  • source2 (PAR16)

    (in)

  • destination (PAR16)

    (out)



527
528
529
530
531
532
533
534
535
536
537
538
539
# File 'lib/lignite/ev3_ops.rb', line 527

def mul16(source1, source2, destination)
  logger.debug do
    args = [source1, source2, destination]
    "called mul16 with #{args.inspect}"
  end

  bytes = u8(0x19)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#mul32(source1, source2, destination) ⇒ Object

Multiply two 32 bit values DESTINATION = SOURCE1 * SOURCE2

Parameters:

  • source1 (PAR32)

    (in)

  • source2 (PAR32)

    (in)

  • destination (PAR32)

    (out)



545
546
547
548
549
550
551
552
553
554
555
556
557
# File 'lib/lignite/ev3_ops.rb', line 545

def mul32(source1, source2, destination)
  logger.debug do
    args = [source1, source2, destination]
    "called mul32 with #{args.inspect}"
  end

  bytes = u8(0x1A)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#mul8(source1, source2, destination) ⇒ Object

Multiply two 8 bit values DESTINATION = SOURCE1 * SOURCE2

Parameters:

  • source1 (PAR8)

    (in)

  • source2 (PAR8)

    (in)

  • destination (PAR8)

    (out)



509
510
511
512
513
514
515
516
517
518
519
520
521
# File 'lib/lignite/ev3_ops.rb', line 509

def mul8(source1, source2, destination)
  logger.debug do
    args = [source1, source2, destination]
    "called mul8 with #{args.inspect}"
  end

  bytes = u8(0x18)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#mulf(source1, source2, destination) ⇒ Object

Multiply two floating point values DESTINATION = SOURCE1 * SOURCE2

Parameters:

  • source1 (PARF)

    (in)

  • source2 (PARF)

    (in)

  • destination (PARF)

    (out)



563
564
565
566
567
568
569
570
571
572
573
574
575
# File 'lib/lignite/ev3_ops.rb', line 563

def mulf(source1, source2, destination)
  logger.debug do
    args = [source1, source2, destination]
    "called mulf with #{args.inspect}"
  end

  bytes = u8(0x1B)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#nopObject

This code does absolutely nothing



19
20
21
22
23
24
25
26
27
28
# File 'lib/lignite/ev3_ops.rb', line 19

def nop
  logger.debug do
    args = []
    "called nop with #{args.inspect}"
  end

  bytes = u8(0x01)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#note_to_freq(note, freq) ⇒ Object

Convert note to tone

Parameters:

  • note (PAR8)

    (in) Note string (HND) (e.c. “C#4”)

  • freq (PAR16)

    (out) Frequency [Hz]



1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
# File 'lib/lignite/ev3_ops.rb', line 1770

def note_to_freq(note, freq)
  logger.debug do
    args = [note, freq]
    "called note_to_freq with #{args.inspect}"
  end

  bytes = u8(0x63)
  bytes += param_simple(note)
  bytes += param_simple(freq)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#object_endObject

Stops current object



149
150
151
152
153
154
155
156
157
158
# File 'lib/lignite/ev3_ops.rb', line 149

def object_end
  logger.debug do
    args = []
    "called object_end with #{args.inspect}"
  end

  bytes = u8(0x0A)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#object_start(objid) ⇒ Object

Start specific object

Parameters:

  • objid (PAR16)

    (in) Object id



80
81
82
83
84
85
86
87
88
89
90
# File 'lib/lignite/ev3_ops.rb', line 80

def object_start(objid)
  logger.debug do
    args = [objid]
    "called object_start with #{args.inspect}"
  end

  bytes = u8(0x05)
  bytes += param_simple(objid)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#object_stop(objid) ⇒ Object

Stops specific object

Parameters:

  • objid (PAR16)

    (in) Object id



66
67
68
69
70
71
72
73
74
75
76
# File 'lib/lignite/ev3_ops.rb', line 66

def object_stop(objid)
  logger.debug do
    args = [objid]
    "called object_stop with #{args.inspect}"
  end

  bytes = u8(0x04)
  bytes += param_simple(objid)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#object_trig(objid) ⇒ Object

Triggers object and run the object if fully triggered

Parameters:

  • objid (PAR16)

    (in) Object id



94
95
96
97
98
99
100
101
102
103
104
# File 'lib/lignite/ev3_ops.rb', line 94

def object_trig(objid)
  logger.debug do
    args = [objid]
    "called object_trig with #{args.inspect}"
  end

  bytes = u8(0x06)
  bytes += param_simple(objid)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#object_wait(objid) ⇒ Object

Wait until object has run

Parameters:

  • objid (PAR16)

    (in) Object id



108
109
110
111
112
113
114
115
116
117
118
# File 'lib/lignite/ev3_ops.rb', line 108

def object_wait(objid)
  logger.debug do
    args = [objid]
    "called object_wait with #{args.inspect}"
  end

  bytes = u8(0x07)
  bytes += param_simple(objid)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#or16(source1, source2, destination) ⇒ Object

Or two 16 bit values DESTINATION = SOURCE1 | SOURCE2

Parameters:

  • source1 (PAR16)

    (in)

  • source2 (PAR16)

    (in)

  • destination (PAR16)

    (out)



671
672
673
674
675
676
677
678
679
680
681
682
683
# File 'lib/lignite/ev3_ops.rb', line 671

def or16(source1, source2, destination)
  logger.debug do
    args = [source1, source2, destination]
    "called or16 with #{args.inspect}"
  end

  bytes = u8(0x21)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#or32(source1, source2, destination) ⇒ Object

Or two 32 bit values DESTINATION = SOURCE1 | SOURCE2

Parameters:

  • source1 (PAR32)

    (in)

  • source2 (PAR32)

    (in)

  • destination (PAR32)

    (out)



689
690
691
692
693
694
695
696
697
698
699
700
701
# File 'lib/lignite/ev3_ops.rb', line 689

def or32(source1, source2, destination)
  logger.debug do
    args = [source1, source2, destination]
    "called or32 with #{args.inspect}"
  end

  bytes = u8(0x22)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#or8(source1, source2, destination) ⇒ Object

Or two 8 bit values DESTINATION = SOURCE1 | SOURCE2

Parameters:

  • source1 (PAR8)

    (in)

  • source2 (PAR8)

    (in)

  • destination (PAR8)

    (out)



653
654
655
656
657
658
659
660
661
662
663
664
665
# File 'lib/lignite/ev3_ops.rb', line 653

def or8(source1, source2, destination)
  logger.debug do
    args = [source1, source2, destination]
    "called or8 with #{args.inspect}"
  end

  bytes = u8(0x20)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#output_clr_count(layer, nos) ⇒ Object

Clearing tacho count when used as sensor

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • nos (PAR8)

    (in) Output bit field [0x00..0x0F]



6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
# File 'lib/lignite/ev3_ops.rb', line 6688

def output_clr_count(layer, nos)
  logger.debug do
    args = [layer, nos]
    "called output_clr_count with #{args.inspect}"
  end

  bytes = u8(0xB2)
  bytes += param_simple(layer)
  bytes += param_simple(nos)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#output_get_count(layer, nos, tacho) ⇒ Object

Getting tacho count when used as sensor - values are in shared memory

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • nos (PAR8)

    (in) Output bit field [0x00..0x0F]

  • tacho (PAR32)

    (out) Tacho pulses [-MAX .. +MAX]



6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
# File 'lib/lignite/ev3_ops.rb', line 6705

def output_get_count(layer, nos, tacho)
  logger.debug do
    args = [layer, nos, tacho]
    "called output_get_count with #{args.inspect}"
  end

  bytes = u8(0xB3)
  bytes += param_simple(layer)
  bytes += param_simple(nos)
  bytes += param_simple(tacho)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#output_get_type(layer, no, type) ⇒ Object

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • no (PAR8)

    (in) Port number

  • type (PAR8)

    (out)



6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
# File 'lib/lignite/ev3_ops.rb', line 6325

def output_get_type(layer, no, type)
  logger.debug do
    args = [layer, no, type]
    "called output_get_type with #{args.inspect}"
  end

  bytes = u8(0xA0)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  bytes += param_simple(type)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#output_polarity(layer, nos, pol) ⇒ Object

Set polarity of the outputs

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • nos (PAR8)

    (in) Output bit field [0x00..0x0F]

  • pol (PAR8)

    (in) Polarity [-1,0,1]



6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
# File 'lib/lignite/ev3_ops.rb', line 6447

def output_polarity(layer, nos, pol)
  logger.debug do
    args = [layer, nos, pol]
    "called output_polarity with #{args.inspect}"
  end

  bytes = u8(0xA7)
  bytes += param_simple(layer)
  bytes += param_simple(nos)
  bytes += param_simple(pol)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#output_position(layer, nos, pos) ⇒ Object

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • nos (PAR8)

    (in) Output bit field [0x00..0x0F]

  • pos (PAR32)

    (out)



6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
# File 'lib/lignite/ev3_ops.rb', line 6519

def output_position(layer, nos, pos)
  logger.debug do
    args = [layer, nos, pos]
    "called output_position with #{args.inspect}"
  end

  bytes = u8(0xAB)
  bytes += param_simple(layer)
  bytes += param_simple(nos)
  bytes += param_simple(pos)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#output_power(layer, nos, power) ⇒ Object

Set power of the outputs

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • nos (PAR8)

    (in) Output bit field [0x00..0x0F]

  • power (PAR8)

    (in) Power [-100..100%]



6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
# File 'lib/lignite/ev3_ops.rb', line 6395

def output_power(layer, nos, power)
  logger.debug do
    args = [layer, nos, power]
    "called output_power with #{args.inspect}"
  end

  bytes = u8(0xA4)
  bytes += param_simple(layer)
  bytes += param_simple(nos)
  bytes += param_simple(power)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#output_prg_stopObject

Program stop



6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
# File 'lib/lignite/ev3_ops.rb', line 6720

def output_prg_stop
  logger.debug do
    args = []
    "called output_prg_stop with #{args.inspect}"
  end

  bytes = u8(0xB4)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#output_read(layer, no, speed, tacho) ⇒ Object

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • no (PAR8)

    (in) NO - Output no [0..3]

  • speed (PAR8)

    (out) Speed [-100..100%]

  • tacho (PAR32)

    (out) Tacho pulses [-MAX .. +MAX]



6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
# File 'lib/lignite/ev3_ops.rb', line 6466

def output_read(layer, no, speed, tacho)
  logger.debug do
    args = [layer, no, speed, tacho]
    "called output_read with #{args.inspect}"
  end

  bytes = u8(0xA8)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  bytes += param_simple(speed)
  bytes += param_simple(tacho)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#output_ready(layer, nos) ⇒ Object

Wait for output ready (wait for completion)

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • nos (PAR8)

    (in) Output bit field [0x00..0x0F]



6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
# File 'lib/lignite/ev3_ops.rb', line 6502

def output_ready(layer, nos)
  logger.debug do
    args = [layer, nos]
    "called output_ready with #{args.inspect}"
  end

  bytes = u8(0xAA)
  bytes += param_simple(layer)
  bytes += param_simple(nos)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#output_reset(layer, nos) ⇒ Object

Resets the Tacho counts

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • nos (PAR8)

    (in) Output bit field [0x00..0x0F]



6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
# File 'lib/lignite/ev3_ops.rb', line 6360

def output_reset(layer, nos)
  logger.debug do
    args = [layer, nos]
    "called output_reset with #{args.inspect}"
  end

  bytes = u8(0xA2)
  bytes += param_simple(layer)
  bytes += param_simple(nos)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#output_set_type(layer, no, type) ⇒ Object

Set output type

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • no (PAR8)

    (in) Output no [0..3]

  • type (PAR8)

    (out) Device type id from typedata.rcf



6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
# File 'lib/lignite/ev3_ops.rb', line 6343

def output_set_type(layer, no, type)
  logger.debug do
    args = [layer, no, type]
    "called output_set_type with #{args.inspect}"
  end

  bytes = u8(0xA1)
  bytes += param_simple(layer)
  bytes += param_simple(no)
  bytes += param_simple(type)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#output_speed(layer, nos, speed) ⇒ Object

Set speed of the outputs

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • nos (PAR8)

    (in) Output bit field [0x00..0x0F]

  • speed (PAR8)

    (in) Speed [-100..100%]



6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
# File 'lib/lignite/ev3_ops.rb', line 6413

def output_speed(layer, nos, speed)
  logger.debug do
    args = [layer, nos, speed]
    "called output_speed with #{args.inspect}"
  end

  bytes = u8(0xA5)
  bytes += param_simple(layer)
  bytes += param_simple(nos)
  bytes += param_simple(speed)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#output_start(layer, nos) ⇒ Object

Starts the outputs

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • nos (PAR8)

    (in) Output bit field [0x00..0x0F]



6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
# File 'lib/lignite/ev3_ops.rb', line 6430

def output_start(layer, nos)
  logger.debug do
    args = [layer, nos]
    "called output_start with #{args.inspect}"
  end

  bytes = u8(0xA6)
  bytes += param_simple(layer)
  bytes += param_simple(nos)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#output_step_power(layer, nos, power, step1, step2, step3, brake) ⇒ Object

Set Ramp up, constant and rampdown steps and power of the outputs

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • nos (PAR8)

    (in) Output bit field [0x00..0x0F]

  • power (PAR8)

    (in) Power [-100..100%]

  • step1 (PAR32)

    (in) Tacho pulses [0..MAX]

  • step2 (PAR32)

    (in) Tacho pulses [0..MAX]

  • step3 (PAR32)

    (in) Tacho pulses [0..MAX]

  • brake (PAR8)

    (in) 0 = Coast, 1 = BRAKE



6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
# File 'lib/lignite/ev3_ops.rb', line 6541

def output_step_power(layer, nos, power, step1, step2, step3, brake)
  logger.debug do
    args = [layer, nos, power, step1, step2, step3, brake]
    "called output_step_power with #{args.inspect}"
  end

  bytes = u8(0xAC)
  bytes += param_simple(layer)
  bytes += param_simple(nos)
  bytes += param_simple(power)
  bytes += param_simple(step1)
  bytes += param_simple(step2)
  bytes += param_simple(step3)
  bytes += param_simple(brake)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#output_step_speed(layer, nos, speed, step1, step2, step3, brake) ⇒ Object

Set Ramp up, constant and rampdown steps and power of the outputs

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • nos (PAR8)

    (in) Output bit field [0x00..0x0F]

  • speed (PAR8)

    (in) Speed [-100..100%]

  • step1 (PAR32)

    (in) Tacho pulses [0..MAX]

  • step2 (PAR32)

    (in) Tacho pulses [0..MAX]

  • step3 (PAR32)

    (in) Tacho pulses [0..MAX]

  • brake (PAR8)

    (in) 0 = Coast, 1 = BRAKE



6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
# File 'lib/lignite/ev3_ops.rb', line 6593

def output_step_speed(layer, nos, speed, step1, step2, step3, brake)
  logger.debug do
    args = [layer, nos, speed, step1, step2, step3, brake]
    "called output_step_speed with #{args.inspect}"
  end

  bytes = u8(0xAE)
  bytes += param_simple(layer)
  bytes += param_simple(nos)
  bytes += param_simple(speed)
  bytes += param_simple(step1)
  bytes += param_simple(step2)
  bytes += param_simple(step3)
  bytes += param_simple(brake)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#output_step_sync(layer, nos, speed, turn, step, brake) ⇒ Object

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • nos (PAR8)

    (in) Output bit field [0x00..0x0F]

  • speed (PAR8)

    (in) Speed [-100..100%]

  • turn (PAR16)

    (in) Turn Ratio [-200..200]

  • step (PAR32)

    (in) Tacho Pulses [0..MAX]

  • brake (PAR8)

    (in) 0 = Coast, 1 = BRAKE



6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
# File 'lib/lignite/ev3_ops.rb', line 6644

def output_step_sync(layer, nos, speed, turn, step, brake)
  logger.debug do
    args = [layer, nos, speed, turn, step, brake]
    "called output_step_sync with #{args.inspect}"
  end

  bytes = u8(0xB0)
  bytes += param_simple(layer)
  bytes += param_simple(nos)
  bytes += param_simple(speed)
  bytes += param_simple(turn)
  bytes += param_simple(step)
  bytes += param_simple(brake)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#output_stop(layer, nos, brake) ⇒ Object

Stops the outputs

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • nos (PAR8)

    (in) Output bit field [0x00..0x0F]

  • brake (PAR8)

    (in) 0 = Coast, 1 = BRAKE



6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
# File 'lib/lignite/ev3_ops.rb', line 6377

def output_stop(layer, nos, brake)
  logger.debug do
    args = [layer, nos, brake]
    "called output_stop with #{args.inspect}"
  end

  bytes = u8(0xA3)
  bytes += param_simple(layer)
  bytes += param_simple(nos)
  bytes += param_simple(brake)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#output_test(layer, nos, busy) ⇒ Object

Testing if output is not used

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • nos (PAR8)

    (in) Output bit field [0x00..0x0F]

  • busy (PAR8)

    (out) Output busy flag (0 = ready, 1 = Busy)



6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
# File 'lib/lignite/ev3_ops.rb', line 6485

def output_test(layer, nos, busy)
  logger.debug do
    args = [layer, nos, busy]
    "called output_test with #{args.inspect}"
  end

  bytes = u8(0xA9)
  bytes += param_simple(layer)
  bytes += param_simple(nos)
  bytes += param_simple(busy)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#output_time_power(layer, nos, power, time1, time2, time3, brake) ⇒ Object

Set Ramp up, constant and rampdown steps and power of the outputs

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • nos (PAR8)

    (in) Output bit field [0x00..0x0F]

  • power (PAR8)

    (in) Power [-100..100%]

  • time1 (PAR32)

    (in) Time in Ms [0..MAX]

  • time2 (PAR32)

    (in) Time in Ms [0..MAX]

  • time3 (PAR32)

    (in) Time in Ms [0..MAX]

  • brake (PAR8)

    (in) 0 = Coast, 1 = BRAKE



6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
# File 'lib/lignite/ev3_ops.rb', line 6567

def output_time_power(layer, nos, power, time1, time2, time3, brake)
  logger.debug do
    args = [layer, nos, power, time1, time2, time3, brake]
    "called output_time_power with #{args.inspect}"
  end

  bytes = u8(0xAD)
  bytes += param_simple(layer)
  bytes += param_simple(nos)
  bytes += param_simple(power)
  bytes += param_simple(time1)
  bytes += param_simple(time2)
  bytes += param_simple(time3)
  bytes += param_simple(brake)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#output_time_speed(layer, nos, speed, time1, time2, time3, brake) ⇒ Object

Set Ramp up, constant and rampdown steps and power of the outputs

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • nos (PAR8)

    (in) Output bit field [0x00..0x0F]

  • speed (PAR8)

    (in) Speed [-100..100%]

  • time1 (PAR32)

    (in) Time in Ms [0..MAX]

  • time2 (PAR32)

    (in) Time in Ms [0..MAX]

  • time3 (PAR32)

    (in) Time in Ms [0..MAX]

  • brake (PAR8)

    (in) 0 = Coast, 1 = BRAKE



6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
# File 'lib/lignite/ev3_ops.rb', line 6619

def output_time_speed(layer, nos, speed, time1, time2, time3, brake)
  logger.debug do
    args = [layer, nos, speed, time1, time2, time3, brake]
    "called output_time_speed with #{args.inspect}"
  end

  bytes = u8(0xAF)
  bytes += param_simple(layer)
  bytes += param_simple(nos)
  bytes += param_simple(speed)
  bytes += param_simple(time1)
  bytes += param_simple(time2)
  bytes += param_simple(time3)
  bytes += param_simple(brake)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#output_time_sync(layer, nos, speed, turn, time, brake) ⇒ Object

Parameters:

  • layer (PAR8)

    (in) Daisy chain layer number [0..3]

  • nos (PAR8)

    (in) Output bit field [0x00..0x0F]

  • speed (PAR8)

    (in) Speed [-100..100%]

  • turn (PAR16)

    (in) Turn Ratio [-200..200]

  • time (PAR32)

    (in) Time in ms [0..MAX]

  • brake (PAR8)

    (in) 0 = Coast, 1 = BRAKE



6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
# File 'lib/lignite/ev3_ops.rb', line 6668

def output_time_sync(layer, nos, speed, turn, time, brake)
  logger.debug do
    args = [layer, nos, speed, turn, time, brake]
    "called output_time_sync with #{args.inspect}"
  end

  bytes = u8(0xB1)
  bytes += param_simple(layer)
  bytes += param_simple(nos)
  bytes += param_simple(speed)
  bytes += param_simple(turn)
  bytes += param_simple(time)
  bytes += param_simple(brake)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#port_cnv_input(portin, layer, portout) ⇒ Object

Convert encoded port to Layer and Port

Parameters:

  • portin (PAR32)

    (in) EncodedPortNumber

  • layer (PAR8)

    (out) Layer

  • portout (PAR8)

    (out) 0-index port for use with VM commands



1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
# File 'lib/lignite/ev3_ops.rb', line 1753

def port_cnv_input(portin, layer, portout)
  logger.debug do
    args = [portin, layer, portout]
    "called port_cnv_input with #{args.inspect}"
  end

  bytes = u8(0x62)
  bytes += param_simple(portin)
  bytes += param_simple(layer)
  bytes += param_simple(portout)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#port_cnv_output(portin, layer, bitfield, inverted) ⇒ Object

Convert encoded port to Layer and Bitfield

Parameters:

  • portin (PAR32)

    (in) EncodedPortNumber

  • layer (PAR8)

    (out) Layer

  • bitfield (PAR8)

    (out) Bitfield

  • inverted (PAR8)

    (out) yes if left/right motor are inverted (ie, C&A)



1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
# File 'lib/lignite/ev3_ops.rb', line 1734

def port_cnv_output(portin, layer, bitfield, inverted)
  logger.debug do
    args = [portin, layer, bitfield, inverted]
    "called port_cnv_output with #{args.inspect}"
  end

  bytes = u8(0x61)
  bytes += param_simple(portin)
  bytes += param_simple(layer)
  bytes += param_simple(bitfield)
  bytes += param_simple(inverted)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#probe(prgid, objid, offset, size) ⇒ Object

Display globals or object locals on terminal

Parameters:

  • prgid (PAR16)

    (in) Program slot number

  • objid (PAR16)

    (in) Object id (zero means globals)

  • offset (PAR32)

    (in) Offset (start from)

  • size (PAR32)

    (in) Size (length of dump) zero means all (max 1024)



328
329
330
331
332
333
334
335
336
337
338
339
340
341
# File 'lib/lignite/ev3_ops.rb', line 328

def probe(prgid, objid, offset, size)
  logger.debug do
    args = [prgid, objid, offset, size]
    "called probe with #{args.inspect}"
  end

  bytes = u8(0x0E)
  bytes += param_simple(prgid)
  bytes += param_simple(objid)
  bytes += param_simple(offset)
  bytes += param_simple(size)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#program_info(*args) ⇒ Object



314
315
316
317
318
319
# File 'lib/lignite/ev3_ops.rb', line 314

def program_info(*args)
  logger.debug "called program_info with #{args.inspect}"
  cvalue = args.shift
  csym = MULTIPLEX_PROGRAM_INFO.fetch(cvalue)
  __send__("program_info_#{csym}", *args)
end

#program_info_get_prgname(prgid, name) ⇒ Object

Parameters:

  • prgid (PAR16)

    (in) Program slot number

  • name (PAR8)

    (out) Program name



290
291
292
293
294
295
296
297
298
299
300
301
302
# File 'lib/lignite/ev3_ops.rb', line 290

def program_info_get_prgname(prgid, name)
  logger.debug do
    args = [prgid, name]
    "called program_info_get_prgname with #{args.inspect}"
  end

  bytes = u8(0x0C)
  bytes += param_simple(26)
  bytes += param_simple(prgid)
  bytes += param_simple(name)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#program_info_get_prgresult(prgid, data) ⇒ Object

Parameters:

  • prgid (PAR16)

    (in) Program slot number

  • data (PAR8)

    (out) Program result [OK, BUSY, FAIL]



254
255
256
257
258
259
260
261
262
263
264
265
266
# File 'lib/lignite/ev3_ops.rb', line 254

def program_info_get_prgresult(prgid, data)
  logger.debug do
    args = [prgid, data]
    "called program_info_get_prgresult with #{args.inspect}"
  end

  bytes = u8(0x0C)
  bytes += param_simple(24)
  bytes += param_simple(prgid)
  bytes += param_simple(data)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#program_info_get_speed(prgid, data) ⇒ Object

Parameters:

  • prgid (PAR16)

    (in) Program slot number

  • data (PAR32)

    (out) Program speed [instr/S]



235
236
237
238
239
240
241
242
243
244
245
246
247
# File 'lib/lignite/ev3_ops.rb', line 235

def program_info_get_speed(prgid, data)
  logger.debug do
    args = [prgid, data]
    "called program_info_get_speed with #{args.inspect}"
  end

  bytes = u8(0x0C)
  bytes += param_simple(23)
  bytes += param_simple(prgid)
  bytes += param_simple(data)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#program_info_get_status(prgid, data) ⇒ Object

Parameters:

  • prgid (PAR16)

    (in) Program slot number

  • data (PAR8)

    (out) Program status



216
217
218
219
220
221
222
223
224
225
226
227
228
# File 'lib/lignite/ev3_ops.rb', line 216

def program_info_get_status(prgid, data)
  logger.debug do
    args = [prgid, data]
    "called program_info_get_status with #{args.inspect}"
  end

  bytes = u8(0x0C)
  bytes += param_simple(22)
  bytes += param_simple(prgid)
  bytes += param_simple(data)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#program_info_obj_start(prgid, objid) ⇒ Object

Parameters:

  • prgid (PAR16)

    (in) Program slot number

  • objid (PAR16)

    (in) Object id



197
198
199
200
201
202
203
204
205
206
207
208
209
# File 'lib/lignite/ev3_ops.rb', line 197

def program_info_obj_start(prgid, objid)
  logger.debug do
    args = [prgid, objid]
    "called program_info_obj_start with #{args.inspect}"
  end

  bytes = u8(0x0C)
  bytes += param_simple(4)
  bytes += param_simple(prgid)
  bytes += param_simple(objid)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#program_info_obj_stop(prgid, objid) ⇒ Object

Parameters:

  • prgid (PAR16)

    (in) Program slot number

  • objid (PAR16)

    (in) Object id



178
179
180
181
182
183
184
185
186
187
188
189
190
# File 'lib/lignite/ev3_ops.rb', line 178

def program_info_obj_stop(prgid, objid)
  logger.debug do
    args = [prgid, objid]
    "called program_info_obj_stop with #{args.inspect}"
  end

  bytes = u8(0x0C)
  bytes += param_simple(0)
  bytes += param_simple(prgid)
  bytes += param_simple(objid)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#program_info_set_instr(prgid) ⇒ Object

Set number of instructions before VMThread change

Parameters:

  • prgid (PAR16)

    (in) Program slot number



272
273
274
275
276
277
278
279
280
281
282
283
# File 'lib/lignite/ev3_ops.rb', line 272

def program_info_set_instr(prgid)
  logger.debug do
    args = [prgid]
    "called program_info_set_instr with #{args.inspect}"
  end

  bytes = u8(0x0C)
  bytes += param_simple(25)
  bytes += param_simple(prgid)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#program_start(prgid, size, ip, debug) ⇒ Object

Start program id slot

Parameters:

  • prgid (PAR16)

    (in) Program id

  • size (PAR32)

    (in) Size of image

  • ip (PAR32)

    (in) Address of image (value from opFILE(LOAD_IMAGE,..) )

  • debug (PAR8)

    (in) Debug mode (0=normal, 1=debug, 2=don’t execute)



49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/lignite/ev3_ops.rb', line 49

def program_start(prgid, size, ip, debug)
  logger.debug do
    args = [prgid, size, ip, debug]
    "called program_start with #{args.inspect}"
  end

  bytes = u8(0x03)
  bytes += param_simple(prgid)
  bytes += param_simple(size)
  bytes += param_simple(ip)
  bytes += param_simple(debug)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#program_stop(prgid) ⇒ Object

Stops specific program id slot

Parameters:

  • prgid (PAR16)

    (in) Program id (GUI_SLOT = all, CURRENT_SLOT = current)



32
33
34
35
36
37
38
39
40
41
42
# File 'lib/lignite/ev3_ops.rb', line 32

def program_stop(prgid)
  logger.debug do
    args = [prgid]
    "called program_stop with #{args.inspect}"
  end

  bytes = u8(0x02)
  bytes += param_simple(prgid)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#random(min, max, value) ⇒ Object

Get random value

Parameters:

  • min (PAR16)

    (in) Minimum value

  • max (PAR16)

    (in) Maximum value

  • value (PAR16)

    (out) value



5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
# File 'lib/lignite/ev3_ops.rb', line 5311

def random(min, max, value)
  logger.debug do
    args = [min, max, value]
    "called random with #{args.inspect}"
  end

  bytes = u8(0x8E)
  bytes += param_simple(min)
  bytes += param_simple(max)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#read16(source, index, destination) ⇒ Object

Read 16 bit value from SOURCE to DESTINATION

Parameters:

  • source (PAR16)

    (in) First value in array of values

  • index (PAR8)

    (in) Index to array member to read

  • destination (PAR16)

    (out) Variable to receive read value



8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
# File 'lib/lignite/ev3_ops.rb', line 8074

def read16(source, index, destination)
  logger.debug do
    args = [source, index, destination]
    "called read16 with #{args.inspect}"
  end

  bytes = u8(0xC9)
  bytes += param_simple(source)
  bytes += param_simple(index)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#read32(source, index, destination) ⇒ Object

Read 32 bit value from SOURCE to DESTINATION

Parameters:

  • source (PAR32)

    (in) First value in array of values

  • index (PAR8)

    (in) Index to array member to read

  • destination (PAR32)

    (out) Variable to receive read value



8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
# File 'lib/lignite/ev3_ops.rb', line 8092

def read32(source, index, destination)
  logger.debug do
    args = [source, index, destination]
    "called read32 with #{args.inspect}"
  end

  bytes = u8(0xCA)
  bytes += param_simple(source)
  bytes += param_simple(index)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#read8(source, index, destination) ⇒ Object

Read 8 bit value from SOURCE to DESTINATION

Parameters:

  • source (PAR8)

    (in) First value in array of values

  • index (PAR8)

    (in) Index to array member to read

  • destination (PAR8)

    (out) Variable to receive read value



8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
# File 'lib/lignite/ev3_ops.rb', line 8056

def read8(source, index, destination)
  logger.debug do
    args = [source, index, destination]
    "called read8 with #{args.inspect}"
  end

  bytes = u8(0xC8)
  bytes += param_simple(source)
  bytes += param_simple(index)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#readf(source, index, destination) ⇒ Object

Read floating point value from SOURCE to DESTINATION

Parameters:

  • source (PARF)

    (in) First value in array of values

  • index (PAR8)

    (in) Index to array member to read

  • destination (PARF)

    (out) Variable to receive read value



8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
# File 'lib/lignite/ev3_ops.rb', line 8110

def readf(source, index, destination)
  logger.debug do
    args = [source, index, destination]
    "called readf with #{args.inspect}"
  end

  bytes = u8(0xCB)
  bytes += param_simple(source)
  bytes += param_simple(index)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#returnObject

Return from byte code subroutine



121
122
123
124
125
126
127
128
129
130
# File 'lib/lignite/ev3_ops.rb', line 121

def return
  logger.debug do
    args = []
    "called return with #{args.inspect}"
  end

  bytes = u8(0x08)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#rl16(source1, source2, destination) ⇒ Object

Rotate left 16 bit value DESTINATION = SOURCE1 << SOURCE2

Parameters:

  • source1 (PAR16)

    (in)

  • source2 (PAR16)

    (in)

  • destination (PAR16)

    (out)



833
834
835
836
837
838
839
840
841
842
843
844
845
# File 'lib/lignite/ev3_ops.rb', line 833

def rl16(source1, source2, destination)
  logger.debug do
    args = [source1, source2, destination]
    "called rl16 with #{args.inspect}"
  end

  bytes = u8(0x2D)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#rl32(source1, source2, destination) ⇒ Object

Rotate left 32 bit value DESTINATION = SOURCE1 << SOURCE2

Parameters:

  • source1 (PAR32)

    (in)

  • source2 (PAR32)

    (in)

  • destination (PAR32)

    (out)



851
852
853
854
855
856
857
858
859
860
861
862
863
# File 'lib/lignite/ev3_ops.rb', line 851

def rl32(source1, source2, destination)
  logger.debug do
    args = [source1, source2, destination]
    "called rl32 with #{args.inspect}"
  end

  bytes = u8(0x2E)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#rl8(source1, source2, destination) ⇒ Object

Rotate left 8 bit value DESTINATION = SOURCE1 << SOURCE2

Parameters:

  • source1 (PAR8)

    (in)

  • source2 (PAR8)

    (in)

  • destination (PAR8)

    (out)



815
816
817
818
819
820
821
822
823
824
825
826
827
# File 'lib/lignite/ev3_ops.rb', line 815

def rl8(source1, source2, destination)
  logger.debug do
    args = [source1, source2, destination]
    "called rl8 with #{args.inspect}"
  end

  bytes = u8(0x2C)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#select16(flag, source1, source2, result) ⇒ Object

If FLAG is set move SOURCE1 to RESULT else move SOURCE2 to RESULT

Parameters:

  • flag (PAR8)

    (in)

  • source1 (PAR16)

    (in)

  • source2 (PAR16)

    (in)

  • result (PAR16)

    (out)



1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
# File 'lib/lignite/ev3_ops.rb', line 1658

def select16(flag, source1, source2, result)
  logger.debug do
    args = [flag, source1, source2, result]
    "called select16 with #{args.inspect}"
  end

  bytes = u8(0x5D)
  bytes += param_simple(flag)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(result)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#select32(flag, source1, source2, result) ⇒ Object

If FLAG is set move SOURCE1 to RESULT else move SOURCE2 to RESULT

Parameters:

  • flag (PAR8)

    (in)

  • source1 (PAR32)

    (in)

  • source2 (PAR32)

    (in)

  • result (PAR32)

    (out)



1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
# File 'lib/lignite/ev3_ops.rb', line 1678

def select32(flag, source1, source2, result)
  logger.debug do
    args = [flag, source1, source2, result]
    "called select32 with #{args.inspect}"
  end

  bytes = u8(0x5E)
  bytes += param_simple(flag)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(result)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#select8(flag, source1, source2, result) ⇒ Object

If FLAG is set move SOURCE1 to RESULT else move SOURCE2 to RESULT

Parameters:

  • flag (PAR8)

    (in)

  • source1 (PAR8)

    (in)

  • source2 (PAR8)

    (in)

  • result (PAR8)

    (out)



1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
# File 'lib/lignite/ev3_ops.rb', line 1638

def select8(flag, source1, source2, result)
  logger.debug do
    args = [flag, source1, source2, result]
    "called select8 with #{args.inspect}"
  end

  bytes = u8(0x5C)
  bytes += param_simple(flag)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(result)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#selectf(flag, source1, source2, result) ⇒ Object

If FLAG is set move SOURCE1 to RESULT else move SOURCE2 to RESULT

Parameters:

  • flag (PAR8)

    (in)

  • source1 (PARF)

    (in)

  • source2 (PARF)

    (in)

  • result (PARF)

    (out)



1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
# File 'lib/lignite/ev3_ops.rb', line 1698

def selectf(flag, source1, source2, result)
  logger.debug do
    args = [flag, source1, source2, result]
    "called selectf with #{args.inspect}"
  end

  bytes = u8(0x5F)
  bytes += param_simple(flag)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(result)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#sleepObject

Breaks execution of current VMTHREAD



161
162
163
164
165
166
167
168
169
170
# File 'lib/lignite/ev3_ops.rb', line 161

def sleep
  logger.debug do
    args = []
    "called sleep with #{args.inspect}"
  end

  bytes = u8(0x0B)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#sound(*args) ⇒ Object



5489
5490
5491
5492
5493
5494
# File 'lib/lignite/ev3_ops.rb', line 5489

def sound(*args)
  logger.debug "called sound with #{args.inspect}"
  cvalue = args.shift
  csym = MULTIPLEX_SOUND.fetch(cvalue)
  __send__("sound_#{csym}", *args)
end

#sound_breakObject



5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
# File 'lib/lignite/ev3_ops.rb', line 5425

def sound_break
  logger.debug do
    args = []
    "called sound_break with #{args.inspect}"
  end

  bytes = u8(0x94)
  bytes += param_simple(0)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#sound_readyObject

Wait for sound ready (wait until sound finished)



5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
# File 'lib/lignite/ev3_ops.rb', line 5511

def sound_ready
  logger.debug do
    args = []
    "called sound_ready with #{args.inspect}"
  end

  bytes = u8(0x96)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#sound_serviceObject



5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
# File 'lib/lignite/ev3_ops.rb', line 5469

def sound_service
  logger.debug do
    args = []
    "called sound_service with #{args.inspect}"
  end

  bytes = u8(0x94)
  bytes += param_simple(4)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#sound_test(busy) ⇒ Object

Test if sound busy (playing file or tone

Parameters:

  • busy (PAR8)

    (out) Sound busy flag (0 = ready, 1 = busy)



5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
# File 'lib/lignite/ev3_ops.rb', line 5498

def sound_test(busy)
  logger.debug do
    args = [busy]
    "called sound_test with #{args.inspect}"
  end

  bytes = u8(0x95)
  bytes += param_simple(busy)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#sound_tone(volume, frequency, duration) ⇒ Object

Parameters:

  • volume (PAR8)

    (in) Volume [0..100]

  • frequency (PAR16)

    (in) Frequency [Hz]

  • duration (PAR16)

    (in) Duration [mS]



5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
# File 'lib/lignite/ev3_ops.rb', line 5443

def sound_tone(volume, frequency, duration)
  logger.debug do
    args = [volume, frequency, duration]
    "called sound_tone with #{args.inspect}"
  end

  bytes = u8(0x94)
  bytes += param_simple(1)
  bytes += param_simple(volume)
  bytes += param_simple(frequency)
  bytes += param_simple(duration)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#strings(*args) ⇒ Object



2601
2602
2603
2604
2605
2606
# File 'lib/lignite/ev3_ops.rb', line 2601

def strings(*args)
  logger.debug "called strings with #{args.inspect}"
  cvalue = args.shift
  csym = MULTIPLEX_STRINGS.fetch(cvalue)
  __send__("strings_#{csym}", *args)
end

#strings_add(source1, source2, destination) ⇒ Object

Add two strings (SOURCE1 + SOURCE2 -> DESTINATION)

Parameters:

  • source1 (PAR8)

    (in) String variable or handle to string

  • source2 (PAR8)

    (in) String variable or handle to string

  • destination (PAR8)

    (out) String variable or handle to string



2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
# File 'lib/lignite/ev3_ops.rb', line 2382

def strings_add(source1, source2, destination)
  logger.debug do
    args = [source1, source2, destination]
    "called strings_add with #{args.inspect}"
  end

  bytes = u8(0x7D)
  bytes += param_simple(2)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#strings_compare(source1, source2, result) ⇒ Object

Compare two strings

Parameters:

  • source1 (PAR8)

    (in) String variable or handle to string

  • source2 (PAR8)

    (in) String variable or handle to string

  • result (PAR8)

    (out) Result (0 = not equal, 1 = equal)



2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
# File 'lib/lignite/ev3_ops.rb', line 2403

def strings_compare(source1, source2, result)
  logger.debug do
    args = [source1, source2, result]
    "called strings_compare with #{args.inspect}"
  end

  bytes = u8(0x7D)
  bytes += param_simple(3)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(result)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#strings_duplicate(source1, destination) ⇒ Object

Duplicate a string (SOURCE1 -> DESTINATION)

Parameters:

  • source1 (PAR8)

    (in) String variable or handle to string

  • destination (PAR8)

    (out) String variable or handle to string



2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
# File 'lib/lignite/ev3_ops.rb', line 2423

def strings_duplicate(source1, destination)
  logger.debug do
    args = [source1, destination]
    "called strings_duplicate with #{args.inspect}"
  end

  bytes = u8(0x7D)
  bytes += param_simple(5)
  bytes += param_simple(source1)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#strings_get_size(source1, size) ⇒ Object

Get size of string (not including zero termination)

Parameters:

  • source1 (PAR8)

    (in) String variable or handle to string

  • size (PAR16)

    (out) Size



2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
# File 'lib/lignite/ev3_ops.rb', line 2362

def strings_get_size(source1, size)
  logger.debug do
    args = [source1, size]
    "called strings_get_size with #{args.inspect}"
  end

  bytes = u8(0x7D)
  bytes += param_simple(1)
  bytes += param_simple(source1)
  bytes += param_simple(size)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#strings_number_formatted(value, format, size, destination) ⇒ Object

Convert integer number to a formatted string

Parameters:

  • value (PAR32)

    (in) Number to write

  • format (PAR8)

    (in) Format string variable or handle to string

  • size (PAR8)

    (in) Total size of destination string

  • destination (PAR8)

    (out) String variable or handle to string



2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
# File 'lib/lignite/ev3_ops.rb', line 2571

def strings_number_formatted(value, format, size, destination)
  logger.debug do
    args = [value, format, size, destination]
    "called strings_number_formatted with #{args.inspect}"
  end

  bytes = u8(0x7D)
  bytes += param_simple(12)
  bytes += param_simple(value)
  bytes += param_simple(format)
  bytes += param_simple(size)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#strings_number_to_string(value, figures, destination) ⇒ Object

Convert integer value to a string

Parameters:

  • value (PAR16)

    (in) Value to write

  • figures (PAR8)

    (in) Total number of figures

  • destination (PAR8)

    (out) String variable or handle to string



2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
# File 'lib/lignite/ev3_ops.rb', line 2505

def strings_number_to_string(value, figures, destination)
  logger.debug do
    args = [value, figures, destination]
    "called strings_number_to_string with #{args.inspect}"
  end

  bytes = u8(0x7D)
  bytes += param_simple(9)
  bytes += param_simple(value)
  bytes += param_simple(figures)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#strings_string_to_value(source1, destination) ⇒ Object

Parameters:

  • source1 (PAR8)

    (in) String variable or handle to string

  • destination (PARF)

    (out) Value



2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
# File 'lib/lignite/ev3_ops.rb', line 2466

def strings_string_to_value(source1, destination)
  logger.debug do
    args = [source1, destination]
    "called strings_string_to_value with #{args.inspect}"
  end

  bytes = u8(0x7D)
  bytes += param_simple(7)
  bytes += param_simple(source1)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#strings_strip(source1, destination) ⇒ Object

Strip a string for spaces (SOURCE1 -> DESTINATION)

Parameters:

  • source1 (PAR8)

    (in) String variable or handle to string

  • destination (PAR8)

    (out) String variable or handle to string



2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
# File 'lib/lignite/ev3_ops.rb', line 2485

def strings_strip(source1, destination)
  logger.debug do
    args = [source1, destination]
    "called strings_strip with #{args.inspect}"
  end

  bytes = u8(0x7D)
  bytes += param_simple(8)
  bytes += param_simple(source1)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#strings_sub(source1, source2, destination) ⇒ Object

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

Parameters:

  • source1 (PAR8)

    (in) String variable or handle to string

  • source2 (PAR8)

    (in) String variable or handle to string

  • destination (PAR8)

    (out) String variable or handle to string



2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
# File 'lib/lignite/ev3_ops.rb', line 2526

def strings_sub(source1, source2, destination)
  logger.debug do
    args = [source1, source2, destination]
    "called strings_sub with #{args.inspect}"
  end

  bytes = u8(0x7D)
  bytes += param_simple(10)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#strings_value_formatted(value, format, size, destination) ⇒ Object

Convert floating point value to a formatted string

Parameters:

  • value (PARF)

    (in) Value to write

  • format (PAR8)

    (in) Format string variable or handle to string

  • size (PAR8)

    (in) Total size of destination string

  • destination (PAR8)

    (out) String variable or handle to string



2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
# File 'lib/lignite/ev3_ops.rb', line 2548

def strings_value_formatted(value, format, size, destination)
  logger.debug do
    args = [value, format, size, destination]
    "called strings_value_formatted with #{args.inspect}"
  end

  bytes = u8(0x7D)
  bytes += param_simple(11)
  bytes += param_simple(value)
  bytes += param_simple(format)
  bytes += param_simple(size)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#strings_value_to_string(value, figures, decimals, destination) ⇒ Object

Parameters:

  • decimals (PAR8)

    (in) Number of decimals

  • destination (PAR8)

    (out) String variable or handle to string



2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
# File 'lib/lignite/ev3_ops.rb', line 2445

def strings_value_to_string(value, figures, decimals, destination)
  logger.debug do
    args = [value, figures, decimals, destination]
    "called strings_value_to_string with #{args.inspect}"
  end

  bytes = u8(0x7D)
  bytes += param_simple(6)
  bytes += param_simple(value)
  bytes += param_simple(figures)
  bytes += param_simple(decimals)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#sub16(source1, source2, destination) ⇒ Object

Subtract two 16 bit values DESTINATION = SOURCE1 - SOURCE2

Parameters:

  • source1 (PAR16)

    (in)

  • source2 (PAR16)

    (in)

  • destination (PAR16)

    (out)



455
456
457
458
459
460
461
462
463
464
465
466
467
# File 'lib/lignite/ev3_ops.rb', line 455

def sub16(source1, source2, destination)
  logger.debug do
    args = [source1, source2, destination]
    "called sub16 with #{args.inspect}"
  end

  bytes = u8(0x15)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#sub32(source1, source2, destination) ⇒ Object

Subtract two 32 bit values DESTINATION = SOURCE1 - SOURCE2

Parameters:

  • source1 (PAR32)

    (in)

  • source2 (PAR32)

    (in)

  • destination (PAR32)

    (out)



473
474
475
476
477
478
479
480
481
482
483
484
485
# File 'lib/lignite/ev3_ops.rb', line 473

def sub32(source1, source2, destination)
  logger.debug do
    args = [source1, source2, destination]
    "called sub32 with #{args.inspect}"
  end

  bytes = u8(0x16)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#sub8(source1, source2, destination) ⇒ Object

Subtract two 8 bit values DESTINATION = SOURCE1 - SOURCE2

Parameters:

  • source1 (PAR8)

    (in)

  • source2 (PAR8)

    (in)

  • destination (PAR8)

    (out)



437
438
439
440
441
442
443
444
445
446
447
448
449
# File 'lib/lignite/ev3_ops.rb', line 437

def sub8(source1, source2, destination)
  logger.debug do
    args = [source1, source2, destination]
    "called sub8 with #{args.inspect}"
  end

  bytes = u8(0x14)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#subf(source1, source2, destination) ⇒ Object

Subtract two floating point values DESTINATION = SOURCE1 - SOURCE2

Parameters:

  • source1 (PARF)

    (in)

  • source2 (PARF)

    (in)

  • destination (PARF)

    (out)



491
492
493
494
495
496
497
498
499
500
501
502
503
# File 'lib/lignite/ev3_ops.rb', line 491

def subf(source1, source2, destination)
  logger.debug do
    args = [source1, source2, destination]
    "called subf with #{args.inspect}"
  end

  bytes = u8(0x17)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#system(command, status) ⇒ Object

Executes a system command

Parameters:

  • command (PAR8)

    (in) Command string (HND)

  • status (PAR32)

    (out) Return status of the command



1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
# File 'lib/lignite/ev3_ops.rb', line 1716

def system(command, status)
  logger.debug do
    args = [command, status]
    "called system with #{args.inspect}"
  end

  bytes = u8(0x60)
  bytes += param_simple(command)
  bytes += param_simple(status)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#timer_read(time) ⇒ Object

Read free running timer [mS]

Parameters:

  • time (PAR32)

    (out) Value



4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
# File 'lib/lignite/ev3_ops.rb', line 4786

def timer_read(time)
  logger.debug do
    args = [time]
    "called timer_read with #{args.inspect}"
  end

  bytes = u8(0x87)
  bytes += param_simple(time)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#timer_read_us(time) ⇒ Object

Read free running timer [uS]

Parameters:

  • time (PAR32)

    (out) Value



5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
# File 'lib/lignite/ev3_ops.rb', line 5327

def timer_read_us(time)
  logger.debug do
    args = [time]
    "called timer_read_us with #{args.inspect}"
  end

  bytes = u8(0x8F)
  bytes += param_simple(time)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#timer_ready(timer) ⇒ Object

Wait for timer ready (wait for timeout)

Parameters:

  • timer (PAR32)

    (in) Variable used for timing



4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
# File 'lib/lignite/ev3_ops.rb', line 4772

def timer_ready(timer)
  logger.debug do
    args = [timer]
    "called timer_ready with #{args.inspect}"
  end

  bytes = u8(0x86)
  bytes += param_simple(timer)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#timer_wait(time, timer) ⇒ Object

Setup timer to wait TIME mS

Parameters:

  • time (PAR32)

    (in) Time to wait [mS]

  • timer (PAR32)

    (in) Variable used for timing



4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
# File 'lib/lignite/ev3_ops.rb', line 4757

def timer_wait(time, timer)
  logger.debug do
    args = [time, timer]
    "called timer_wait with #{args.inspect}"
  end

  bytes = u8(0x85)
  bytes += param_simple(time)
  bytes += param_simple(timer)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#tst(*args) ⇒ Object



9727
9728
9729
9730
9731
9732
# File 'lib/lignite/ev3_ops.rb', line 9727

def tst(*args)
  logger.debug "called tst with #{args.inspect}"
  cvalue = args.shift
  csym = MULTIPLEX_TST.fetch(cvalue)
  __send__("tst_#{csym}", *args)
end

#tst_tst_accu_switch(active) ⇒ Object

Read accu switch state

Parameters:

  • active (PAR8)

    (out) State [0..1]



9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
# File 'lib/lignite/ev3_ops.rb', line 9633

def tst_tst_accu_switch(active)
  logger.debug do
    args = [active]
    "called tst_tst_accu_switch with #{args.inspect}"
  end

  bytes = u8(0xFF)
  bytes += param_simple(19)
  bytes += param_simple(active)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#tst_tst_boot_mode2Object

Turn on mode2



9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
# File 'lib/lignite/ev3_ops.rb', line 9649

def tst_tst_boot_mode2
  logger.debug do
    args = []
    "called tst_tst_boot_mode2 with #{args.inspect}"
  end

  bytes = u8(0xFF)
  bytes += param_simple(20)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#tst_tst_closeObject

Disables test byte codes



9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
# File 'lib/lignite/ev3_ops.rb', line 9481

def tst_tst_close
  logger.debug do
    args = []
    "called tst_tst_close with #{args.inspect}"
  end

  bytes = u8(0xFF)
  bytes += param_simple(11)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#tst_tst_close_mode2Object

Closes mode2



9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
# File 'lib/lignite/ev3_ops.rb', line 9681

def tst_tst_close_mode2
  logger.debug do
    args = []
    "called tst_tst_close_mode2 with #{args.inspect}"
  end

  bytes = u8(0xFF)
  bytes += param_simple(22)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#tst_tst_disable_uartObject

Disable all UARTs



9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
# File 'lib/lignite/ev3_ops.rb', line 9617

def tst_tst_disable_uart
  logger.debug do
    args = []
    "called tst_tst_disable_uart with #{args.inspect}"
  end

  bytes = u8(0xFF)
  bytes += param_simple(18)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#tst_tst_enable_uart(bitrate) ⇒ Object

Enable all UARTs

Parameters:

  • bitrate (PAR32)

    (in) Bit rate [2400..115200 b/S]



9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
# File 'lib/lignite/ev3_ops.rb', line 9601

def tst_tst_enable_uart(bitrate)
  logger.debug do
    args = [bitrate]
    "called tst_tst_enable_uart with #{args.inspect}"
  end

  bytes = u8(0xFF)
  bytes += param_simple(17)
  bytes += param_simple(bitrate)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#tst_tst_openObject

Enables test byte codes for 10 seconds



9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
# File 'lib/lignite/ev3_ops.rb', line 9466

def tst_tst_open
  logger.debug do
    args = []
    "called tst_tst_open with #{args.inspect}"
  end

  bytes = u8(0xFF)
  bytes += param_simple(10)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#tst_tst_poll_mode2(status) ⇒ Object

Read mode2 status

Parameters:

  • status (PAR8)

    (out) State [0..2]



9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
# File 'lib/lignite/ev3_ops.rb', line 9665

def tst_tst_poll_mode2(status)
  logger.debug do
    args = [status]
    "called tst_tst_poll_mode2 with #{args.inspect}"
  end

  bytes = u8(0xFF)
  bytes += param_simple(21)
  bytes += param_simple(status)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#tst_tst_ram_check(status) ⇒ Object

Read RAM test status status

Parameters:

  • status (PAR8)

    (out) State [0,1] 0 = FAIL, 1 = SUCCESS



9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
# File 'lib/lignite/ev3_ops.rb', line 9697

def tst_tst_ram_check(status)
  logger.debug do
    args = [status]
    "called tst_tst_ram_check with #{args.inspect}"
  end

  bytes = u8(0xFF)
  bytes += param_simple(23)
  bytes += param_simple(status)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#tst_tst_read_adc(index, value) ⇒ Object

Read raw count from ADC

Parameters:

  • index (PAR8)

    (in) Input mapped index (see remarks) [0..15]

  • value (PAR16)

    (out) Raw count [0..4095]



9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
# File 'lib/lignite/ev3_ops.rb', line 9541

def tst_tst_read_adc(index, value)
  logger.debug do
    args = [index, value]
    "called tst_tst_read_adc with #{args.inspect}"
  end

  bytes = u8(0xFF)
  bytes += param_simple(14)
  bytes += param_simple(index)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#tst_tst_read_pins(port, length, string) ⇒ Object

Read connector pin status

Parameters:

  • port (PAR8)

    (in) Input connector [0..3], output connector [16..19]

  • length (PAR8)

    (in) Number of pins in returned string

  • string (PAR8)

    (out) String variable start index (‘0’ = low, ‘1’ = high)



9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
# File 'lib/lignite/ev3_ops.rb', line 9499

def tst_tst_read_pins(port, length, string)
  logger.debug do
    args = [port, length, string]
    "called tst_tst_read_pins with #{args.inspect}"
  end

  bytes = u8(0xFF)
  bytes += param_simple(12)
  bytes += param_simple(port)
  bytes += param_simple(length)
  bytes += param_simple(string)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#tst_tst_read_uart(port, length, string) ⇒ Object

Read data from port through UART

Parameters:

  • port (PAR8)

    (in) Input connector [0..3]

  • length (PAR8)

    (in) Length of string to write [0..63]

  • string (PAR8)

    (out) String of data



9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
# File 'lib/lignite/ev3_ops.rb', line 9582

def tst_tst_read_uart(port, length, string)
  logger.debug do
    args = [port, length, string]
    "called tst_tst_read_uart with #{args.inspect}"
  end

  bytes = u8(0xFF)
  bytes += param_simple(16)
  bytes += param_simple(port)
  bytes += param_simple(length)
  bytes += param_simple(string)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#tst_tst_write_pins(port, length, string) ⇒ Object

Write to connector pin

Parameters:

  • port (PAR8)

    (in) Input connector [0..3], output connector [16..19]

  • length (PAR8)

    (in) Number of pins in returned string

  • string (PAR8)

    (in) String variable start index (‘0’ = set low, ‘1’ = set high, ‘X’ = tristate, ‘-’ = don’t touch)



9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
# File 'lib/lignite/ev3_ops.rb', line 9521

def tst_tst_write_pins(port, length, string)
  logger.debug do
    args = [port, length, string]
    "called tst_tst_write_pins with #{args.inspect}"
  end

  bytes = u8(0xFF)
  bytes += param_simple(13)
  bytes += param_simple(port)
  bytes += param_simple(length)
  bytes += param_simple(string)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#tst_tst_write_uart(port, length, string) ⇒ Object

Write data to port through UART

Parameters:

  • port (PAR8)

    (in) Input connector [0..3]

  • length (PAR8)

    (in) Length of string to write [0..63]

  • string (PAR8)

    (in) String of data



9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
# File 'lib/lignite/ev3_ops.rb', line 9561

def tst_tst_write_uart(port, length, string)
  logger.debug do
    args = [port, length, string]
    "called tst_tst_write_uart with #{args.inspect}"
  end

  bytes = u8(0xFF)
  bytes += param_simple(15)
  bytes += param_simple(port)
  bytes += param_simple(length)
  bytes += param_simple(string)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_button(*args) ⇒ Object



3881
3882
3883
3884
3885
3886
# File 'lib/lignite/ev3_ops.rb', line 3881

def ui_button(*args)
  logger.debug "called ui_button with #{args.inspect}"
  cvalue = args.shift
  csym = MULTIPLEX_UI_BUTTON.fetch(cvalue)
  __send__("ui_button_#{csym}", *args)
end

#ui_button_flushObject



3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
# File 'lib/lignite/ev3_ops.rb', line 3637

def ui_button_flush
  logger.debug do
    args = []
    "called ui_button_flush with #{args.inspect}"
  end

  bytes = u8(0x83)
  bytes += param_simple(4)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_button_get_back_block(blocked) ⇒ Object

Parameters:

  • blocked (PAR8)

    (out) Get UI back button blocked flag (0 = not blocked, 1 = blocked)



3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
# File 'lib/lignite/ev3_ops.rb', line 3757

def ui_button_get_back_block(blocked)
  logger.debug do
    args = [blocked]
    "called ui_button_get_back_block with #{args.inspect}"
  end

  bytes = u8(0x83)
  bytes += param_simple(11)
  bytes += param_simple(blocked)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_button_get_bumbed(button, state) ⇒ Object

Parameters:

  • button (PAR8)

    (in)

  • state (PAR8)

    (out) Button has been pressed (0 = no, 1 = yes)



3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
# File 'lib/lignite/ev3_ops.rb', line 3813

def ui_button_get_bumbed(button, state)
  logger.debug do
    args = [button, state]
    "called ui_button_get_bumbed with #{args.inspect}"
  end

  bytes = u8(0x83)
  bytes += param_simple(14)
  bytes += param_simple(button)
  bytes += param_simple(state)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_button_get_bumped(button, state) ⇒ Object

Parameters:

  • button (PAR8)

    (in)

  • state (PAR8)

    (out) Button has been pressed (0 = no, 1 = yes)



3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
# File 'lib/lignite/ev3_ops.rb', line 3832

def ui_button_get_bumped(button, state)
  logger.debug do
    args = [button, state]
    "called ui_button_get_bumped with #{args.inspect}"
  end

  bytes = u8(0x83)
  bytes += param_simple(14)
  bytes += param_simple(button)
  bytes += param_simple(state)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_button_get_click(click) ⇒ Object

Get and clear click sound request (internal use only)

Parameters:

  • click (PAR8)

    (out) Click sound request (0 = no, 1 = yes)



3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
# File 'lib/lignite/ev3_ops.rb', line 3850

def ui_button_get_click(click)
  logger.debug do
    args = [click]
    "called ui_button_get_click with #{args.inspect}"
  end

  bytes = u8(0x83)
  bytes += param_simple(15)
  bytes += param_simple(click)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_button_get_horz(value) ⇒ Object

Parameters:

  • value (PAR16)

    (out) Horizontal arrows data (-1 = left, +1 = right, 0 = not pressed)



3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
# File 'lib/lignite/ev3_ops.rb', line 3687

def ui_button_get_horz(value)
  logger.debug do
    args = [value]
    "called ui_button_get_horz with #{args.inspect}"
  end

  bytes = u8(0x83)
  bytes += param_simple(7)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_button_get_vert(value) ⇒ Object

Parameters:

  • value (PAR16)

    (out) Vertical arrows data (-1 = up, +1 = down, 0 = not pressed)



3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
# File 'lib/lignite/ev3_ops.rb', line 3704

def ui_button_get_vert(value)
  logger.debug do
    args = [value]
    "called ui_button_get_vert with #{args.inspect}"
  end

  bytes = u8(0x83)
  bytes += param_simple(8)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_button_longpress(button, state) ⇒ Object

Parameters:

  • button (PAR8)

    (in)

  • state (PAR8)

    (out) Button has been pressed (0 = no, 1 = yes)



3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
# File 'lib/lignite/ev3_ops.rb', line 3605

def ui_button_longpress(button, state)
  logger.debug do
    args = [button, state]
    "called ui_button_longpress with #{args.inspect}"
  end

  bytes = u8(0x83)
  bytes += param_simple(2)
  bytes += param_simple(button)
  bytes += param_simple(state)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_button_press(button) ⇒ Object

Parameters:

  • button (PAR8)

    (in)



3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
# File 'lib/lignite/ev3_ops.rb', line 3653

def ui_button_press(button)
  logger.debug do
    args = [button]
    "called ui_button_press with #{args.inspect}"
  end

  bytes = u8(0x83)
  bytes += param_simple(5)
  bytes += param_simple(button)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_button_pressed(button, state) ⇒ Object

Parameters:

  • button (PAR8)

    (in)

  • state (PAR8)

    (out) Button is pressed (0 = no, 1 = yes)



3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
# File 'lib/lignite/ev3_ops.rb', line 3722

def ui_button_pressed(button, state)
  logger.debug do
    args = [button, state]
    "called ui_button_pressed with #{args.inspect}"
  end

  bytes = u8(0x83)
  bytes += param_simple(9)
  bytes += param_simple(button)
  bytes += param_simple(state)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_button_release(button) ⇒ Object

Parameters:

  • button (PAR8)

    (in)



3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
# File 'lib/lignite/ev3_ops.rb', line 3670

def ui_button_release(button)
  logger.debug do
    args = [button]
    "called ui_button_release with #{args.inspect}"
  end

  bytes = u8(0x83)
  bytes += param_simple(6)
  bytes += param_simple(button)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_button_set_back_block(blocked) ⇒ Object

Parameters:

  • blocked (PAR8)

    (in) Set UI back button blocked flag (0 = not blocked, 1 = blocked)



3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
# File 'lib/lignite/ev3_ops.rb', line 3740

def ui_button_set_back_block(blocked)
  logger.debug do
    args = [blocked]
    "called ui_button_set_back_block with #{args.inspect}"
  end

  bytes = u8(0x83)
  bytes += param_simple(10)
  bytes += param_simple(blocked)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_button_shortpress(button, state) ⇒ Object

Parameters:

  • button (PAR8)

    (in)

  • state (PAR8)

    (out) Button has been pressed (0 = no, 1 = yes)



3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
# File 'lib/lignite/ev3_ops.rb', line 3586

def ui_button_shortpress(button, state)
  logger.debug do
    args = [button, state]
    "called ui_button_shortpress with #{args.inspect}"
  end

  bytes = u8(0x83)
  bytes += param_simple(1)
  bytes += param_simple(button)
  bytes += param_simple(state)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_button_testlongpress(button, state) ⇒ Object

Parameters:

  • button (PAR8)

    (in)

  • state (PAR8)

    (out) Button has been hold down(0 = no, 1 = yes)



3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
# File 'lib/lignite/ev3_ops.rb', line 3794

def ui_button_testlongpress(button, state)
  logger.debug do
    args = [button, state]
    "called ui_button_testlongpress with #{args.inspect}"
  end

  bytes = u8(0x83)
  bytes += param_simple(13)
  bytes += param_simple(button)
  bytes += param_simple(state)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_button_testshortpress(button, state) ⇒ Object

Parameters:

  • button (PAR8)

    (in)

  • state (PAR8)

    (out) Button has been hold down(0 = no, 1 = yes)



3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
# File 'lib/lignite/ev3_ops.rb', line 3775

def ui_button_testshortpress(button, state)
  logger.debug do
    args = [button, state]
    "called ui_button_testshortpress with #{args.inspect}"
  end

  bytes = u8(0x83)
  bytes += param_simple(12)
  bytes += param_simple(button)
  bytes += param_simple(state)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_button_wait_for_pressObject



3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
# File 'lib/lignite/ev3_ops.rb', line 3622

def ui_button_wait_for_press
  logger.debug do
    args = []
    "called ui_button_wait_for_press with #{args.inspect}"
  end

  bytes = u8(0x83)
  bytes += param_simple(3)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw(*args) ⇒ Object



4747
4748
4749
4750
4751
4752
# File 'lib/lignite/ev3_ops.rb', line 4747

def ui_draw(*args)
  logger.debug "called ui_draw with #{args.inspect}"
  cvalue = args.shift
  csym = MULTIPLEX_UI_DRAW.fetch(cvalue)
  __send__("ui_draw_#{csym}", *args)
end

#ui_draw_bmpfile(color, x0, y0, name) ⇒ Object

Parameters:

  • color (PAR8)

    (in) Color [BG_COLOR..FG_COLOR]

  • x0 (PAR16)

    (in) X start cord [0..LCD_WIDTH]

  • y0 (PAR16)

    (in) Y start cord [0..LCD_HEIGHT]

  • name (PAR8)

    (in) First character in filename (character string)



4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
# File 'lib/lignite/ev3_ops.rb', line 4590

def ui_draw_bmpfile(color, x0, y0, name)
  logger.debug do
    args = [color, x0, y0, name]
    "called ui_draw_bmpfile with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(28)
  bytes += param_simple(color)
  bytes += param_simple(x0)
  bytes += param_simple(y0)
  bytes += param_simple(name)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_browse(type, x0, y0, x1, y1, length, item_type, string) ⇒ Object

Parameters:

  • string (PAR8)

    (out) First character in string receiving selected item name



4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
# File 'lib/lignite/ev3_ops.rb', line 4267

def ui_draw_browse(type, x0, y0, x1, y1, length, item_type, string)
  logger.debug do
    args = [type, x0, y0, x1, y1, length, item_type, string]
    "called ui_draw_browse with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(14)
  bytes += param_simple(type)
  bytes += param_simple(x0)
  bytes += param_simple(y0)
  bytes += param_simple(x1)
  bytes += param_simple(y1)
  bytes += param_simple(length)
  bytes += param_simple(item_type)
  bytes += param_simple(string)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_circle(color, x0, y0, r) ⇒ Object

Parameters:

  • color (PAR8)

    (in) Color [BG_COLOR..FG_COLOR]

  • x0 (PAR16)

    (in) X start cord [0..LCD_WIDTH]

  • y0 (PAR16)

    (in) Y start cord [0..LCD_HEIGHT]

  • r (PAR16)

    (in) Radius



3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
# File 'lib/lignite/ev3_ops.rb', line 3972

def ui_draw_circle(color, x0, y0, r)
  logger.debug do
    args = [color, x0, y0, r]
    "called ui_draw_circle with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(4)
  bytes += param_simple(color)
  bytes += param_simple(x0)
  bytes += param_simple(y0)
  bytes += param_simple(r)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_cleanObject



3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
# File 'lib/lignite/ev3_ops.rb', line 3907

def ui_draw_clean
  logger.debug do
    args = []
    "called ui_draw_clean with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(1)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_dotline(color, x0, y0, x1, y1, on, off) ⇒ Object

Parameters:

  • color (PAR8)

    (in) Color [BG_COLOR..FG_COLOR]

  • x0 (PAR16)

    (in) X start cord [0..LCD_WIDTH]

  • y0 (PAR16)

    (in) Y start cord [0..LCD_HEIGHT]

  • x1 (PAR16)

    (in) X end [0..LCD_WIDTH]

  • y1 (PAR16)

    (in) Y end [0..LCD_HEIGHT]

  • on (PAR16)

    (in) On pixels

  • off (PAR16)

    (in) Off pixels



4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
# File 'lib/lignite/ev3_ops.rb', line 4424

def ui_draw_dotline(color, x0, y0, x1, y1 , on , off )
  logger.debug do
    args = [color, x0, y0, x1, y1 , on , off ]
    "called ui_draw_dotline with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(21)
  bytes += param_simple(color)
  bytes += param_simple(x0)
  bytes += param_simple(y0)
  bytes += param_simple(x1)
  bytes += param_simple(y1 )
  bytes += param_simple(on )
  bytes += param_simple(off )
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_fillcircle(color, x0, y0, r) ⇒ Object

Parameters:

  • color (PAR8)

    (in) Color [BG_COLOR..FG_COLOR]

  • x0 (PAR16)

    (in) X start cord [0..LCD_WIDTH]

  • y0 (PAR16)

    (in) Y start cord [0..LCD_HEIGHT]

  • r (PAR16)

    (in) Radius



4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
# File 'lib/lignite/ev3_ops.rb', line 4508

def ui_draw_fillcircle(color, x0, y0, r)
  logger.debug do
    args = [color, x0, y0, r]
    "called ui_draw_fillcircle with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(24)
  bytes += param_simple(color)
  bytes += param_simple(x0)
  bytes += param_simple(y0)
  bytes += param_simple(r)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_fillrect(color, x0, y0, x1, y1) ⇒ Object

Parameters:

  • color (PAR8)

    (in) Color [BG_COLOR..FG_COLOR]

  • x0 (PAR16)

    (in) X start cord [0..LCD_WIDTH]

  • y0 (PAR16)

    (in) Y start cord [0..LCD_HEIGHT]

  • x1 (PAR16)

    (in) X size [0..LCD_WIDTH - X0]

  • y1 (PAR16)

    (in) Y size [0..LCD_HEIGHT - Y0]



4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
# File 'lib/lignite/ev3_ops.rb', line 4094

def ui_draw_fillrect(color, x0, y0, x1, y1 )
  logger.debug do
    args = [color, x0, y0, x1, y1 ]
    "called ui_draw_fillrect with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(9)
  bytes += param_simple(color)
  bytes += param_simple(x0)
  bytes += param_simple(y0)
  bytes += param_simple(x1)
  bytes += param_simple(y1 )
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_fillwindow(color, y0, y1) ⇒ Object

Parameters:

  • y0 (PAR16)

    (in) Y start cord [0..LCD_HEIGHT]

  • y1 (PAR16)

    (in) X size [0..LCD_HEIGHT]



4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
# File 'lib/lignite/ev3_ops.rb', line 4382

def ui_draw_fillwindow(color, y0, y1)
  logger.debug do
    args = [color, y0, y1]
    "called ui_draw_fillwindow with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(19)
  bytes += param_simple(color)
  bytes += param_simple(y0)
  bytes += param_simple(y1)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_graph_draw(view, actual, lowest, highest, average) ⇒ Object

Parameters:

  • view (PAR8)

    (in) Dataset number to view (0=all)

  • actual (PARF)

    (out)

  • lowest (PARF)

    (out)

  • highest (PARF)

    (out)

  • average (PARF)

    (out)



4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
# File 'lib/lignite/ev3_ops.rb', line 4663

def ui_draw_graph_draw(view, actual, lowest, highest, average)
  logger.debug do
    args = [view, actual, lowest, highest, average]
    "called ui_draw_graph_draw with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(31)
  bytes += param_simple(view)
  bytes += param_simple(actual)
  bytes += param_simple(lowest)
  bytes += param_simple(highest)
  bytes += param_simple(average)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_graph_setup(x0, x1, items, offset, span, min, max, sample) ⇒ Object

Parameters:

  • min (PAR16)

    (in) DATAF array (handle) containing min values

  • max (PAR16)

    (in) DATAF array (handle) containing max values

  • sample (PAR16)

    (in) DATAF array (handle) containing sample values



4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
# File 'lib/lignite/ev3_ops.rb', line 4635

def ui_draw_graph_setup(x0, x1, items, offset, span, min, max, sample)
  logger.debug do
    args = [x0, x1, items, offset, span, min, max, sample]
    "called ui_draw_graph_setup with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(30)
  bytes += param_simple(x0)
  bytes += param_simple(x1)
  bytes += param_simple(items)
  bytes += param_simple(offset)
  bytes += param_simple(span)
  bytes += param_simple(min)
  bytes += param_simple(max)
  bytes += param_simple(sample)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_icon(color, x0, y0, type, no) ⇒ Object

Parameters:

  • color (PAR8)

    (in) Color [BG_COLOR..FG_COLOR]

  • x0 (PAR16)

    (in) X start cord [0..LCD_WIDTH]

  • y0 (PAR16)

    (in) Y start cord [0..LCD_HEIGHT]

  • type (PAR8)

    (in) Icon type (pool)

  • no (PAR8)

    (in) Icon number



4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
# File 'lib/lignite/ev3_ops.rb', line 4019

def ui_draw_icon(color, x0, y0, type, no)
  logger.debug do
    args = [color, x0, y0, type, no]
    "called ui_draw_icon with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(6)
  bytes += param_simple(color)
  bytes += param_simple(x0)
  bytes += param_simple(y0)
  bytes += param_simple(type)
  bytes += param_simple(no)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_icon_question(color, x0, y0, state, icons) ⇒ Object

Parameters:

  • color (PAR8)

    (in) Color [BG_COLOR..FG_COLOR]

  • x0 (PAR16)

    (in) X start cord [0..LCD_WIDTH]

  • y0 (PAR16)

    (in) Y start cord [0..LCD_HEIGHT]

  • state (PAR8)

    (in) State 0 = INIT

  • icons (PAR32)

    (in) bitfield with icons



4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
# File 'lib/lignite/ev3_ops.rb', line 4566

def ui_draw_icon_question(color, x0, y0, state, icons)
  logger.debug do
    args = [color, x0, y0, state, icons]
    "called ui_draw_icon_question with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(27)
  bytes += param_simple(color)
  bytes += param_simple(x0)
  bytes += param_simple(y0)
  bytes += param_simple(state)
  bytes += param_simple(icons)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_inverserect(x0, y0, x1, y1) ⇒ Object

Parameters:

  • x0 (PAR16)

    (in) X start cord [0..LCD_WIDTH]

  • y0 (PAR16)

    (in) Y start cord [0..LCD_HEIGHT]

  • x1 (PAR16)

    (in) X size [0..LCD_WIDTH]

  • y1 (PAR16)

    (in) Y size [0..LCD_HEIGHT]



4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
# File 'lib/lignite/ev3_ops.rb', line 4325

def ui_draw_inverserect(x0, y0, x1, y1 )
  logger.debug do
    args = [x0, y0, x1, y1 ]
    "called ui_draw_inverserect with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(16)
  bytes += param_simple(x0)
  bytes += param_simple(y0)
  bytes += param_simple(x1)
  bytes += param_simple(y1 )
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_keyboard(color, x0, y0, icon, length, default, charset, string) ⇒ Object

Parameters:

  • string (PAR8)

    (out) First character in string receiving keyboard input



4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
# File 'lib/lignite/ev3_ops.rb', line 4235

def ui_draw_keyboard(color, x0, y0, icon, length, default, charset, string)
  logger.debug do
    args = [color, x0, y0, icon, length, default, charset, string]
    "called ui_draw_keyboard with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(13)
  bytes += param_simple(color)
  bytes += param_simple(x0)
  bytes += param_simple(y0)
  bytes += param_simple(icon)
  bytes += param_simple(length)
  bytes += param_simple(default)
  bytes += param_simple(charset)
  bytes += param_simple(string)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_line(color, x0, y0, x1, y1) ⇒ Object

Parameters:

  • color (PAR8)

    (in) Color [BG_COLOR..FG_COLOR]

  • x0 (PAR16)

    (in) X start cord [0..LCD_WIDTH]

  • y0 (PAR16)

    (in) Y start cord [0..LCD_HEIGHT]

  • x1 (PAR16)

    (in) X end [0..LCD_WIDTH]

  • y1 (PAR16)

    (in) Y end [0..LCD_HEIGHT]



3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
# File 'lib/lignite/ev3_ops.rb', line 3948

def ui_draw_line(color, x0, y0, x1, y1 )
  logger.debug do
    args = [color, x0, y0, x1, y1 ]
    "called ui_draw_line with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(3)
  bytes += param_simple(color)
  bytes += param_simple(x0)
  bytes += param_simple(y0)
  bytes += param_simple(x1)
  bytes += param_simple(y1 )
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_notification(color, x0, y0, icon1, icon2, icon3, string, state) ⇒ Object

Parameters:

  • color (PAR8)

    (in) Color [BG_COLOR..FG_COLOR]

  • x0 (PAR16)

    (in) X start cord [0..LCD_WIDTH]

  • y0 (PAR16)

    (in) Y start cord [0..LCD_HEIGHT]

  • icon1 (PAR8)

    (in) First icon

  • icon2 (PAR8)

    (in) Second icon

  • icon3 (PAR8)

    (in) Third icon

  • string (PAR8)

    (in) First character in notification string

  • state (PAR8)

    (in) State 0 = INIT



4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
# File 'lib/lignite/ev3_ops.rb', line 4172

def ui_draw_notification(color, x0, y0, icon1, icon2, icon3, string, state)
  logger.debug do
    args = [color, x0, y0, icon1, icon2, icon3, string, state]
    "called ui_draw_notification with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(11)
  bytes += param_simple(color)
  bytes += param_simple(x0)
  bytes += param_simple(y0)
  bytes += param_simple(icon1)
  bytes += param_simple(icon2)
  bytes += param_simple(icon3)
  bytes += param_simple(string)
  bytes += param_simple(state)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_picture(color, x0, y0, ip) ⇒ Object

Parameters:

  • color (PAR8)

    (in) Color [BG_COLOR..FG_COLOR]

  • x0 (PAR16)

    (in) X start cord [0..LCD_WIDTH]

  • y0 (PAR16)

    (in) Y start cord [0..LCD_HEIGHT]

  • ip (PAR32)

    (in) Address of picture



4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
# File 'lib/lignite/ev3_ops.rb', line 4043

def ui_draw_picture(color, x0, y0, ip)
  logger.debug do
    args = [color, x0, y0, ip]
    "called ui_draw_picture with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(7)
  bytes += param_simple(color)
  bytes += param_simple(x0)
  bytes += param_simple(y0)
  bytes += param_simple(ip)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_pixel(color, x0, y0) ⇒ Object

Parameters:

  • color (PAR8)

    (in) Color [BG_COLOR..FG_COLOR]

  • x0 (PAR16)

    (in) X start cord [0..LCD_WIDTH]

  • y0 (PAR16)

    (in) Y start cord [0..LCD_HEIGHT]



3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
# File 'lib/lignite/ev3_ops.rb', line 3925

def ui_draw_pixel(color, x0, y0)
  logger.debug do
    args = [color, x0, y0]
    "called ui_draw_pixel with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(2)
  bytes += param_simple(color)
  bytes += param_simple(x0)
  bytes += param_simple(y0)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_popup(open) ⇒ Object

Parameters:

  • open (PAR8)

    ()



4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
# File 'lib/lignite/ev3_ops.rb', line 4610

def ui_draw_popup(open)
  logger.debug do
    args = [open]
    "called ui_draw_popup with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(29)
  bytes += param_simple(open)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_question(color, x0, y0, icon1, icon2, string, state, ok) ⇒ Object

Parameters:

  • color (PAR8)

    (in) Color [BG_COLOR..FG_COLOR]

  • x0 (PAR16)

    (in) X start cord [0..LCD_WIDTH]

  • y0 (PAR16)

    (in) Y start cord [0..LCD_HEIGHT]

  • icon1 (PAR8)

    (in) First icon

  • icon2 (PAR8)

    (in) Second icon

  • string (PAR8)

    (in) First character in question string

  • state (PAR8)

    (in) State 0 = NO, 1 = OK

  • ok (PAR8)

    (out) Answer 0 = NO, 1 = OK, -1 = SKIP



4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
# File 'lib/lignite/ev3_ops.rb', line 4203

def ui_draw_question(color, x0, y0, icon1, icon2, string, state, ok)
  logger.debug do
    args = [color, x0, y0, icon1, icon2, string, state, ok]
    "called ui_draw_question with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(12)
  bytes += param_simple(color)
  bytes += param_simple(x0)
  bytes += param_simple(y0)
  bytes += param_simple(icon1)
  bytes += param_simple(icon2)
  bytes += param_simple(string)
  bytes += param_simple(state)
  bytes += param_simple(ok)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_rect(color, x0, y0, x1, y1) ⇒ Object

Parameters:

  • color (PAR8)

    (in) Color [BG_COLOR..FG_COLOR]

  • x0 (PAR16)

    (in) X start cord [0..LCD_WIDTH]

  • y0 (PAR16)

    (in) Y start cord [0..LCD_HEIGHT]

  • x1 (PAR16)

    (in) X size [0..LCD_WIDTH - X0]

  • y1 (PAR16)

    (in) Y size [0..LCD_HEIGHT - Y0]



4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
# File 'lib/lignite/ev3_ops.rb', line 4119

def ui_draw_rect(color, x0, y0, x1, y1 )
  logger.debug do
    args = [color, x0, y0, x1, y1 ]
    "called ui_draw_rect with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(10)
  bytes += param_simple(color)
  bytes += param_simple(x0)
  bytes += param_simple(y0)
  bytes += param_simple(x1)
  bytes += param_simple(y1 )
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_rectangle(color, x0, y0, x1, y1) ⇒ Object

Parameters:

  • color (PAR8)

    (in) Color [BG_COLOR..FG_COLOR]

  • x0 (PAR16)

    (in) X start cord [0..LCD_WIDTH]

  • y0 (PAR16)

    (in) Y start cord [0..LCD_HEIGHT]

  • x1 (PAR16)

    (in) X size [0..LCD_WIDTH - X0]

  • y1 (PAR16)

    (in) Y size [0..LCD_HEIGHT - Y0]



4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
# File 'lib/lignite/ev3_ops.rb', line 4144

def ui_draw_rectangle(color, x0, y0, x1, y1 )
  logger.debug do
    args = [color, x0, y0, x1, y1 ]
    "called ui_draw_rectangle with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(10)
  bytes += param_simple(color)
  bytes += param_simple(x0)
  bytes += param_simple(y0)
  bytes += param_simple(x1)
  bytes += param_simple(y1 )
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_restore(no) ⇒ Object

Parameters:

  • no (PAR8)

    (in) Level number (N=0 -> Saved screen just before run)



4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
# File 'lib/lignite/ev3_ops.rb', line 4545

def ui_draw_restore(no)
  logger.debug do
    args = [no]
    "called ui_draw_restore with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(26)
  bytes += param_simple(no)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_scroll(y) ⇒ Object

Parameters:

  • y (PAR16)

    ()



4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
# File 'lib/lignite/ev3_ops.rb', line 4401

def ui_draw_scroll(y)
  logger.debug do
    args = [y]
    "called ui_draw_scroll with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(20)
  bytes += param_simple(y)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_select_font(type) ⇒ Object

Parameters:

  • type (PAR8)

    (in) Font type [0..2] font will change to 0 when UPDATE is called



4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
# File 'lib/lignite/ev3_ops.rb', line 4345

def ui_draw_select_font(type)
  logger.debug do
    args = [type]
    "called ui_draw_select_font with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(17)
  bytes += param_simple(type)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_store(no) ⇒ Object

Parameters:

  • no (PAR8)

    (in) Level number



4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
# File 'lib/lignite/ev3_ops.rb', line 4528

def ui_draw_store(no)
  logger.debug do
    args = [no]
    "called ui_draw_store with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(25)
  bytes += param_simple(no)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_text(color, x0, y0, string) ⇒ Object

Parameters:

  • color (PAR8)

    (in) Color [BG_COLOR..FG_COLOR]

  • x0 (PAR16)

    (in) X start cord [0..LCD_WIDTH]

  • y0 (PAR16)

    (in) Y start cord [0..LCD_HEIGHT]

  • string (PAR8)

    (in) First character in string to draw



3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
# File 'lib/lignite/ev3_ops.rb', line 3995

def ui_draw_text(color, x0, y0, string)
  logger.debug do
    args = [color, x0, y0, string]
    "called ui_draw_text with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(5)
  bytes += param_simple(color)
  bytes += param_simple(x0)
  bytes += param_simple(y0)
  bytes += param_simple(string)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_textbox(x0, y0, x1, y1, text, size, del, line) ⇒ Object

Parameters:

  • x0 (PAR16)

    ()

  • y0 (PAR16)

    ()

  • x1 (PAR16)

    ()

  • y1 (PAR16)

    ()

  • text (PAR8)

    ()

  • size (PAR32)

    ()

  • del (PAR8)

    ()

  • line (PAR8)

    ()



4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
# File 'lib/lignite/ev3_ops.rb', line 4691

def ui_draw_textbox(x0, y0, x1, y1, text, size, del, line)
  logger.debug do
    args = [x0, y0, x1, y1, text, size, del, line]
    "called ui_draw_textbox with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(32)
  bytes += param_simple(x0)
  bytes += param_simple(y0)
  bytes += param_simple(x1)
  bytes += param_simple(y1)
  bytes += param_simple(text)
  bytes += param_simple(size)
  bytes += param_simple(del)
  bytes += param_simple(line)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_topline(enable) ⇒ Object

Parameters:

  • enable (PAR8)

    (in) Enable top status line (0 = disabled, 1 = enabled)



4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
# File 'lib/lignite/ev3_ops.rb', line 4362

def ui_draw_topline(enable)
  logger.debug do
    args = [enable]
    "called ui_draw_topline with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(18)
  bytes += param_simple(enable)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_updateObject



3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
# File 'lib/lignite/ev3_ops.rb', line 3892

def ui_draw_update
  logger.debug do
    args = []
    "called ui_draw_update with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(0)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_value(color, x0, y0, value, figures, decimals) ⇒ Object

Parameters:

  • color (PAR8)

    (in) Color [BG_COLOR..FG_COLOR]

  • x0 (PAR16)

    (in) X start cord [0..LCD_WIDTH]

  • y0 (PAR16)

    (in) Y start cord [0..LCD_HEIGHT]

  • value (PARF)

    (in) Value to write

  • figures (PAR8)

    (in) Total number of figures inclusive decimal point

  • decimals (PAR8)

    (in) Number of decimals



4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
# File 'lib/lignite/ev3_ops.rb', line 4068

def ui_draw_value(color, x0, y0, value, figures, decimals)
  logger.debug do
    args = [color, x0, y0, value, figures, decimals]
    "called ui_draw_value with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(8)
  bytes += param_simple(color)
  bytes += param_simple(x0)
  bytes += param_simple(y0)
  bytes += param_simple(value)
  bytes += param_simple(figures)
  bytes += param_simple(decimals)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_vertbar(color, x0, y0, x1, y1, min, max, act) ⇒ Object

Parameters:

  • color (PAR8)

    (in) Color [BG_COLOR..FG_COLOR]

  • x0 (PAR16)

    (in) X start cord [0..LCD_WIDTH]

  • y0 (PAR16)

    (in) Y start cord [0..LCD_HEIGHT]

  • x1 (PAR16)

    (in) X size [0..LCD_WIDTH]

  • y1 (PAR16)

    (in) Y size [0..LCD_HEIGHT]

  • min (PAR16)

    (in) Minimum value

  • max (PAR16)

    (in) Maximum value

  • act (PAR16)

    (in) Actual value



4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
# File 'lib/lignite/ev3_ops.rb', line 4298

def ui_draw_vertbar(color, x0, y0, x1, y1, min, max, act)
  logger.debug do
    args = [color, x0, y0, x1, y1, min, max, act]
    "called ui_draw_vertbar with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(15)
  bytes += param_simple(color)
  bytes += param_simple(x0)
  bytes += param_simple(y0)
  bytes += param_simple(x1)
  bytes += param_simple(y1)
  bytes += param_simple(min)
  bytes += param_simple(max)
  bytes += param_simple(act)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_view_unit(color, x0, y0, value, figures, decimals, length, string) ⇒ Object

Parameters:

  • color (PAR8)

    (in) Color [BG_COLOR..FG_COLOR]

  • x0 (PAR16)

    (in) X start cord [0..LCD_WIDTH]

  • y0 (PAR16)

    (in) Y start cord [0..LCD_HEIGHT]

  • value (PARF)

    (in) Value to write

  • figures (PAR8)

    (in) Total number of figures inclusive decimal point

  • decimals (PAR8)

    (in) Number of decimals

  • length (PAR8)

    (in) Maximal string length

  • string (PAR8)

    (in) First character in string to draw



4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
# File 'lib/lignite/ev3_ops.rb', line 4481

def ui_draw_view_unit(color, x0, y0, value, figures, decimals, length, string)
  logger.debug do
    args = [color, x0, y0, value, figures, decimals, length, string]
    "called ui_draw_view_unit with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(23)
  bytes += param_simple(color)
  bytes += param_simple(x0)
  bytes += param_simple(y0)
  bytes += param_simple(value)
  bytes += param_simple(figures)
  bytes += param_simple(decimals)
  bytes += param_simple(length)
  bytes += param_simple(string)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_draw_view_value(color, x0, y0, value, figures, decimals) ⇒ Object

Parameters:

  • color (PAR8)

    (in) Color [BG_COLOR..FG_COLOR]

  • x0 (PAR16)

    (in) X start cord [0..LCD_WIDTH]

  • y0 (PAR16)

    (in) Y start cord [0..LCD_HEIGHT]

  • value (PARF)

    (in) Value to write

  • figures (PAR8)

    (in) Total number of figures inclusive decimal point

  • decimals (PAR8)

    (in) Number of decimals



4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
# File 'lib/lignite/ev3_ops.rb', line 4452

def ui_draw_view_value(color, x0, y0, value, figures, decimals)
  logger.debug do
    args = [color, x0, y0, value, figures, decimals]
    "called ui_draw_view_value with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(22)
  bytes += param_simple(color)
  bytes += param_simple(x0)
  bytes += param_simple(y0)
  bytes += param_simple(value)
  bytes += param_simple(figures)
  bytes += param_simple(decimals)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_flushObject

User Interface flush buffers



2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
# File 'lib/lignite/ev3_ops.rb', line 2653

def ui_flush
  logger.debug do
    args = []
    "called ui_flush with #{args.inspect}"
  end

  bytes = u8(0x80)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_read(*args) ⇒ Object



3146
3147
3148
3149
3150
3151
# File 'lib/lignite/ev3_ops.rb', line 3146

def ui_read(*args)
  logger.debug "called ui_read with #{args.inspect}"
  cvalue = args.shift
  csym = MULTIPLEX_UI_READ.fetch(cvalue)
  __send__("ui_read_#{csym}", *args)
end

#ui_read_get_address(value) ⇒ Object

Parameters:

  • value (PAR32)

    (out) Address from lms_cmdin



2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
# File 'lib/lignite/ev3_ops.rb', line 2885

def ui_read_get_address(value)
  logger.debug do
    args = [value]
    "called ui_read_get_address with #{args.inspect}"
  end

  bytes = u8(0x81)
  bytes += param_simple(13)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_read_get_code(length, image, global, flag) ⇒ Object

Parameters:

  • length (PAR32)

    (in) Maximal code stream length

  • image (PAR32)

    (out) Address of image

  • global (PAR32)

    (out) Address of global variables

  • flag (PAR8)

    (out) Flag tells if image is ready



2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
# File 'lib/lignite/ev3_ops.rb', line 2905

def ui_read_get_code(length, image, global, flag)
  logger.debug do
    args = [length, image, global, flag]
    "called ui_read_get_code with #{args.inspect}"
  end

  bytes = u8(0x81)
  bytes += param_simple(14)
  bytes += param_simple(length)
  bytes += param_simple(image)
  bytes += param_simple(global)
  bytes += param_simple(flag)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_read_get_event(event) ⇒ Object

Parameters:

  • event (PAR8)

    ()



2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
# File 'lib/lignite/ev3_ops.rb', line 2722

def ui_read_get_event(event)
  logger.debug do
    args = [event]
    "called ui_read_get_event with #{args.inspect}"
  end

  bytes = u8(0x81)
  bytes += param_simple(4)
  bytes += param_simple(event)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_read_get_fw_build(length, destination) ⇒ Object

Get firmware build string

Parameters:

  • length (PAR8)

    (in) Maximal length of string returned (-1 = no check)

  • destination (PAR8)

    (out) String variable or handle to string



2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
# File 'lib/lignite/ev3_ops.rb', line 2848

def ui_read_get_fw_build(length, destination)
  logger.debug do
    args = [length, destination]
    "called ui_read_get_fw_build with #{args.inspect}"
  end

  bytes = u8(0x81)
  bytes += param_simple(11)
  bytes += param_simple(length)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_read_get_fw_vers(length, destination) ⇒ Object

Get firmware version string

Parameters:

  • length (PAR8)

    (in) Maximal length of string returned (-1 = no check)

  • destination (PAR8)

    (out) String variable or handle to string



2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
# File 'lib/lignite/ev3_ops.rb', line 2829

def ui_read_get_fw_vers(length, destination)
  logger.debug do
    args = [length, destination]
    "called ui_read_get_fw_vers with #{args.inspect}"
  end

  bytes = u8(0x81)
  bytes += param_simple(10)
  bytes += param_simple(length)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_read_get_hw_vers(length, destination) ⇒ Object

Get hardware version string

Parameters:

  • length (PAR8)

    (in) Maximal length of string returned (-1 = no check)

  • destination (PAR8)

    (out) String variable or handle to string



2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
# File 'lib/lignite/ev3_ops.rb', line 2810

def ui_read_get_hw_vers(length, destination)
  logger.debug do
    args = [length, destination]
    "called ui_read_get_hw_vers with #{args.inspect}"
  end

  bytes = u8(0x81)
  bytes += param_simple(9)
  bytes += param_simple(length)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_read_get_ibatt(value) ⇒ Object

Parameters:

  • value (PARF)

    (out) Battery current [A]



2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
# File 'lib/lignite/ev3_ops.rb', line 2686

def ui_read_get_ibatt(value)
  logger.debug do
    args = [value]
    "called ui_read_get_ibatt with #{args.inspect}"
  end

  bytes = u8(0x81)
  bytes += param_simple(2)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_read_get_iint(iint) ⇒ Object

Parameters:

  • iint (PARF)

    (out) Integrated battery current [A]



2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
# File 'lib/lignite/ev3_ops.rb', line 2756

def ui_read_get_iint(iint)
  logger.debug do
    args = [iint]
    "called ui_read_get_iint with #{args.inspect}"
  end

  bytes = u8(0x81)
  bytes += param_simple(6)
  bytes += param_simple(iint)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_read_get_imotor(value) ⇒ Object

Parameters:

  • value (PARF)

    (out) Motor current [A]



2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
# File 'lib/lignite/ev3_ops.rb', line 2773

def ui_read_get_imotor(value)
  logger.debug do
    args = [value]
    "called ui_read_get_imotor with #{args.inspect}"
  end

  bytes = u8(0x81)
  bytes += param_simple(7)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_read_get_ip(length, destination) ⇒ Object

Get IP address string

Parameters:

  • length (PAR8)

    (in) Maximal length of string returned (-1 = no check)

  • destination (PAR8)

    (out) String variable or handle to string



3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
# File 'lib/lignite/ev3_ops.rb', line 3040

def ui_read_get_ip(length, destination)
  logger.debug do
    args = [length, destination]
    "called ui_read_get_ip with #{args.inspect}"
  end

  bytes = u8(0x81)
  bytes += param_simple(27)
  bytes += param_simple(length)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_read_get_lbatt(pct) ⇒ Object

Get battery level in %

Parameters:

  • pct (PAR8)

    (out) Battery level [0..100]



2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
# File 'lib/lignite/ev3_ops.rb', line 2976

def ui_read_get_lbatt(pct)
  logger.debug do
    args = [pct]
    "called ui_read_get_lbatt with #{args.inspect}"
  end

  bytes = u8(0x81)
  bytes += param_simple(18)
  bytes += param_simple(pct)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_read_get_os_build(length, destination) ⇒ Object

Get os build string

Parameters:

  • length (PAR8)

    (in) Maximal length of string returned (-1 = no check)

  • destination (PAR8)

    (out) String variable or handle to string



2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
# File 'lib/lignite/ev3_ops.rb', line 2867

def ui_read_get_os_build(length, destination)
  logger.debug do
    args = [length, destination]
    "called ui_read_get_os_build with #{args.inspect}"
  end

  bytes = u8(0x81)
  bytes += param_simple(12)
  bytes += param_simple(length)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_read_get_os_vers(length, destination) ⇒ Object

Get os version string

Parameters:

  • length (PAR8)

    (in) Maximal length of string returned (-1 = no check)

  • destination (PAR8)

    (out) String variable or handle to string



2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
# File 'lib/lignite/ev3_ops.rb', line 2704

def ui_read_get_os_vers(length, destination)
  logger.debug do
    args = [length, destination]
    "called ui_read_get_os_vers with #{args.inspect}"
  end

  bytes = u8(0x81)
  bytes += param_simple(3)
  bytes += param_simple(length)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_read_get_power(vbatt, ibatt, iint, imotor) ⇒ Object

Parameters:

  • vbatt (PARF)

    (out) Battery voltage [V]

  • ibatt (PARF)

    (out) Battery current [A]

  • iint (PARF)

    (out) Integrated battery current [A]

  • imotor (PARF)

    (out) Motor current [A]



3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
# File 'lib/lignite/ev3_ops.rb', line 3061

def ui_read_get_power(vbatt, ibatt, iint, imotor)
  logger.debug do
    args = [vbatt, ibatt, iint, imotor]
    "called ui_read_get_power with #{args.inspect}"
  end

  bytes = u8(0x81)
  bytes += param_simple(29)
  bytes += param_simple(vbatt)
  bytes += param_simple(ibatt)
  bytes += param_simple(iint)
  bytes += param_simple(imotor)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_read_get_sdcard(state, total, free) ⇒ Object

Parameters:

  • state (PAR8)

    (out) SD card present [0..1]

  • total (PAR32)

    (out) Kbytes in total

  • free (PAR32)

    (out) Kbytes free



3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
# File 'lib/lignite/ev3_ops.rb', line 3083

def ui_read_get_sdcard(state, total, free)
  logger.debug do
    args = [state, total, free]
    "called ui_read_get_sdcard with #{args.inspect}"
  end

  bytes = u8(0x81)
  bytes += param_simple(30)
  bytes += param_simple(state)
  bytes += param_simple(total)
  bytes += param_simple(free)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_read_get_shutdown(flag) ⇒ Object

Parameters:

  • flag (PAR8)

    ()



2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
# File 'lib/lignite/ev3_ops.rb', line 2942

def ui_read_get_shutdown(flag)
  logger.debug do
    args = [flag]
    "called ui_read_get_shutdown with #{args.inspect}"
  end

  bytes = u8(0x81)
  bytes += param_simple(16)
  bytes += param_simple(flag)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_read_get_string(length, destination) ⇒ Object

Get string from terminal

Parameters:

  • length (PAR8)

    (in) Maximal length of string returned

  • destination (PAR8)

    (out) String variable or handle to string



2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
# File 'lib/lignite/ev3_ops.rb', line 2791

def ui_read_get_string(length, destination)
  logger.debug do
    args = [length, destination]
    "called ui_read_get_string with #{args.inspect}"
  end

  bytes = u8(0x81)
  bytes += param_simple(8)
  bytes += param_simple(length)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_read_get_tbatt(value) ⇒ Object

Parameters:

  • value (PARF)

    (out) Battery temperature rise [C]



2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
# File 'lib/lignite/ev3_ops.rb', line 2739

def ui_read_get_tbatt(value)
  logger.debug do
    args = [value]
    "called ui_read_get_tbatt with #{args.inspect}"
  end

  bytes = u8(0x81)
  bytes += param_simple(5)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_read_get_usbstick(state, total, free) ⇒ Object

Parameters:

  • state (PAR8)

    (out) USB stick present [0..1]

  • total (PAR32)

    (out) Kbytes in total

  • free (PAR32)

    (out) Kbytes free



3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
# File 'lib/lignite/ev3_ops.rb', line 3104

def ui_read_get_usbstick(state, total, free)
  logger.debug do
    args = [state, total, free]
    "called ui_read_get_usbstick with #{args.inspect}"
  end

  bytes = u8(0x81)
  bytes += param_simple(31)
  bytes += param_simple(state)
  bytes += param_simple(total)
  bytes += param_simple(free)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_read_get_vbatt(value) ⇒ Object

Parameters:

  • value (PARF)

    (out) Battery voltage [V]



2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
# File 'lib/lignite/ev3_ops.rb', line 2669

def ui_read_get_vbatt(value)
  logger.debug do
    args = [value]
    "called ui_read_get_vbatt with #{args.inspect}"
  end

  bytes = u8(0x81)
  bytes += param_simple(1)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_read_get_version(length, destination) ⇒ Object

Get version string

Parameters:

  • length (PAR8)

    (in) Maximal length of string returned (-1 = no check)

  • destination (PAR8)

    (out) String variable or handle to string



3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
# File 'lib/lignite/ev3_ops.rb', line 3021

def ui_read_get_version(length, destination)
  logger.debug do
    args = [length, destination]
    "called ui_read_get_version with #{args.inspect}"
  end

  bytes = u8(0x81)
  bytes += param_simple(26)
  bytes += param_simple(length)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_read_get_warning(warnings) ⇒ Object

Parameters:

  • warnings (PAR8)

    ()



2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
# File 'lib/lignite/ev3_ops.rb', line 2959

def ui_read_get_warning(warnings)
  logger.debug do
    args = [warnings]
    "called ui_read_get_warning with #{args.inspect}"
  end

  bytes = u8(0x81)
  bytes += param_simple(17)
  bytes += param_simple(warnings)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_read_key(value) ⇒ Object

Parameters:

  • value (PAR8)

    (out) Key value from lms_cmdin (0 = no key)



2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
# File 'lib/lignite/ev3_ops.rb', line 2925

def ui_read_key(value)
  logger.debug do
    args = [value]
    "called ui_read_key with #{args.inspect}"
  end

  bytes = u8(0x81)
  bytes += param_simple(15)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_read_textbox_read(text, size, del, length, line, destination) ⇒ Object

Parameters:

  • text (PAR8)

    ()

  • size (PAR32)

    ()

  • del (PAR8)

    ()

  • length (PAR8)

    ()

  • line (PAR16)

    ()

  • destination (PAR8)

    ()



2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
# File 'lib/lignite/ev3_ops.rb', line 2998

def ui_read_textbox_read(text, size, del, length, line, destination)
  logger.debug do
    args = [text, size, del, length, line, destination]
    "called ui_read_textbox_read with #{args.inspect}"
  end

  bytes = u8(0x81)
  bytes += param_simple(21)
  bytes += param_simple(text)
  bytes += param_simple(size)
  bytes += param_simple(del)
  bytes += param_simple(length)
  bytes += param_simple(line)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_write(*args) ⇒ Object



3573
3574
3575
3576
3577
3578
# File 'lib/lignite/ev3_ops.rb', line 3573

def ui_write(*args)
  logger.debug "called ui_write with #{args.inspect}"
  cvalue = args.shift
  csym = MULTIPLEX_UI_WRITE.fetch(cvalue)
  __send__("ui_write_#{csym}", *args)
end

#ui_write_address(value) ⇒ Object

Parameters:

  • value (PAR32)

    (out)



3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
# File 'lib/lignite/ev3_ops.rb', line 3296

def ui_write_address(value)
  logger.debug do
    args = [value]
    "called ui_write_address with #{args.inspect}"
  end

  bytes = u8(0x82)
  bytes += param_simple(13)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_write_allow_pulse(value) ⇒ Object

Parameters:

  • value (PAR8)

    ()



3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
# File 'lib/lignite/ev3_ops.rb', line 3364

def ui_write_allow_pulse(value)
  logger.debug do
    args = [value]
    "called ui_write_allow_pulse with #{args.inspect}"
  end

  bytes = u8(0x82)
  bytes += param_simple(17)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_write_code(array, length) ⇒ Object

Parameters:

  • array (PAR8)

    (in) First byte in byte array to write

  • length (PAR32)

    (in) Length of array



3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
# File 'lib/lignite/ev3_ops.rb', line 3314

def ui_write_code(array, length)
  logger.debug do
    args = [array, length]
    "called ui_write_code with #{args.inspect}"
  end

  bytes = u8(0x82)
  bytes += param_simple(14)
  bytes += param_simple(array)
  bytes += param_simple(length)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_write_download_endObject

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



3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
# File 'lib/lignite/ev3_ops.rb', line 3331

def ui_write_download_end
  logger.debug do
    args = []
    "called ui_write_download_end with #{args.inspect}"
  end

  bytes = u8(0x82)
  bytes += param_simple(15)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_write_floatvalue(value, figures, decimals) ⇒ Object

Parameters:

  • value (PARF)

    (in) Value to write

  • figures (PAR8)

    (in) Total number of figures inclusive decimal point

  • decimals (PAR8)

    (in) Number of decimals



3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
# File 'lib/lignite/ev3_ops.rb', line 3175

def ui_write_floatvalue(value, figures, decimals)
  logger.debug do
    args = [value, figures, decimals]
    "called ui_write_floatvalue with #{args.inspect}"
  end

  bytes = u8(0x82)
  bytes += param_simple(2)
  bytes += param_simple(value)
  bytes += param_simple(figures)
  bytes += param_simple(decimals)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_write_graph_sampleObject

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



3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
# File 'lib/lignite/ev3_ops.rb', line 3518

def ui_write_graph_sample
  logger.debug do
    args = []
    "called ui_write_graph_sample with #{args.inspect}"
  end

  bytes = u8(0x82)
  bytes += param_simple(30)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_write_init_runObject

Start the “Mindstorms” “run” screen



3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
# File 'lib/lignite/ev3_ops.rb', line 3454

def ui_write_init_run
  logger.debug do
    args = []
    "called ui_write_init_run with #{args.inspect}"
  end

  bytes = u8(0x82)
  bytes += param_simple(25)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_write_led(pattern) ⇒ Object

Parameters:

  • pattern (PAR8)

    (in) LED Pattern



3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
# File 'lib/lignite/ev3_ops.rb', line 3485

def ui_write_led(pattern)
  logger.debug do
    args = [pattern]
    "called ui_write_led with #{args.inspect}"
  end

  bytes = u8(0x82)
  bytes += param_simple(27)
  bytes += param_simple(pattern)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_write_power(value) ⇒ Object

Parameters:

  • value (PAR8)

    (in) Value [0,1]



3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
# File 'lib/lignite/ev3_ops.rb', line 3502

def ui_write_power(value)
  logger.debug do
    args = [value]
    "called ui_write_power with #{args.inspect}"
  end

  bytes = u8(0x82)
  bytes += param_simple(29)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_write_put_string(string) ⇒ Object

Parameters:

  • string (PAR8)

    (in) First character in string to write



3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
# File 'lib/lignite/ev3_ops.rb', line 3211

def ui_write_put_string(string)
  logger.debug do
    args = [string]
    "called ui_write_put_string with #{args.inspect}"
  end

  bytes = u8(0x82)
  bytes += param_simple(8)
  bytes += param_simple(string)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_write_screen_block(status) ⇒ Object

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

Parameters:

  • status (PAR8)

    (in) Value [0 = normal,1 = blocked]



3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
# File 'lib/lignite/ev3_ops.rb', line 3347

def ui_write_screen_block(status)
  logger.debug do
    args = [status]
    "called ui_write_screen_block with #{args.inspect}"
  end

  bytes = u8(0x82)
  bytes += param_simple(16)
  bytes += param_simple(status)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_write_set_busy(value) ⇒ Object

Parameters:

  • value (PAR8)

    (in) Value [0,1]



3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
# File 'lib/lignite/ev3_ops.rb', line 3421

def ui_write_set_busy(value)
  logger.debug do
    args = [value]
    "called ui_write_set_busy with #{args.inspect}"
  end

  bytes = u8(0x82)
  bytes += param_simple(22)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_write_set_pulse(value) ⇒ Object

Parameters:

  • value (PAR8)

    ()



3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
# File 'lib/lignite/ev3_ops.rb', line 3381

def ui_write_set_pulse(value)
  logger.debug do
    args = [value]
    "called ui_write_set_pulse with #{args.inspect}"
  end

  bytes = u8(0x82)
  bytes += param_simple(18)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_write_set_testpin(state) ⇒ Object

Parameters:

  • state (PAR8)

    (in) Value [0 = low,1 = high]



3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
# File 'lib/lignite/ev3_ops.rb', line 3438

def ui_write_set_testpin(state)
  logger.debug do
    args = [state]
    "called ui_write_set_testpin with #{args.inspect}"
  end

  bytes = u8(0x82)
  bytes += param_simple(24)
  bytes += param_simple(state)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_write_stamp(value) ⇒ Object

Parameters:

  • value (PAR8)

    ()



3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
# File 'lib/lignite/ev3_ops.rb', line 3194

def ui_write_stamp(value)
  logger.debug do
    args = [value]
    "called ui_write_stamp with #{args.inspect}"
  end

  bytes = u8(0x82)
  bytes += param_simple(3)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_write_terminal(state) ⇒ Object

Parameters:

  • state (PAR8)

    (in) Value [0 = Off,1 = On]



3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
# File 'lib/lignite/ev3_ops.rb', line 3534

def ui_write_terminal(state)
  logger.debug do
    args = [state]
    "called ui_write_terminal with #{args.inspect}"
  end

  bytes = u8(0x82)
  bytes += param_simple(31)
  bytes += param_simple(state)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_write_textbox_append(text, size, del, source) ⇒ Object

Append line of text at the bottom of a text box

Parameters:

  • text (PAR8)

    (in) First character in text box text (must be zero terminated)

  • size (PAR32)

    (in) Maximal text size (including zero termination)

  • del (PAR8)

    (in) Delimiter code

  • source (PAR8)

    (in) String variable or handle to string to append



3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
# File 'lib/lignite/ev3_ops.rb', line 3401

def ui_write_textbox_append(text, size, del, source)
  logger.debug do
    args = [text, size, del, source]
    "called ui_write_textbox_append with #{args.inspect}"
  end

  bytes = u8(0x82)
  bytes += param_simple(21)
  bytes += param_simple(text)
  bytes += param_simple(size)
  bytes += param_simple(del)
  bytes += param_simple(source)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_write_update_runObject



3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
# File 'lib/lignite/ev3_ops.rb', line 3469

def ui_write_update_run
  logger.debug do
    args = []
    "called ui_write_update_run with #{args.inspect}"
  end

  bytes = u8(0x82)
  bytes += param_simple(26)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_write_value16(value) ⇒ Object

Parameters:

  • value (PAR16)

    (in) Value to write



3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
# File 'lib/lignite/ev3_ops.rb', line 3245

def ui_write_value16(value)
  logger.debug do
    args = [value]
    "called ui_write_value16 with #{args.inspect}"
  end

  bytes = u8(0x82)
  bytes += param_simple(10)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_write_value32(value) ⇒ Object

Parameters:

  • value (PAR32)

    (in) Value to write



3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
# File 'lib/lignite/ev3_ops.rb', line 3262

def ui_write_value32(value)
  logger.debug do
    args = [value]
    "called ui_write_value32 with #{args.inspect}"
  end

  bytes = u8(0x82)
  bytes += param_simple(11)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_write_value8(value) ⇒ Object

Parameters:

  • value (PAR8)

    (in) Value to write



3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
# File 'lib/lignite/ev3_ops.rb', line 3228

def ui_write_value8(value)
  logger.debug do
    args = [value]
    "called ui_write_value8 with #{args.inspect}"
  end

  bytes = u8(0x82)
  bytes += param_simple(9)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_write_valuef(value) ⇒ Object

Parameters:

  • value (PARF)

    (in) Value to write



3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
# File 'lib/lignite/ev3_ops.rb', line 3279

def ui_write_valuef(value)
  logger.debug do
    args = [value]
    "called ui_write_valuef with #{args.inspect}"
  end

  bytes = u8(0x82)
  bytes += param_simple(12)
  bytes += param_simple(value)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#ui_write_write_flushObject



3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
# File 'lib/lignite/ev3_ops.rb', line 3157

def ui_write_write_flush
  logger.debug do
    args = []
    "called ui_write_write_flush with #{args.inspect}"
  end

  bytes = u8(0x82)
  bytes += param_simple(1)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#write16(source, index, destination) ⇒ Object

Write 16 bit value from SOURCE to DESTINATION

Parameters:

  • source (PAR16)

    (in) Variable to write

  • index (PAR8)

    (in) Index to array member to write

  • destination (PAR16)

    (in) Array to receive write value



8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
# File 'lib/lignite/ev3_ops.rb', line 8146

def write16(source, index, destination)
  logger.debug do
    args = [source, index, destination]
    "called write16 with #{args.inspect}"
  end

  bytes = u8(0xCD)
  bytes += param_simple(source)
  bytes += param_simple(index)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#write32(source, index, destination) ⇒ Object

Write 32 bit value from SOURCE to DESTINATION

Parameters:

  • source (PAR32)

    (in) Variable to write

  • index (PAR8)

    (in) Index to array member to write

  • destination (PAR32)

    (in) Array to receive write value



8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
# File 'lib/lignite/ev3_ops.rb', line 8164

def write32(source, index, destination)
  logger.debug do
    args = [source, index, destination]
    "called write32 with #{args.inspect}"
  end

  bytes = u8(0xCE)
  bytes += param_simple(source)
  bytes += param_simple(index)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#write8(source, index, destination) ⇒ Object

Write 8 bit value from SOURCE to DESTINATION

Parameters:

  • source (PAR8)

    (in) Variable to write

  • index (PAR8)

    (in) Index to array member to write

  • destination (PAR8)

    (in) Array to receive write value



8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
# File 'lib/lignite/ev3_ops.rb', line 8128

def write8(source, index, destination)
  logger.debug do
    args = [source, index, destination]
    "called write8 with #{args.inspect}"
  end

  bytes = u8(0xCC)
  bytes += param_simple(source)
  bytes += param_simple(index)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#writef(source, index, destination) ⇒ Object

Write floating point value from SOURCE to DESTINATION

Parameters:

  • source (PARF)

    (in) Variable to write

  • index (PAR8)

    (in) Index to array member to write

  • destination (PARF)

    (in) Array to receive write value



8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
# File 'lib/lignite/ev3_ops.rb', line 8182

def writef(source, index, destination)
  logger.debug do
    args = [source, index, destination]
    "called writef with #{args.inspect}"
  end

  bytes = u8(0xCF)
  bytes += param_simple(source)
  bytes += param_simple(index)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#xor16(source1, source2, destination) ⇒ Object

Exclusive or two 16 bit values DESTINATION = SOURCE1 ^ SOURCE2

Parameters:

  • source1 (PAR16)

    (in)

  • source2 (PAR16)

    (in)

  • destination (PAR16)

    (out)



779
780
781
782
783
784
785
786
787
788
789
790
791
# File 'lib/lignite/ev3_ops.rb', line 779

def xor16(source1, source2, destination)
  logger.debug do
    args = [source1, source2, destination]
    "called xor16 with #{args.inspect}"
  end

  bytes = u8(0x29)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#xor32(source1, source2, destination) ⇒ Object

Exclusive or two 32 bit values DESTINATION = SOURCE1 ^ SOURCE2

Parameters:

  • source1 (PAR32)

    (in)

  • source2 (PAR32)

    (in)

  • destination (PAR32)

    (out)



797
798
799
800
801
802
803
804
805
806
807
808
809
# File 'lib/lignite/ev3_ops.rb', line 797

def xor32(source1, source2, destination)
  logger.debug do
    args = [source1, source2, destination]
    "called xor32 with #{args.inspect}"
  end

  bytes = u8(0x2A)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end

#xor8(source1, source2, destination) ⇒ Object

Exclusive or two 8 bit values DESTINATION = SOURCE1 ^ SOURCE2

Parameters:

  • source1 (PAR8)

    (in)

  • source2 (PAR8)

    (in)

  • destination (PAR8)

    (out)



761
762
763
764
765
766
767
768
769
770
771
772
773
# File 'lib/lignite/ev3_ops.rb', line 761

def xor8(source1, source2, destination)
  logger.debug do
    args = [source1, source2, destination]
    "called xor8 with #{args.inspect}"
  end

  bytes = u8(0x28)
  bytes += param_simple(source1)
  bytes += param_simple(source2)
  bytes += param_simple(destination)
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end