boardRequestOption (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

All

Firmware version:

2.64 / 1.00.00


The boardRequestOption function makes it possible to request options from the Option Server directly from the RTCU device. The functionality is equal to the RTCU IDE Request Option functionality.

 

When an option is requested, the option server at Logic IO is contacted through the internet by using the supplied account credentials. If there are sufficient credits for the requested option(s), the transaction will be made and the options activated on the device.

To use the request option functionality, it is therefore necessary to have an account with a positive credit established at Logic IO with a given user name/password.

 

Note that the device must be reset before the changes take effect (for example by using boardReset).

 

 

Note: using this function will deduct the credit on the account used and constitutes a non-refundable purchase.

 

Input:

user : STRING

The user name used to connect to the option server. Case sensitive.

 

pass : STRING

The password used to connect to the option server. Case sensitive.

 

options : STRING

The list of options to apply. The options are case sensitive and multiple options must be separated with spaces.

To find an up-to-date list of the possible options and prices for a specific target, use the IDs from Request Options in the RTCU IDE.

 

The following devices currently supports the options listed below:

CX1 series

CX1 flex / CX1i flex

COM

RS232, FMI, 1-wire (CX1i flex only).

IO

I/O option. See technical manual for details.

 

CX1 warp

COM

RS232, FMI, 1-wire

IO

I/O option. See technical manual for details.

RF

RF interface.

FLASH

3MB (XF3) extended flash, SD-CARD

 

CX1 warp-c

COM

CAN

IO

I/O option. See technical manual for details.

RF

RF interface.

FLASH

3MB (XF3) extended flash, SD Card

 

DX4 Series

DX4 flex / DX4i warp

COM

RS485, MODBUS and 1-wire option.

DIO

Digital I/O option. See technical manual for details.

AIO

Analog I/O option. See technical manual for details.

 

MX2 Series

MX2 warp

CAN

CAN option.

COM

RS485 and 2nd RS232 (RJ45).

HS

Headset.

ISIM

Internal SIM card reader

 

MX2 encore

CAN

CAN option.

RS485

RS485 option.

ISIM

Internal SIM card reader

 

MX2 eco+

FMI

Fleet Management Interface

 

AX9 Series

AX9 pro / AX9 pro-x / AX9i pro / AX9 turbo

FMI

Fleet Management Interface

 

AX9 encore

RS485

RS485 option.

 

 

Returns:

>=0

- The total cost of the options.

-1

- Error connecting to server.

-2

- Illegal argument.

-3

- Server uses an unsupported protocol version.

-4

- Failed to log in.

-5

- Not enough credits to complete order.

-6

- Invalid option.

-7

- Unspecified error when trying to order.

-8

- Error applying options.

-9

- One or more options are restricted and must be approved by Logic IO.

 

Declaration:

FUNCTION boardRequestOption : INT;
VAR_INPUT
  user   : STRING;
  pass   : STRING;
  options : STRING;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
VAR
  rc:INT;
END_VAR;
  ...
  ...
  IF boardGetProfileX(index := 13) = 0 THEN
    gsmPower(power:=ON);
    gprsOpen();    
    WHILE NOT gprsConnected() DO  
        Sleep(delay:=2500);  
    END_WHILE;  
     rc:= boardRequestOption(user:="user", pass:="pass",options:="FMI");
    IF rc >= 0 THEN
        DebugMsg(message := "Options enabled");
        // Make the RTCU device reset
        boardReset();
    END_IF;
  END_IF;
BEGIN
  ...
END;
END_PROGRAM;