Bar Code Handy Terminal BHT-200-CE Class Library Reference Manual
Copyright DENSO WAVE INCORPORATED, 2006 All rights reserved. No part of this publication may be reproduced in any form or by any means without permission in writing from the publisher. Specifications are subject to change without prior notice. All products and company names mentioned in this manual are trademarks or registered trademarks of their respective holders.
Introduction This reference manual is intended for software developers using VB.NET or C# to develop software applications using barcode read functions and so forth for the BHT200. Related Manuals Please refer to the following related manuals for further information.
Contents 1. Development Environment ...............................................................................................................5 2. Development Procedure...................................................................................................................6 2.1. Project Creation Procedure......................................................................................................6 2.2. Assignment Procedure .............................................................
15. Data Communication....................................................................................................................41 15.1. IrDA Interface .......................................................................................................................41 15.2. Connector Interface..............................................................................................................41 15.3. File Transfer ......................................................................
18.1. Scanner ................................................................................................................................82 18.2. Scanner.CodeInfo.............................................................................................................. 137 18.3. Scanner.Settings ............................................................................................................... 140 18.4. BatteryCollection ...................................................................
1. Development Environment Development tool • Microsoft Visual Studio .NET 2003 Application development kit The following assemblies have been provided as dedicated BHT class libraries. • BHT200CL.dll - Assembly equipped with dedicated BHT functions such as barcode reading - Used as a reference when developing applications employing dedicated BHT functions. - This file can be downloaded from QBNet. • BHT200CL.xml - BHT200CL.
2. Development Procedure 2.1. Project Creation Procedure 1. Store the dedicated BHT class libraries (dll, xml files) in an appropriate location on the computer used for application development. 2. Start up Visual Studio.NET. 3. Select [File] – [New] – [Project…] to create a new project. 4. At the [New Project] dialog box, set the [Project Types:] to “Visual Basic Projects” or “Visual C# Projects”, and the [Templates] to “Smart Device Application”. 5.
. Select [Build…] – [Build solution] and then assign a solution. Unless the IP address is changed, step 9 only is required from the second time onwards. When debugging, change both methods from [Build…] – [Build solution] to [Debug] – [Start].
3. Device Control The following table lists devices that can be controlled from the dedicated BHT class library and the respective classes used. Function Class Assembly Barcode reading Scanner Wireless communication RF Backlight Backlight Beeper, vibrator Beep Battery information Battery Keyboard Keys BHT200CL.dll LED LED Power management PwrMng OS update SysModification Status display Icon Screen control Display System information SysInfo Registry Registry Serial communication COM Communication200.
4. Barcode Reading The barcode reading function has the following features. • Specification of barcode types for which reading is permitted • Specification of the trigger switch operation mode • Specification of the method used to notify the operator that reading is complete • Acquisition of the read barcode data, number of code digits, and code type • Calculation of check digits 4.1. Readable Codes The BHT unit can read the following codes.
The following options can be specified for the above code types. BHT-200B Code Type Option EAN-13 (JAN-13) EAN-8 (JAN-8) UPC-A, UPC-E Interleaved 2of5 (ITF) 1st character (country flag) Codes with add-on Codabar (NW-7) Code-39 Code-93 Code-128 Standard 2of5 (STF) MSI No. of read digits Check digits No. of read digits Start/stop characters Check digits No. of read digits Check digits No. of read digits No. of read digits No.
4.2. Trigger Switch Operation Mode The following four modes exist based on differences in the illumination timing and duration of the illumination LED. These modes are specified at the Scanner.RdMode property. Auto-off mode (default) The illumination LED turns ON when the trigger switch is pressed, and turns OFF again when the trigger switch is released or a barcode is read. The illumination LED remains ON for a maximum of five seconds if the trigger switch is held down continuously.
4.3. Display LEDs and Beeper Control A notification given to inform the operator that barcode reading has been performed successfully can be controlled as follows. This is specified at the Scanner.RdMode property. • Turn ON/do not turn ON display LEDs. (Default: Turn ON display LEDs.) • Sound/do not sound beeper. (Default: Do not sound beeper.) If set to “Turn ON display LEDs.”, it will not be not possible to control the LEDs from the application while barcode reading is enabled.
5. Wireless Communication 5.1. Wireless Communication System Configuration SS method data communication is performed using a wireless card. Wireless communication between the host computer and BHT is performed via an access point. Please refer to the “BHT-200B-CE/200BW-CE User’s Manual” or “BHT-200Q-CE/200QW-CE User’s Manual” for further details. The table below shows the wireless communication devices on the BHT-200 and communication state transition for the above system configuration.
5.2. Wireless Communication Parameters The BHT-200 wireless operation mode has a Zero Config mode and NIC Control mode. The default mode is NIC Control mode. NIC Control mode only is supported on BHT units running Windows CE.NET 4.1. ▪ Zero Config mode ▪ NIC Control mode : Windows CE standard I/F : Security supported : BHT original I/F : Compatible with units running Windows CE.NET 4.1. The parameter setting method differs due to the differences between these two operation modes.
[Ex.] Changing the recognition mode for the existing Profile (SSID: BHT, Infrastructure mode). [VB] RF.Controller = RF.EN_CONTROLLER.ZEROCONFIG ‘Sets the control mode to Zero Config. RF.EditMode = RF.EN_EDIT_MODE.ZEROCONFIG ‘Sets the edit mode to Zero Config. RF.Profile.Update ‘Updates the existing Profile. MyProfile = New RF.Profile(“BHT200”, RF.Profile. EN_INFRA_MODE.INFRASTRUCTURE) MyProfile.Authentication = RF.Profile.EN_AUTHENTICATION.SHARED RF.Profile.Commit ‘Reflects to driver. [C#] RF.
Details of the parameters used with the above security configurations are outlined in the table below. Parameter Authentication Encryption 802.1x ESSID Profile Priority Pre Shared Key WEP Key None OPEN Disable WEP (static) Disable ● ● ● PEAP (802.1x) OPEN WEP (auto distribution) PEAP ● ● - Security EAP-TLS PEAP (802.
▪ ENCRYPTION This is the encryption method setting. A selection can be made from Prohibited, WEP, and TKIP. ▪ AUTHENTICATION This is the authentication method setting. A selection can be made from Open, Shared, and WPA for units running on Windows CE 4.2, and a selection can be made from Open, Shared, WPA, and WPA-PSK for units running Windows CE 5.0. ▪ EAP TYPE This is the EAP type setting. A selection can be made from Prohibited, PEAP, and TLS. ▪ WEP KEY The encryption key (WEP KEY) can be set.
Settable Parameters ▪ POWER The wireless module power mode can be set. The following 6 power modes are available. The default is P_PWRSAVE_MOST. Power Mode FULL MOST MORE MID LESS LEAST Power Consumption Status Consumes much power (no power saving effect) Consumes much power (little power saving effect) The BHT may take a little more time to establish a wireless connection or issue responses with little power consumption (large power saving effect). [Ex.] Set the power mode to "Cosumes much power" RF.
5.3. Wireless Communication Parameters 5.3.1. Parameter Setting in Zero Config Mode By the setting “TRUE” for the RF.Open property, the wireless communication device is started up and wireless communication is permitted. By the setting “FALSE” for the RF.Open property, the wireless communication device is stopped and wireless communication is prohibited. Furthermore, the wireless permission method can be changed using the OpenMode property. However, with units running on Windows CE 4.1 or 4.
5.3.2. Checking Synchronization with the Access Point When performing data communication with a wireless communication device, use the RF.Synchronize method to check whether synchronization with the access point has been obtained. The following is a list of possible reasons why it may not be possible to obtain synchronization with the access point. (1) The wireless communication device is currently open.
6. Backlight The backlight function has the following features. • Backlight control • Backlight control key specification • Backlight illumination duration specification • Brightness adjustment • Backlight OFF/DIM toggle (Only on units running on Windows CE 5.0.
6.1. Backlight Control The backlight can be controlled using the following methods. • Control by pressing the backlight function control key • Control using the backlight control property The backlight function can be enabled/disabled by pressing the backlight function control key. With the backlight function enabled, press any key or tap the touch panel to turn the backlight ON.
6.2. Backlight Control Key The backlight function control key can be specified with the Backlight.Settings.CtrlKey property. The backlight is controlled by holding down the [SF] key and pressing [M4] by default. Furthermore, the current backlight control key can be acquired by reading the property value. Backlight Control Key [F1] [F2] [F3] [F4] [F5] [F6] [F7] [F8] [F9] [F10] [F11] [F12] [SCAN] [M1] [M2] [M3H] (half-press) [M3] [M4H] (half-press) [M4] Setting Backlight Control Key [SF] + [.
6.3. Backlight Illumination Duration The backlight illumination duration time can be set at or acquired from the Backlight.Settings.OnTimeBattery /OnTimeACTime property when the backlight is powered by the battery or when the BHT is installed on the CU. The illumination duration default value is 3 seconds when powered by the battery, and 60 seconds when installed on the CU. The illumination duration begins from the moment all keys or the touch panel is released. 6.4.
7. Beeper, Vibrator The beeper and vibrator function is equipped with the following features. • The beeper or vibrator is selected and the beeper volume setting made at the system settings. • Sound pattern specification 7.1. Beeper/Vibrator Selection It is possible to select from “Beeper only”, “Vibrator only”, and “Beeper and vibrator”. Sounding of the beeper or activation of the vibrator from the application is controlled using an indexer. The beeper or vibrator is specified for the index. [Ex.
7.3. Beeper Volume The beeper volume level can be selected from the six levels shown in the table below, however, there are in fact only four levels; OFF, Low, Medium and High. Setting Volume Level 0 OFF 1 Low 2 3 Medium 4 5 High When sounding the beeper from the application, the volume setting is valid only when the frequency is set to “0”, “1”, or “2”. The beeper will sound at maximum volume at all other frequency settings.
8. Battery Information The battery information function provides the following information. • Battery voltage (mV) • CU installation status (charge status) • Battery level • Battery type There are six battery levels. The battery level is “HIGH” when fully charged and continues to drop to “MID” and then “LOW” and so on as the BHT is used. If a key is pressed or the touch panel is tapped when the battery level is “LOW”, the beeper will sound three times and a ”Battery voltage low” message displays.
9. Keyboard The following key functions exist in addition to the standard press/release functions. • Input mode change • Magic key function assignment • [SF] key operation mode change 9.1. Key Input Modes The following key entry modes are available. (1) Numeric entry mode This mode allows you to type in numeric data with the numeric keys. (2) Alphabet entry mode 26-key pad Use the numeric keys to type in alphabet letters in the same way as he/she uses a cellular phone.
When keys are pressed in this mode, virtual key codes and character codes are returned in accordance with “Appndix A. Keyboard Arrangement, Virtual Key Codes, and Character Codes”. 26-key pad alphabet entry mode: Alphabet characters can be entered using an alphabet character similar to that used on a cellular phones. When changing to alphabet entry mode, an unestablished character display window similar to that shown below displays. Unestablished characters display.
When keys used for alphabet entry mode, the table below lists keys whose operations are different from those in the numeric entry mode. Use this key 0 to 9 and period (.) keys ENT key BS key C key F1 to F12 Key Magic key ALP key To do this Enter alphabets. For alphabets assigned to these keys, refer to “Appendix A. Keyboard Arrangement, Virtual Key Codes and Character Codes” – “A.1.3. Character Codes in Alphabet Entry Mode.” Establish an unestablished key if any.
9.2. Magic Key Operation Magic key function assignment The following functions are assigned to magic keys. None Marker light [ENT] key [CTL] key Trigger key [ALT] key [SF] key [TAB] key Backlight control CLEAR key The default functions for each magic key are as follows.
The virtual key codes and display characters returned when functions are assigned to magic keys are as follows. Character Code Parameter Function Virtual Key Code MAGIC_FUNC_NONE None Keys.M1 to Keys.M5, Keys.M3H to Keys.M5H − MAGIC_FUNC_ENTER MAGIC_FUNC_TRG [ENT] Trigger Keys.Return Keys.M1 to Keys.M5, Keys.M3H to Keys.M5H 0D(H) MAGIC_FUNC_SHIFT [SF] Keys.Shift − MAGIC_FUNC_BLT Backlight control Keys.M1 to Keys.M5, Keys.M3H to Keys.
9.4. Keyboard Type The following four keyboard types exist based on the combination of the number of keys and number key arrangement. No.
10. LED The unit is equipped with three types of LED; indicator LEDs (red, blue) to notify the user that barcode reading is complete, charge LEDs (red, green) to indicate the charge status, and a wireless LED to indicate the wireless communication status. The illumination status for indicator LEDs and wireless LEDs can be controlled from the application. Indicator LEDs The illumination status is set and acquired using a 2D indexer.
Wireless LEDs The illumination status is set or acquired using a 2D indexer. Specify the device to be illuminated for the first index and the illumination color (yellow) for the second index. The usage can be changed with the Usage property. The default setting for this property is “Use only at the wireless communication device.” ▪ Use only at the wireless communication device. ▪ Use only at the application. ▪ Use at both the wireless communication device and application.
11. Power Management The four power statuses are listed in the table below. Power ON CPU LCD Standby (*1) Suspend (*2) Critical OFF(*2) DEEP IDLE SLEEP SLEEP ON OFF OFF TURBO RUN / RUN / IDLE ON (*1) No processing is performed when the BHT is on standby. Furthermore, ensure to disable standby before accessing the card. (*2) The events that cause the BHT to switch to the suspend and critical OFF statuses differ.
11.2. Suspend Transition Conditions The BHT switches to suspend when the power key is pressed, when the event that prohibits suspend has been completed and the auto power OFF time has elapsed, and when the method used to switch to suspend is called from the application. Events that prohibit suspend - Wireless connection open (Excludes BHT-200 models used in USA and Canada.
12. Updating the OS The system can be updated (version update) by creating and executing the update applications discussed in the procedure below while Windows CE is running. Update method using RAM (1) Call up the PwrMng.Shutdown(PwrMng.EN_SHUTDOWN_MODE.SYSMODIFY) method and reboot the BHT (*1). (2) After rebooting, a “SysModify” directory (RAM disk) is created. Copy the OS file to this directory. (3) Specify the update filename in the SysModification.FileName property. (4) Call up the SysModification.
13. Status Display Enabling and disabling of the following status display icons can be controlled from the application. Property Residual voltage battery Icon Battery Meaning High 3.9 V or more Medium Less than 3.9 V Low Less than 3.7 V Warning Less than 3.
14. System Information The following system information can be acquired from the BHT. • System version • Machine name • Machine No. • Serial No. • RAM size • ROM size The RAM and ROM size constitute the size of the BHT memory. This does not refer to the amount of available space or user space.
15. Data Communication The following communication interfaces can be used for communication with the host computer. Of the three listed below, the IrDA interface and connector interface can be used with the CommSerial class and FileTransfer class in order to create applications. • IrDA interface (IrDA-SIR1.2) • Connector interface • USB interface 15.1. IrDA Interface The IrDA interface is assigned to port no. 4.
16. Namespaces The following three namespaces exist in the BHT-200 class library. Namespace Name DNWA.BHTCL DNWA.Exception DNWA.Tools.BHT.Communication Description Class group used to realize functions unique to the BHT-200. Thrown exception class group.
17. Class DNWA.BHTCL Namespace The DNWA.BHTCL namespace includes the following classes. Class Name 17.1. Scanner 17.2. Scanner.CodeInfo 17.3. Scanner.Settings 17.4. BatteryCollection 17.5. BatteryCollection.Battery 17.6. Backlight 17.7. Backlight.Settings 17.8. LED 17.10. Beep 17.11. Beep.Settings 17.12. RF 17.13. RF.Profile 17.14. RF.Settings 17.15. RF.WepKeyCollection 17.16. RF.SiteSurvey 17.17. RF.Info 17.18. Keys 17.19. Keys.Settings 17.22. PwrMng 17.23. PwrMng.Settings 17.20. SysInfo 17.21. SysInfo.
DNWA.Exception Namepsace The DNWA.Exception namespace includes the following classes. Class Name 17.30. ArgumentException 17.31. ObjectDisposedException 17.32. SecurityException 17.33. DeviceNotFoundException 17.34. DeviceLoadException 17.35. NotSupportedException Description An exception thrown when a specified parameter is invalid. An exception thrown when an operation request is issued to a device whose file has not been opened.
17.1. Scanner Controls barcode reading and acquires the read data. For a description of all members of this class, refer to section “18.1. Scanner". Syntax [VB] Public Class Scanner [C#] public class Scanner Namespace DNWA.BHTCL Assembly DNWA.BHT200CL.
17.2. Scanner.CodeInfo Acquires the code information read by the scanner. This class exists within the Scanner class. For a description of all members of this class, refer to section “18.2. Scanner.CodeInfo". Syntax [VB] Public Class Scanner.CodeInfo [C#] public class Scanner.CodeInfo Namespace DNWA.BHTCL Assembly BHT200CL.
17.3. Scanner.Settings Sets or acquires barcode related parameters. This class exists within the Scanner class. For a description of all members of this class, refer to section “18.3. Scanner.Settings". Syntax [VB] Public Class Scanner.Settings [C#] public class Scanner.Settings Namespace DNWA.BHTCL Assembly BHT200CL.
17.4. BatteryCollection Acquires information on the battery such as the charge status and output voltage. For a description of all members of this class, refer to section “18.4. BatteryCollection". Syntax [VB] Public Class BatteryCollection [C#] public class BatteryCollection Namespace DNWA.BHTCL Assembly BHT200CL.
17.5. BatteryCollection.Battery Acquires information on the battery such as the charge status and output voltage. For a description of all members of this class, refer to section “18.5. BatteryCollection.Battery". Syntax [VB] Public Class BatteryCollection.Battery [C#] public class BatteryCollection.Battery Namespace DNWA.BHTCL Assembly BHT200CL.
17.6. Backlight Sets or acquires the ON/OFF status of the backlight. For a description of all members of this class, refer to section “18.6. Backlight". Syntax [VB] Public Class Backlight [C#] public class Backlight Namespace DNWA.BHTCL Assembly BHT200CL.
17.7. Backlight.Settings Sets or acquires backlight related parameters. This class exists within the Backlight class. For a description of all members of this class, refer to section “18.7. Backlight.Settings". Syntax [VB] Public Class Backlight.Settings [C#] public class Backlight.Settings Namespace DNWA.BHTCL Assembly BHT200CL.
17.8. LED Sets or acquires the LED ON/OFF status. For a description of all members of this class, refer to section “18.8. LED". Syntax [VB] Public Class LED [C#] public class LED Namespace DNWA.BHTCL Assembly BHT200CL.
17.9. LED.UsageCollection Sets or acquires the control factor for the specified LED device. This class exists in the LED class. Please refer to “18.9. LED.UsageCollection” for details of all members.
17.10. Beep Controls the beeping of the beeper and vibration of the vibrator. For a description of all members of this class, refer to section “18.10. Beep". Syntax [VB] Public Class Beep [C#] public class Beep Namespace DNWA.BHTCL Assembly BHT200CL.
17.11. Beep.Settings Sets or acquires the beeper and vibrator related parameters. This class exists within the Beep class. For a description of all members of this class, refer to section “18.11. Beep.Settings". Syntax [VB] Public Class Beep.Settings [C#] public class Beep.Settings Namespace DNWA.BHTCL Assembly BHT200CL.
17.12. RF Opens and closes wireless communication, and sets or acquires the parameters for wireless communication. For a description of all members of this class, refer to section “18.12. RF". Syntax [VB] Public Class RF [C#] public class RF Namespace DNWA.BHTCL Assembly BHT200CL.
17.13. RF.Profile Sets or acquires properties for the wireless communication profile. This is not supported on units running on Windows CE 4.1. This class exists within the RF class. For a description of all members of this class, refer to section “18.13. RF.Profile". Syntax [VB] Public Class RF.Profile [C#] public class RF.Profile Namespace DNWA.BHTCL Assembly BHT200CL.
17.14. RF.Settings Sets or acquires the parameters for wireless communication. This class exists within the RF class. For a description of all members of this class, refer to section “18.14. RF.Settings". Syntax [VB] Public Class RF.Settings [C#] public class RF.Settings Namespace DNWA.BHTCL Assembly BHT200CL.
17.15. RF.WepKeyCollection Specifies the Wep key. This class exists within the RF class. For a description of all members of this class, refer to section “18.15. RF.WepKeyCollection". Syntax [VB] Public Class RF.WepKeyCollection [C#] public class RF.WepKeyCollection Namespace DNWA.BHTCL Assembly BHT200CL.
17.16. RF.SiteSurvey Acquires SiteSurvey data. This class exists within the RF class. For a description of all members of this class, refer to section “18.16. RF.SiteSurvey". Syntax [VB] Public Class RF.SiteSurvey [C#] public class RF.SiteSurvey Namespace DNWA.BHTCL Assembly BHT200CL.
17.17. RF.Info Acquires information on wireless communication. This class exists within the RF class. For a description of all members of this class, refer to section ”18.17. RF.Info". Syntax [VB] Public Class RF.Info [C#] public class RF.Info Namespace DNWA.BHTCL Assembly BHT200CL.
17.18. Keys Sets or acquires keyboard related parameters and defines the magic key. For a description of all members of this class, refer to section “18.18. Keys". Syntax [VB] Public Class Keys [C#] public class Keys Namespace DNWA.BHTCL Assembly BHT200CL.
17.19. Keys.Settings Sets or acquires keyboard related parameters. This class exists within the Keys class. For a description of all members of this class, refer to section “18.19. Keys.Settings". Syntax [VB] Public Class Keys.Settings [C#] public class Keys.Settings Namespace DNWA.BHTCL Assembly BHT200CL.
17.20. SysInfo Sets or acquires system information. For a description of all members of this class, refer to section “18.20. SysInfo". Syntax [VB] Public Class SysInfo [C#] public class SysInfo Namespace DNWA.BHTCL Assembly BHT200CL.
17.21. SysInfo.Settings Sets or acquires parameters related to the system information. This class exists within the SysInfo class. For a description of all members of this class, refer to section “18.21. SysInfo.Settings". Syntax [VB] Public Class SysInfo.Settings [C#] public class SysInfo.Settings Namespace DNWA.BHTCL Assembly BHT200CL.
17.22. PwrMng Sets or acquires power management related parameters for the BHT and controls the shut down process. For a description of all members of this class, refer to section “18.22. PwrMng". Syntax [VB] Public Class PwrMng [C#] public class PwrMng Namespace DNWA.BHTCL Assembly BHT200CL.
17.23. PwrMng.Settings Sets or acquires the parameters for power management. This class exists within the PwrMng class. For a description of all members of this class, refer to section “18.23. PwrMng.Settings". Syntax [VB] Public Class PwrMng.Settings [C#] public class PwrMng.Settings Namespace DNWA.BHTCL Assembly BHT200CL.
17.24. Icon Sets or acquires the icon display status (enabled/disabled). For a description of all members of this class, refer to section “18.24. Icon". Syntax [VB] Public Class Icon [C#] public class Icon Namespace DNWA.BHTCL Assembly BHT200CL.
17.25. Icon.Settings Enables or disables the display of icons. This class exists within the Icon class. For a description of all members of this class, refer to section “18.25. Icon.Settings". Syntax [VB] Public Class Icon.Settings [C#] public class Icon.Settings Namespace DNWA.BHTCL Assembly BHT200CL.
17.26. Display This function is not supported.
17.27. Display.Settings This function is not supported.
17.28. SysModification Updates the BHT system program. For a description of all members of this class, refer to section “18.28. SysModification". Syntax [VB] Public Class SysModification [C#] public class SysModification Namespace DNWA.BHTCL Assembly BHT200CL.
17.29. Registry Performs registry operation. Please refer to “18.29. Registry” for details of all members. Syntax [VB] Public Class Registry [C#] public class Registry Namespace DNWA.BHTCL Assembly BHT200CL.
17.30. ArgumentException An exception that is thrown when the value set in the property or the value of one of the parameters specified in the method is invalid. Syntax [VB] Public Class ArgumentException Inherits System.ArgumentException [C#] public class ArgumentException : System.ArgumentException Namespace DNWA.BHTCL Assembly DNWA.Exception.
17.31. ObjectDisposedException An exception that is thrown when an operation request is issued to a device whose file has not been opened. Syntax [VB] Public Class ObjectDisposedException Inherits System.ObjectDisposedException [C#] public class ObjectDisposedException : System.ObjectDisposedException Namespace DNWA.BHTCL Assembly DNWA.Exception.
17.32. SecurityException An exception that is thrown when an open request is issued to a device file for which authorization for opening cannot be obtained (e.g., when the file is already opened). Syntax [VB] Public Class SecurityException Inherits System.SecurityException [C#] public class SecurityException : System.SecurityException Namespace DNWA.BHTCL Assembly DNWA.Exception.
17.33. DeviceNotFoundException An exception that is thrown when an operation request is issued to a device that is not installed on the BHT. Syntax [VB] Public Class DeviceNotFoundException Inherits System.IO.FileNotFoundException [C#] public class DeviceNotFoundException : System.IO.FileNotFoundException Namespace DNWA.BHTCL Assembly DNWA.Exception.
17.34. DeviceLoadException An exception that is thrown when an operation request is issued to a device that is not ready to process it. Syntax [VB] Public Class DeviceLoadException Inherits System.IO.FileLoadException [C#] public class DeviceLoadException : System.IO.FileLoadException Namespace DNWA.BHTCL Assembly DNWA.Exception.
17.35. NotSupportedException An exception that is thrown when an attempt is made to carry out a function that is not supported. Syntax [VB] Public Class NotSupportedException Inherits System.IO.PlatformNotSupportedException [C#] public class NotSupportedException : System.IO.PlatformNotSupportedException Namespace DNWA.BHTCL Assembly DNWA.Exception.
17.36. CommSerial Sets or acquires the parameters for serial communication and performs data communication. For a description of all members of this class, refer to section “18.30. CommSerial". Syntax [VB] Public Class CommSerial [C#] public class CommSerial Namespace DNWA.Tools.BHT.Communication Assembly DNWA.Tools.BHT.Communication200.
17.37. FileTransfer Controls the uploading and downloading of files using the Y-modem protocol. For a description of all members of this class, refer to section “18.31. FileTransfer" Syntax [VB] Public Class FileTransfer [C#] public class FileTransfer Namespace DNWA.Tools.BHT.Communication Assembly DNWA.Tools.BHT.Communication200.
18. Members 18.1. Scanner Constructor Constructor Name Scanner Description Creates a new instance of the Scanner class.
Events Event Name OnDone Description Occurs when decoding is complete.
Scanner Initializes a new instance of the Scanner class. ■ Syntax [VB] Public Sub New( ) [C#] public Scanner( ) ■ Parameters None ■ Exceptions None [Ex.] Create a MyScanner Scanner instance.
MAX_BAR_LEN The maximum number of digits in the barcode. This value is fixed (not variable). ■ Syntax [VB] Public Const MAX_BAR_LEN As Integer [C#] public const int MAX_BAR_LEN; [Ex.] Declare a buffer containing a barcode with the maximum number of elements. [VB] Dim ReadBuf(Scanner.MAX_BAR_LEN) As Byte [C#] Byte[] ReadBuf = new byte[Scanner.MAX_BAR_LEN]; MAX_2DCODE_LEN The maximum number of digits in the 2D code. This value is fixed (not variable).
ALL_BUFFER Specify this parameter during a read operation using the Input method to read the contents of the entire barcode buffer. This value is fixed (not variable). ■ Syntax [VB] Public Const ALL_BUFFER As Integer [C#] public const int ALL_BUFFER; [Ex.] Read all remaining data in the barcode buffer. [VB] MyScanner.Input(ReadBuf, 0, Scanner.ALL_BUFFER) [C#] MyScanner.Input(ReadBuf, 0, Scanner.
RdMode Sets or acquires Read mode. ■ Syntax [VB] Public Property RdMode As String [C#] public string RdMode {get; set} ■ Property Character string used to specify read mode Default value: "FB" ■ Exceptions None ■ Note The setting for this property will be valid the next time the read operation is enabled. If an invalid character string is specified, no exceptions are thrown immediately, however, an exception is thrown the next time the read operation is enabled.
Auto-off mode (F) Press the trigger switch to turn ON the illumination LED. The LED turns OFF when the switch is released or when the BHT completes barcode reading. The LED remains illuminated for a maximum of 5 seconds when the trigger switch is held down. The BHT can read barcodes while the illumination LED is ON. The BHT is no longer able to read barcodes after a barcode has been read or the barcode device file is closed.
Notes: If no choice is specified for the read mode, the auto-off mode is selected by default. In momentary switching mode, alternate switching mode, or continuous reading mode, if, after reading a low-quality barcode requiring more than one second to read, the barcode read head remains in close proximity to that barcode, the BHT may re-read the same barcode again at intervals of one second (or longer).
Beeper control and LED control This property is used to control the action of the beeper and indicator LED when a barcode has been read successfully. This property also allows the vibrator to be controlled with beeper control. Specify the parameters for read mode, beeper control, and LED control with no spaces in between. Specify the parameters for read mode, beeper control, and LED control in this order.
RdType Sets or acquires the codes that are to be read-enabled. ■ Syntax [VB] Public Property RdType As String [C#] public string RdType {get; set} ■ Property Character string used to specify read-enabled codes Default value: "A,I:4-99,M:1-99,N:3-99,L:1-99,K:1-99,H:3-99,P:1-99" (BHT-200B) "Q:E,A,I:4-99,M:1-99,N:3-99,K:1-99,R,V,Y,X,Z" ■ (BHT-200Q) Exceptions None ■ Note The setting for this property will be valid the next time the read operation is enabled.
BHT-200B The BHT-200B supports universal product codes, Interleaved 2of5 (ITF), Codabar (NW-7), Code-39, Code-93, Code-128, Standard 2of5 (STF), and MSI. It can also read EAN-128 if Code-128 is specified. • Universal product codes (A) [Syntax] A [:[code] [1st character [2nd character]][supplemental]] Specify a code from one of the following. Code A B C Barcode Type EAN-13 (JAN-13), UPC-A EAN-8 (JAN-8) UPC-E If the code is omitted, it will be possible to read any of the above universal product codes.
• Interleaved 2of5 (ITF) (I) [Syntax] I [:[mini.no.digits[-max.no.digits]][CD]] The mini.no.digits and max.no.digits are the minimum and maximum numbers of barcode digits to be read by the BHT, respectively. These numbers must both be between 2 and 99 (inclusive) and satisfy the following condition: mini.no.digits ≤ max.no.digits If both mini.no.digits and max.no.digits are omitted, the default reading range will be from the minimum number of digits specified at system mode up to 99 digits. If only max.
• CODABAR (NW-7) (N) [Syntax] N [:[mini.no.digits[-max.no.digits]][startstop][CD]] The mini.no.digits and max.no.digits are the minimum and maximum numbers of barcode digits to be read by the BHT, respectively. These numbers must both be between 3 and 99 (inclusive) and satisfy the following condition: mini.no.digits ≤ max.no.digits If both mini.no.digits and max.no.digits are omitted, the default reading range will be from the minimum number of digits specified at system mode up to 99 digits.
• CODE-39 (M) [Syntax] M [:[mini.no.digits[-max.no.digits]][CD]] The mini.no.digits and max.no.digits are the minimum and maximum numbers of barcode digits to be read by the BHT, respectively. These do not include the start and stop characters. These numbers must both be between 1 and 99 (inclusive) and satisfy the following condition: mini.no.digits ≤ max.no.digits If both mini.no.digits and max.no.digits are omitted, the default reading range will be from 1 to 99 digits. If only max.no.
• CODE-93 (L) [Syntax] L [:[mini.no.digits[-max.no.digits]]] The mini.no.digits and max.no.digits are the minimum and maximum numbers of barcode digits to be read by the BHT, respectively. These do not include the start and stop characters or check digits. These numbers must both be between 1 and 99 (inclusive) and satisfy the following condition: mini.no.digits ≤ max.no.digits If both mini.no.digits and max.no.digits are omitted, the default reading range will be from 1 to 99 digits. If only max.no.
• CODE-128 (K) [Syntax] K [:[mini.no.digits[-max.no.digits]]] The mini.no.digits and max.no.digits are the minimum and maximum numbers of barcode digits to be read by the BHT, respectively. These do not include the start and stop characters or check digits. These numbers must both be between 1 and 99 (inclusive) and satisfy the following condition: mini.no.digits ≤ max.no.digits If both mini.no.digits and max.no.digits are omitted, the default reading range will be from 1 to 99 digits. If only max.no.
Handling of special characters If the BHT reads a barcode made up of special characters only (such as FNC, CODE-A, CODE-B, CODE-C and SHIFT characters), it will not transfer the data to the barcode buffer. If the beeper is enabled, only the beeper sounds. • FNC1 FNC1 characters placed within two character positions after the start character are not transferred to the barcode buffer. FNC1 characters in any other positions are converted to GS characters (1Dh) and then transferred to the barcode buffer.
• Standard 2of5 (STF) (H) [Syntax] H [:[mini.no.digits[-max.no.digits]][CD][startstop]] The mini.no.digits and max.no.digits are the minimum and maximum numbers of barcode digits to be read by the BHT, respectively. These do not include the start and stop characters. These numbers must both be between 1 and 99 (inclusive) and satisfy the following condition: mini.no.digits ≤ max.no.digits If both mini.no.digits and max.no.
• MSI (P) [Syntax] P [:[mini.no.digits[-max.no.digits]][CD]] The mini.no.digits and max.no.digits are the minimum and maximum numbers of barcode digits to be read by the BHT, respectively. These do not include the start and stop characters. These numbers must both be between 1 and 99 (inclusive) and satisfy the following condition: mini.no.digits ≤ max.no.digits If both mini.no.digits and max.no.digits are omitted, the default reading range will be from 1 to 99 digits. If only max.no.
BHT-200Q The BHT-200Q supports the following 2D code and barcode types. Supported 2D code types QR code, PDF417, MaxiCode, Data Matrix, EAN/UCC Composite Supported barcode types Universal product codes, Interleaved 2of5 (ITF), Codabar (NW-7), Code-39, Code-128 It can also read EAN-128 if Code-128 is specified.
Split/merge mode E B C Enables compound code reading in edit mode. Enables compound code reading in batch edit mode. Enables compound code reading in non-edit mode. The mode specified last will be valid if multiple modes are specified. It is not possible to read split QR code symbols without specifying a split/merge mode. [Ex.] To enable the BHT to read compound codes: RdType = " Q:M5-14E;L1-40;S1-4" When reading a compound code in edit mode, the maximum data length is 8,192 bytes.
1. A code other than a split sub-code is read. In this case, the data that has been read will be stored in the barcode buffer. 2. Another concatenated code is read. The BHT initiates reading of the new compound code starting with the newly read sub-code. 3. The barcode read window is removed from the barcode for more than 3 seconds in momentary switch mode, alternate switch mode, or continuous read mode, or more than 5 seconds has elapsed since a split sub-code was read. 4.
• MaxiCode(X) [Syntax] X • Data Matrix(Z) [Syntax] Z [:[symbol type [min code no. [−max code no.]]]] [;symbol type [min code no.[−max code no.]]] The following symbol types can be set. Symbol Type Applicable Code S Square Data Matrix R Rectangular Data Matrix Both of the above code types can be read if the symbol type is omitted. The “min code no.” and “max code no.” are the minimum and maximum DataMatrix code numbers that can be read, respectively.
S (Square Data Matrix) Code No. 1 2 3 4 5 6 Row x Col. 10 x 10 12 x 12 14 x 14 16 x 16 18 x 18 20 x 20 Code No. 7 8 9 10 11 12 Row x Col. 22 x 22 24 x 24 26 x 26 32 x 32 36 x 36 40 x 40 Code No. 13 14 15 16 17 18 R (Rectangular Data Matrix) Code No. 1 2 3 • Row x Col. 8 x 18 8 x 32 12 x 26 Code No. 4 5 6 Row x Col. 12 x 36 16 x 36 16 x 48 EAN/UCC Composite(V) [Syntax] V - 105 - Row x Col. 44 x 44 48 x 48 52 x 52 64 x 64 72 x 72 80 x 80 Code No. 19 20 21 22 23 24 Row x Col.
• Universal product code (A) [Syntax] A [:[code][1st character [2nd character]][supplemental]] Specify one of the codes listed below. Code Barcode Type A EAN-13 (JAN-13), UPC-A B EAN-8 (JAN-8) C UPC-E If the code is omitted, it will be possible to read any of the above universal product codes. The 1st character and 2nd character are flag characters representing the country code, and each must be a numeral between 0 and 9 (inclusive).
• Interleaved 2of5 (ITF) (I) [Syntax] I [:[mini.no.digits [−max. no.digits]][CD]][;[1st character [2nd character]]] The mini.no.digits and max.no.digits are the minimum and maximum numbers of barcode digits to be read by the BHT, respectively. These do not include the start and stop characters. These numbers must both be between 1 and 99 (inclusive) and satisfy the following condition: mini.no.digits ≤ max.no.digits If both mini.no.digits and max.no.
• Codabar(NW-7)(N) [Syntax] N [:[mini.no.digits [− max.no.digits]][startstop] [CD]] The mini.no.digits and max.no.digits are the minimum and maximum numbers of barcode digits to be read by the BHT, respectively. These numbers must both be between 3 and 99 (inclusive) and satisfy the following condition: mini.no.digits ≤ max.no.digits If both mini.no.digits and max.no.digits are omitted, the default reading range will be from the minimum number of digits specified at system mode up to 99 digits.
• Code-39(M) [Syntax] M [:[min.no.digits [−max.no.digits]][CD]][; [1st character [2nd character]]] The mini.no.digits and max.no.digits are the minimum and maximum numbers of barcode digits to be read by the BHT, respectively. These do not include the start and stop characters or check digits. These numbers must both be between 1 and 99 (inclusive) and satisfy the following condition: mini.no.digits ≤ max.no.digits If both mini.no.digits and max.no.
• Code-128(K) [Syntax] K [:[mini.no.digits [−max.no.digits]]][;[1st character [2nd character]]] The mini.no.digits and max.no.digits are the minimum and maximum numbers of barcode digits to be read by the BHT, respectively. These do not include the start and stop characters or check digits. These numbers must both be between 1 and 99 (inclusive) and satisfy the following condition: mini.no.digits ≤ max.no.digits If both mini.no.digits and max.no.
Multi-line code reading To specify multi-line code reading, specify “&” followed by the codes to be read. Up to three rows can be specified. [Syntax] “&, code in 1st row, code in 2nd row, [code in 3rd row]” Multi-line code reading is independent of single-row code reading. [Ex.] Reading universal product code EAN-8 and EAN-13 (2 rows): RdType = "&,A:B,A:A" [Ex.
If the same code (with the same code type and the same data code) appears more than once in a multi-line code, it cannot be read by the BHT. [Ex.
PortOpen Enables or disables barcode reading. ■ Syntax [VB] Public WriteOnly Property PortOpen As Boolean [C#] public bool PortOpen {set} ■ Property Read-enabled (= True), Read-disabled (= False) Default value: False ■ Exceptions Name of Exception Meaning SecurityException Barcode device file already opened ArgumentException The specified read mode was invalid. The specified read-enabled code(s) was/were invalid. [Ex.] Enable barcode reading. [VB] MyScanner.PortOpen = True [C#] MyScanner.
InBufferCount BHT-200B Acquires the number of digits in the barcode remaining in the barcode buffer. BHT-200Q Acquires the number of digits in the barcode remaining in the barcode buffer. When a multi-line code is read, the total number of digits in the multi-line code is returned. When an EAN/UCC composite code is read, the total number of digits in the composite code is returned.
InBufferType BHT-200B Acquires the type of barcode remaining in the barcode buffer. BHT-200Q Acquires the type of barcode remaining in the barcode buffer. When a multi-line code is read, this fact is communicated to the caller. When an EAN/UCC composite code is read, this fact is communicated to the caller.
Code Type QR code (BHT-200Q only) Compound QR code non-edit mode) InBufferType ‘Q’ (in ‘S’ (BHT-200Q only) PDF417 (BHT-200Q only) Maxi Code (BHT-200Q only) Data Matrix (BHT-200Q only) Multi-line code (BHT-200Q only) 'Y' 'X' 'Z' '&' Composite code 'V' (BHT-200Q only) Default value: 0 (Nothing in VB.NET) ■ Exceptions None ■ Note The value is reset to zero (0) when all data is read from the barcode buffer using the Input method and the barcode buffer is empty.
LastCount BHT-200B Acquires the number of digits in the barcode that was read last. “0” is stored if no barcodes are read since the BHT was last started up. BHT-200Q Acquires the number of digits in the barcode that was read last. “0” is stored if no barcodes are read since the BHT was last started up. If the barcode that was read last is a multi-line code, the total number of digits for all rows is returned. To acquire the number of digits for a specific row, use LastCodeInfo.
■ Note The value is "0" if no barcode is read after an instance of the Scanner class was created. The value remains unchanged even if barcode reading is disabled. [Ex.] Acquire the number of code digits for the data last read. [VB] Dim count As Integer = MyScanner.LastCount [C#] int count = MyScanner.
LastType BHT-200B Acquires the type of code that was read last. “0” is stored if no barcodes are read since the BHT was last started up. BHT-200Q Acquires the type of code that was read last. “0” is stored if no barcodes are read since the BHT was last started up. When a multi-line code is read, this fact is communicated to the caller. To acquire the type of code for a specific row, use LastCodeInfo. When an EAN/UCC composite code is read, this fact is communicated to the caller.
LastCodeInfo Acquires information on the code that was read last. ■ Syntax [VB] Public Property ReadOnly LastCodeInfo As Scanner.CodeInfo [C#] public Scanner.CodeInfo LastCodeInfo {get} ■ Property Information on the barcode that was read last The correlation between the barcode type and values is the same as that for the InBufferType. Default value: null (Nothing in VB.NET) ■ Exceptions None [Ex.] Acquire the code type and number of digits in all rows for the data last read.
LastCodeNum Acquires the number of codes (rows) that were read last. ■ Syntax [VB] Public Property ReadOnly LastCodeNum As Integer [C#] public int LastCodeNum {get} ■ Property Number of barcodes that were read last. BHT-200Q If the code that was read last is a multi-line code, the number of rows is returned. If the code that was read last is a composite code, the number of codes constituting the composite code (which is “2”) is returned.
Input Reads unicoded data from the barcode buffer. ■ Syntax [VB] Public Function Input(ByVal len As Integer) As String [C#] public string Input(int len) ■ Parameters len [in] Maximum number of digits in the barcode to be read Specifying Scanner.ALL_BUFFER causes the entire contents of the barcode buffer to be read.
Input Reads unicoded data from the barcode buffer. ■ Syntax [VB] Public Function Input(ByVal buffer() As Char,ByVal offset As Integer, _ len As Integer) As Integer [C#] public int Input(char[] buffer, int offset, int len) ■ Parameters buffer [out] Destination buffer offset [in] Offset value within buffer indicating the start point of reading Specifying Scanner.ALL_BUFFER causes the entire contents of the barcode buffer to be read.
■ Note Calling this method while barcode reading is disabled will cause an exception to be thrown. [Ex.] Read out the last read data converted to Unicode. [VB] len = MyScanner.Input(buffer, 0, Scanner.ALL_BUFFER) [C#] len = MyScanner.Input(buffer, 0, Scanner.
Input Reads binary data from the barcode buffer. ■ Syntax [VB] Public Function Input (ByVal buffer() As Byte, ByVal offset As Integer, _ len As Integer) As Integer [C#] public int Input(byte[] buffer, int offset, int len) ■ Parameters buffer [out] Destination buffer offset [in] Offset value within buffer indicating the start point of reading len [in] Maximum number of barcode digits to be read out Specifying Scanner.ALL_BUFFER causes the entire contents of the barcode buffer to be read.
■ Note Calling this method while barcode reading is disabled will cause an exception to be thrown. When displaying the read data, it is necessary to use the encoding class and convert to Unicode. [Ex.] Use the ANSI code page encoding currently set in the system and convert to Unicode. [VB] Dim buffer(MAX_2DCODE_LEN) As Byte Input(buffer, 0, ALL_BUFFER) Dim strDisplayData As String = System.Text.Encoding.Default.
GetChkDigit Calculates the check digit for the barcode data based on the specified calculation algorithm.
■ Note If the barcode data within the code (excluding the check digit positions) contains any characters outside the character set corresponding to the barcode type specified by the check digit type, this function returns "0" and throws an exception. However, if only the check digit positions contain a character outside the valid character set, then this function calculates the correct check digit and returns it as a single-character string. [VB] Scanner.GetChkDigit("494AB4458", "A") [C#] Scanner.
When CD type is A(EAN (JAN) or UPC): This function identifies the code type (EAN or UPC) based upon the data length (number of digits) as shown below. If the data length is other than 13, 8, or 7, this function returns "0" and throws an exception. No. of Digits in Barcode Data 13 8 7 Barcode type EAN-13 (JAN-13), UPC-A EAN-8 (JAN-8) UPC-E To check whether the CD type is correct, pass a piece of barcode data with a CD to the Scanner.GetChkDigit method as shown below.
When CD type is I (ITF): The barcode data must be an even number with two or more digits. Otherwise, this function returns "0" and throws an exception. To check whether the CD is correct, pass a piece of barcode data with a CD to the Scanner.GetChkDigit method as shown below. If the returned value is equal to the CD, then the CD is correct. [VB] If (Scanner.GetChkDigit("123457", "I") = Asc("7")) Then Console.WriteLine ("CD OK") End If [C#] UnicodeEncoding encode = new UnicodeEncoding(); if (Scanner.
When CD type is H (STF): The barcode data must be two or more digits in length. Otherwise, this function returns "0" and throws an exception. To check whether the CD is correct, pass a piece of barcode data with a CD to the Scanner.GetChkDigit method as shown below. If the returned value is equal to the CD, then the CD is correct. [VB] If (Scanner.GetChkDigit("12345678905", "H") = Asc("5")) Then Console.WriteLine ("CD OK") End If [C#] UnicodeEncoding encode = new UnicodeEncoding(); if (Scanner.
When CD type is N (Codabar): The barcode data must be three or more digits in length, including the start and stop characters. Otherwise, this function returns "0" and throws an exception. To check whether the CD is correct, pass a piece of barcode data with a CD to the Scanner.GetChkDigit method as shown below. If the returned value is equal to the CD, then the CD is correct. [VB] If (Scanner.GetChkDigit("a0123-a", "N") = Asc("-")) Then Console.
When CD type is M (Code 39): The barcode data must be two or more digits in length, excluding the start and stop characters. Otherwise, this function returns "0" and throws an exception. To check whether the CD is correct, pass a piece of barcode data with a CD to the Scanner.GetChkDigit method as shown below. If the returned value is equal to the CD, then the CD is correct. [VB] If (Scanner.GetChkDigit("CODE39W", "M") = Asc("W")) Then Console.
When CD type is P (MSI): The barcode data must be two or more digits in length. Otherwise, this function returns "0" and throws an exception. To calculate a two-digit CD, call this function twice. To check whether the CD is correct, pass a piece of barcode data with a CD to the Scanner.GetChkDigit method as shown below. If the returned value is equal to the CD, then the CD is correct. [VB] If (Scanner.GetChkDigit("123456782", "P") = Asc("2")) Then Console.
Dispose Frees up all the unmanaged resources. This function must be called before instances of the Scanner class are no longer referenced. ■ Syntax [VB] Public Sub Dispose() [C#] public void Dispose() ■ Parameters None ■ Return value None ■ Exceptions None ■ Note This function must be called before instances of the Scanner class are no longer referenced. [VB] Private Sub Form1_Closed(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Closed MyScanner.
OnDone This event occurs when decoding is complete. ■ Syntax [VB] Public Event OnDone As EventHandler [C#] public event EventHandler OnDone ■ Event data The Event Handler has received EventArgs type parameters. The second parameter EventArgs e is always System.EventArgs.Empty. [Ex.] Read data when decoding complete. [VB] Private Sub MyScanner_OnDone(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyScanner.OnDone Dim ReadBuf(Scanner.MAX_BAR_LEN) As Byte MyScanner.
18.2. Scanner.CodeInfo Constructor None Instances cannot be created directly from this class.
Type Acquires the code type. ■ Syntax [VB] Public ReadOnly Property Type As Char [C#] public char Type {get;} ■ Property Code type. Refer to InBufferType for the relationship between code types and properties. Default value: 0 ■ Exceptions None [Ex.] Acquire the code type and number of digits in all rows for the data last read. [VB] For i = 0 To MyScanner.LastCodeNum len(i) = MyScanner.LastCodeInfo(i).Len type(i) = MyScanner.LastCodeInfo(i).Type Next [C#] for (i = 0; i < MyScanner.
Len Acquires the number of digits in the code (code length). ■ Syntax [VB] Public ReadOnly Property Len As Integer [C#] public int Len {get;} ■ Property Number of digits in the code Default value: ■ 0 Exceptions None [Ex.] Acquire the code type and number of digits in all rows for the data last read. [VB] For i = 0 To MyScanner.LastCodeNum len(i) = MyScanner.LastCodeInfo(i).Len type(i) = MyScanner.LastCodeInfo(i).Type Next [C#] for (i = 0; i < MyScanner.LastCodeNum; i++) { len[i] = MyScanner.
18.3. Scanner.Settings Constructor None Instances cannot be created directly from this class.
CRTime Sets or acquires re-read prevention time. ■ Syntax [VB] Public Shared Property CRTime As Integer [C#] public static int CRTime {get; set;} ■ Property Re-read prevention time (in units of 100 msec) Parameter values: 0 to 255 Default value: 10 ■ Exceptions Name of Exception ArgumentException ■ Meaning The specified parameter value(s) is invalid. Note If "0" is specified, the same code will not be read twice in a row. [Ex.] Set the 2nd read prevention time to 2 seconds. [VB] Scanner.Settings.
Invert Sets or acquires the enabling and disabling of the black-and-white inverted label reading function. ■ Syntax [VB] Public Shared Property Invert As Integer [C#] public static int Invert {get; set;} ■ Property Parameter values: 0: disabled, 1: enabled (BHT-200B) 0: disabled, 1: black and white inversion only, 2: auto (BHT-200Q) Default value: ■ 0 Exceptions Name of Exception ArgumentException Meaning The specified parameter value(s) is invalid. [Ex.] Disable black-and-white inversion reading.
DecodeLevel Sets or acquires the decoding level. ■ Syntax [VB] Public Shared Property DecodeLevel As Integer [C#] public static int DecodeLevel {get; set;} ■ Property Decoding level Parameter values: 1 to 9 Default value: 4 ■ Exceptions Name of Exception ArgumentException ■ Meaning The specified parameter value(s) is invalid. Note The setting for this property will be valid the next time read operation is enabled. [Ex.] Set the decode level to 7. [VB] Scanner.Settings.
MinDigitITF Sets or acquires the minimum number of digits in ITF code. ■ Syntax [VB] Public Shared Property MinDigitITF As Integer [C#] public static int MinDigitITF {get; set;} ■ Property Minimum number of digits Parameter values: 2 to 20 Default value: 4 ■ Exceptions Name of Exception ArgumentException ■ Meaning The specified parameter value(s) is invalid. Note The setting for this property will be valid the next time read operation is enabled.
MinDigitSTF Sets or acquires the minimum number of digits in STF code. ■ Syntax [VB] Public Shared Property MinDigitSTF As Integer [C#] public static int MinDigitSTF {get; set;} ■ Property Minimum number of digits Parameter values: 1 to 20 Default value: 3 ■ Exceptions Name of Exception ArgumentException ■ Meaning The specified parameter value(s) is invalid. Note This is not supported on the BHT-200Q. An exception is thrown when attempting to set or acquire.
MinDigitNW7 Sets or acquires the minimum number of digits in NW7 code (CODABAR). ■ Syntax [VB] Public Shared Property MinDigitNW7 As Integer [C#] public static int MinDigitNW7 {get; set;} ■ Property Minimum number of digits Parameter values: 3 to 20 Default value: 4 ■ Exceptions Name of Exception ArgumentException ■ Meaning The specified parameter value(s) is invalid. Note The setting for this property will be valid the next time read operation is enabled.
Marker Sets or acquires the marker mode. ■ Syntax [VB] Public Shared Property Marker As EN_MARKER [C#] public static EN_MARKER Marker {get; set;} ■ Property Marker mode Parameter values: As listed in EN_MARKER Default value: EN_MARKER.NORMAL ■ Exceptions Name of Exception Meaning ArgumentException The specified parameter value(s) is invalid. ■ Note Marker ahead mode (EN_MARKER.AHEAD) is supported only on BHT-200B models used in Japan. [Ex.
Reverse Sets or acquires the front-back inverted reading enabled/disabled status. ■ Syntax [VB] Public Shared Property Reverse As Integer [C#] public static int Reverse {get; set;} ■ Property Front-back inverted reading enabled/disabled status Parameter values: 0: Disabled, 1: Enabled Default value: 0 ■ Exceptions Name of Exception ArgumentException ■ Meaning The specified parameter value(s) is invalid. Note The BHT-200B does not support this property.
ScanMode Sets or acquires the scan mode. ■ Syntax [VB] Public Shared Property ScanMode As EN_SCAN_MODE [C#] public static EN_SCAN_MODE ScanMode {get; set;} ■ Property Scan mode Parameter values: As listed in EN_SCAN_MODE Default value: EN_SCAN_MODE.NORMAL ■ Exceptions Name of Exception ArgumentException ■ Meaning The specified parameter value(s) is invalid. Note The BHT-200B does not support this property.
OptionData Sets or acquires the status of the option data. ■ Syntax [VB] Public Shared Property OptionData As Integer [C#] public static int OptionData {get; set;} ■ Property Option data status Parameter values: 0: Do not append option data 1: Append option data Default value: 0 ■ Exceptions Name of Exception ArgumentException ■ Meaning The specified parameter value(s) is invalid. Note The BHT-200B does not support this property.
EN_MARKER Specifies the marker mode. ■ Syntax [VB] Public Enum EN_MARKER [C#] public enum EN_MARKER ■ ■ Members Member Name Description NORMAL Normal mode AHEAD Ahead mode DISABLE Lighting is disabled Class BHTCL.Scanner.
EN_SCAN_MODE Specifies the scan mode. ■ Syntax [VB] Public Enum EN_SCAN_MODE [C#] public enum EN_SCAN_MODE ■ ■ Members Member Name Description NORMAL Normal mode POINT Point scan mode D1 Barcode reader mode Class BHTCL.Scanner.
18.4. BatteryCollection Constructor None Acquire battery information by first obtaining an instance of the battery using the "ExistingBatteries" property and then locating it in the corresponding property.
COUNT Number of batteries. This value is fixed (not variable). ■ Syntax [VB] Public Const COUNT As Integer [C#] public const int COUNT; [Ex.] Acquire the maximum number of batteries that can be inserted in the BHT-200. [VB] Count = BatteryCollection.COUNT [C#] Count = BatteryCollection.
ExistingBatteries Acquires instances of existing batteries. ■ Syntax [VB] Public Shared ReadOnly Property ExistingBatteries As Battery() [C#] public static Battery[] ExistingBatteries {get;} ■ Property Battery instances arrangement ■ Exceptions None ■ Note Even if there is no battery in either the grip or BHT body, an arrangement with two elements is created. [Ex.] Acquire the battery instance. [VB] MyBattery = BatteryCollection.ExistingBatteries [C#] MyBattery = BatteryCollection.
18.5. BatteryCollection.Battery Constructor Constructor Name Battery Description Creates a new instance of the Battery class.
Battery Initializes a new instance of the Battery class.
ID Acquires the battery ID.
OnCU Acquires the CU installation status for the BHT. ■ Syntax [VB] Public ReadOnly Property OnCU As EN_CHARGE [C#] public EN_CHARGE OnCU {get;} ■ Property CU installation status Default value: Installation status at the time of initialization ■ Exceptions None ■ Note The value is the same for batteries in the BHT body and grip. [Ex.] Acquire the battery charge status. [VB] For Each MyBattery In BatteryCollection.ExistingBatteries Dim OnCU As BatteryCollection.Battery.EN_CHARGE = MyBattery.
Voltage Acquires the battery voltage. ■ Syntax [VB] Public ReadOnly Property Voltage As Integer [C#] public int Voltage {get;} ■ Property Battery voltage (mV) Default value: Battery voltage at the time of initialization ■ Exceptions None ■ Note If the BHT has a battery in the grip only, the battery voltage for the BHT body will be 0 (mV). Similarly, if there is a battery in the BHT body only, the battery voltage for the grip will be 0 (mV). [Ex.
Level Acquires the battery voltage level. ■ Syntax [VB] Public ReadOnly Property Level As EN_LEVEL [C#] public EN_LEVEL Level {get;} ■ Property Battery voltage level Default value: Battery voltage level at the time of initialization ■ Exceptions None ■ Note If the BHT has a battery in the grip only, the battery voltage level for the BHT body will be EN_LEVEL.NO_BATTERY. Similarly, if there is a battery in the BHT body only, the battery voltage level for the grip will be EN_LEVEL.NO_BATTERY. [Ex.
Chemistry Acquires the battery type. ■ Syntax [VB] Public ReadOnly Property Chemistry As EN_CHEMISTRY [C#] public EN_CHEMISTRY Chemistry {get;} ■ Property Battery type Default value: Type of battery installed ■ Exceptions None ■ Note If the BHT has a battery in the grip only, the battery type for the BHT body will be EN_CHEMISTRY.UNKNOWN. Similarly, if there is a battery in the BHT body only, the battery type for the grip will be EN_CHEMISTRY.UNKNOWN. [Ex.
EN_CHARGE Specifies whether the battery is charged or not. ■ Syntax [VB] Public Enum EN_CHARGE [C#] public enum EN_CHARGE ■ ■ Members Member Name Description OFFLINE Not charged ONLINE Charged UNKNOWN Charge status unknown Class Within BHTCL.BatteryCollection.
EN_LEVEL Specifies the battery voltage level. ■ Syntax [VB] Public Enum EN_LEVEL [C#] public enum EN_LEVEL ■ ■ Members Member Name Description HIGH 3.9 V or above MID 3.7 V or above but less than 3.9 V LOW 3.6 V or above but less than 3.7 V WARNING Less than 3.6 V CRITICAL Less than 3.4 V NO_BATTERY No battery installed Class Within BHTCL.BatteryCollection.
EN_CHEMISTRY Specifies the battery type. ■ Syntax [VB] Public Enum EN_CHEMISTRY [C#] public enum EN_CHEMISTRY ■ ■ Members Member Name Description ALKALINE Alkaline battery NICD Nickel-Cadmium battery NIMH Nickel Metal Hydride battery LION Lithium Ion battery LIPOLY Lithium Polymer battery UNKNOWN Unknown, missing Class Within BHTCL.BatteryCollection.
18.6. Backlight Constructor Constructor Name Backlight Description Creates a new instance of the Backlight class. Fields None Properties Property Name Status Description Backlight is lit. Methods None Events None Enumeration Enumeration Name EN_STATUS Description Backlight is lit.
Backlight Initializes a new instance of the Backlight class. ■ Syntax [VB] Public Sub New() [C#] public Backlight() ■ Parameters None ■ Exceptions None [Ex.] Create a MyBacklight Backlight instance.
Status Sets or acquires the backlight status (whether the backlight is lit). ■ Syntax [VB] Public Shared Property Status As EN_STATUS [C#] public static EN_STATUS Status {get; set;} ■ Property Backlight status (whether the backlight is lit) Parameter values: As listed in EN_STATUS Default value: Backlight status at the time of initialization ■ Exceptions Name of Exception ArgumentException Meaning The specified parameter value(s) is invalid. [Ex.] Turn ON the backlight. [VB] Backlight.
EN_STATUS Specifies the backlight status (whether the backlight is lit). ■ Syntax [VB] Public Enum EN_STATUS [C#] public enum EN_STATUS ■ ■ Members Member Name Description ENABLE_ON ON ENABLE_OFF OFF DISABLE_OFF Disabled Class Within BHTCL.
18.7. Backlight.Settings Constructor None Instances cannot be created directly from this class. Fields None Properties Property Name OnTimeBattery OnTimeAC CtrlKey Brightness PowerSave Description "ON" time (when powered by battery) " ON " time (when installed on CU) Control key Brightness level Brightness when OFF (Only on units running on Windows CE 5.0.
OnTimeBattery Sets or acquires the ON time when the backlight is powered by the battery. ■ Syntax [VB] Public Shared Property OnTimeBattery As Integer [C#] public static int OnTimeBattery {get; set;} ■ Property ON time (in units of 1 sec) Parameter values: 0 to 255 Default value: 3 ■ Exceptions Name of Exception ArgumentException ■ Meaning The specified parameter value(s) is invalid. Note When "0" is specified, the backlight does not turn ON.
OnTimeAC Sets or acquires the backlight ON time when installed on the CU. ■ Syntax [VB] Public Shared Property OnTimeAC As Integer [C#] public static int OnTimeAC {get; set;} ■ Property ON time (in units of 1 sec) Parameter values: 0 to 255 Default value: 60 ■ Exceptions Name of Exception ArgumentException ■ Meaning The specified parameter value(s) is invalid. Note When "0" is specified, the backlight does not turn ON. When "255" is specified, the backlight remains ON constantly. [Ex.
CtrlKey Sets or acquires the control key for turning ON and OFF the backlight. ■ Syntax [VB] Public Shared Property CtrlKey As Integer [C#] public static int CtrlKey {get; set;} ■ Property Backlight ON/OFF control key Parameter values: See table below. Default value: 0x00010204([SF] + [M4]) ■ Exceptions Name of Exception ArgumentException ■ Meaning The specified parameter value(s) is invalid. Note The relationship between the control keys and settings is shown in table below.
Backlight Control Key Setting Backlight Control Key Setting 0x00000201 [SF] + [.
Brightness Sets or acquires the backlight brightness level. ■ Syntax [VB] Public Shared Property Brightness As Integer [C#] public static int Brightness {get; set;} ■ Property Brightness level Parameter values: 0 (OFF), 1 (dark) to 3 (bright) Default value: 3 ■ Exceptions Name of Exception ArgumentException Meaning The specified parameter value(s) is invalid. [Ex.] Set the brightness to maximum when turning ON the backlight. [VB] Backlight.Settings.Brightness = 3 [C#] Backlight.Settings.
PowerSave Sets or acquires the backlight brightness when OFF. ■ Syntax [VB] Public Shared Property PowerSave As Integer [C#] public static int PowerSave {get; set;} ■ Property Brightness when OFF Parameter values: 0 (OFF), 1 (Dimly) Default value: 1 ■ Exceptions Name of Exception Meaning ArgumentException The specified parameter value(s) is invalid. NotSupportedException PowerSave not supported [Ex.] Set the backlight status to OFF when not lit. [VB] Backlight.Settings.PowerSave = 0 [C#] Backlight.
18.8. LED Constructor Constructor Name LED Description Creates a new instance of the LED class.
LED Initializes a new instance of the LED class. ■ Syntax [VB] Public Sub New( ) [C#] public LED( ) ■ Parameters None ■ Exceptions None [Ex.] Create a MyLED LED instance.
Usage Sets or acquires the LED control factor. ■ Syntax [VB] Public Usage As LED.UsageCollection [C#] public LED.UsageCollection Usage ■ Property LED control factor ■ Parameter values: As listed in LED.EN_USAGE (one of the values or a combination of the values) Default value: Control factor when initialized Note Usage RF APL RF | APL Description LED illumination cannot be controlled from the application if this value is specified.
Item Sets or aquires the LED status (ON/OFF) specified by the index. In C#, this property is used as the indexer for the LED class. ■ Syntax [VB] Public Property Item(ByVal device As LED.EN_DEVICE, _ ByVal color As LED.EN_COLOR) As LED.EN_CTRL [C#] public LED.EN_CTRL this[LED.EN_DEVICE device][LED.EN_COLOR color] {get; set;} ■ Parameters device LED device Parameter values: As listed in LED.EN_DEVICE color LED color Parameter values: As listed in LED.
■ Note When an indicator LED (=BAR) is specified as "device," selection of the color yellow (=YELLOW) is ignored. When a wireless LED (=RF) is specified as "device," selection of the color red (=RED) or blue (=GREEN) is ignored. In general, indicator LEDs cannot be controlled from the application while barcode reading is enabled. However, if prohibition of operation for a particular indicator LED is specified, it can be controlled from the application.
EN_DEVICE Specifies the LED device. ■ Syntax [VB] Public Enum EN_DEVICE [C#] public enum EN_DEVICE ■ ■ Members Member Name Description BAR Indicator LED RF Wireless LED Class Within BHTCL.
EN_COLOR Specifies the LED color. ■ Syntax [VB] Public Enum EN_COLOR [C#] public enum EN_COLOR ■ ■ Members Member Name Description RED Red BLUE Blue(=GREEN) GREEN Green YELLOW Yellow Class Within BHTCL.
EN_CTRL Specifies the LED ON/OFF status. ■ Syntax [VB] Public Enum EN_CTRL [C#] public enum EN_CTRL ■ ■ Members Member Name Description OFF LED OFF ON LED ON Class Within BHTCL.
EN_USAGE Specifies the LED control factor. ■ Syntax [VB] Public [Flags] Enum EN_USAGE [C#] public enum [Flags] EN_USAGE ■ ■ Members Member Name Description RF Wireless communication APL Application Class Within BHTCL.
18.9. LED.UsageCollection Constructor None Instances cannot be created directly from this class.
Item Sets or acquires the LED control factor specified at the index. At C#, this property uses the indexer for the LED.UsageCollection class. ■ Syntax [VB] Public Property Item(ByVal device As LED.EN_DEVICE) _ As LED.EN_USAGE [C#] public LED.EN_USAGE this[LED.EN_DEVICE device]{get; set;} ■ Parameters device LED device Parameter values: As listed in LED.EN_DEVICE (Only wireless LEDs can be controlled.) ■ Property LED control factor Parameter values: As listed in LED.
18.10. Beep Constructor Constructor Name Beep Description Creates a new instance of the Beep class.
Beep Initializes a new instance of the Beep class. ■ Syntax [VB] Public Sub New( ) [C#] public Beep( ) ■ Parameters None ■ Exceptions None [Ex.] Create a MyBeep beeper/vibrator instance.
Item Starts or stops the beeping or vibrating of the device specified by the index. In C#, this property is used as the indexer for the Beep class. ■ Syntax [VB] Public WriteOnly Property Item(ByVal device As Beep.EN_DEVICE) _ As Beep.EN_CTRL [C#] public Beep.EN_CTRL this[Beep.
OnTime Sets or acquires the ON/OFF duration of the beeper or vibrator.
OffTime Sets or acquires the OFF duration of the beeper or vibrator.
Frequency Sets or acquires the beeping frequency of the beeper.
Count Sets or acquires the number of beeps or vibrations of the beeper or vibrator. ■ Syntax [VB] Public Property Count As Integer [C#] public int Count {get; set;} ■ Property Number of beeps or vibrations of the beeper or vibrator Parameter values: 0 to 255. The beeper will not sound if “0” is specified.
EN_CTRL Starts or stops the beeping or vibration. ■ Syntax [VB] Public Enum EN_CTRL [C#] public enum EN_CTRL ■ ■ Members Member Name Description OFF Stop the beeping or vibration. ON Start the beeping or vibration. Class Within BHTCL.
18.11. Beep.Settings Constructor None Instances cannot be created directly from this class. Fields None Properties Property Name Device Volume VolumeKey VolumeTap VolumeHalfKey OnOffLaserKey OnOffTrgKey Description Beeper or vibrator Beeper volume Key click sound volume Tap sound volume Half-pressed key click sound volume Trigger switch ON/OFF sound Laser key click ON/OFF sound Methods None Events None Enumeration Enumeration Name EN_DEVICE EN_VOLUME EN_ON_OFF Description Beeper or vibrator.
Device Sets or acquires the beeper or vibrator. ■ Syntax [VB] Public Shared Property Device As EN_DEVICE [C#] public static EN_DEVICE Device {get; set;} ■ Property Beeper or vibrator Parameter values: As listed in EN_DEVICE (one of the values or a combination of the values) Default value: EN_DEVICE.BEEP ■ Exceptions Name of Exception ArgumentException Meaning The specified parameter value(s) is invalid. [Ex.] Set the sound device (barcode reading, warning sound etc.
Volume Sets or acquires the beeper volume. ■ Syntax [VB] Public Shared Property Volume As EN_VOLUME [C#] public static EN_VOLUME Volume {get; set;} ■ Property Beeper volume Parameter values: As listed in EN_VOLUME Default value: EN_VOLUME.LEVEL5 ■ Exceptions Name of Exception ArgumentException Meaning The specified parameter value(s) is invalid. [Ex.] Set the beeper volume to maximum. [VB] Beep.Settings.Volume = Beep.Settings.EN_VOLUME.LEVEL5 [C#] Beep.Settings.Volume = Beep.Settings.EN_VOLUME.
VolumeKey Sets or acquires the volume of a key click. ■ Syntax [VB] Public Shared Property VolumeKey As EN_VOLUME [C#] public static EN_VOLUME VolumeKey {get; set;} ■ Property Sound volume Parameter values: EN_VOLUME values LEVEL_OFF to LEVEL2 Default value: EN_VOLUME.LEVEL2 ■ Exceptions Name of Exception ArgumentException Meaning The specified parameter value(s) is invalid. [Ex.] Set the key click sound volume to maximum. [VB] Beep.Settings.VolumeKey = Beep.Settings.EN_VOLUME.LEVEL2 [C#] Beep.
VolumeTap Sets or acquires the sound volume of the screen taps. ■ Syntax [VB] Public Shared Property VolumeTap As EN_VOLUME [C#] public static EN_VOLUME VolumeTap {get; set;} ■ Property Sound volume Parameter values: EN_VOLUME values LEVEL_OFF to LEVEL2 Default value: EN_VOLUME.LEVEL2 ■ Exceptions Name of Exception ArgumentException Meaning The specified parameter value(s) is invalid. [Ex.] Set the screen tap sound volume to maximum. [VB] Beep.Settings.VolumeTap = Beep.Settings.EN_VOLUME.
VolumeHalfKey Sets or acquires the sound volume of a half-pressed key click. ■ Syntax [VB] Public Shared Property VolumeHalfKey As EN_VOLUME [C#] public static EN_VOLUME VolumeHalfKey {get; set;} ■ Property Sound volume Parameter values: EN_VOLUME values LEVEL_OFF to LEVEL2 Default value: EN_VOLUME.LEVEL_OFF ■ Exceptions Name of Exception ArgumentException Meaning The specified parameter value(s) is invalid. [Ex.] Set the half-press key click sound volume to maximum. [VB] Beep.Settings.
OnOffLaserKey Sets or acquires the ON/OFF for the sound of the clicking of the laser marker key. ■ Syntax [VB] Public Shared Property OnOffLaserKey As EN_ON_OFF [C#] public static EN_VOLUME OnOffLaserKey {get; set;} ■ Property Clicking sound ON/OFF Parameter values: As listed in EN_ON_OFF Default value: EN_ON_OFF.OFF ■ Exceptions Name of Exception ArgumentException Meaning The specified parameter value(s) is invalid. [Ex.] Turn OFF the laser marker key click sound. [VB] Beep.Settings.
OnOffTrgKey Sets or acquires the ON/OFF for the sound of the clicking of the trigger switch. ■ Syntax [VB] Public Shared Property OnOffTrgKey As EN_ON_OFF [C#] public static EN_VOLUME OnOffTrgKey {get; set;} ■ Property Clicking sound ON/OFF Parameter values: As listed in EN_ON_OFF Default value: EN_ON_OFF.OFF ■ Exceptions Name of Exception Meaning ArgumentException The specified parameter value(s) is invalid. [Ex.] Turn OFF the trigger key click sound. [VB] Beep.Settings.OnOffTrgKey = Beep.Settings.
EN_DEVICE Specifies the beeper or vibrator. ■ Syntax [VB] Public [Flags] Enum EN_DEVICE [C#] public [Flags] enum EN_DEVICE ■ ■ Members Member Name Description BEEP Beeper VIB Vibrator Class Within BHTCL.Beep.
EN_VOLUME Specifies the beeper volume level. ■ Syntax [VB] Public Enum EN_VOLUME [C#] public enum EN_VOLUME ■ Members Member Name Description LEVEL_OFF OFF LEVEL1 Low LEVEL2 LEVEL3 LEVEL4 LEVEL5 ■ High Class BHTCL.Beep.
EN_ON_OFF Specifies the ON/OFF for the clicking sound. ■ Syntax [VB] Public Enum EN_ON_OFF [C#] public enum EN_ON_OFF ■ ■ Members Member Name Description OFF OFF ON ON Class BHTCL.Beep.
18.12. RF Constructor Constructor Name RF Description Creates a new instance of the RF class. Fields None Properties Property Name OpenMode Open Controller EditMode SelectedProfile WepKey Description Wireless communication open mode (Only on units running on Windows CE 5.0.) Wireless communication open state Control mode Wireless communication parameter editing mode Profile selection Wep key Methods Method Name Synchronize Description Checks the status of synchronization with AP.
RF Initializes a new instance of the RF class. ■ Syntax [VB] Public Sub New( ) [C#] public RF( ) ■ Parameters None ■ Exceptions None [Ex.] Create a MyRf RF interface.
OpenMode Sets or acquires the wireless open mode. ■ Syntax [VB] Public Property OpenMode As EN_OPEN_MODE [C#] public EN_OPEN_MODE OpenMode{get; set;} ■ Property Wireless communication open mode Parameter values: As listed in EN_OPEN_MODE Default value: EN_OPEN_MODE.NORMAL ■ Exceptions None ■ Note If an invalid value is specified for this property, no exceptions will be thrown immediately; however, an exception will be thrown later when an attempt is made to open or close the wireless device.
When the property is set to EN_OPENMODE.CONTINUOUSLY and the wireless device is opened: When closing the wireless device, set the property to EN_OPEN_MODE.CONTINUOUSLY and then close the device. The wireless device is not closed even when exiting the application. The wireless device is closed when the EN_OPEN_MODE.CONTINUOUSLY property is specified at another application and the wireless device is closed.
[Ex.] Close the wireless connection opened from any application (including the current application). [VB] MyRf.Open = True ……… MyRf.OpenMode = RF.EN_OPEN_MODE.CONTINUOUSLY MyRf.Open = False [C#] MyRf.Open = true; ……… MyRf.OpenMode = RF.EN_OPEN_MODE.CONTINUOUSLY; MyRf.
Open Opens or closes wireless communication. ■ Syntax [VB] Public Property Open As Boolean [C#] public bool Open{get; set;} ■ Property Wireless communication open (= True), close (= False) If wireless communication is achieved by setting OpenMode to EN_OPEN_MODE.NORMAL, the status achieved by setting OpenMode to EN_OPEN_MODE.NORMAL will be returned. If wireless communication is achieved by setting OpenMode to EN_OPEN_MODE.CONTINUOUSLY, the status achieved by setting OpenMode to EN_OPEN_MODE.
Controller Specifies the control mode. ■ Syntax [VB] Public Shared Property Controller As EN_CONTROLLER [C#] public static EN_CONTROLLER Controller{set; get;} ■ Property Wireless control mode Parameter values: As listed in EN_CONTROLLER Default value: EN_CONTROLLER.NIC ■ Exceptions Name of Exception ArgumentException NotSupportedException ■ Meaning Parameter error Control mode not supported Note This is not supported on units running on Windows CE 4.1.
[Ex.] Copying the value set at Zero Config to the BHT wireless registry [VB] RF.Controller = RF.EN_CONTROLLER.ZEROCONFIG RF.Profile.Update [C#] RF.Controller = RF.EN_CONTROLLER.ZEROCONFIG; RF.Profile.
EditMode Specifies the wireless parameter edit mode. ■ Syntax [VB] Public Shared WriteOnly Property EditMode As EN_EDIT_MODE [C#] public static EN_EDIT_MODE EditMode{set;} ■ Property Wireless parameter edit mode Parameter values: As listed in EN_EDIT_MODE ■ Exceptions Name of Exception MissingMethodException ArgumentException ■ Meaning Editmode not supported Parameter error Note This is not supported on units running on Windows CE 4.1.
SelectedProfile Sets or acquires the Profile to be edited. ■ Syntax [VB] Public Shared Profile SelectedProfile [C#] public static Profile SelectedProfile; ■ Property Profile Parameter values: Profile class instance Default value: null ■ Exceptions Name of Exception ArgumentException MissingMethodException ■ Meaning Profile not supported Note This method allows compatibility with Windows CE 4.1. This method is used when selecting the Profile to be edited if the parameter is edited from the RF.
[Ex.] Setting Wep key 1 from RF.WepKey(1) when in Zero Config mode [VB] RF.EditMode = RF.EN_EDIT_MODE.ZEROCONFIG RF.SelectedProfile = _ New RF.Profile(“BHT200”, RF.Profile.EN_PROFILE.INFRASTRUCTURE) RF.WepKey(1) = “12345123451234123412341234” [C#] RF.EditMode = RF.EN_EDIT_MODE.ZEROCONFIG; RF.SelectedProfile = new RF.Profile(“BHT200”, RF.Profile.EN_PROFILE.INFRASTRUCTURE); RF.
WepKey Generates an instance of the WepKeyCollection. ■ Syntax [VB] Public Shared ReadOnly Property WepKey As WepKeyCollection [C#] public static WepKeyCollection WepKey{get;} ■ Property WepKey instance Default value: ■ null (Nothing at VB.NET) Exceptions None ■ Note An instance cannot be generated directly from WepKeyCollection and therefore WepKey should be obtained with this property. This property has been retained for compatibility with Windows CE 4.1.
Synchronize Checks the status of synchronization with AP. ■ Syntax [VB] Public Shared Function Synchronize(ByVal TimeOut As Integer) _ As Integer [C#] public static int Synchronize(int TimeOut) ■ Parameters TimeOut [in] time-out value until synchronization is established. If RF.SYNC_CHECK is specified, the synchronization status is immediately checked and a result returned. If RF.SYNC_INFINITE is specified, processing continues until synchronization is established. Parameter values: RF.SYNC_CHECK, RF.
[Ex.] Check the synchronization with the AP every second until synchronization is established. [VB] While Not 0 = RF.Synchronize(RF.SYNC_CHECK) Threading.Thread.Sleep(1000) End While [C#] while (0 != RF.Synchronize(RF.SYNC_CHECK)) { System.Threading.Thread.
EN_OPEN_MODE Specifies the wireless connection open mode. ■ Syntax [VB] Public Enum EN_OPEN_MODE [C#] public enum EN_OPEN_MODE ■ Members Member Name Description NORMAL Normal mode (*1) CONTINUOUSLY Continuously open mode (*1) (*1) Please refer to the notes for the OpenMode property for further details.
EN_CONTROLLER Specifies the wireless control mode.
EN_EDIT_MODE Specifies the wireless parameter edit mode.
18.13. RF.Profile This is not supported on units running on Windows CE 4.1. Constructor Constructor Name Profile Description Specifies ESSID and infrastructure mode, and generates a profile instance. Fields None Properties Property Name SSID InfraMode Priority Authentication Encryption EAP8021x WepKey PreSharedKey KeyIndex Count Registered Description ESSID Infrastructure mode Priority Authentication method Encryption method EAP type WEP key PreSharedKey (Supported only on units running on Windows CE 5.
Enumeration Enumeration Name EN_AUTHENTICATION EN_EAP8021X EN_ENCRYPTION EN_INFRA_MODE Description Authentication method EAP type Encryption method Infrastructure - 225 -
Profile Specifies ESSID and infrastructure mode, and initializes a new instance.
SSID Acquires the profile ESSID.
InfraMode Acquires the profile infrastructure.
Priority Sets or acquires the profile priority. ■ Syntax [VB] Public Property Priority As Integer [C#] public int Priority {get; set;} ■ Property Profile priority Parameter values: 1 (high) to 16 (low) Default value: 1 ■ Exceptions Name of Exception ArgumentException Meaning The specified parameter value(s) lies outside the permissible range. DeviceLoadException The device is not ready. The edit mode has not been set to Zero Config mode.
Authentication Sets or acquires the profile authentication method. ■ Syntax [VB] Public Property Authentication As EN_AUTHENTICATION [C#] public EN_AUTHENTICATION Authentication {get; set;} ■ Property Profile authentication method Parameter values: As listed in EN_AUTHENTICATION EN_AUTHENTICATION.WPAPSK is only supported on units running on Windows CE 5.0. Default value: EN_AUTHENTICATION.
Encryption Sets or acquires the profile encryption method. ■ Syntax [VB] Public Property Encryption As EN_ENCRYPTION [C#] public EN_ENCRYPTION Encryption {get; set;} ■ Property Profile encryption method Parameter values: As listed in EN_ENCRYPTION Default value: EN_ENCRYPTION.DISABLE ■ Exceptions Name of Exception ArgumentException Meaning The specified parameter value(s) lies outside the permissible range. DeviceLoadException The device is not ready.
EAP8021x Sets or acquires the profile EAP (802.1x) type. ■ Syntax [VB] Public Property EAP8021x As EN_EAP8021X [C#] public EN_EAP8021X EAP8021x {get; set;} ■ Property Profile EAP type Parameter values: As listed in EN_EAP8021X Default value: EN_EAP8021X.DISABLE ■ Exceptions Name of Exception ArgumentException Meaning The specified parameter value(s) lies outside the permissible range. DeviceLoadException The device is not ready. The edit mode has not been set to Zero Config mode.
WepKey Sets the profile WepKey. ■ Syntax [VB] Public WriteOnly Property WepKey As String [C#] public string WepKey {set;} ■ Property Profile WEP key. Parameter values: 10-character alphanumeric character string (40-bit) 26-character alphanumeric character string (128-bit) ■ Exceptions Name of Exception ArgumentException Meaning The specified parameter value(s) lies outside the permissible range. DeviceLoadException The device is not ready. The edit mode has not been set to Zero Config mode.
PreSharedKey Specifies the profile PreSharedKey. ■ Syntax [VB] Public WriteOnly Property PreSharedKey As String [C#] public string PreSharedKey {set;} ■ Property Profile PreSharedKey Parameter values: 64-characters alphanumeric character string in hexadecimal notation, or ASCII character string with 8 characters or more and 63 characters or less ■ Exceptions Name of Exception ArgumentException Meaning The specified parameter value(s) lies outside the permissible range.
KeyIndex Sets or acquires the key index used during communication. ■ Syntax [VB] Public Property KeyIndex As Integer [C#] public int KeyIndex {set; get;} ■ Property The key index used by the profile during communication Parameter values: 1 to 4 ■ Exceptions Name of Exception ArgumentException DeviceLoadException Meaning The setting lies outside the range. The device is not ready. The edit mode has not been set to Zero Config mode. MissingMethodException Profile not supported. Set from RF.WepKey.
Count Acquires the number of registered profiles. ■ Syntax [VB] Public Shared ReadOnly Property Count As Integer [C#] public static int Count {get;} ■ Property Registered profile count ■ Exceptions Name of Exception Meaning MissingMethodException Profile not supported. ■ Note This is not supported on units running on Windows CE 4.1. An exception is thrown when an attempt is made to acquire.
Registered Acquires all registered profiles. ■ Syntax [VB] Public Shared ReadOnly Property Registered As RF.Profile[] [C#] public static RF.Profile[] Registered {get;} ■ Property All registered profile instances. ■ Exceptions Name of Exception Meaning MissingMethodException Profile not supported. ■ Note This is not supported on units running on Windows CE 4.1. An exception is thrown when an attempt is made to acquire. It is necessary to call the RF.Profile.
[Ex.] Delete all registered profiles. [VB] RF.Profile.Update() registry. ' Copies settings from the Zero Config GUI to the BHT wireless Dim regProfiles() As RF.Profile = RF.Profile.Registered For Each prof As RF.Profile In regProfiles RF.Profile.Remove(prof.SSID, prof.InfraMode) Next RF.Profile.Commit() ' Updates to the Zero Config GUI. [C#] RF.Profile.Update() ' Copies settings from the Zero Config GUI to the BHT wireless registry.Zero Config GUI. RF.Profile[] regProfiles = RF.Profile.
Update Copies the value set at the Zero Config GUI to the BHT wireless registry referenced by the wireless driver. ■ Syntax [VB] Public Shared Sub Update() [C#] public static void Update() ■ Parameters None ■ Exceptions Name of Exception DeviceLoadException Meaning The device is not ready. The edit mode has not been set to Zero Config mode. MissingMethodException Profile not supported. ■ Note This is not supported on units running on Windows CE 4.1. An exception is thrown when executed.
[Ex.] Changing the profile (ESSID:BHT, Infra: Infrastructure) Wep key created at Zero Config to “1234567890”. [VB] RF.Profile.Update(); Dim prof As RF.Profile = New Profile("BHT", EN_INFRA_MODE.INFRASTRUCTURE) prof.WepKey = “1234567890” RF.Profile.Commit(); [C#] RF.Profile.Update(); RF.Profile prof = new Profile("BHT", EN_INFRA_MODE.INFRASTRUCTURE); prof.WepKey = “1234567890” RF.Profile.
Commit Reflects the value set from application to the Zero Config GUI. ■ Syntax [VB] Public Shared Sub Commit() [C#] public static void Commit() ■ Parameters None ■ Exceptions Name of Exception DeviceLoadException Meaning The device is not ready. The edit mode has not been set to Zero Config mode. MissingMethodException Profile not supported. ■ Note This is not supported on units running on Windows CE 4.1. An exception is thrown when executed.
[Ex.] Changing the profile (ESSID:BHT, Infra: Infrastructure) Wep key created at Zero Config to “1234567890”. [VB] RF.Profile.Update(); Dim prof As RF.Profile = New Profile("BHT", EN_INFRA_MODE.INFRASTRUCTURE) prof.WepKey = “1234567890” RF.Profile.Commit(); [C#] RF.Profile.Update(); RF.Profile prof = new Profile("BHT", EN_INFRA_MODE.INFRASTRUCTURE); prof.WepKey = “1234567890” RF.Profile.
Remove Deletes registered profiles. ■ Syntax [VB] Public Shared Sub Remove(ByVal ssid As String, ByVal infra As EN_INFRA_MODE) [C#] public static void Remove(string ssid, EN_INFRA_MODE infra) ■ Parameters ssid: Deleted profile ESSID infra: Deleted profile infrastructure mode ■ Exceptions Name of Exception Meaning MissingMethodException Profile not supported. ■ Note This is not supported on units running on Windows CE 4.1. An exception is thrown when executed. [Ex.
EN_AUTHENTICATION Specifies the authentication method.
EN_EAP8021X Specifies the EAP type.
EN_ENCRYPTION Specifies the encryption method.
EN_INFRA_MODE Specifies infrastructure.
18.14. RF.Settings Constructor None Instances cannot be created directly from this class.
PowerSave Sets or acquires power save mode. ■ Syntax [VB] Public Shared Property PowerSave As EN_POWERSAVE [C#] public static EN_POWERSAVE PowerSave {get; set;} ■ Property Power save mode Parameter values: As listed in EN_POWERSAVE Default value: EN_POWERSAVE.MOST ■ Exceptions Name of Exception ArgumentException Meaning The specified parameter value(s) is invalid. [Ex.] Set the wireless power consumption to LEAST. [VB] RF.Settings.PowerSave = RF.Settings.EN_POWERSAVE.LEAST [C#] RF.Settings.
Authentication Sets or acquires the authentication method. ■ Syntax [VB] Public Shared Property Authentication As EN_AUTHENTICATION [C#] public static EN_AUTHENTICATION Authentication {get; set;} ■ Property Authentication method Parameter values: As listed in EN_AUTHENTICATION ■ Exceptions Name of Exception ArgumentException ■ Meaning The specified parameter value(s) is invalid. Note This property has been retained to provide compatibility with Windows CE4.1.
DestMACAddress Sets or acquires the MAC address of the destination AP. ■ Syntax [VB] Public Shared Property DestMACAddress As String [C#] public static string DestMACAddress {get; set;} ■ Property MAC address of AP Default value: null ■ Exceptions Name of Exception ArgumentException ■ Meaning The specified parameter value(s) is invalid. Note An exception will be thrown only when the length of the string exceeds 12 characters. [Ex.] Specify the connection destination AP as "001122334455". [VB] RF.
Version Acquires the driver version. ■ Syntax [VB] Public Shared ReadOnly Property Version As String [C#] public static string Version {get;} ■ Property Driver version Default value: null ■ Exceptions Name of Exception DeviceLoadException Meaning The NIC device is not ready. [Ex.] Acquire the wireless driver version. [VB] Dim VerDriver As String = RF.Settings.Version [C#] string VerDriver = RF.Settings.
FWVersion Acquires the firmware version. ■ Syntax [VB] Public Shared ReadOnly Property FWVersion As String [C#] public static string FWVersion {get;} ■ Property Firmware version Default value: null ■ Exceptions Name of Exception DeviceLoadException Meaning The NIC device is not ready. [Ex.] Acquire the wireless F/W version. [VB] Dim VerFW As String = RF.Settings.FWVersion [C#] string VerFW = RF.Settings.
HWVersion Acquires the hardware version. ■ Syntax [VB] Public Shared ReadOnly Property HWVersion As String [C#] public static string HWVersion {get;} ■ Property Hardware version Default value: null ■ Exceptions Name of Exception DeviceLoadException Meaning The NIC device is not ready. [Ex.] Acquire the wireless H/W version. [VB] Dim VerHW As String = RF.Settings.HWVersion [C#] string VerHW = RF.Settings.
MACAddress Acquires the MAC address. ■ Syntax [VB] Public Shared ReadOnly Property MACAddress As String [C#] public static string MACAddress {get;} ■ Property MAC address Default value: null ■ Exceptions Name of Exception DeviceLoadException Meaning The NIC device is not ready. [Ex.] Acquire the MAC address. [VB] Dim MacAddr As String = RF.Settings.MACAddress [C#] string MacAddr = RF.Settings.
SSID1 Sets or acquires the ESSID. ■ Syntax [VB] Public Shared Property SSID1 As String [C#] public static string SSID1 {get; set;} ■ Property ESSID Default value: "101" ■ Exceptions Name of Exception ArgumentException ■ Meaning The specified parameter value(s) is invalid. Note This property has been retained for compatibility with Windows CE 4.1. Set SSID at the Profile class constructor. Any values set for this property are ignored when in Zero Config mode.
EN_AUTHENTICATION Specifies the authentication method. ■ Syntax [VB] Public Enum EN_AUTHENTICATION [C#] public enum EN_AUTHENTICATION ■ ■ Members Member Name Description OPEN Open SHARED40 40bit SHARED128 128bit Class BHTCL.RF.
EN_POWERSAVE Specifies power save mode. ■ Syntax [VB] Public Enum EN_POWERSAVE [C#] public enum EN_POWERSAVE ■ Members Member Name Description FULL Max. power consumption MOST MORE MID LESS LEAST ■ Min. power consumption Class BHTCL.RF.
18.15. RF.WepKeyCollection Constructor None Instances cannot be created directly form this class.
Item Sets the value of the Wep key specified by the index. In C#, this property is used as the indexer for the WepKeyCollection class. ■ Syntax [VB] Public WriteOnly Property Item(ByVal KeyNo As Integer) As String [C#] public string this[int KeyNo] {set;} ■ Parameters KeyNo Wep key index Values for 1 to 4 ■ Property Wep key ■ Exceptions Name of Exception ArgumentException ■ Meaning The specified parameter value(s) is invalid.
TransmitKey Sets or acquires the Wep transmission key [to be] used. ■ Syntax [VB] Public Default Property TransmitKey As Integer [C#] public static int TransmitKey {get; set;} ■ Property Wep transmission key Default value: Wep transmission key value at the time of initialization. ■ Exceptions Name of Exception ArgumentException ■ Meaning The specified parameter value(s) is invalid.
18.16. RF.SiteSurvey Constructor None Instances cannot be created directly from this class.
Strength Acquires the radio field strength. ■ Syntax [VB] Public Shared ReadOnly Property Strength As Integer [C#] public static int Strength {get;} ■ Property Radio field strength (%) Default value: Radio field strength at the time of initialization. ■ Exceptions Name of Exception Meaning DeviceNotFoundException No NIC device was found. DeviceLoadException The NIC device is not ready. [Ex.] Acquire the radio field strength. [VB] Dim Strength As Integer = RF.SiteSurvey.
Beacon Acquires the beacon quality. ■ Syntax [VB] Public Shared ReadOnly Property Beacon As Integer [C#] public static int Beacon {get;} ■ Property Beacon quality (%) Default value: Beacon quality at the time of initialization. ■ Exceptions Name of Exception DeviceNotFoundException DeviceLoadException Meaning No NIC device was found. The NIC device is not ready. [Ex.] Acquire the beacon. [VB] Dim Beacon As Integer = RF.SiteSurvey.Beacon [C#] int Beacon = RF.SiteSurvey.
Link Acquires the communication quality. ■ Syntax [VB] Public Shared ReadOnly Property Link As EN_LINE_QUALITY [C#] public static EN_LINE_QUALITY Link {get;} ■ Property Communication quality Default value: Communication quality at the time of initialization. ■ Exceptions Name of Exception DeviceNotFoundException DeviceLoadException Meaning No NIC device was found. The NIC device is not ready. [Ex.] Acquire the communication quality. [VB] Dim LineQuality As RF.SiteSurvey.EN_LINE_QUALITY = RF.
EN_LINE_QUALITY Specifies the communication quality. ■ Syntax [VB] Public Enum EN_LINE_QUALITY [C#] public enum EN_LINE_QUALITY ■ ■ Members Member Name Description UNSYNC Not connected (not synchronized) POOR Less than 20% FAIR 20% to 40% GOOD 40% to 75% EXCELLENT 75% or greater Class Within BHTCL.RF.
18.17. RF.Info Constructor None Instances cannot be created directly from this class.
Rate Acquires the communication speed. ■ Syntax [VB] Public Shared ReadOnly Property Rate As EN_RATE [C#] public static EN_RATE Rate {get;} ■ Property Communication speed Default value: NOT_LINK ■ Exceptions Name of Exception DeviceNotFoundException DeviceLoadException Meaning No NIC device was found. The NIC device is not ready. [Ex.] Acquire the current communication speed. [VB] Dim Rate As RF.Info.EN_RATE = RF.Info.Rate [C#] RF.Info.EN_RATE Rate = RF.Info.
RateKbps Acquires the communication speed. ■ Syntax [VB] Public Shared ReadOnly Property RateKbps As Integer [C#] public static int RateKbps {get;} ■ Property Communication speed (kbps) Default value: 0 ■ Exceptions Name of Exception DeviceNotFoundException DeviceLoadException ArgumentException Meaning No Nic device exists. The Nic device is not ready. RateKbps not supported. [Ex.] Acquire the current communication speed. [VB] Dim RateKbps As Integer = RF.Info.RateKbps [C#] int RateKbps = RF.Info.
Channel Acquires the communication channel. ■ Syntax [VB] Public Shared ReadOnly Property Channel As Integer [C#] public static int Channel {get;} ■ Property Communication channel Default value: 0 ■ Exceptions Name of Exception DeviceNotFoundException DeviceLoadException Meaning No NIC device was found. The NIC device is not ready. [Ex.] Acquire the current communication channel. [VB] Dim Channel As Integer = RF.Info.Channel [C#] int Channel = RF.Info.
APMAC Acquires the MAC address of the currently linked AP. ■ Syntax [VB] Public Shared ReadOnly Property APMAC As String [C#] public static string APMAC {get;} ■ Property MAC address Default value: null ■ Exceptions Name of Exception DeviceNotFoundException DeviceLoadException Meaning No NIC device was found. The NIC device is not ready. [Ex.] Acquire the MAC address of the currently linked AP. [VB] Dim CurAPMacAddr As String = RF.Info.APMAC [C#] int Channel = RF.Info.
EN_RATE Specifies the communication speed. ■ Syntax [VB] Public Enum EN_RATE [C#] public enum EN_RATE ■ ■ Members Member Name Description AUTO Auto MBPS1 1 Mbps MBPS2 2 Mbps MBPS5_5 5.5 Mbps MBPS11 11 Mbps OVER Faster than above Class Within BHTCL.RF.
18.18. Keys Constructor None There is no need to create an instance because all the members are static members.
Mx, MxH (Mx:M1 to M5, MxH:M3H to M5H) Key code of the magic key and the half-pressed magic key If the [ENTER], [Shift], [TAB], [CTRL], and [Alt] key functions are assigned to these keys, the assigned key code is returned. ■ Syntax [VB] Public Const Mx As Windows.Forms.Keys [C#] public const Windows.Forms.Keys Mx; ALP Key code for [ALP] key ■ Syntax [VB] Public Const ALPKey As System.Windows.Forms.Keys [C#] public const System.Windows.Forms.
[Ex.] Display the pressed key. [VB] Private Sub Form1_KeyDown(ByVal sender As Object, System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown Select Case e.KeyCode Case DNWA.BHTCL.Keys.M1 Console.WriteLine("[M1] key is down") Case DNWA.BHTCL.Keys.ALP Console.WriteLine("[ALP] key is down") End Select End Sub [C#] private void Form1_KeyDown(object sender, KeyEventArgs e) { switch(e.KeyCode) { case DNWA.BHTCL.Keys.M1: Console.WriteLine("[M1] key is down"); break; case DNWA.BHTCL.Keys.ALP: Console.
18.19. Keys.Settings Constructor None Instances cannot be created directly from this class.
ShiftMode Sets or acquires the operation mode for the [SF] key. ■ Syntax [VB] Public Shared Property ShiftMode As EN_SHIFT_MODE [C#] public static EN_SHIFT_MODE ShiftMode {get; set;} ■ Property Operation mode Parameter values: As listed in EN_SHIFT_MODE Default value: EN_SHIFT_MODE.NON_LOCK ■ Exceptions Name of Exception ArgumentException Meaning The specified parameter value(s) is invalid. [Ex.] Set the [SF] key operation mode to onetime lock. [VB] Keys.Settings.ShiftMode = Keys.Settings.
MxMode(Mx : M1 to M5, M3H,M4H,M5H) Sets or acquires the operation mode for the magic key, including that when the key is half-pressed. ■ Syntax [VB] Public Shared Property MxMode As EN_MX_MODE [C#] public static EN_MX_MODE MxMode {get; set;} ■ Property Operation mode Parameter values: As listed in EN_MX_MODE with the exception of EN_MX.MODE.IM Default value: M1 EN_MX_MODE.TAB M2 EN_MX_MODE.NONE M3 EN_MX_MODE.TRG M4 EN_MX_MODE.TRG M5 EN_MX_MODE.TRG ■ M3H EN_MX_MODE.LASER (BHT-200B) M4H EN_MX_MODE.
InputMethod Sets or acquires the input method. ■ Syntax [VB] Public Shared Property InputMethod As EN_INPUT_METHOD [C#] public static EN_INPUT_METHOD InputMethod {get; set;} ■ Property Input method Parameter values: As listed in EN_INPUT_METHOD Default value: EN_ INPUT_METHOD.NUMERIC ■ Exceptions Name of Exception ArgumentException Meaning The specified parameter value(s) is invalid. [Ex.] Set the input method to alphabet entry mode. [VB] Keys.Settings.InputMethod = Keys.Settings.EN_INPUT_METHOD.
PwrDownTime Sets or acquires the length of time the PWR key is pressed down until the power turns OFF. ■ Syntax [VB] Public Shared Property PwrDownTime As Integer [C#] public static int PwrDownTime {get; set;} ■ Property Length of time key pressed down (in units of 100msec) Parameter values: 1 to 255 Default value: 5 ■ Exceptions Name of Exception ArgumentException Meaning The specified parameter value(s) is invalid. [Ex.
AllowChangeIM Sets or acquires the enabling/disabling of the transition to the alphabet entry mode. ■ Syntax [VB] Public Shared Property AllowChangeIM As EN_CHANGE_IM [C#] public static EN_CHANGE_IM AllowChangeIM {get; set;} ■ Property Enable/disable Parameter values: As listed in EN_CHANGE_IM Default value: EN_CHANGE_IM.ENABLE ■ Exceptions Name of Exception ArgumentException Meaning The specified parameter value(s) is invalid. [Ex.] Disable transition to alphabet entry mode. [VB] Keys.Settings.
KeyboardType Acquires the keyboard type. ■ Syntax [VB] Public Shared ReadOnly Property KeyboardType As EN_KEYBOARD_TYPE [C#] public static EN_KEYBOARD_TYPE KeyboardType {get;} ■ Property Keyboard type ■ Exceptions None [Ex.] Check the key type. [VB] If DNWA.BHTCL.Keys.Settings.KeyboardType = _ Keys.Settings.EN_KEYBOARD_TYPE.KEY26 Then Console.WriteLine("26 keys") End If [C#] if (DNWA.BHTCL.Keys.Settings.EN_KEYBOARD_TYPE.KEY26 == DNWA.BHTCL.Keys.Settings.KeyboardType) { Console.
HandleStatus Acquires the grip handle status (connected/not connected). ■ Syntax [VB] Public Shared ReadOnly Property HandleStatus As EN_HANDLE_STATUS [C#] public static EN_HANDLE_STATUS HandleStatus {get;} ■ Property Grip handle status ■ Exceptions None [Ex.] Check the grip handle connection status [VB] If DNWA.BHTCL.Keys.Settings.HandleStatus = _ Keys.Settings.EN_HANDLE_STATUS.LOADED Then Console.WriteLine("Grip handle is loaded.") Else Console.WriteLine("Grip handle is not loaded.
EN_SHIFT_MODE Specifies the operation mode for the Shift (SF) key. ■ Syntax [VB] Public Enum EN_SHIFT_MODE [C#] public enum EN_SHIFT_MODE ■ ■ Members Member Name Description NON_LOCK Normal ONE_LOCK Onetime lock mode Class BHTCL.Keys.
EN_MX_MODE Specifies the key function. ■ Syntax [VB] Public Enum EN_MX_MODE [C#] public enum EN_MX_MODE ■ Members Member Name Description NONE None ENTER Enter key TRG Trigger key SHIFT Shift key BACKLIGHT Backlight control key TAB Tab key IM Input method switching key LASER Laser ON/OFF key CTRL Ctrl key ALT Alt key USER_DEF_CODE User definition code ■ Class BHTCL.Keys.
EN_INPUT_METHOD Specifies the input method. ■ Syntax [VB] Public Enum EN_INPUT_METHOD [C#] public enum EN_INPUT_METHOD ■ ■ Members Member Name Description NUMERIC Numeric entry mode ALPHABET Alphabet entry mode Class BHTCL.Keys.
EN_CHANGE_IM Specifies whether to enable or disable input method switching. ■ Syntax [VB] Public Enum EN_CHANGE_IM [C#] public enum EN_CHANGE_IM ■ ■ Members Member Name Description ENABLE Enable DISABLE Disable Class BHTCL.Keys.
EN_KEYBOARD_TYPE Specifies the keyboard type. ■ Syntax [VB] Public Enum EN_KEYBOARD_TYPE [C#] public enum EN_KEYBOARD_TYPE ■ ■ Members Member Name Description KEY26 26-key (Calculator-type key layout) KEY30 30-key (Calculator-type key layout) KEY26P 26-key (Phone-type key layout) KEY30P 30-key (Phone-type key layout) Class BHTCL.Keys.
18.20. SysInfo Constructor None There is no need to create an instance because all the members are static members.
18.21. SysInfo.Settings Constructor None Instances cannot be created directly from this class.
OSVersion Acquires the operating system (OS) version. ■ Syntax [VB] Public Shared ReadOnly Property OSVersion As String [C#] public static string OSVersion {get;} ■ Property System version (4 digits) ■ Exceptions None [Ex.] Acquire the system version. [VB] Dim OSVer As String = SysInfo.Settings.OSVersion [C#] string OSVer = SysInfo.Settings.
MachineName Acquires the machine name. ■ Syntax [VB] Public Shared ReadOnly Property MachineName As String [C#] public static string MachineName {get;} ■ Property Machine name ■ Exceptions None [Ex.] Acquire the machine name. [VB] Dim MachineName As String = SysInfo.Settings.MachineName [C#] string MachineName = SysInfo.Settings.
MachineNumber Acquires the machine number. ■ Syntax [VB] Public Shared ReadOnly Property MachineNumber As String [C#] public static string MachineNumber {get;} ■ Property Machine number ■ Exceptions None [Ex.] Acquire the machine number. [VB] Dim MachineNumber As String = SysInfo.Settings.MachineNumber [C#] string MachineNumber = SysInfo.Settings.
SerialNumber Sets or acquires the serial number. ■ Syntax [VB] Public Shared Property SerialNumber As String [C#] public static string SerialNumber {get;set;} ■ Property Serial number Parameter values: 6-digit character string Default value: Last 6 digits of machine number on the back of the BHT. ■ Exceptions Name of Exception ArgumentException Meaning The specified parameter value(s) is invalid. [Ex.] Acquire the serial number. [VB] Dim SerialNumber As String = SysInfo.Settings.
RAMSize Acquires the size (capacity) of the BHT RAM. ■ Syntax [VB] Public Shared ReadOnly Property RAMSize As Integer [C#] public static int RAMSize {get;} ■ Property Capacity (Byte) ■ Exceptions None [Ex.] Acquire the capacity of the BHT RAM. [VB] Dim RAMSize As Integer = SysInfo.Settings.RAMSize [C#] string RAMSize = SysInfo.Settings.
ROMSize Acquires the size (capacity) of the BHT ROM. ■ Syntax [VB] Public Shared ReadOnly Property ROMSize As Integer [C#] public static int ROMSize {get;} ■ Property Capacity (Byte) ■ Exceptions None [Ex.] Acquire the capacity of the BHT ROM. [VB] Dim ROMSize As Integer = SysInfo.Settings.ROMSize [C#] string ROMSize = SysInfo.Settings.
18.22. PwrMng Constructor None There is no need to create an instance because all the members are static members. Fields None Properties None Methods Method Name Shutdown Description Shuts down the power in such a way that the system will be started in the specified mode next time it is turned ON.
Shutdown Shuts down the power in such a way that the next time the system is turned ON, it will start up in the mode specified by the parameter. ■ Syntax [VB] Public Shared Sub Shutdown _ (ByVal mode As EN_SHUTDOWN_MODE) [C#] public static void Shutdown(EN_SHUTDOWN_MODE mode) ■ Parameters mode [in] Mode to be entered at the time of start-up Parameter values: As listed in EN_SHUTDOWN_MODE EN_SHUTDOWN_MODE.COLD is only valid on units running on Windows CE 5.0.
[Ex.] Switch to suspend. [VB] PwrMng.Shutdown(PwrMng.EN_SHUTDOWN_MODE.SUSPEND) [C#] PwrMng.Shutdown(PwrMng.EN_SHUTDOWN_MODE.
EN_SHUTDOWN_MODE Specifies the operation mode to be entered at the next start-up after shutdown. ■ Syntax [VB] Public Enum EN_SHUTDOWN_MODE [C#] public enum EN_SHUTDOWN_MODE ■ Members Member Name Description WARM Warm-boot SUSPEND Suspend COLD_BOOT_REGINIT Cold-boot, with registry initialized COLD_BOOT_REGREMAIN Cold-boot, with registry saved ■ SYSMODIFY Update OS COLD Cold-boot Class Within BHTCL.
18.23. PwrMng.Settings Constructor None Instances cannot be created directly from this class. Fields None Properties Property Name StandbyTime AutoPowerOffBattery AutoPowerOffExt EnableSuspendSlotX (X=0,1) CPUClock Description Standby transition time Auto-power-OFF time (battery-powered) Auto-power-OFF time (installed on CU) Auto power OFF Enable/Disable for CF card slot X currently being used.
StandbyTime Sets or Acquires the standby transition time. ■ Syntax [VB] Public Shared Property StandbyTime As Integer [C#] public static int StandbyTime {get; set;} ■ Property Transition time (in units of 100 msec) Parameter values: 0 to 255 Default value: 10 ■ Exceptions Name of Exception ArgumentException ■ Meaning The specified parameter value(s) is invalid. Note If "0" is specified, transition to the standby state will not take place. [Ex.] Prohibits transition to standby. [VB] PwrMng.
AutoPowerOffBattery Sets or acquires the automatic power-OFF time when powered by the battery. ■ Syntax [VB] Public Shared Property AutoPowerOffBattery As Integer [C#] public static int AutoPowerOffBattery {get; set;} ■ Property Auto-power-off time (in units of 1 sec) Parameter values: 0 to System.Int32.MaxValue Default value: 180 ■ Exceptions Name of Exception ArgumentException ■ Meaning The specified parameter value(s) is invalid.
AutoPowerOffExt Sets or acquires the automatic power-OFF time when the BHT is installed on the CU. ■ Syntax [VB] Public Shared Property AutoPowerOffExt As Integer [C#] public static int AutoPowerOffExt {get; set;} ■ Property Automatic power-off time (in units of 1 sec) Parameter values: 0 to System.Int32.MaxValue Default value: 0 (The system will not be turned OFF automatically.) ■ Exceptions Name of Exception ArgumentException ■ Meaning The specified parameter value(s) is invalid.
EnableSuspendSlotX (X=0,1) Sets or acquires the auto power OFF enable/disable status for the CF slot X currently being used. ■ Syntax [VB] Public Shared Property EnableSuspendSlotX As Integer [C#] public static int EnableSuspendSlotX {get; set;} ■ Property Auto power OFF enable (EN_SUSPEND.ENABLE), disable (EN_SUSPEND.DISABLE) Parameter values: As listed in EN_SUSPEND Default value: Slot 0: Enable, Slot 1: Enable ■ Exceptions Name of Exception Meaning ArgumentException The setting is invalid.
CPUClock Sets or acquires the CPU clock speed. ■ Syntax [VB] Public Shared Property CPUClock As EN_CPU_CLOCK [C#] public static EN_CPU_CLOCK CPUClock {get; set;} ■ Property CPU clock Parameter values: As listed in EN_CPU_CLOCK Default value: EN_CPU_CLOCK.NORMAL ■ Exceptions Name of Exception ArgumentException Meaning The specified parameter value(s) is invalid. [Ex.] Up to the CPU clock speed. [VB] PwrMng.Settings.Clock = PwrMng.Settings.EN_CPU_CLOCK.FAST [C#] PwrMng.Settings.Clock = PwrMng.
EN_SUSPEND Specifies whether to enable or disable suspend mode. ■ Syntax [VB] Public Enum EN_SUSPEND [C#] public enum EN_SUSPEND ■ ■ Members Member Name Description DISABLE Disable ENABLE Enable Class BHTCL.Pwrmng.
EN_CPU_CLOCK Specifies the CPU clock. ■ Syntax [VB] Public Enum EN_CPU_CLOCK [C#] public enum EN_CPU_CLOCK ■ ■ Members Member Name Description NORMAL Normal FAST Fast Class BHTCL.Pwrmng.
18.24. Icon Constructor None There is no need to create an instance because all the members are static members.
18.25. Icon.Settings Constructor None Instances cannot be created directly from this class. Fields None Properties Property Name ShiftKey Battery Standby Wireless SIP Alphabet Description Enables/disables display of the icon indicating that the SF key is pressed down. Enables/disables display of the battery icon. Enables/disables display of the icon indicating standby transition state. Enables/disables display of the icon indicating that the BHT is in wireless communication mode.
ShiftKey Sets or acquires the display status (enabled/disabled) of the icon indicating that key input is in shift mode. ■ Syntax [VB] Public Shared Property ShiftKey As EN_STATUS [C#] public static EN_STATUS ShiftKey {get; set;} ■ Property Display enabled/disabled Parameter values: As listed in EN_STATUS Default value: EN_STATUS.ENABLE ■ Exceptions Name of Exception ArgumentException ■ Meaning The specified parameter value(s) is invalid.
Battery Sets or acquires the display status (enabled/disabled) of the icon indicating the residual charge of the battery. ■ Syntax [VB] Public Shared Property Battery As EN_STATUS [C#] public static EN_STATUS Battery {get; set;} ■ Property Display enabled/disabled Parameter values: As listed in EN_STATUS Default value: EN_STATUS.ENABLE ■ Exceptions Name of Exception ArgumentException Meaning The specified parameter value(s) is invalid. [Ex.] Disables display of the battery status icon. [VB] Icon.
Standby Sets or acquires the display status (enabled/disabled) of the icon indicating the standby transition state. ■ Syntax [VB] Public Shared Property Standby As EN_STATUS [C#] public static EN_STATUS Standby {get; set;} ■ Property Display enabled/disabled Parameter values: As listed in EN_STATUS Default value: EN_STATUS.ENABLE ■ Exceptions Name of Exception ArgumentException ■ Meaning The specified parameter value(s) is invalid.
Wireless Sets or acquires the display status (enabled/disabled) of the icon indicating that the BHT is in wireless communication mode. ■ Syntax [VB] Public Shared Property Wireless As EN_STATUS [C#] public static EN_STATUS Wireless {get; set;} ■ Property Display enabled/disabled Parameter values: As listed in EN_STATUS Default value: EN_STATUS.ENABLE ■ Exceptions Name of Exception ArgumentException ■ Meaning The specified parameter value(s) is invalid.
SIP Sets or acquires the display status (enabled/disabled) of the Software Input Panel (SIP) icon. ■ Syntax [VB] Public Shared Property SIP As EN_STATUS [C#] public static EN_STATUS SIP {get; set;} ■ Property Display enabled/disabled Parameter values: As listed in EN_STATUS Default value: EN_STATUS.ENABLE ■ Exceptions Name of Exception ArgumentException Meaning The specified parameter value(s) is invalid. [Ex.] Disables display of the Software Input Panel icon. [VB] Icon.Settings.SIP = Icon.
Alphabet Sets or acquires the display status (enabled/disabled) of the icon indicating the alphabet entry mode. ■ Syntax [VB] Public Shared Property Alphabet As EN_STATUS [C#] public static EN_STATUS Alphabet {get; set;} ■ Property Display enabled/disabled Parameter values: As listed in EN_STATUS Default value: EN_STATUS.ENABLE ■ Exceptions Name of Exception ArgumentException ■ Meaning The specified parameter value(s) is invalid.
EN_STATUS Enables/disables icon display. ■ Syntax [VB] Public Enum EN_STATUS [C#] public enum EN_STATUS ■ ■ Members Member Name Description DISABLE Display is disabled. ENABLE Display is enabled. Class BHTCL.Icon.
18.26. Display This function is not supported.
18.27. Display.Settings This function is not supported.
18.28. SysModification Constructor Constructor Name SysModification Description Creates a new instance of the SysModification class.
SysModification Initializes a new instance of the SysModificaiton class. ■ Syntax [VB] Public Sub New( ) [C#] public SysModification( ) ■ Parameters None ■ Exceptions None [Ex.] Create the OS update instance.
FileName Specifies the OS update filename. ■ Syntax [VB] Public Property FileName As String [C#] public string FileName{get; set;} ■ Property Filename Default value: "" The file name must contain the absolute path of the file. Set the path name to ”\SysModify\”. Ensure that the file extension is ”.zl”. ■ Exceptions None ■ Note Even if an invalid filename or a non-existent file is specified, no exceptions are immediately thrown.
Mode Specifies the operation mode after updating the OS. ■ Syntax [VB] Public Property Mode As EN_MODE [C#] public EN_MODE Mode{get; set;} ■ Property Operation mode Parameter values: As listed in EN_MODE Default value: EN_MODE.POWEROFF ■ Exceptions None ■ Note Even if you specify an invalid file name or a non-existent file, no exceptions will be thrown immediately. An exception will be thrown when the Execute method attempts to update (modify) the OS. [Ex.
Execute Executes the OS update. ■ Syntax [VB] Public Sub Execute() [C#] public void Execute() ■ Parameters None ■ Return value None ■ Exceptions Name of Exception FileNotFoundException ArgumentException ■ Meaning The file specified by FileName does not exist. The specified file name is invalid. The specified mode is invalid. Note Before calling this method to update the OS, it is necessary to restart the BHT using the PwrMng.Shutdown (EN_SHUTDOWN_MODE.SYSMODIFY) method. [Ex.
[C#] MySysMod.FileName = @“\SysModification\BHT200New.zl”; MySysMod.Mode = SysModification.EN_MODE.POWEROFF; MySysMod.
EN_MODE Specifies the operation mode to be entered after updating the OS. ■ Syntax [VB] Public Enum EN_MODE [C#] public enum EN_MODE ■ ■ Members Member Name Description POWEROFF Power OFF (The system will be cold-booted next time it is turned ON.) Class Within BHTCL.
18.29. Registry Constructor None There is no need to create an instance because all the members are static members. Fields None Properties None Methods Method Name Save Description Saves the registry to the FLASH memory.
Save Saves the registry to the FLASH memory. ■ Syntax [VB] Public Shared Sub Save() [C#] public static void Save(); ■ Parameters None ■ Return value None ■ Exceptions Name of Exception Meaning MissingMethodException Registry save function not supported. ■ Note This is not supported on units running on Windows CE 4.1 or 4.2. An exception is thrown when executed. [Ex.] Saving the registry [VB] Registry.Save [C#] Registry.
18.30. CommSerial Constructor Constructor Name CommSerial Description Creates a new instance of the CommSerial class. Fields Field Name DEFAULT_PORT Description Default value for the COM port to be used Properties Property Name WaitEvent SignaledEvent InBufferCount OutBufferCount PortOpen Port Params Description Specifies a wait event. Acquires the event that has occurred.
CommSerial Initializes a new instance of the CommSerial class. ■ Syntax [VB] Public Sub New( ) [C#] public CommSerial( ) ■ Parameters None ■ Exceptions None [Ex.] Create a MyComm CommSerial instance.
DEFAULT_PORT Default value of the port number. This value is read-only.
WaitEvent Sets or acquires the event to wait for. ■ Syntax [VB] Public Property WaitEvent As EN_EVENT [C#] public EN_EVENT WaitEvent {get; set;} ■ Property Event to wait for Parameter values: As listed in EN_EVENT Default value: EN_EVENT.NONE ■ Exceptions Name of Exception ObjectDisposedException ArgumentException ■ Meaning COM has not been opened yet. The specified parameter value(s) lies outside the permissible range. Note The parameter value will always be EN_EVENT.
SignaledEvent Acquires the last serial communication event that occurred. ■ Syntax [VB] Public ReadOnly Property SignaledEvent As EN_EVENT [C#] public EN_EVENT SignaledEvent {get} ■ Property Event to wait for Parameter values: As listed in EN_EVENT Default value: EN_EVENT.NONE ■ Exceptions None ■ Note The parameter value will always be EN_EVENT.NONE while the port is closed. [Ex.] Acquire the last event that occurred. [VB] Dim CommSerial.EN_EVENT CommEvent = MyComm.
InBufferCount Acquires the size of meaningful data in the receive buffer (in buffer). ■ Syntax [VB] Public Property ReadOnly InBufferCount As Integer [C#] public int InBufferCount {get} ■ Property Size of meaningful data in the receive buffer (in buffer) (bytes) ■ Exceptions Name of Exception ObjectDisposedException ■ Meaning The COM port has not been opened yet.
OutBufferCount Acquires the size of meaningful data in the send buffer (out buffer). ■ Syntax [VB] Public Property ReadOnly OutBufferCount As Integer [C#] public int OutBufferCount {get} ■ Property Size of meaningful data in the send buffer (out buffer) (bytes) ■ Exceptions Name of Exception ObjectDisposedException ■ Meaning The COM port has not been opened yet. Note Data can be stored in the send buffer (out buffer) using the Output method.
PortOpen Opens/closes the COM port. ■ Syntax [VB] Public Property PortOpen As Boolean [C#] public bool PortOpen {get;set} ■ Property COM port status: Open (=True), Disabled (=False) Default value: False ■ Exceptions Name of Exception Meaning DevNotFoundException No COM port exists. ObjectDisposedException The COM port has not been opened (i.e., The COM port is closed). The COM port has already been opened. SecurityException [Ex.] Open the COM port. [VB] MyComm.PortOpen = True [C#] MyComm.
Port Specifies the COM port number. ■ Syntax [VB] Public Property Port As Integer [C#] public bool Port {get; set} ■ Property An integer indicating the port number Parameter value(s): 1: Connector interface, 4: IrDA Default value: 4 ■ ■ Exceptions Name of Exception Meaning InvalidOperationException The COM port is already open. Note If the value of this property is changed while COM port is open, an exception will be thrown.
Params Sets the following communication parameters in alphabetic characters: Baud rate, parity bit, data size, and stop bit ■ Syntax [VB] Public Property Params As String [C#] public string Params {get; set} ■ Property Character string representing the communication parameters Syntax : "BBBB,P,D,S" BBBB : BaudRate(bps) "115200","57600","38400","19200","9600","4800","2400","1200","600" (Connector interface) "115200","57600","38400","19200","9600" (IrDA) P : Parity "N": no parity bit D : Data size (bits)
■ Exceptions Name of Exception ObjectDisposedException ArgumentException Meaning The COM port has not been opened yet. The specified parameter value(s) lies outside the permissible range. [Ex.] Specify a baud rate of 115200 bps, set the parity to none, the data length to 8 bits, and the stop bit to 1 bit. [VB] MyComm.Params = "115200,N,8,1" [C#] MyComm.
Input Reads data from the receive buffer.
[Ex.] Read out all data remaining in the receive buffer. [VB] While MyComm.InBufferCount > 0 len = MyComm.Input(buffer, 0, buffer.Length) End While [C#] while (MyComm.InBufferCount > 0) { len = MyComm.Input(buffer, 0, buffer.
Output Writes data into the send buffer.
[Ex.] Send the len(byte) data when there is no longer any data in the send buffer. [VB] If MyComm.OutBufferCount = 0 Then MyComm.Output(buffer, 0, len) End If [C#] if (MyComm.OutBufferCount == 0) { MyComm.
Dispose Frees up all unmanaged resources. This function must be called before instances of the CommSerial class are no longer referenced. ■ Syntax [VB] Public Sub Dispose() [C#] public void Dispose() ■ Parameters None ■ Return value None ■ Exceptions None ■ Note This function must be called before instances of the CommSerial class are no longer referenced. [VB] Private Sub Form1_Closed(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Closed MyComm.
OnDone Occurs when a COM event has occurred. ■ Syntax [VB] Public Event OnDone As EventHandler [C#] public event EventHandler OnDone ■ Event data The Event Handler has received EventArgs type parameters. The second parameter EventArgs e is always System.EventArgs.Empty. To identify the type of the event that has occurred, retrieve SignaledEvent. [Ex.] Read out the data when a receive event occurs. [VB] Private Sub MyComm_OnDone(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyComm.
EN_EVENT Specifies the event type.
18.31. FileTransfer Constructor Constructor Name FileTransfer Description Creates a new instance of the FileTransfer class.
Events Event Name OnDone OnTransferring Description Occurs when transfer processing has been completed. Information on the file is stored during the transfer.
FileTransfer Initializes a new instance of the FileTransfer class. ■ Syntax [VB] Public Sub New( ) [C#] public FileTransfer( ) ■ Parameters None ■ Exceptions None [Ex.] Create a FileTransfer class instance. [VB] Dim MyFileTransfer As FileTransfer = New FileTransfer [C#] FileTransfer MyFileTransfer = new FileTransfer(); DEFAULT_PORT Default value of the port number. This value is read-only.
Port Sets the COM port number. ■ Syntax [VB] Public Property Port As Integer [C#] public int Port {get; set} ■ Property COM port number Parameter value(s): 1: Connector interface, 4: IrDA Default value: 4 ■ ■ Exceptions Name of Exception Meaning InvalidOperationException The COM port is already open. Note If the value of this property is changed while COM port is open, an exception will be thrown.
Baud Sets the communication rate. ■ Syntax [VB] Public Property Baud As EN_BAUD [C#] public EN_BAUD Baud {get; set} ■ Property Communication rate. Parameter values: As listed in EN_BAUD BPS300, BPS600, BPS1200, BPS2400, BPS4800, BPS9600, BPS19200, BPS38400, BPS57600, BPS115200 (connector interface communication) BPS9600, BPS19200, BPS38400, BPS57600, BPS115200 (IrDA communication) Default value: ■ EN_BAUD.
Parity Specifies the parity scheme to be used. ■ Syntax [VB] Public Property Parity As EN_PARITY [C#] public EN_PARITY Parity {get; set} ■ Property Parity Parameter values: As listed in EN_PARITY NOPARITY, ODDPARITY, EVENPARITY (connector interface communication) NOPARITY (IrDA communication) Default value: EN_PARITY.NOPARITY ■ Exceptions None ■ Note The value specified for this property will be valid the next time a send or receive operation is performed.
StopBits Specifies the number of stop bits to be used. ■ Syntax [VB] Public Property StopBits As EN_STOPBITS [C#] public EN_STOPBITS StopBits {get; set} ■ Property Stop bits Parameter values: As listed in EN_STOPBITS ONEBIT, TWOBITS (connector interface communication) ONEBIT (IrDA communication) Default value: ■ EN_STOPBITS. ONEBIT Exceptions None ■ Note The value specified for this property will be valid the next time a send or receive operation is performed.
Path Specifies the folder in which the send file or receive file is [to be] located. ■ Syntax [VB] Public Property Path As String [C#] public string Path {get; set} ■ Property Absolute path Default value: @"\" Maximum length: 259 characters (including the path name and the file name) ■ Exceptions Name of Exception PathTooLongException ■ Meaning The path name is too long. Note The value specified for this property will be valid the next time a send or receive operation is performed.
TransferringEventInterval Sets the interval for creating transferring events (OnTransferring). ■ Syntax [VB] Public Property TransferringEventInterval As Integer [C#] public int TransferringEventInterval {get; set} ■ Property Event interval (in units of 100 msec) Parameter values: 0 and above, but less than System.Int32.MaxValue Default value: 0 0: No event will occur.
Status Acquires the file transfer status. ■ Syntax [VB] Public ReadOnly Property Status As EN_STATUS [C#] public EN_STATUS Status {get; } ■ Property File transfer status Parameter values: as listed in EN_STATUS Default value: EN_STATUS.READY ■ Exceptions None [Ex.] Acquire the file transfer status. [VB] Dim Status As FileTransfer.EN_STATUS = MyFileTransfer.Status [C#] FileTransfer.EN_STATUS Status = MyFileTransfer.
FileCount Acquires the file number of the file being transferred. ■ Syntax [VB] Public ReadOnly Property FileCount As Integer [C#] public int FileCount {get; } ■ Property File number. (A serial number starting with the first file transferred as file number 1.) Default value: 0 ■ Exceptions None [Ex.] Acquire the number of the file currently being sent. [VB] Dim Number As Integer = MyFileTransfer.FileCount [C#] int Number = MyFileTransfer.
AddFile Adds a file to be transferred. ■ Syntax [VB] Public Sub AddFile(ByVal fileName As String) [C#] public void AddFile(string fileName); ■ Parameters fileName [in] Name of the file to be added (This should not include the path.) Maximum length: 90 characters ■ Return value None ■ Exceptions Name of Exception ArgumentException PathTooLongException Meaning The length of the specified file name was zero (0). The specified file name is too long. [Ex.] Add "Mydoc.txt" to the file to be sent.
ClearFile Clears the contents of the file that was added by AddFile. ■ Syntax [VB] Public Sub ClearFile() [C#] public void ClearFile(); ■ Parameters None ■ Return value None ■ Exceptions None [Ex.] Clear the file to be sent. [VB] MyFileTransfer.ClearFile() [C#] MyFileTransfer.
Input Receives a file. ■ Syntax [VB] Public Sub Input() [C#] public void Input(); ■ Parameters None ■ Return value None ■ Exceptions Name of Exception SecurityException DeviceNotFoundException Meaning The port has already opened by another application. The COM port specified at Port does not exist. [Ex.] Receive a file. [VB] MyFileTransfer.Input() [C#] MyFileTransfer.
Output Sends the contents of the file that was specified by AddFile. ■ Syntax [VB] Public Sub Output() [C#] public void Output(); ■ Parameters None ■ Return value None ■ Exceptions Name of Exception SecurityException DeviceNotFoundException ArgumentNullException PathTooLongException Meaning The port has already opened by another application. The COM port specified at Port does not exist. The file has not been added by AddFile.
Abort Aborts the file transfer that is already in progress. ■ Syntax [VB] Public Sub Abort() [C#] public void Abort(); ■ Parameters None ■ Return value None ■ Exceptions None ■ Note Execution of this method will result in an OnDone event after file transfer has been aborted. [Ex.] Interrupt file transfer. [VB] MyFileTransfer.Abort() [C#] MyFileTransfer.
Dispose Frees up all unmanaged resources. This function must be called before instances of the FileTransfer class are no longer referenced. ■ Syntax [VB] Public Sub Dispose() [C#] public void Dispose() ■ Parameters None ■ Return value None ■ Exceptions None ■ Note This function must be called before instances of the FileTransfer class are no longer referenced. [VB] Private Sub Form1_Closed(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Closed MyTransfer.
OnDone Occurs when a transfer operation is complete. ■ Syntax [VB] Public Event OnDone As TransferredHandler [C#] public event TransferredHandler OnDone ■ Event data The Event Handler has received TransferredEventArgs type parameters. One of the values listed in EN_Result will be stored in Result, the member of the second parameter TransferredEventArgs e. [Ex.] Display the event type that occurred each time a transfer event occurs.
OnTransferring Information on the file being transferred will be entered. ■ Syntax [VB] Public Event OnTransferring As TransferringHandler [C#] public event TransferringHandler OnTransferring ■ Event data The Event Handler has received TransferringEventArgs type parameters. The name and size of the file being transferred and the amount of the data that has already been transferred will be stored in TransferringFileInfo, the member of the second parameter TransferringEventArgs e. [Ex.
EN_BAUD Specifies the communication rate.
EN_PARITY Specifies the parity scheme.
EN_STOPBITS Specifies the stop bits.
EN_STATUS Specifies the file transfer status.
EN_RESULT Specifies the results of the file transfer. ■ Syntax [VB] Public Enum EN_RESULT [C#] public enum EN_RESULT ■ ■ Members Member Name Description SUCCESS The file transfer was successfully completed TIMEOUT Timeout OPERATION_ ABORTED OPEN_FAILED The operation was aborted The file could not be opened. INVALID_DATA Invalid data has been received. DISK_FULL The disk storage was full and did not have enough space. PATH_TOO_LONG The path length was too long.
Appendix A. Keyboard Arrangements, Virtual Key Codes and Character Codes Appendix A.1. Appendix A.1.1. 26-key Pad Keyboard Arrangement M3(H) M4(H) ↑ M1 Clr BS F1 F2 ← → M2 ALP ↓ 7 4 1 0 8 5 2 . 9 6 3 SF F3 F4 ENT Appendix A.1.2. Virtual Key Codes and Character Codes Key [F1] [F2] [F3] [F4] [9] [8] [7] [6] [5] [4] [3] [2] [1] [0] [.
Appendix A.1.3. Character Codes in Alphabet Entry Mode Depression Key [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [.] 1st 2nd 3rd 4th 5th 6th 7th '-' 'S' 'V' 'Y' 'J' 'M' 'P' 'A' 'D' 'G' ',' '%' 'T' 'W' 'Z' 'K' 'N' 'Q' 'B' 'E' 'H' '/' '$' 'U' 'X' '+' 'L' 'O' 'R' 'C' 'F' 'I' '' (Space) '\' 's' 'v' 'y' 'j 'm' 'p' 'a' 'd 'g (*1) (*1) 't' 'w' 'z' 'k 'n' 'q' 'b' 'e 'h 'u' 'x' (*1) 'l' 'o' 'r' 'c' 'f' 'i' (*1) (*1) (*1):Returns to the 1st letter.
Appendix A.2. Appendix A.2.1. 30-key Pad Keyboard Arrangement M3(H) F1 F2 M1 BS *1 SF M2 ↑ ↓ ← → 7 8 M4(H) F6 F7 9 F3 F8 F4 F5 4 5 6 1 2 3 0 . ENT F9 F0 M5(H) Keys M3H, M4H, and M5H are pushed in halfway. Appendix A.2.2. Virtual Key Codes and Character Codes Key [F1] [F2] [F3] [F4] [F5] [F6] [F7] [F8] [F9] [F0] [9] [8] [7] [6] [5] [4] [3] [2] [1] [0] [.
Appendix B. Class Backlight.Settings RF Differences Between Units Running Windows CE 4.x and Windows CE 5.x Item Member PowerSave OpenMode Controller EditMode SelectedProfile Not supported Not supported Not supported Not supported Not supported OS Version CE4.
BHT-200-CE Class Library Reference Manual November, 2006 DENSO WAVE INCORPORATED 5th Release Automatic Data Capture Division - 375 -