Skip to content

Commit

Permalink
Added option for SqueezeLog v2.0
Browse files Browse the repository at this point in the history
Signed-off-by: Giuseppe Monteleone <[email protected]>
  • Loading branch information
geppo12 committed May 30, 2011
1 parent 71a1eed commit cf2ab59
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 4 deletions.
4 changes: 2 additions & 2 deletions LogConsole/LogConsole.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
<VersionInfo Name="MajorVer">0</VersionInfo>
<VersionInfo Name="MinorVer">4</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">72</VersionInfo>
<VersionInfo Name="Build">73</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
Expand All @@ -135,7 +135,7 @@
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"/>
<VersionInfoKeys Name="FileDescription"/>
<VersionInfoKeys Name="FileVersion">0.4.0.72</VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">0.4.0.73</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"/>
<VersionInfoKeys Name="LegalCopyright"/>
<VersionInfoKeys Name="LegalTrademarks"/>
Expand Down
Binary file modified LogConsole/LogConsole.res
Binary file not shown.
8 changes: 8 additions & 0 deletions LogConsole/UMain.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,14 @@ object fmMain: TfmMain
Height = 21
TabOrder = 1
end
object cbSqzLog20: TCheckBox
Left = 248
Top = 18
Width = 129
Height = 17
Caption = 'Tag Support (v 2.0)'
TabOrder = 3
end
end
end
object cbFilterEnable: TCheckBox
Expand Down
5 changes: 4 additions & 1 deletion LogConsole/UMain.pas
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ TfmMain = class(TForm)
odSequence: TOpenDialog;
lbSeqOutText: TListBox;
btnMarkerEdit: TButton;
cbSqzLog20: TCheckBox;
procedure btnSeqCancelClick(Sender: TObject);
procedure btnFilterEditClick(Sender: TObject);
procedure btnMarkerEditClick(Sender: TObject);
Expand Down Expand Up @@ -195,7 +196,7 @@ procedure TfmMain.FormCreate(Sender: TObject);
FSequenceEngine.OnOutText := seqPrint;

// initialize log processor engine
FSqzLogProcessor := TSqzLogNetHandler.Create;
FSqzLogProcessor := TSqzLogNetHandler.Create(TNCTOptions.Instance.SqueezeLogV20);
FSqzLogProcessor.OnPrint := print;

FFileList := TFileNamesList.Create;
Expand Down Expand Up @@ -477,6 +478,7 @@ procedure TfmMain.setupOptions;
with TNCTOptions.Instance do begin
SqueezeLogMask := StrToIntDef(eSqzLogMask.Text,SqueezeLogMask);
SqueezeLogId := StrToIntDef(eSqzLogID.Text,SqueezeLogId);
SqueezeLogV20 := cbSqzLog20.Checked;
NodeMask := StrToIntDef(eNodeMask.Text,NodeMask);
FSqzLogProcessor.NodeMask := NodeMask;
end;
Expand All @@ -487,6 +489,7 @@ procedure TfmMain.showOptions;
with TNCTOptions.Instance do begin
eSqzLogMask.Text := Format('0x%.8X',[SqueezeLogMask]);
eSqzLogID.Text := Format('0x%.8X',[SqueezeLogId]);
cbSqzLog20.Checked := SqueezeLogV20;
eNodeMask.Text := Format('0x%.8X',[NodeMask]);
end;
end;
Expand Down
5 changes: 5 additions & 0 deletions LogConsole/UOptions.pas
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ TNCTOptions = class
public
SqueezeLogId: Cardinal;
SqueezeLogMask: Cardinal;
SqueezeLogV20: Boolean;
NodeMask: Cardinal;
class constructor CreateInstance;
class destructor DestroyInstance;
Expand Down Expand Up @@ -69,12 +70,14 @@ implementation
kIniOptions = 'Options';
// keys
kIniSqzLogId = 'SqueezeLogId';
kIniSqzLogV20 = 'SqueezeLogV20';
kIniSqzLogMask = 'SqueezeLogMask';
kIniNodeMask = 'NodeMask';

procedure TNCTOptions.loadDefaults;
begin
SqueezeLogId := $FE0000;
SqueezeLogV20 := false;
SqueezeLogMask := $FFC000;
NodeMask := $3FFF;
end;
Expand All @@ -85,6 +88,7 @@ procedure TNCTOptions.loadFromFile(AFile: string);
begin
LIniFile := TIniFile.Create(AFile);
SqueezeLogId := LIniFile.ReadInteger(kIniOptions,kIniSqzLogId,SqueezeLogId);
SqueezeLogV20 := LIniFile.ReadBool(kIniOptions,kIniSqzLogV20,SqueezeLogV20);
SqueezeLogMask := LIniFile.ReadInteger(kIniOptions,kIniSqzLogMask,SqueezeLogMask);
NodeMask := LIniFile.ReadInteger(kIniOptions,kIniNodeMask,NodeMask);
LIniFile.Free;
Expand All @@ -96,6 +100,7 @@ procedure TNCTOptions.saveToFile(AFile: string);
begin
LIniFile := TIniFile.Create(AFile);
LIniFile.WriteInteger(kIniOptions,kIniSqzLogId,SqueezeLogId);
LIniFile.WriteBool(kIniOptions,kIniSqzLogV20,SqueezeLogV20);
LIniFile.WriteInteger(kIniOptions,kIniSqzLogMask,SqueezeLogMask);
LIniFile.WriteInteger(kIniOptions,kIniNodeMask,NodeMask);
LIniFile.Free;
Expand Down
2 changes: 1 addition & 1 deletion LogConsole/USqzLogCore.pas
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ TSqzLogNetHandler = class
function findNode(ANodeId: Integer): TSqzLogHandler;
procedure print(ANodeId: Integer; AClass: TSqzLogClass; ATitle: string);
public
constructor Create(AProtoV2: Boolean = false);
constructor Create(AProtoV2: Boolean);
destructor Destroy; override;
procedure AddNode(ANodeId: Integer);
{$IFDEF USE_PRINTER_OBJ}
Expand Down

0 comments on commit cf2ab59

Please sign in to comment.