Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
kravtsov
opos
Commits
14762fad
Commit
14762fad
authored
May 30, 2018
by
kravtsov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[-] Исправлены некоторые ошибки
parent
b2474061
Changes
154
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
75 changed files
with
1037 additions
and
1012 deletions
+1037
-1012
History.txt
History.txt
+7
-0
Setup/Setup_template.iss
Setup/Setup_template.iss
+7
-28
Setup/Setup_template2.iss
Setup/Setup_template2.iss
+108
-0
Source/Opos/OposCashUtils.pas
Source/Opos/OposCashUtils.pas
+4
-4
Source/Opos/OposDevice.pas
Source/Opos/OposDevice.pas
+4
-4
Source/Opos/OposPtrUtils.pas
Source/Opos/OposPtrUtils.pas
+4
-4
Source/Opos/OposScalUtils.pas
Source/Opos/OposScalUtils.pas
+6
-6
Source/Opos/OposSemaphore.pas
Source/Opos/OposSemaphore.pas
+6
-6
Source/Opos/OposServiceDevice19.pas
Source/Opos/OposServiceDevice19.pas
+27
-27
Source/Opos/OposStatistics.pas
Source/Opos/OposStatistics.pas
+45
-45
Source/Opos/Semaphore.pas
Source/Opos/Semaphore.pas
+4
-4
Source/OposConfig/Fmu/fmuFptrBarcode.pas
Source/OposConfig/Fmu/fmuFptrBarcode.pas
+1
-1
Source/OposConfig/Fmu/fmuPages.pas
Source/OposConfig/Fmu/fmuPages.pas
+1
-1
Source/OposConfig/OposConfig.dof
Source/OposConfig/OposConfig.dof
+2
-2
Source/OposConfig/OposConfig.dpr
Source/OposConfig/OposConfig.dpr
+0
-1
Source/OposConfig/OposConfig.rc
Source/OposConfig/OposConfig.rc
+3
-3
Source/OposConfig/OposConfig.res
Source/OposConfig/OposConfig.res
+0
-0
Source/OposShtrih.dsk
Source/OposShtrih.dsk
+26
-32
Source/OposTest/Fmu/fmuAbout.pas
Source/OposTest/Fmu/fmuAbout.pas
+6
-6
Source/OposTest/Fmu/fmuCashDrawer.pas
Source/OposTest/Fmu/fmuCashDrawer.pas
+1
-1
Source/OposTest/Fmu/fmuCashGeneral.pas
Source/OposTest/Fmu/fmuCashGeneral.pas
+2
-2
Source/OposTest/Fmu/fmuFiscalPrinter.pas
Source/OposTest/Fmu/fmuFiscalPrinter.pas
+1
-1
Source/OposTest/Fmu/fmuFptrDirectIO.pas
Source/OposTest/Fmu/fmuFptrDirectIO.pas
+1
-1
Source/OposTest/Fmu/fmuFptrDirectIOBarcode.pas
Source/OposTest/Fmu/fmuFptrDirectIOBarcode.pas
+8
-8
Source/OposTest/Fmu/fmuFptrDirectIOStr.pas
Source/OposTest/Fmu/fmuFptrDirectIOStr.pas
+3
-3
Source/OposTest/Fmu/fmuFptrEvents.pas
Source/OposTest/Fmu/fmuFptrEvents.pas
+7
-7
Source/OposTest/Fmu/fmuFptrFiscalStorage.pas
Source/OposTest/Fmu/fmuFptrFiscalStorage.pas
+1
-1
Source/OposTest/Fmu/fmuFptrFroudReceipt.pas
Source/OposTest/Fmu/fmuFptrFroudReceipt.pas
+2
-2
Source/OposTest/Fmu/fmuFptrInfo.pas
Source/OposTest/Fmu/fmuFptrInfo.pas
+7
-7
Source/OposTest/Fmu/fmuFptrMonitoring.pas
Source/OposTest/Fmu/fmuFptrMonitoring.pas
+1
-1
Source/OposTest/Fmu/fmuFptrProperties.pas
Source/OposTest/Fmu/fmuFptrProperties.pas
+6
-6
Source/OposTest/Fmu/fmuFptrReceipt.pas
Source/OposTest/Fmu/fmuFptrReceipt.pas
+2
-2
Source/OposTest/Fmu/fmuFptrSetHeaderTrailer.pas
Source/OposTest/Fmu/fmuFptrSetHeaderTrailer.pas
+3
-3
Source/OposTest/Fmu/fmuFptrTest.pas
Source/OposTest/Fmu/fmuFptrTest.pas
+3
-3
Source/OposTest/Fmu/fmuFptrTest2.pas
Source/OposTest/Fmu/fmuFptrTest2.pas
+3
-3
Source/OposTest/Fmu/fmuFptrThreadTest.pas
Source/OposTest/Fmu/fmuFptrThreadTest.pas
+4
-4
Source/OposTest/Fmu/fmuMalina.pas
Source/OposTest/Fmu/fmuMalina.pas
+2
-2
Source/OposTest/Fmu/fmuPosPrinter.pas
Source/OposTest/Fmu/fmuPosPrinter.pas
+1
-1
Source/OposTest/Fmu/fmuScale.pas
Source/OposTest/Fmu/fmuScale.pas
+1
-1
Source/OposTest/Fmu/fmuScaleGeneral.pas
Source/OposTest/Fmu/fmuScaleGeneral.pas
+5
-5
Source/OposTest/Fmu/fmuScaleProperties.pas
Source/OposTest/Fmu/fmuScaleProperties.pas
+4
-4
Source/OposTest/Fmu/fmuTankReport.pas
Source/OposTest/Fmu/fmuTankReport.pas
+1
-1
Source/OposTest/Fmu/fmuTextBlock.pas
Source/OposTest/Fmu/fmuTextBlock.pas
+2
-2
Source/OposTest/OposTest.dof
Source/OposTest/OposTest.dof
+2
-2
Source/OposTest/OposTest.rc
Source/OposTest/OposTest.rc
+3
-3
Source/OposTest/OposTest.res
Source/OposTest/OposTest.res
+0
-0
Source/OposTest/Units/AlignStrings.pas
Source/OposTest/Units/AlignStrings.pas
+3
-3
Source/OposTest/Units/DIODescription.pas
Source/OposTest/Units/DIODescription.pas
+2
-3
Source/OposTest/Units/DriverTest.pas
Source/OposTest/Units/DriverTest.pas
+6
-6
Source/OposTest/Units/OPOSDate.pas
Source/OposTest/Units/OPOSDate.pas
+4
-4
Source/OposTest/Units/PrinterTest.pas
Source/OposTest/Units/PrinterTest.pas
+208
-208
Source/OposTest/Units/untPages.pas
Source/OposTest/Units/untPages.pas
+4
-4
Source/OposTest/Units/untUtil.pas
Source/OposTest/Units/untUtil.pas
+8
-8
Source/Shared/BStdUtil.pas
Source/Shared/BStdUtil.pas
+2
-2
Source/Shared/BStrUtil.pas
Source/Shared/BStrUtil.pas
+60
-60
Source/Shared/ByteUtils.pas
Source/Shared/ByteUtils.pas
+2
-2
Source/Shared/ClassLogger.pas
Source/Shared/ClassLogger.pas
+28
-28
Source/Shared/DIOHandlers.pas
Source/Shared/DIOHandlers.pas
+13
-13
Source/Shared/DebugUtils.pas
Source/Shared/DebugUtils.pas
+3
-3
Source/Shared/FileUtils.pas
Source/Shared/FileUtils.pas
+4
-4
Source/Shared/LangUtils.pas
Source/Shared/LangUtils.pas
+11
-11
Source/Shared/LogFile.pas
Source/Shared/LogFile.pas
+111
-111
Source/Shared/PortUtil.pas
Source/Shared/PortUtil.pas
+4
-4
Source/Shared/SerialPort.pas
Source/Shared/SerialPort.pas
+17
-17
Source/Shared/ServiceVersion.pas
Source/Shared/ServiceVersion.pas
+1
-1
Source/Shared/StringUtils.pas
Source/Shared/StringUtils.pas
+44
-44
Source/Shared/TextReport.pas
Source/Shared/TextReport.pas
+5
-5
Source/Shared/TlvSender.pas
Source/Shared/TlvSender.pas
+0
-149
Source/Shared/TlvSenderStatic.pas
Source/Shared/TlvSenderStatic.pas
+0
-47
Source/Shared/XMLParser.pas
Source/Shared/XMLParser.pas
+1
-1
Source/SmFiscalPrinter/FiscalPrinter.ini
Source/SmFiscalPrinter/FiscalPrinter.ini
+135
-0
Source/SmFiscalPrinter/SmFiscalPrinter.rc
Source/SmFiscalPrinter/SmFiscalPrinter.rc
+3
-3
Source/SmFiscalPrinter/SmFiscalPrinter.res
Source/SmFiscalPrinter/SmFiscalPrinter.res
+0
-0
Source/SmFiscalPrinter/Units/AntiFroudFilter.pas
Source/SmFiscalPrinter/Units/AntiFroudFilter.pas
+8
-8
Source/SmFiscalPrinter/Units/BinStream.pas
Source/SmFiscalPrinter/Units/BinStream.pas
+13
-13
No files found.
History.txt
View file @
14762fad
...
...
@@ -4,6 +4,13 @@
Company : SHTRIH-M, Russia, Moscow, Masterkova 4
(495) 787-60-90, www.shtrih-m.ru
*******************************************************************
OposShtrih_1.13_492.exe
30 мая 2018 16:40
[-] Исправлены некоторые ошибки
*******************************************************************
OposShtrih_1.13_491.exe
...
...
Setup/Setup_template.iss
View file @
14762fad
[CustomMessages]
; Russian
ru.AppName="-: OPOS "
ru.AppVerName="-: OPOS ${version2}"
ru.AppPublisher=-
ru.AppCopyright="Copyright, 2018 -"
ru.VersionInfoCompany="-"
ru.VersionInfoDescription="OPOS "
; English
en.AppName="SHTRIH-M: OPOS fiscal printer driver"
en.AppVerName="SHTRIH-M: OPOS fiscal printer driver ${version2}"
en.AppPublisher=SHTRIH-M
en.AppCopyright="Copyright, 2018 SHTRIH-M"
en.VersionInfoCompany="SHTRIH-M"
en.VersionInfoDescription="OPOS fiscal printer driver"
[Setup]
AppName= {cm:AppName}
AppVerName= {cm:AppVerName}
AppPublisher= {cm:AppPublisher}
AppCopyright= {cm:AppCopyright}
VersionInfoCompany= {cm:VersionInfoCompany}
VersionInfoDescription= {cm:VersionInfoDescription}
AppName="SHTRIH-M: OPOS fiscal printer driver"
AppVerName="SHTRIH-M: OPOS fiscal printer driver ${version2}"
AppPublisher=SHTRIH-M
AppCopyright="Copyright, 2018 SHTRIH-M"
VersionInfoCompany="SHTRIH-M"
VersionInfoDescription="OPOS fiscal printer driver"
AppVersion=${version2}
AppPublisherURL=http://www.shtrih-m.ru
AppSupportURL=http://www.shtrih-m.ru
...
...
@@ -33,7 +17,6 @@ VersionInfoVersion=${version}
DefaultDirName= {pf}\OPOS\SHTRIH-M\
DefaultGroupName=OPOS\SHTRIH-M\
UninstallDisplayIcon= {app}\Uninstall.exe
UsePreviousLanguage=No
AllowNoIcons=Yes
OutputDir="."
[Setup]
...
...
@@ -41,16 +24,12 @@ OutputBaseFilename=Setup
[Components]
Name: "main"; Description: "Driver files"; Types: full compact custom; Flags: fixed
Name: "source"; Description: "Samples and source code";
[Languages]
Name: "en"; MessagesFile: "compiler:Default.isl"
Name: "ru"; MessagesFile: "compiler:Languages\Russian.isl"
[Files]
; Version history
Source: "History.txt"; DestDir: "{app}"; Flags: ignoreversion; components: main;
; Localization params
Source: "Setup\locales\SmFiscalPrinter.mo"; DestDir: "{app}\locale\en\LC_MESSAGES\"; Flags: 32bit; Components: main
Source: "Setup\Locales\ru\locale.ini"; DestDir: "{userappdata}\SHTRIH-M\OposShtrih"; DestName: "locale.ini"; Flags: 32bit; Components: main; Languages: ru
Source: "Setup\Locales\en\locale.ini"; DestDir: "{userappdata}\SHTRIH-M\OposShtrih"; DestName: "locale.ini"; Flags: 32bit; Components: main; Languages: en
Source: "Setup\Locales\ru\locale.ini"; DestDir: "{userappdata}\SHTRIH-M\OposShtrih"; DestName: "locale.ini"; Flags: 32bit; Components: main;
; Logo files
Source: "Setup\Logo\*.*"; DestDir: "{app}\Bin\Logo"; Flags: ignoreversion; components: main;
; Drivers
...
...
Setup/Setup_template2.iss
0 → 100644
View file @
14762fad
[CustomMessages]
; Russian
ru.AppName="-: OPOS "
ru.AppVerName="-: OPOS ${version2}"
ru.AppPublisher=-
ru.AppCopyright="Copyright, 2018 -"
ru.VersionInfoCompany="-"
ru.VersionInfoDescription="OPOS "
; English
en.AppName="SHTRIH-M: OPOS fiscal printer driver"
en.AppVerName="SHTRIH-M: OPOS fiscal printer driver ${version2}"
en.AppPublisher=SHTRIH-M
en.AppCopyright="Copyright, 2018 SHTRIH-M"
en.VersionInfoCompany="SHTRIH-M"
en.VersionInfoDescription="OPOS fiscal printer driver"
[Setup]
AppName= {cm:AppName}
AppVerName= {cm:AppVerName}
AppPublisher= {cm:AppPublisher}
AppCopyright= {cm:AppCopyright}
VersionInfoCompany= {cm:VersionInfoCompany}
VersionInfoDescription= {cm:VersionInfoDescription}
AppVersion=${version2}
AppPublisherURL=http://www.shtrih-m.ru
AppSupportURL=http://www.shtrih-m.ru
AppUpdatesURL=http://www.shtrih-m.ru
AppContact=.(495) 787-6090
AppReadmeFile=History.txt
;
VersionInfoTextVersion="${version}"
VersionInfoVersion=${version}
DefaultDirName= {pf}\OPOS\SHTRIH-M\
DefaultGroupName=OPOS\SHTRIH-M\
UninstallDisplayIcon= {app}\Uninstall.exe
UsePreviousLanguage=No
AllowNoIcons=Yes
OutputDir="."
[Setup]
OutputBaseFilename=Setup
[Components]
Name: "main"; Description: "Driver files"; Types: full compact custom; Flags: fixed
Name: "source"; Description: "Samples and source code";
[Languages]
Name: "en"; MessagesFile: "compiler:Default.isl"
Name: "ru"; MessagesFile: "compiler:Languages\Russian.isl"
[Files]
; Version history
Source: "History.txt"; DestDir: "{app}"; Flags: ignoreversion; components: main;
; Localization params
Source: "Setup\locales\SmFiscalPrinter.mo"; DestDir: "{app}\locale\en\LC_MESSAGES\"; Flags: 32bit; Components: main
Source: "Setup\Locales\ru\locale.ini"; DestDir: "{userappdata}\SHTRIH-M\OposShtrih"; DestName: "locale.ini"; Flags: 32bit; Components: main; Languages: ru
Source: "Setup\Locales\en\locale.ini"; DestDir: "{userappdata}\SHTRIH-M\OposShtrih"; DestName: "locale.ini"; Flags: 32bit; Components: main; Languages: en
; Logo files
Source: "Setup\Logo\*.*"; DestDir: "{app}\Bin\Logo"; Flags: ignoreversion; components: main;
; Drivers
Source: "Setup\zint.dll"; DestDir: "{app}\Bin"; Flags: ignoreversion; components: main;
Source: "Setup\zlib1.dll"; DestDir: "{app}\Bin"; Flags: ignoreversion; components: main;
Source: "Setup\libpng15.dll"; DestDir: "{app}\Bin"; Flags: ignoreversion; components: main;
Source: "Bin\SmScale.dll"; DestDir: "{app}\Bin"; Flags: ignoreversion regserver; components: main;
Source: "Bin\SmFiscalPrinter.dll"; DestDir: "{app}\Bin"; Flags: ignoreversion regserver; components: main;
;Source: "Bin\SmFiscalPrinter.RUS"; DestDir: "{app}\Bin"; Flags: ignoreversion; components: main;
; Print server
Source: "Bin\SmFptrSrv.exe"; DestDir: "{app}\Bin"; Flags: ignoreversion; components: main;
; Configuration utility
Source: "Bin\OposConfig.exe"; DestDir: "{app}\Bin"; Flags: ignoreversion; components: main;
; Test utility
Source: "Bin\OposTest.exe"; DestDir: "{app}\Bin"; Flags: ignoreversion; components: main;
Source: "Setup\Models.xml"; DestDir: "{app}\Bin"; Flags: ignoreversion; components: main;
Source: "Setup\Commands.xml"; DestDir: "{app}\Bin"; Flags: ignoreversion; components: main;
; Source code
Source: "Source\Script\*"; DestDir: "{app}\Source\Script"; Flags: createallsubdirs recursesubdirs; components: source;
Source: "Source\Opos\*"; DestDir: "{app}\Source\Opos"; Flags: createallsubdirs recursesubdirs; Excludes: "*.svn,*.exe,*.dll,*.dcu,*.rsm,*.xml"; components: source;
Source: "Source\OposTest\*"; DestDir: "{app}\Source\OposTest"; Flags: createallsubdirs recursesubdirs; Excludes: "*.svn,*.exe,*.dll,*.dcu,*.rsm,*.xml"; components: source;
Source: "Source\OposConfig\*"; DestDir: "{app}\Source\OposConfig"; Flags: createallsubdirs recursesubdirs; Excludes: "*.svn,*.exe,*.dll,*.dcu,*.rsm,*.xml"; components: source;
Source: "Source\SmFiscalPrinter\*"; DestDir: "{app}\Source\SmFiscalPrinter"; Flags: createallsubdirs recursesubdirs; Excludes: "*.svn,*.exe,*.dll,*.dcu,*.rsm,*.xml"; components: source;
Source: "Source\SmScale\*"; DestDir: "{app}\Source\SmScale"; Flags: createallsubdirs recursesubdirs; Excludes: "*.svn,*.exe,*.dll,*.dcu,*.rsm,*.xml"; components: source;
Source: "Source\Shared\*"; DestDir: "{app}\Source\Shared"; Flags: createallsubdirs recursesubdirs; Excludes: "*.svn,*.exe,*.dll,*.dcu,*.rsm,*.xml"; components: source;
Source: "Source\SmFptrSrv\*"; DestDir: "{app}\Source\SmFptrSrv"; Flags: createallsubdirs recursesubdirs; Excludes: "*.svn,*.exe,*.dll,*.dcu,*.rsm,*.xml"; components: source;
[Icons]
Name: "{group}\Version history"; Filename: "{app}\History.txt"; WorkingDir: "{app}";
Name: "{group}\Opos setup"; Filename: "{app}\Bin\OposConfig.exe"; WorkingDir: "{app}";
Name: "{group}\Opos test"; Filename: "{app}\Bin\OposTest.exe"; WorkingDir: "{app}";
Name: "{group}\Uninstall"; Filename: "{uninstallexe}"
[Registry]
; FiscalPrinter default device
Root: HKLM; Subkey: "SOFTWARE\OLEforRetail\ServiceOPOS\FiscalPrinter\SHTRIH-M-OPOS-1"; ValueType: string; ValueName: ""; ValueData: "OposShtrih.FiscalPrinter"; Flags: uninsdeletevalue;
; CashDrawer default device
Root: HKLM; Subkey: "SOFTWARE\OLEforRetail\ServiceOPOS\CashDrawer\SHTRIH-M-OPOS-1"; ValueType: string; ValueName: ""; ValueData: "OposShtrih.CashDrawer"; Flags: uninsdeletevalue;
Root: HKLM; Subkey: "SOFTWARE\OLEforRetail\ServiceOPOS\CashDrawer\SHTRIH-M-OPOS-1"; ValueType: string; ValueName: "FptrDeviceName"; ValueData: "SHTRIH-M-OPOS-1"; Flags: uninsdeletevalue;
; Scale
Root: HKLM; Subkey: "SOFTWARE\OLEforRetail\ServiceOPOS\Scale\SHTRIH-M-OPOS-1"; ValueType: string; ValueName: ""; ValueData: "OposShtrih.Scale"; Flags: uninsdeletevalue;
[UninstallDelete]
Type: files; Name: "{app}\*.log"
[Run]
Filename: "{app}\Bin\SmFptrSrv.exe"; Parameters: "/regserver"; Flags: nowait;
Source/Opos/OposCashUtils.pas
View file @
14762fad
...
...
@@ -8,12 +8,12 @@ uses
// Opos
OposUtils
,
OposCashhi
;
function
GetCashPropertyName
(
const
ID
:
Integer
):
s
tring
;
function
GetResultCodeExtendedText
(
Value
:
Integer
):
s
tring
;
function
GetCashPropertyName
(
const
ID
:
Integer
):
WideS
tring
;
function
GetResultCodeExtendedText
(
Value
:
Integer
):
WideS
tring
;
implementation
function
GetCashPropertyName
(
const
ID
:
Integer
):
s
tring
;
function
GetCashPropertyName
(
const
ID
:
Integer
):
WideS
tring
;
begin
case
ID
of
PIDXCash_DrawerOpened
:
Result
:=
'PIDXCash_DrawerOpened'
;
...
...
@@ -24,7 +24,7 @@ begin
end
;
end
;
function
GetResultCodeExtendedText
(
Value
:
Integer
):
s
tring
;
function
GetResultCodeExtendedText
(
Value
:
Integer
):
WideS
tring
;
begin
Result
:=
IntToStr
(
Value
);
end
;
...
...
Source/Opos/OposDevice.pas
View file @
14762fad
...
...
@@ -68,22 +68,22 @@ type
property
DeviceName
:
WideString
read
FDeviceName
write
FDeviceName
;
end
;
function
CLSIDToFileName
(
const
CLSID
:
TGUID
):
String
;
function
CLSIDToFileName
(
const
CLSID
:
TGUID
):
Wide
String
;
function
ProgIDToFileName
(
const
ProgID
:
WideString
):
WideString
;
implementation
function
ExtractQuotedStr
(
const
Src
:
String
):
String
;
function
ExtractQuotedStr
(
const
Src
:
Wide
String
):
Wide
String
;
begin
Result
:=
Src
;
if
Src
[
1
]
=
'"'
then
Delete
(
Result
,
1
,
1
);;
if
Result
[
Length
(
Result
)]
=
'"'
then
SetLength
(
Result
,
Length
(
Result
)
-
1
);
end
;
function
CLSIDToFileName
(
const
CLSID
:
TGUID
):
String
;
function
CLSIDToFileName
(
const
CLSID
:
TGUID
):
Wide
String
;
var
Reg
:
TTntRegistry
;
strCLSID
:
String
;
strCLSID
:
Wide
String
;
begin
Result
:=
''
;
Reg
:=
TTntRegistry
.
Create
;
...
...
Source/Opos/OposPtrUtils.pas
View file @
14762fad
...
...
@@ -8,12 +8,12 @@ uses
// Opos
OposUtils
,
OposPtr
,
OposPtrhi
;
function
GetPtrPropertyName
(
const
ID
:
Integer
):
s
tring
;
function
GetResultCodeExtendedText
(
Value
:
Integer
):
s
tring
;
function
GetPtrPropertyName
(
const
ID
:
Integer
):
WideS
tring
;
function
GetResultCodeExtendedText
(
Value
:
Integer
):
WideS
tring
;
implementation
function
GetPtrPropertyName
(
const
ID
:
Integer
):
s
tring
;
function
GetPtrPropertyName
(
const
ID
:
Integer
):
WideS
tring
;
begin
case
ID
of
// POS printer
...
...
@@ -145,7 +145,7 @@ begin
end
;
end
;
function
GetResultCodeExtendedText
(
Value
:
Integer
):
s
tring
;
function
GetResultCodeExtendedText
(
Value
:
Integer
):
WideS
tring
;
begin
case
Value
of
OPOS_EPTR_COVER_OPEN
:
Result
:=
'OPOS_EPTR_COVER_OPEN'
;
...
...
Source/Opos/OposScalUtils.pas
View file @
14762fad
...
...
@@ -8,13 +8,13 @@ uses
// Opos
OposScal
,
OposScalhi
,
OposUtils
;
function
GetScalePropertyName
(
const
ID
:
Integer
):
s
tring
;
function
GetResultCodeExtendedText
(
Value
:
Integer
):
s
tring
;
function
GetScaleStatusUpdateEventText
(
Value
:
Integer
):
s
tring
;
function
GetScalePropertyName
(
const
ID
:
Integer
):
WideS
tring
;
function
GetResultCodeExtendedText
(
Value
:
Integer
):
WideS
tring
;
function
GetScaleStatusUpdateEventText
(
Value
:
Integer
):
WideS
tring
;
implementation
function
GetScalePropertyName
(
const
ID
:
Integer
):
s
tring
;
function
GetScalePropertyName
(
const
ID
:
Integer
):
WideS
tring
;
begin
case
ID
of
PIDXScal_MaximumWeight
:
Result
:=
'PIDXScal_MaximumWeight'
;
...
...
@@ -35,7 +35,7 @@ begin
end
;
end
;
function
GetResultCodeExtendedText
(
Value
:
Integer
):
s
tring
;
function
GetResultCodeExtendedText
(
Value
:
Integer
):
WideS
tring
;
begin
case
Value
of
OPOS_ESCAL_OVERWEIGHT
:
Result
:=
'OPOS_ESCAL_OVERWEIGHT'
;
...
...
@@ -46,7 +46,7 @@ begin
end
;
end
;
function
GetScaleStatusUpdateEventText
(
Value
:
Integer
):
s
tring
;
function
GetScaleStatusUpdateEventText
(
Value
:
Integer
):
WideS
tring
;
begin
case
Value
of
// OPOS SCALE
...
...
Source/Opos/OposSemaphore.pas
View file @
14762fad
...
...
@@ -17,13 +17,13 @@ type
FClaimed
:
Boolean
;
procedure
Close
;
procedure
Open
(
const
AName
:
s
tring
);
procedure
Open
(
const
AName
:
WideS
tring
);
function
WaitFor
(
Timeout
:
Integer
):
Integer
;
public
destructor
Destroy
;
override
;
procedure
Release
;
procedure
Claim
(
const
Name
:
s
tring
;
Timeout
:
Integer
);
procedure
Claim
(
const
Name
:
WideS
tring
;
Timeout
:
Integer
);
end
;
implementation
...
...
@@ -49,16 +49,16 @@ begin
end
;
end
;
procedure
TOposSemaphore
.
Open
(
const
AName
:
s
tring
);
procedure
TOposSemaphore
.
Open
(
const
AName
:
WideS
tring
);
begin
if
FHandle
=
0
then
begin
FHandle
:=
CreateSemaphore
(
nil
,
1
,
1
,
PChar
(
AName
));
FHandle
:=
CreateSemaphore
W
(
nil
,
1
,
1
,
P
Wide
Char
(
AName
));
if
FHandle
=
0
then
begin
if
GetLastError
=
ERROR_ALREADY_EXISTS
then
begin
FHandle
:=
OpenSemaphore
(
SEMAPHORE_MODIFY_STATE
,
False
,
PChar
(
AName
));
FHandle
:=
OpenSemaphore
W
(
SEMAPHORE_MODIFY_STATE
,
False
,
P
Wide
Char
(
AName
));
if
FHandle
=
0
then
RaiseLastOsError
;
end
;
...
...
@@ -80,7 +80,7 @@ begin
end
;
end
;
procedure
TOposSemaphore
.
Claim
(
const
Name
:
s
tring
;
Timeout
:
Integer
);
procedure
TOposSemaphore
.
Claim
(
const
Name
:
WideS
tring
;
Timeout
:
Integer
);
begin
if
FClaimed
then
Exit
;
...
...
Source/Opos/OposServiceDevice19.pas
View file @
14762fad
...
...
@@ -19,8 +19,8 @@ type
FState
:
Integer
;
FOpened
:
Boolean
;
FClaimed
:
Boolean
;
FDeviceName
:
s
tring
;
FDeviceClass
:
s
tring
;
FDeviceName
:
WideS
tring
;
FDeviceClass
:
WideS
tring
;
FOposEvents
:
IOposEvents
;
FAutoDisable
:
Boolean
;
FSemaphore
:
TOposSemaphore
;
...
...
@@ -29,7 +29,7 @@ type
FCapStatisticsReporting
:
Boolean
;
FCapUpdateFirmware
:
Boolean
;
FCapUpdateStatistics
:
Boolean
;
FCheckHealthText
:
s
tring
;
FCheckHealthText
:
WideS
tring
;
FDataCount
:
Integer
;
FDataEventEnabled
:
Boolean
;
FDeviceEnabled
:
Boolean
;
...
...
@@ -38,16 +38,16 @@ type
FOutputID
:
Integer
;
FPowerNotify
:
Integer
;
FPowerState
:
Integer
;
FServiceObjectDescription
:
s
tring
;
FServiceObjectDescription
:
WideS
tring
;
FServiceObjectVersion
:
Integer
;
FPhysicalDeviceDescription
:
s
tring
;
FPhysicalDeviceName
:
s
tring
;
FPhysicalDeviceDescription
:
WideS
tring
;
FPhysicalDeviceName
:
WideS
tring
;
FOpenResult
:
Integer
;
FBinaryConversion
:
Integer
;
FResultCode
:
Integer
;
FErrorString
:
s
tring
;
FErrorString
:
WideS
tring
;
FResultCodeExtended
:
Integer
;
FLongDeviceName
:
s
tring
;
FLongDeviceName
:
WideS
tring
;
FErrorEventEnabled
:
Boolean
;
FLogger
:
ILogFile
;
...
...
@@ -65,7 +65,7 @@ type
constructor
Create
(
ALogger
:
ILogFile
);
destructor
Destroy
;
override
;
procedure
Open
(
const
ADeviceClass
,
ADeviceName
:
s
tring
;
procedure
Open
(
const
ADeviceClass
,
ADeviceName
:
WideS
tring
;
const
AOposEvents
:
IOposEvents
);
procedure
Close
;
procedure
ClaimDevice
(
Timeout
:
Integer
);
...
...
@@ -80,23 +80,23 @@ type
procedure
FireEvent
(
Event
:
TOposEvent
);
procedure
StatusUpdateEvent
(
Data
:
Integer
);
function
ConvertBinary
(
const
Data
:
s
tring
):
s
tring
;
function
ConvertBinary
(
const
Data
:
WideS
tring
):
WideS
tring
;
function
ClearResult
:
Integer
;
function
SetResultCode
(
Value
:
Integer
):
Integer
;
function
HandleException
(
const
OPOSError
:
TOPOSError
):
Integer
;
property
Opened
:
Boolean
read
FOpened
;
property
Claimed
:
Boolean
read
FClaimed
;
property
DeviceName
:
s
tring
read
FDeviceName
;
property
DeviceClass
:
s
tring
read
FDeviceClass
;
property
DeviceName
:
WideS
tring
read
FDeviceName
;
property
DeviceClass
:
WideS
tring
read
FDeviceClass
;
property
AutoDisable
:
Boolean
read
FAutoDisable
;
property
LongDeviceName
:
s
tring
read
FLongDeviceName
;
property
LongDeviceName
:
WideS
tring
read
FLongDeviceName
;
property
CapCompareFirmwareVersion
:
Boolean
read
FCapCompareFirmwareVersion
;
property
CapPowerReporting
:
Integer
read
FCapPowerReporting
;
property
CapStatisticsReporting
:
Boolean
read
FCapStatisticsReporting
;
property
CapUpdateFirmware
:
Boolean
read
FCapUpdateFirmware
;
property
CapUpdateStatistics
:
Boolean
read
FCapUpdateStatistics
;
property
CheckHealthText
:
s
tring
read
FCheckHealthText
write
FCheckHealthText
;
property
CheckHealthText
:
WideS
tring
read
FCheckHealthText
write
FCheckHealthText
;
property
DataCount
:
Integer
read
FDataCount
;
property
DataEventEnabled
:
Boolean
read
FDataEventEnabled
write
FDataEventEnabled
;
property
DeviceEnabled
:
Boolean
read
FDeviceEnabled
write
SetDeviceEnabled
;
...
...
@@ -105,14 +105,14 @@ type
property
PowerNotify
:
Integer
read
FPowerNotify
write
FPowerNotify
;
property
PowerState
:
Integer
read
FPowerState
write
SetPowerState
;
property
State
:
Integer
read
FState
;
property
ServiceObjectDescription
:
s
tring
read
FServiceObjectDescription
write
FServiceObjectDescription
;
property
ServiceObjectDescription
:
WideS
tring
read
FServiceObjectDescription
write
FServiceObjectDescription
;
property
ServiceObjectVersion
:
Integer
read
FServiceObjectVersion
write
FServiceObjectVersion
;
property
PhysicalDeviceDescription
:
s
tring
read
FPhysicalDeviceDescription
write
FPhysicalDeviceDescription
;
property
PhysicalDeviceName
:
s
tring
read
FPhysicalDeviceName
write
FPhysicalDeviceName
;
property
PhysicalDeviceDescription
:
WideS
tring
read
FPhysicalDeviceDescription
write
FPhysicalDeviceDescription
;
property
PhysicalDeviceName
:
WideS
tring
read
FPhysicalDeviceName
write
FPhysicalDeviceName
;
property
OpenResult
:
Integer
read
FOpenResult
write
FOpenResult
;
property
BinaryConversion
:
Integer
read
FBinaryConversion
write
FBinaryConversion
;
property
ResultCode
:
Integer
read
FResultCode
;
property
ErrorString
:
s
tring
read
FErrorString
;
property
ErrorString
:
WideS
tring
read
FErrorString
;
property
ResultCodeExtended
:
Integer
read
FResultCodeExtended
;
property
ErrorEventEnabled
:
Boolean
read
FErrorEventEnabled
write
FErrorEventEnabled
;
end
;
...
...
@@ -158,7 +158,7 @@ begin
inherited
Destroy
;
end
;
procedure
TOposServiceDevice19
.
Open
(
const
ADeviceClass
,
ADeviceName
:
s
tring
;
procedure
TOposServiceDevice19
.
Open
(
const
ADeviceClass
,
ADeviceName
:
WideS
tring
;
const
AOposEvents
:
IOposEvents
);
begin
Logger
.
Debug
(
'TOposServiceDevice19.Open'
,
[
ADeviceClass
,
ADeviceName
]);
...
...
@@ -385,16 +385,16 @@ begin
end
;
end
;
function
TOposServiceDevice19
.
ConvertBinary
(
const
Data
:
s
tring
):
s
tring
;
function
TOposServiceDevice19
.
ConvertBinary
(
const
Data
:
WideS
tring
):
WideS
tring
;
// First character = 0x30 + bits 7-4 of the data byte.
// Second character = 0x30 + bits 3-0 of the data byte.
function
NibbleConversion
(
const
Data
:
s
tring
):
s
tring
;
function
NibbleConversion
(
const
Data
:
WideS
tring
):
WideS
tring
;
var
C
:
Char
;
Item
:
s
tring
;
Text
:
s
tring
;
Item
:
WideS
tring
;
Text
:
WideS
tring
;
begin
Result
:=
''
;
Text
:=
Data
;
...
...
@@ -407,10 +407,10 @@ function TOposServiceDevice19.ConvertBinary(const Data: string): string;
until
False
;
end
;
function
DecimalConversion
(
const
Data
:
s
tring
):
s
tring
;
function
DecimalConversion
(
const
Data
:
WideS
tring
):
WideS
tring
;
var
Item
:
s
tring
;
Text
:
s
tring
;
Item
:
WideS
tring
;
Text
:
WideS
tring
;
begin
Result
:=
''
;
Text
:=
Data
;
...
...
@@ -451,7 +451,7 @@ end;
function
TOposServiceDevice19
.
HandleException
(
const
OPOSError
:
TOPOSError
):
Integer
;
var
Line
:
s
tring
;
Line
:
WideS
tring
;
begin
FErrorString
:=
OPOSError
.
ErrorString
;
FResultCode
:=
OPOSError
.
ResultCode
;
...
...
Source/Opos/OposStatistics.pas
View file @
14762fad
...
...
@@ -16,35 +16,35 @@ type
TOposStatistics
=
class
private
FItems
:
TStatisticItems
;
FDeviceCategory
:
s
tring
;
FUnifiedPOSVersion
:
s
tring
;
FManufacturerName
:
s
tring
;
FModelName
:
s
tring
;
FSerialNumber
:
s
tring
;
FFirmwareRevision
:
s
tring
;
FInterfaceName
:
s
tring
;
FInstallationDate
:
s
tring
;
FDeviceCategory
:
WideS
tring
;
FUnifiedPOSVersion
:
WideS
tring
;
FManufacturerName
:
WideS
tring
;
FModelName
:
WideS
tring
;
FSerialNumber
:
WideS
tring
;
FFirmwareRevision
:
WideS
tring
;
FInterfaceName
:
WideS
tring
;
FInstallationDate
:
WideS
tring
;
FLogger
:
ILogFile
;
function
SaveToXml
:
s
tring
;
function
GetIniFileName
:
s
tring
;
function
SaveToXml
:
WideS
tring
;
function
GetIniFileName
:
WideS
tring
;
procedure
SetItems
(
const
Value
:
TStatisticItems
);
procedure
ParseNames
(
const
Names
:
s
tring
;
Strings
:
TTntStrings
);
function
ValidItem
(
Item
:
TStatisticItem
;
const
StatName
:
s
tring
):
Boolean
;
procedure
ParseNames
(
const
Names
:
WideS
tring
;
Strings
:
TTntStrings
);
function
ValidItem
(
Item
:
TStatisticItem
;
const
StatName
:
WideS
tring
):
Boolean
;
property
Logger
:
ILogFile
read
FLogger
;
property
Items
:
TStatisticItems
read
FItems
write
SetItems
;
protected
procedure
Add
(
const
StatisticName
:
s
tring
);
procedure
IncItem
(
const
StatisticName
:
s
tring
);
overload
;
procedure
IncItem
(
const
StatisticName
:
s
tring
;
Count
:
Integer
);
overload
;
procedure
Add
(
const
StatisticName
:
WideS
tring
);
procedure
IncItem
(
const
StatisticName
:
WideS
tring
);
overload
;
procedure
IncItem
(
const
StatisticName
:
WideS
tring
;
Count
:
Integer
);
overload
;
public
constructor
Create
(
ALogger
:
ILogFile
);
virtual
;
destructor
Destroy
;
override
;
procedure
Assign
(
Source
:
TOposStatistics
);
procedure
IniLoad
(
const
DeviceName
:
s
tring
);
virtual
;
procedure
IniSave
(
const
DeviceName
:
s
tring
);
virtual
;
procedure
IniLoad
(
const
DeviceName
:
WideS
tring
);
virtual
;
procedure
IniSave
(
const
DeviceName
:
WideS
tring
);
virtual
;
procedure
Reset
(
const
StatisticsBuffer
:
WideString
);
virtual
;
procedure
Update
(
const
StatisticsBuffer
:
WideString
);
virtual
;
procedure
Retrieve
(
var
StatisticsBuffer
:
WideString
);
virtual
;
...
...
@@ -53,14 +53,14 @@ type
procedure
CommunicationError
;
procedure
ReportHoursPowered
(
Count
:
Integer
);
property
DeviceCategory
:
s
tring
read
FDeviceCategory
write
FDeviceCategory
;
property
UnifiedPOSVersion
:
s
tring
read
FUnifiedPOSVersion
write
FUnifiedPOSVersion
;
property
ManufacturerName
:
s
tring
read
FManufacturerName
write
FManufacturerName
;
property
ModelName
:
s
tring
read
FModelName
write
FModelName
;
property
SerialNumber
:
s
tring
read
FSerialNumber
write
FSerialNumber
;
property
FirmwareRevision
:
s
tring
read
FFirmwareRevision
write
FFirmwareRevision
;
property
InterfaceName
:
s
tring
read
FInterfaceName
write
FInterfaceName
;
property
InstallationDate
:
s
tring
read
FInstallationDate
write
FInstallationDate
;
property
DeviceCategory
:
WideS
tring
read
FDeviceCategory
write
FDeviceCategory
;
property
UnifiedPOSVersion
:
WideS
tring
read
FUnifiedPOSVersion
write
FUnifiedPOSVersion
;
property
ManufacturerName
:
WideS
tring
read
FManufacturerName
write
FManufacturerName
;
property
ModelName
:
WideS
tring
read
FModelName
write
FModelName
;
property
SerialNumber
:
WideS
tring
read
FSerialNumber
write
FSerialNumber
;
property
FirmwareRevision
:
WideS
tring
read
FFirmwareRevision
write
FFirmwareRevision
;
property
InterfaceName
:
WideS
tring
read
FInterfaceName
write
FInterfaceName
;
property
InstallationDate
:
WideS
tring
read
FInstallationDate
write
FInstallationDate
;
end
;
implementation
...
...
@@ -88,14 +88,14 @@ begin
Items
.
Assign
(
Value
);
end
;
procedure
TOposStatistics
.
Add
(
const
StatisticName
:
s
tring
);
procedure
TOposStatistics
.
Add
(
const
StatisticName
:
WideS
tring
);
begin
Items
.
Add
(
StatisticName
,
stOpos
);
end
;
procedure
TOposStatistics
.
ParseNames
(
const
Names
:
s
tring
;
Strings
:
TTntStrings
);
procedure
TOposStatistics
.
ParseNames
(
const
Names
:
WideS
tring
;
Strings
:
TTntStrings
);
var
S
:
s
tring
;
S
:
WideS
tring
;
P
:
Integer
;
begin
if
Names
=
''
then
...
...
@@ -121,7 +121,7 @@ end;
(*******************************************************************************
This is a comma-separated list of name(s), where an empty
s
tring (“”) means ALL
This is a comma-separated list of name(s), where an empty
WideS
tring (“”) means ALL
resettable statistics are to be reset, “U_” means all UnifiedPOS defined resettable
statistics are to be reset, “M_” means all manufacturer defined resettable statistics
are to be reset, and “actual_name1, actual_name2” (from the XML file definitions)
...
...
@@ -159,7 +159,7 @@ end;
retrieveStatistics
Method Added in Release 1.8