CsCom Service / CsComSvc

Contents


I Product Description

CSCom is a Windows software that allows to download captured barcodes from a Symbol Technologies (Motorola) CS1504 "keychain memory barcode scanner" to a PC.
CSCom is a Windows Service agent that works in background without any user interaction. The contents of the CS1504 is copied into a text file (with a timestamp name) in a configured directory.
Data transfer is performed through a serial port.
Configuration is done by a "dot-ini" file. This configuration file will be modified by a standard text editor, or by IniEditor included with the installation package.

To get CS1504 data you need to :


II Installation

II.1 Installation Procedure

An MSI installation package allows to install program in the PC. A folder contains program, help and configuration file CsComSvc.ini
Default directory is "X:\Program Files\SofToGo\CsCom.
Installation program will create an independent CsComSvc service for each available COMX: port in the target computer (PC). This service is created with a Manual "Startup Type". You should turn the "Startup Type" to Automatic for the designated COMx: port you wont to CsCom works. This changes will be performed with the Windows service administrator, located (depending on Windows version)  in "Settings / Administrative Tools / Services".

II.2 Service Administration

Locate the service using the selected COMX: port.

Click on service to set it as Automatic, and you may start it too.


III Starting / Stopping, Downloading

III.1 Starting / Stopping

If needed you will start or stop CsCom program. Normally, CsCom is automatically started as service with the system, and stopped when system goes down.
This changes will be performed with the Windows service administrator, located (depending on Windows version)  in "Settings / Administrative Tools / Services".

III.2 Downloading

To download data from CS1504 device you need :


IV Configuration File

Default directory is "X:\Program Files\SofToGo\CsCom. The configuration file is stored in the same directory as program executable file (.exe).
Configuration file name is CsComSvc.ini.
Configuration file will be modified by IniEditor utility (CsComSvc.iniedit)

Configuration file uses as many tasks as COMX: ports host PC system has. Each task is a section in the file. Usually [TASK01] should use COM1: port, and so on.

[TASK01]
Port=01
FileDir=c:\temp
FilePrefix=CS15_
FileDateTime=1
FileExtension=.txt
DataCodeType=1
DataTimeStamp=1
DataTimeFormat=%Y-%m-%d %H:%M:%S
CodeTypeFormat=A
DataSeparator=009
LogName=CsComLog.log

[TASKxx]
Task number. [TASK01] configuration section is used by "CsConSvc-SofToGo COM01" service, Task number. [TASK02] configuration section is used by "CsConSvc-SofToGo COM02" service, and so on.
[TASK01] should use COM1: port, [TASK02] should use COM2: port, and so on.

Port=01
Port number to use (01-09). [TASK01] should use COM1: port, [TASK02] should use COM2: port, and so on.
Numeric from 01 to 09.

FileDir=c:\temp
Data and log file storage directory. This directory MUST exists in the PC.
String up to 128 characters.

FilePrefix=CS15_
Data file name prefix. See "Data File name building".
If the string is empty, no prefix is added.
String up to 32 characters, Use only accepted "file name" characters. 

FileDateTime=1
Allows to use the system date and time to build file name. See "Data File name building".
1= Use system date and time in data file name.
0= Do not use system date and time in data file name.
Numeric 0 or 1.

FileExtension=.txt
File extension for the data file name. See "Data File name building".
If empty no file extension is added. If file extension do not begins by "." a "." is added before the string.
String up to 32 characters, Use only accepted "file name" characters. 

DataCodeType=1
Allows to add the barcode read type to the collected data record. See "Data File record Format"
1= Adds the barcode type.
0= Do not add the barcode type.
Numeric 0 or 1.

DataTimeStamp=1
Allows to add the reading date and time to the collected data record. See "Data File record Format".
1= Adds date and time.
0= Do not add date and time.
Numeric 0 or 1.

DataTimeFormat=%Y-%m-%d %H:%M:%S
The format of the date and time used to set the timestamp field in the collected data record. See "Data File record Format" and DataTimeFormat Modifiers
This option is needed if DataTimeStamp is set to 1.
String up to 32 characters.

CodeTypeFormat=A
The format of the barcode type in the data record. See "Data File record Format".
This option is needed if DataCodeType is set to 1.
A= Alphabetic format for bar code type identifier (i./e. "CODE 128").
N= Numeric format for bar code type.
One character string.

DataSeparator=009
Data separator character used to separate fields in the data file record.
May be any character from 001 to 255. may be as numeric format (001-255) or string format as a character (i./e. "," for a comma).
0, or empty value means "No separator".

LogName=CsComLog.log
Log file name (w/o directory).  Log file is located in working directory denoted by the FileDir configuration file option.
The file where the data download activity will be logged. See "Log File".
If this value is empty, means that no log is performed.


V Log File

Log file is located in working directory denoted by the FileDir configuration file option.
The log file contains one record for each successful download 
The name is set by the LogName configuration file option. ( LogName=CsComLog.log) 

The format will be :

2007-01-19;11:46:10;2;c:\temp\CS15_2007-01-19_11-46-08_512_4155704576.txt
2007-01-19;15:22:11;7;c:\temp\CS15_2007-01-19_15-22-11_512_4155704576.txt

Field Date Field Separator Time Field Separator Number of
Records
Field Separator File name End of record separator
Format YYYY-MM-DD ; HH:MM:SS ; Numeric ; Full path and file name (0x0D+0x0A) CR/LF.

VI Data File

VI.1 Data File name building

Related configuration file values are :
FileDir=c:\temp
FilePrefix=CS15_
FileDateTime=1
FileExtension=.txt

Data file name is composed by <Directory><File Prefix><File name timestamp><DeviceID_DeviceNumber><Barcode><File Extension>
i./e. CS15_2007-01-25_09-52-17_512_4155704576.txt

Field Directory File Prefix File name timestamp, if requested CS15xx unique Device identification File Extension
Configuration File
Variable
  FilePrefix FileDateTime   FileExtension
Description
Format
Disk and path
SHOULD exist
PPP... YYYY-MM-DD_HH-MM-SS_ DeviceID_DeviceNumber
III_NNNNNNNN
.XXX...

VI.2 Data File record Format

Related configuration file values are :
DataCodeType=1
DataTimeStamp=1
DataTimeFormat=%Y-%d-%m %H:%M:%S
CodeTypeFormat=A
DataSeparator=009

Data record is composed by <Barcode Type><Separator><Record Time Stamp><Separator><Barcode><Record Terminator>

Field Barcode Type Separator Record Time Stamp Separator Barcode Record
Terminator
Configuration File
Variable
DataCodeType
CodeTypeFormat
DataSeparator DataTimeStamp
DataTimeFormat
DataSeparator    
Condition If DataCodeType <> 0 If DataSeparator <> 0,
If Barcode type exists.
If DataTimeStamp <> 0 DataSeparator <> 0,
If Record Time stamp exists.
Always Always
Description
Format
Numeric (NN) or
Alphabetic (Name) 
depending on 
CodeTypeFormat
One character,
Numeric or Alpha
Following  DataTimeFormat
By Default :
YYYY-MM-DD_HH-MM-SS_
One character,
Numeric or Alpha
Barcode value (0x0D+0x0A) CR/LF.

VI.3 DataTimeFormat Modifiers.

DataTimeFormat value option is a string of constants and modifiers, allowing to configure accurately the date and time format.

The default value is : "DataTimeFormat=%Y-%m-%d %H:%M:%S" This value will produces an output of "2007-15-01 08:30:15" for the 15 January 2007 at 8h30 AM.
The value of : "DataTimeFormat=%m/%d/%Y/_%H-%M-%S" This value will produces an output of "01/15/2007_08-30-15" for the 15 January 2007 at 8h30 AM.

%a  Abbreviated weekday name
%A  Full weekday name
%b Abbreviated month name
%B Full month name
%c Date and time representation appropriate for locale
%d Day of month as decimal number (01-31)
%H Hour in 24-hour format (00-23)
%I Hour in 12-hour format (01-12)
%j Day of year as decimal number (001-366)
%m Month as decimal number (01-12)
%M Minute as decimal number (00-59)
%p Current locales A.M./P.M. indicator for 12-hour clock

%S

Second as decimal number (00-59)
%U Week of year as decimal number, with Sunday as first day of week (00-53)
%w Weekday as decimal number (0-6; Sunday is 0)
%W Week of year as decimal number, with Monday as first day of week (00-53)
%x

Date representation for current locale

%X Time representation for current locale
%y Year without century, as decimal number (00-99)
%Y Year with century, as decimal number
%z, %Z Time-zone name or abbreviation; no characters if time zone is unknown
%% Percent sign

As in the printf function, the # flag may prefix any formatting code. In that case, the meaning of the format code is changed as follows.

Format Code Meaning
%#a, %#A, %#b, %#B, %#p, %#X, %#z, %#Z, %#% # flag is ignored.
%#c Long date and time representation, appropriate for current locale. For example: Tuesday, March 14, 1995, 12:41:29.
%#x Long date representation, appropriate to current locale. For example: Tuesday, March 14, 1995.
%#d, %#H, %#I, %#j, %#m, %#M, %#S, %#U, %#w, %#W, %#y, %#Y Remove leading zeros (if any).