Commit 14762fad authored by kravtsov's avatar kravtsov
Browse files

[-] Исправлены некоторые ошибки

parent b2474061
......@@ -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
......
[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
......
[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;
......@@ -8,12 +8,12 @@ uses
// Opos
OposUtils, OposCashhi;
function GetCashPropertyName(const ID: Integer): string;
function GetResultCodeExtendedText(Value: Integer): string;
function GetCashPropertyName(const ID: Integer): WideString;
function GetResultCodeExtendedText(Value: Integer): WideString;
implementation
function GetCashPropertyName(const ID: Integer): string;
function GetCashPropertyName(const ID: Integer): WideString;
begin
case ID of
PIDXCash_DrawerOpened : Result := 'PIDXCash_DrawerOpened';
......@@ -24,7 +24,7 @@ begin
end;
end;
function GetResultCodeExtendedText(Value: Integer): string;
function GetResultCodeExtendedText(Value: Integer): WideString;
begin
Result := IntToStr(Value);
end;
......
......@@ -68,22 +68,22 @@ type
property DeviceName: WideString read FDeviceName write FDeviceName;
end;
function CLSIDToFileName(const CLSID: TGUID): String;
function CLSIDToFileName(const CLSID: TGUID): WideString;
function ProgIDToFileName(const ProgID: WideString): WideString;
implementation
function ExtractQuotedStr(const Src: String): String;
function ExtractQuotedStr(const Src: WideString): WideString;
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): WideString;
var
Reg: TTntRegistry;
strCLSID: String;
strCLSID: WideString;
begin
Result := '';
Reg := TTntRegistry.Create;
......
......@@ -8,12 +8,12 @@ uses
// Opos
OposUtils, OposPtr, OposPtrhi;
function GetPtrPropertyName(const ID: Integer): string;
function GetResultCodeExtendedText(Value: Integer): string;
function GetPtrPropertyName(const ID: Integer): WideString;
function GetResultCodeExtendedText(Value: Integer): WideString;
implementation
function GetPtrPropertyName(const ID: Integer): string;
function GetPtrPropertyName(const ID: Integer): WideString;
begin
case ID of
// POS printer
......@@ -145,7 +145,7 @@ begin
end;
end;
function GetResultCodeExtendedText(Value: Integer): string;
function GetResultCodeExtendedText(Value: Integer): WideString;
begin
case Value of
OPOS_EPTR_COVER_OPEN : Result := 'OPOS_EPTR_COVER_OPEN';
......
......@@ -8,13 +8,13 @@ uses
// Opos
OposScal, OposScalhi, OposUtils;
function GetScalePropertyName(const ID: Integer): string;
function GetResultCodeExtendedText(Value: Integer): string;
function GetScaleStatusUpdateEventText(Value: Integer): string;
function GetScalePropertyName(const ID: Integer): WideString;
function GetResultCodeExtendedText(Value: Integer): WideString;
function GetScaleStatusUpdateEventText(Value: Integer): WideString;
implementation
function GetScalePropertyName(const ID: Integer): string;
function GetScalePropertyName(const ID: Integer): WideString;
begin
case ID of
PIDXScal_MaximumWeight : Result := 'PIDXScal_MaximumWeight';
......@@ -35,7 +35,7 @@ begin
end;
end;
function GetResultCodeExtendedText(Value: Integer): string;
function GetResultCodeExtendedText(Value: Integer): WideString;
begin
case Value of
OPOS_ESCAL_OVERWEIGHT : Result := 'OPOS_ESCAL_OVERWEIGHT';
......@@ -46,7 +46,7 @@ begin
end;
end;
function GetScaleStatusUpdateEventText(Value: Integer): string;
function GetScaleStatusUpdateEventText(Value: Integer): WideString;
begin
case Value of
// OPOS SCALE
......
......@@ -17,13 +17,13 @@ type
FClaimed: Boolean;
procedure Close;
procedure Open(const AName: string);
procedure Open(const AName: WideString);
function WaitFor(Timeout: Integer): Integer;
public
destructor Destroy; override;
procedure Release;
procedure Claim(const Name: string; Timeout: Integer);
procedure Claim(const Name: WideString; Timeout: Integer);
end;
implementation
......@@ -49,16 +49,16 @@ begin
end;
end;
procedure TOposSemaphore.Open(const AName: string);
procedure TOposSemaphore.Open(const AName: WideString);
begin
if FHandle = 0 then
begin
FHandle := CreateSemaphore(nil, 1, 1, PChar(AName));
FHandle := CreateSemaphoreW(nil, 1, 1, PWideChar(AName));
if FHandle = 0 then
begin
if GetLastError = ERROR_ALREADY_EXISTS then
begin
FHandle := OpenSemaphore(SEMAPHORE_MODIFY_STATE, False, PChar(AName));
FHandle := OpenSemaphoreW(SEMAPHORE_MODIFY_STATE, False, PWideChar(AName));
if FHandle = 0 then
RaiseLastOsError;
end;
......@@ -80,7 +80,7 @@ begin
end;
end;
procedure TOposSemaphore.Claim(const Name: string; Timeout: Integer);
procedure TOposSemaphore.Claim(const Name: WideString; Timeout: Integer);
begin
if FClaimed then Exit;
......
......@@ -19,8 +19,8 @@ type
FState: Integer;
FOpened: Boolean;
FClaimed: Boolean;
FDeviceName: string;
FDeviceClass: string;
FDeviceName: WideString;
FDeviceClass: WideString;
FOposEvents: IOposEvents;
FAutoDisable: Boolean;
FSemaphore: TOposSemaphore;
......@@ -29,7 +29,7 @@ type
FCapStatisticsReporting: Boolean;
FCapUpdateFirmware: Boolean;
FCapUpdateStatistics: Boolean;
FCheckHealthText: string;
FCheckHealthText: WideString;
FDataCount: Integer;
FDataEventEnabled: Boolean;
FDeviceEnabled: Boolean;
......@@ -38,16 +38,16 @@ type
FOutputID: Integer;
FPowerNotify: Integer;
FPowerState: Integer;
FServiceObjectDescription: string;
FServiceObjectDescription: WideString;
FServiceObjectVersion: Integer;
FPhysicalDeviceDescription: string;
FPhysicalDeviceName: string;
FPhysicalDeviceDescription: WideString;
FPhysicalDeviceName: WideString;
FOpenResult: Integer;
FBinaryConversion: Integer;
FResultCode: Integer;
FErrorString: string;
FErrorString: WideString;
FResultCodeExtended: Integer;
FLongDeviceName: string;
FLongDeviceName: WideString;
FErrorEventEnabled: Boolean;
FLogger: ILogFile;
......@@ -65,7 +65,7 @@ type
constructor Create(ALogger: ILogFile);
destructor Destroy; override;
procedure Open(const ADeviceClass, ADeviceName: string;
procedure Open(const ADeviceClass, ADeviceName: WideString;
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: string): string;
function ConvertBinary(const Data: WideString): WideString;
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: string read FDeviceName;
property DeviceClass: string read FDeviceClass;
property DeviceName: WideString read FDeviceName;
property DeviceClass: WideString read FDeviceClass;
property AutoDisable: Boolean read FAutoDisable;
property LongDeviceName: string read FLongDeviceName;
property LongDeviceName: WideString 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: string read FCheckHealthText write FCheckHealthText;
property CheckHealthText: WideString 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: string read FServiceObjectDescription write FServiceObjectDescription;
property ServiceObjectDescription: WideString read FServiceObjectDescription write FServiceObjectDescription;
property ServiceObjectVersion: Integer read FServiceObjectVersion write FServiceObjectVersion;
property PhysicalDeviceDescription: string read FPhysicalDeviceDescription write FPhysicalDeviceDescription;
property PhysicalDeviceName: string read FPhysicalDeviceName write FPhysicalDeviceName;
property PhysicalDeviceDescription: WideString read FPhysicalDeviceDescription write FPhysicalDeviceDescription;
property PhysicalDeviceName: WideString 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: string read FErrorString;
property ErrorString: WideString 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: string;
procedure TOposServiceDevice19.Open(const ADeviceClass, ADeviceName: WideString;
const AOposEvents: IOposEvents);
begin
Logger.Debug('TOposServiceDevice19.Open', [ADeviceClass, ADeviceName]);
......@@ -385,16 +385,16 @@ begin
end;
end;
function TOposServiceDevice19.ConvertBinary(const Data: string): string;
function TOposServiceDevice19.ConvertBinary(const Data: WideString): WideString;
// First character = 0x30 + bits 7-4 of the data byte.
// Second character = 0x30 + bits 3-0 of the data byte.
function NibbleConversion(const Data: string): string;
function NibbleConversion(const Data: WideString): WideString;
var
C: Char;
Item: string;
Text: string;
Item: WideString;
Text: WideString;
begin
Result := '';
Text := Data;
......@@ -407,10 +407,10 @@ function TOposServiceDevice19.ConvertBinary(const Data: string): string;
until False;
end;
function DecimalConversion(const Data: string): string;
function DecimalConversion(const Data: WideString): WideString;
var
Item: string;
Text: string;
Item: WideString;
Text: WideString;
begin
Result := '';
Text := Data;
......@@ -451,7 +451,7 @@ end;
function TOposServiceDevice19.HandleException(const OPOSError: TOPOSError): Integer;
var
Line: string;
Line: WideString;
begin
FErrorString := OPOSError.ErrorString;
FResultCode := OPOSError.ResultCode;
......
......@@ -16,35 +16,35 @@ type
TOposStatistics = class
private
FItems: TStatisticItems;
FDeviceCategory: string;
FUnifiedPOSVersion: string;
FManufacturerName: string;
FModelName: string;
FSerialNumber: string;
FFirmwareRevision: string;
FInterfaceName: string;
FInstallationDate: string;
FDeviceCategory: WideString;
FUnifiedPOSVersion: WideString;
FManufacturerName: WideString;
FModelName: WideString;
FSerialNumber: WideString;
FFirmwareRevision: WideString;
FInterfaceName: WideString;
FInstallationDate: WideString;
FLogger: ILogFile;
function SaveToXml: string;
function GetIniFileName: string;
function SaveToXml: WideString;
function GetIniFileName: WideString;
procedure SetItems(const Value: TStatisticItems);
procedure ParseNames(const Names: string; Strings: TTntStrings);
function ValidItem(Item: TStatisticItem; const StatName: string): Boolean;
procedure ParseNames(const Names: WideString; Strings: TTntStrings);
function ValidItem(Item: TStatisticItem; const StatName: WideString): Boolean;
property Logger: ILogFile read FLogger;
property Items: TStatisticItems read FItems write SetItems;
protected
procedure Add(const StatisticName: string);
procedure IncItem(const StatisticName: string); overload;
procedure IncItem(const StatisticName: string; Count: Integer); overload;
procedure Add(const StatisticName: WideString);
procedure IncItem(const StatisticName: WideString); overload;
procedure IncItem(const StatisticName: WideString; Count: Integer); overload;
public
constructor Create(ALogger: ILogFile); virtual;
destructor Destroy; override;
procedure Assign(Source: TOposStatistics);
procedure IniLoad(const DeviceName: string); virtual;
procedure IniSave(const DeviceName: string); virtual;
procedure IniLoad(const DeviceName: WideString); virtual;
procedure IniSave(const DeviceName: WideString); 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: string read FDeviceCategory write FDeviceCategory;
property UnifiedPOSVersion: string read FUnifiedPOSVersion write FUnifiedPOSVersion;
property ManufacturerName: string read FManufacturerName write FManufacturerName;
property ModelName: string read FModelName write FModelName;
property SerialNumber: string read FSerialNumber write FSerialNumber;
property FirmwareRevision: string read FFirmwareRevision write FFirmwareRevision;
property InterfaceName: string read FInterfaceName write FInterfaceName;
property InstallationDate: string read FInstallationDate write FInstallationDate;
property DeviceCategory: WideString read FDeviceCategory write FDeviceCategory;
property UnifiedPOSVersion: WideString read FUnifiedPOSVersion write FUnifiedPOSVersion;
property ManufacturerName: WideString read FManufacturerName write FManufacturerName;
property ModelName: WideString read FModelName write FModelName;
property SerialNumber: WideString read FSerialNumber write FSerialNumber;
property FirmwareRevision: WideString read FFirmwareRevision write FFirmwareRevision;
property InterfaceName: WideString read FInterfaceName write FInterfaceName;
property InstallationDate: WideString read FInstallationDate write FInstallationDate;
end;
implementation
......@@ -88,14 +88,14 @@ begin
Items.Assign(Value);
end;
procedure TOposStatistics.Add(const StatisticName: string);
procedure TOposStatistics.Add(const StatisticName: WideString);
begin
Items.Add(StatisticName, stOpos);
end;
procedure TOposStatistics.ParseNames(const Names: string; Strings: TTntStrings);
procedure TOposStatistics.ParseNames(const Names: WideString; Strings: TTntStrings);
var
S: string;
S: WideString;
P: Integer;
begin
if Names = '' then
......@@ -121,7 +121,7 @@ end;
(*******************************************************************************
This is a comma-separated list of name(s), where an empty string (“”) means ALL
This is a comma-separated list of name(s), where an empty WideString (“”) 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
This is a comma-separated list of name(s), where an empty string (“”) means ALL
This is a comma-separated list of name(s), where an empty WideString (“”) means ALL
statistics are to be retrieved, “U_” means all UnifiedPOS defined statistics are to
be retrieved, “M_” means all manufacturer defined statistics are to be retrieved,
and “actual_name1, actual_name2” (from the XML file definitions) means that the
......@@ -222,7 +222,7 @@ end;
procedure TOposStatistics.Retrieve(var StatisticsBuffer: WideString);
var
i, j: Integer;
StatName: string;
StatName: WideString;
StatNames: TTntStrings;
Item: TStatisticItem;
Statistics: TOposStatistics;
......@@ -251,7 +251,7 @@ begin
end;
function TOposStatistics.ValidItem(Item: TStatisticItem;
const StatName: string): Boolean;
const StatName: WideString): Boolean;
begin
// All
if StatName = '' then
......@@ -289,9 +289,9 @@ procedure TOposStatistics.Update(const StatisticsBuffer: WideString);
var
i, j: Integer;
P: Integer;
StatPair: string;