
7. LW3 Programmers’ Reference
RAP-B511 series
– User's Manual
86
Applied firmware package: v1.1.0b3b3 | LDC software: v2.5.1b5
Further Examples
Scanned property: /MANAGEMENT/STATUS.CpuTemperature=46 C; 0;75; 0;79; 3;48;
<pattern>
Scan result
Variable type
Comment
%s
46
Number
Scanned from the first character till the first
whitespace character
%5c
46 C;
String
The first 5 characters scanned
%*18c%4c
3;48
String
The first 18 characters skipped then 4 characters
scanned
%*s %c
C
String
The first part till the first whitespace character and
a space are skipped then 1 character scanned
%*[^;]; %4c
0;75
String
From the first character till the first semicolon and
a space are skipped, then 4 characters scanned
%*[^;]; %*[^;]; %*[^;]; %4c
0;79
String
Three groups ended with semicolon and space are
skipped then 4 characters scanned
7.13.6.
Reformatting a Value
The value of the variable can be changed by adding text as prefix and/or postfix.
ATTENTION!
Think about the length of the value: 15 characters are allowed, the others are truncated.
Command and Response
ç
CALL·/CTRL/VARS/V
<loc>
:printf(
<prefix>
%s
<postfix>
)
æ
mO·/CTRL/VARS/V
<loc>
:printf
Parameters
Parameter
Parameter description
Value Value description
<loc>
The location of the variable
1-30
<prefix>
The text before the original value of the property (optional)
Custom
ASCII characters
%s
The original value of the variable
<postfix>
The text following the original value of the property (optional)
Custom
ASCII characters
Example
ç
GET /CTRL/VARS/V1.Value
ç
pw /CTRL/VARS/V1.Value=01
ç
CALL /CTRL/VARS/V1:printf(PWR%s)
æ
mO /CTRL/VARS/V1:printf
ç
GET /CTRL/VARS/V1.Value
æ
pw /CTRL/VARS/V1.Value=PWR01
The 'PWR' string has been inserted before the original value.
7.14. Ethernet Port Configuration
ATTENTION!
When you change a network property the new value is stored but the
applySettings
method
must be called always to apply the new settings. When two or more network parameters are changed the
applySettings
method is enough to call once as a final step.
7.14.1. Query the DHCP State
Command and Response
ç
GET·/MANAGEMENT/NETWORK.DhcpEnabled
æ
pw·/MANAGEMENT/NETWORK.DhcpEnabled=false
Parameters
If the
<DHCP_state>
parameter is
true
, the current IP address setting is DHCP, if the parameter is
false
the
current IP address is static.
Example
ç
GET /MANAGEMENT/NETWORK.DhcpEnabled
æ
pw /MANAGEMENT/NETWORK.DhcpEnabled=true
7.14.2.
Change the DHCP State
Command and Response
ç
SET·/MANAGEMENT/NETWORK.DhcpEnabled=
<DHCP_state>
æ
pw·/MANAGEMENT/NETWORK.DhcpEnabled=
<DHCP_state>
Parameters
See in the previous section.
Example
ç
SET /MANAGEMENT/NETWORK.DhcpEnabled=false
æ
pw /MANAGEMENT/NETWORK.DhcpEnabled=false
ç
CALL /MANAGEMENT/NETWORK:ApplySettings()
æ
mO /MANAGEMENT/NETWORK:ApplySettings
INFO:
The
applySettings
method will save and apply the new value and results the device to reboot.