Installation and Configuration

Installation

Active Focus Manager is distributed as a binary pack from which the exe can be directly executed.


Run the AFM for Windows

To run AFM, execute the “Active Focus Manager.exe” in the binary pack. For custom application configurations, please refer to the following sections on application settings and log configurations.


Application Settings

Following includes the default settings of AFM, which can be found in AppSettings.xml file. For custom settings, modify the attributes in the AppSettings.xml file as required.


<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl"?>
<config>
    <application_startup_mode>    
        <minimized_to_tray>0</minimized_to_tray> <!-- Minimized to tray on startup  { Enabled = 1 , Disabled = 0}   Default = {0} -->
        <launch_on_startup>1</launch_on_startup> <!-- Launch on Windows Startup  { Enabled = 1 , Disabled = 0}  Default = {0} -->
    </application_startup_mode>
    
    <monitoring_frequency>500</monitoring_frequency> <!-- In milliseconds -->
    
    <active_focus_applications>
        <!--name = {Application Name} matching_criteria = {Contains, Exact}   enable_hid_emulator = {True/true, False/false} -->
        <!--ddf_configuration = {DDF selection as per the configuration in CoreScanner Config.XML} host_mode = {1 - IBM HID, 2 - IBM TT, 3 - HID KB, 9 - SNAPI} -->
        <application name="Notepad" matching_criteria="Contains" enable_hid_emulator="True" ddf_configuration = "2" />
        <application name="Word" matching_criteria="Contains" enable_hid_emulator="True" />
        <application name="Chrome" matching_criteria="Contains" enable_hid_emulator="False" />
    </active_focus_applications>
</config>                                                            

  • Application Start-up mode Settings - Settings that applies when AFM is launched.
    • Minimized to tray - Configures whether the tool should be minimized to system tray at start up or displayed on the Desktop.
      • 0 (Disabled) - Application will be displayed on the Desktop.
      • 1 (Enabled) - Application will be minimized to system tray upon startup.
    • Launch on Startup - Configures whether the application should be launched at system start up.
      • 0 (Disabled) - Do not launch on Windows Start up.
      • 1 (Enabled) - Launch on Windows Start up.
  • Monitoring Frequency - Specifies how often AFM keeps checking a matched application as per the configured application settings. The default value is every 500 milliseconds.
  • Active Focus Application Settings - Settings pertaining to specific applications configured in AFM tool.
      Settings Available for each application
      • Name - Specifies the name of the application to target for barcode scans.
      • Matching Criteria - Specifies whether the name should be used for an exact match, or the name should be contained within the application name.
      • Enable HID emulator - Specifies whether focusing on the configured application should enable/disable simulated HID feature in CoreScanner.
      • DDF Configuration - Specifies the barcode formatting configuration to be used for the focused application. The DDF configuration is based on the DDF options available in CoreScanner's Config.XML file, located at “C:\Program Files\Zebra Technologies\Barcode Scanners\Common”. The DDF configuration included in AFM specifies which DDF pattern to be configured in CoreScanner. For example, configuring ddf_configuration as “2” will format the barcodes read to have a suffix after the barcode data. The values to appear as suffix can be configured in the Config.xml file in CoreScanner.

Log Configurations

AFM Tool incorporates open-source library Log4net as the logging framework for the application. Log4net utilizes a configuration file that specifies the log configurations used when creating log content.

The following describes the customizable configuration elements in logging for AFM tool.

  • The default log file path is specified to be the current user's Public Documents path, and the log files will be created in path “Public\Documents\Zebra\AFM\Logs”. To change the log file path to a custom path, the path given under “value” property can be modified as required. <file name="File" value="${Public}\Documents\Zebra\AFM\Logs\ActiveFocusManager.log"/>
  • Number of log files created before re-circulating the log files are specified using the property below. <maxSizeRollBackups value="5" />
  • The maximum file size per log file can be specified in either KB or MB units. When the specified size is reached for a log file, a new log file will be created to include the subsequent log entries, until the maximum file count is reached. <maximumFileSize value="1MB" />
  • The log pattern is specified in the parameter “ConversionPattern”. The default log pattern is as below, and each log element is described below.
    <param name="ConversionPattern" value="%-5d{MM-dd-yyyy hh:mm:ss.ffff} [T%thread] [%p] [%type] [%m] [%line] %n" />
    • %-5d = Distance between log components
    • MM-dd-yyyy hh:mm:ss.ffff = Date and time
    • T%thread = 'T' followed by thread ID
    • %p = log type, Info/Error/Warn/Debug
    • %type = Class name
    • %m = log message
    • %line - log message line number
    • %n = next line indicator

The AFM log configuration file is name “afm_log.config” as can be found in the same location as the AFM binaries.

In addition to AFM log files, the tool generates a separate log file that includes the following system information. This file is created at the first launch of the application and maintained in the same location as the log file path for AFM.


================================================================================
System Information
================================================================================
AFM Version:                <AFM tool version>
CoreScanner Version:        <CoreScanner version installed in the PC>
Operating System Name:      <Windows OS version>
Operating System Build ID:  <Windows OS build number>
Processor Architecture:     <Windows Architecture>
Number of Processors:       <Number of processors>