C Language Development Kit/Functions/SystemSetting

From OptiWiki

Jump to: navigation, search
Description This function can change the system settings. System settings are used to change the reading behavior of the handheld terminal, or to change communication settings.
Syntax
int systemsetting(char * option_string);
Arguments
char * option_string
Points to a string containing menu options of 2 (or 4) characters, which are listed in the Universal Menu Book.

Follow the links below to find the lists of all available menu options for the different terminals:

Returns
0 Option code is supported and set.
-1 Option code is not supported.
Remarks It is not possible to change the system settings via the communications port using a .. sequence, unless of course this behavior is emulated by an application that translates data from the communications port to systemsetting() calls.

By enabling the system setting "YC" (enabling decoding of menu labels), the menu labels in Opticon's Universal Menu Book will be returned as data by readbarcode(). The programmer can pass this data to systemsetting(), thereby emulating the behavior of a scanner directly programmable from the Universal Menu Book. By default this behavior is disabled, therefore passing the menu code "U2" (set to default) to systemsetting()s will immediately disable the effect of "YC".

IMPORTANT: System settings that affect a communications port, only take effect after the port is closed and opened again.

TIP: systemsetting() can execute more then one command at a time, when the option_string parameter contains more options, for example:

systemsetting("B0B2R4"); //This enables Code 39 and EAN codes
Example
#include "lib.h"
#include <stdio.h>
 
void main( void )
{
    systemsetting("WK");    // Key click on
 
    while( 1 )
    {
        setfont( LARGE_FONT, 0);
        printf("\fHello world");
 
        resetkey();
        while( !kbhit())
            idle();
    }
}


Views
Personal tools