Beijer Electronics (formerly QSI Corporation)

Obtaining A12 terminal's IP with code
Page 1 of 1

Author:  Breenerman [ Fri Aug 16, 2013 7:13 pm ]
Post subject:  Obtaining A12 terminal's IP with code

I would like to obtain the IP address that an A12 terminal is using when a button within a screen is clicked.
I reviewed the Qlarity language reference and see a function that can do it, but I can't figure out the exact syntax to
get it to work. Could you provide some guidance or a code sample for it ?
Thanks much...

Author:  Jeremy [ Mon Aug 26, 2013 7:15 am ]
Post subject:  Re: Obtaining A12 terminal's IP with code


Assuming your A12 has only a single IP address (the standard A12 configuration, especially when using Qlarity), the following should work:

func click()
    dim addr[] as byte
    dim addrStr as string
    GetSystemSetting(SYS_IPADDRESS, addr, SYSREAD_CURRENT)

    addrStr = str(addr)
    replace(addrstr, 0, -1, ",", ".", -1)
    replace(addrstr, 0, -1, "[", "", -1)
    replace(addrstr, 0, -1, "]", "", -1)
    Value = "IP Address=" + _StrToCharStr(addrstr)

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group