Skip to content

Commit

Permalink
Fixes to pass unit tests.
Browse files Browse the repository at this point in the history
Some code warnings removed
  • Loading branch information
andreyserenkov committed Dec 10, 2024
1 parent b630d72 commit 3819f34
Show file tree
Hide file tree
Showing 19 changed files with 171 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Asap2/.vs/Asap2.csproj.dtbcache.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"RootPath":"C:\\Users\\Ichiro\\source\\repos\\Asap2\\Asap2","ProjectFileName":"Asap2.csproj","Configuration":"Debug|AnyCPU","FrameworkPath":"","Sources":[{"SourceFile":"Asap2Tree\\ADDRESS.cs"},{"SourceFile":"Asap2Tree\\Asap2Base.cs"},{"SourceFile":"Asap2Tree\\Asap2File.cs"},{"SourceFile":"Asap2Tree\\AXIS_PTS.cs"},{"SourceFile":"Asap2Tree\\COPY.cs"},{"SourceFile":"Asap2Tree\\DATA_ACCESS.cs"},{"SourceFile":"Asap2Tree\\CAN.cs"},{"SourceFile":"Asap2Tree\\CHECKSUM_PARAM.cs"},{"SourceFile":"Asap2Tree\\DAQ_EVENT.cs"},{"SourceFile":"Asap2Tree\\CAL_PARAM_GROUP.cs"},{"SourceFile":"Asap2Tree\\CHARACTERISTIC.cs"},{"SourceFile":"Asap2Tree\\CHECKSUM.cs"},{"SourceFile":"Asap2Tree\\COMPU_METHOD.cs"},{"SourceFile":"Asap2Tree\\DEFINED_PAGES.cs"},{"SourceFile":"Asap2Tree\\CODE_CHK.cs"},{"SourceFile":"Asap2Tree\\DIAG_BAUD.cs"},{"SourceFile":"Asap2Tree\\DISTAB_CFG.cs"},{"SourceFile":"Asap2Tree\\ETK_CFG.cs"},{"SourceFile":"Asap2Tree\\FLASH.cs"},{"SourceFile":"Asap2Tree\\KP_BLOB.cs"},{"SourceFile":"Asap2Tree\\PAGE_SWITCH.cs"},{"SourceFile":"Asap2Tree\\SESSION.cs"},{"SourceFile":"Asap2Tree\\TransportProtocolVersion.cs"},{"SourceFile":"Asap2Tree\\USDTP_TIMING_DEFAULTS.cs"},{"SourceFile":"Asap2Tree\\USDTP_TIMING.cs"},{"SourceFile":"Asap2Tree\\KWP_TIMING.cs"},{"SourceFile":"Asap2Tree\\K_LINE.cs"},{"SourceFile":"Asap2Tree\\NETWORK_LIMITS.cs"},{"SourceFile":"Asap2Tree\\PGM.cs"},{"SourceFile":"Asap2Tree\\PAG.cs"},{"SourceFile":"Asap2Tree\\DAQ_LIST.cs"},{"SourceFile":"Asap2Tree\\EVENT.cs"},{"SourceFile":"Asap2Tree\\RASTER.cs"},{"SourceFile":"Asap2Tree\\RESERVED_DISTAB_MEMORY.cs"},{"SourceFile":"Asap2Tree\\SECTOR.cs"},{"SourceFile":"Asap2Tree\\QP_BLOB.cs"},{"SourceFile":"Asap2Tree\\SEED_KEY.cs"},{"SourceFile":"Asap2Tree\\SOURCE.cs"},{"SourceFile":"Asap2Tree\\TIMESTAMP_SUPPORTED.cs"},{"SourceFile":"Asap2Tree\\DAQ.cs"},{"SourceFile":"Asap2Tree\\FileComment.cs"},{"SourceFile":"Asap2Tree\\IF_DATA.cs"},{"SourceFile":"Asap2Tree\\MEASUREMENT.cs"},{"SourceFile":"Asap2Tree\\PAGE.cs"},{"SourceFile":"Asap2Tree\\PROTOCOL_LAYER.cs"},{"SourceFile":"Asap2Tree\\SEGMENT.cs"},{"SourceFile":"Asap2Tree\\TIME_DEF.cs"},{"SourceFile":"Asap2Tree\\TP_BLOB.cs"},{"SourceFile":"Asap2Tree\\XCP_ON_CAN.cs"},{"SourceFile":"Attributes.cs"},{"SourceFile":"Asap2Tree\\DEF_CHARACTERISTIC.cs"},{"SourceFile":"Asap2Tree\\FRAME.cs"},{"SourceFile":"Asap2Tree\\FUNCTION.cs"},{"SourceFile":"Asap2Tree\\IN_MEASUREMENT.cs"},{"SourceFile":"Asap2Tree\\LOC_MEASUREMENT.cs"},{"SourceFile":"Asap2Tree\\MODULE.cs"},{"SourceFile":"Asap2Tree\\OUT_MEASUREMENT.cs"},{"SourceFile":"Asap2Tree\\REF_CHARACTERISTIC.cs"},{"SourceFile":"Asap2Tree\\SI_EXPONENTS.cs"},{"SourceFile":"Asap2Tree\\SUB_FUNCTION.cs"},{"SourceFile":"Asap2Tree\\UNIT.cs"},{"SourceFile":"Asap2Tree\\UNIT_CONVERSION.cs"},{"SourceFile":"Asap2Tree\\USER_RIGHTS.cs"},{"SourceFile":"Asap2Tree\\VARIANT_CODING.cs"},{"SourceFile":"Asap2Tree\\VAR_CHARACTERISTIC.cs"},{"SourceFile":"Asap2Tree\\VAR_CRITERION.cs"},{"SourceFile":"Asap2Tree\\VAR_FORBIDDEN_COMB.cs"},{"SourceFile":"GplexBuffers.cs"},{"SourceFile":"IErrorReporter.cs"},{"SourceFile":"Location.cs"},{"SourceFile":"Parser.cs"},{"SourceFile":"Properties\\AssemblyInfo.cs"},{"SourceFile":"ShiftReduceParserCode.cs"},{"SourceFile":"tools\\Remover.cs"},{"SourceFile":"tools\\Options.cs"},{"SourceFile":"tools\\Merger.cs"},{"SourceFile":"Asap2.Parser.cs"},{"SourceFile":"Asap2.Parser.Generated.cs"},{"SourceFile":"Asap2.Scanner.cs"},{"SourceFile":"Asap2.Scanner.Generated.cs"},{"SourceFile":"obj\\Debug\\.NETFramework,Version=v4.8.AssemblyAttributes.cs"}],"References":[{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\Microsoft.CSharp.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\mscorlib.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Core.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Data.DataSetExtensions.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Data.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Xml.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Xml.Linq.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""}],"Analyzers":[],"Outputs":[{"OutputItemFullPath":"C:\\Users\\Ichiro\\source\\repos\\Asap2\\Asap2\\bin\\Debug\\Asap2.dll","OutputItemRelativePath":"Asap2.dll"},{"OutputItemFullPath":"","OutputItemRelativePath":""}],"CopyToOutputEntries":[]}
{"RootPath":"C:\\Projects\\Tests\\Asap2\\Asap2","ProjectFileName":"Asap2.csproj","Configuration":"Debug|AnyCPU","FrameworkPath":"","Sources":[{"SourceFile":"Asap2Tree\\ADDRESS.cs"},{"SourceFile":"Asap2Tree\\Asap2Base.cs"},{"SourceFile":"Asap2Tree\\Asap2File.cs"},{"SourceFile":"Asap2Tree\\AXIS_PTS.cs"},{"SourceFile":"Asap2Tree\\COPY.cs"},{"SourceFile":"Asap2Tree\\DATA_ACCESS.cs"},{"SourceFile":"Asap2Tree\\CAN.cs"},{"SourceFile":"Asap2Tree\\CHECKSUM_PARAM.cs"},{"SourceFile":"Asap2Tree\\DAQ_EVENT.cs"},{"SourceFile":"Asap2Tree\\CAL_PARAM_GROUP.cs"},{"SourceFile":"Asap2Tree\\CHARACTERISTIC.cs"},{"SourceFile":"Asap2Tree\\CHECKSUM.cs"},{"SourceFile":"Asap2Tree\\COMPU_METHOD.cs"},{"SourceFile":"Asap2Tree\\DEFINED_PAGES.cs"},{"SourceFile":"Asap2Tree\\CODE_CHK.cs"},{"SourceFile":"Asap2Tree\\DIAG_BAUD.cs"},{"SourceFile":"Asap2Tree\\DISTAB_CFG.cs"},{"SourceFile":"Asap2Tree\\ETK_CFG.cs"},{"SourceFile":"Asap2Tree\\FLASH.cs"},{"SourceFile":"Asap2Tree\\KP_BLOB.cs"},{"SourceFile":"Asap2Tree\\PAGE_SWITCH.cs"},{"SourceFile":"Asap2Tree\\SESSION.cs"},{"SourceFile":"Asap2Tree\\TransportProtocolVersion.cs"},{"SourceFile":"Asap2Tree\\USDTP_TIMING_DEFAULTS.cs"},{"SourceFile":"Asap2Tree\\USDTP_TIMING.cs"},{"SourceFile":"Asap2Tree\\KWP_TIMING.cs"},{"SourceFile":"Asap2Tree\\K_LINE.cs"},{"SourceFile":"Asap2Tree\\NETWORK_LIMITS.cs"},{"SourceFile":"Asap2Tree\\PGM.cs"},{"SourceFile":"Asap2Tree\\PAG.cs"},{"SourceFile":"Asap2Tree\\DAQ_LIST.cs"},{"SourceFile":"Asap2Tree\\EVENT.cs"},{"SourceFile":"Asap2Tree\\RASTER.cs"},{"SourceFile":"Asap2Tree\\RESERVED_DISTAB_MEMORY.cs"},{"SourceFile":"Asap2Tree\\SECTOR.cs"},{"SourceFile":"Asap2Tree\\QP_BLOB.cs"},{"SourceFile":"Asap2Tree\\SEED_KEY.cs"},{"SourceFile":"Asap2Tree\\SOURCE.cs"},{"SourceFile":"Asap2Tree\\TIMESTAMP_SUPPORTED.cs"},{"SourceFile":"Asap2Tree\\DAQ.cs"},{"SourceFile":"Asap2Tree\\FileComment.cs"},{"SourceFile":"Asap2Tree\\IF_DATA.cs"},{"SourceFile":"Asap2Tree\\MEASUREMENT.cs"},{"SourceFile":"Asap2Tree\\PAGE.cs"},{"SourceFile":"Asap2Tree\\PROTOCOL_LAYER.cs"},{"SourceFile":"Asap2Tree\\SEGMENT.cs"},{"SourceFile":"Asap2Tree\\TIME_DEF.cs"},{"SourceFile":"Asap2Tree\\TP_BLOB.cs"},{"SourceFile":"Asap2Tree\\XCP_ON_CAN.cs"},{"SourceFile":"Attributes.cs"},{"SourceFile":"Asap2Tree\\DEF_CHARACTERISTIC.cs"},{"SourceFile":"Asap2Tree\\FRAME.cs"},{"SourceFile":"Asap2Tree\\FUNCTION.cs"},{"SourceFile":"Asap2Tree\\IN_MEASUREMENT.cs"},{"SourceFile":"Asap2Tree\\LOC_MEASUREMENT.cs"},{"SourceFile":"Asap2Tree\\MODULE.cs"},{"SourceFile":"Asap2Tree\\OUT_MEASUREMENT.cs"},{"SourceFile":"Asap2Tree\\REF_CHARACTERISTIC.cs"},{"SourceFile":"Asap2Tree\\SI_EXPONENTS.cs"},{"SourceFile":"Asap2Tree\\SUB_FUNCTION.cs"},{"SourceFile":"Asap2Tree\\UNIT.cs"},{"SourceFile":"Asap2Tree\\UNIT_CONVERSION.cs"},{"SourceFile":"Asap2Tree\\USER_RIGHTS.cs"},{"SourceFile":"Asap2Tree\\VARIANT_CODING.cs"},{"SourceFile":"Asap2Tree\\VAR_CHARACTERISTIC.cs"},{"SourceFile":"Asap2Tree\\VAR_CRITERION.cs"},{"SourceFile":"Asap2Tree\\VAR_FORBIDDEN_COMB.cs"},{"SourceFile":"ErrorHandler.cs"},{"SourceFile":"GplexBuffers.cs"},{"SourceFile":"IErrorReporter.cs"},{"SourceFile":"Location.cs"},{"SourceFile":"Parser.cs"},{"SourceFile":"Properties\\AssemblyInfo.cs"},{"SourceFile":"ShiftReduceParserCode.cs"},{"SourceFile":"tools\\Remover.cs"},{"SourceFile":"tools\\Options.cs"},{"SourceFile":"tools\\Merger.cs"},{"SourceFile":"Asap2.Parser.cs"},{"SourceFile":"Asap2.Parser.Generated.cs"},{"SourceFile":"Asap2.Scanner.cs"},{"SourceFile":"Asap2.Scanner.Generated.cs"},{"SourceFile":"obj\\Debug\\.NETFramework,Version=v4.8.AssemblyAttributes.cs"}],"References":[{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\Microsoft.CSharp.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\mscorlib.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Core.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Data.DataSetExtensions.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Data.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Xml.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Xml.Linq.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""}],"Analyzers":[],"Outputs":[{"OutputItemFullPath":"C:\\Projects\\Tests\\Asap2\\Asap2\\bin\\Debug\\Asap2.dll","OutputItemRelativePath":"Asap2.dll"},{"OutputItemFullPath":"","OutputItemRelativePath":""}],"CopyToOutputEntries":[]}
1 change: 1 addition & 0 deletions Asap2/Asap2.Language.analyzer.lex
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ TransportProtocolVersion { return Make(Token.TransportProtocolVersion); }
USDTP_TIMING_DEFAULTS { return Make(Token.USDTP_TIMING_DEFAULTS); }
USDTP_TIMING { return Make(Token.USDTP_TIMING); }
KP_BLOB { return Make(Token.KP_BLOB); }
DEFAULT_EVENT_LIST { return Make(Token.DEFAULT_EVENT_LIST); }
A2ML { yy_push_state (STATE_A2ML); yylval.sb = new StringBuilder(); }
"\/include" { yy_push_state(STATE_INCL); }
\" { yy_push_state(STATE_STRING); yylval.sb = new StringBuilder(); }
Expand Down
52 changes: 45 additions & 7 deletions Asap2/Asap2.Language.grammar.y
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
public PAGE_SWITCH page_switch;
public SESSION session;
public KP_BLOB kp_blob;
public DEFAULT_EVENT_LIST default_event_list;
public TransportProtocolVersion transportProtocolVersion;
}

Expand Down Expand Up @@ -281,6 +282,7 @@
%token USDTP_TIMING_DEFAULTS
%token USDTP_TIMING
%token KP_BLOB
%token DEFAULT_EVENT_LIST
%token maxParseToken COMMENT


Expand Down Expand Up @@ -368,6 +370,7 @@
%type <daq_list> daq_list
%type <daq_list> daq_list_data
%type <cal_param_group> cal_param_group
%type <cal_param_group> cal_param_group_data
%type <protocol_layer> protocol_layer
%type <protocol_layer> protocol_layer_data
%type <page> page
Expand Down Expand Up @@ -433,6 +436,8 @@
%type <transportProtocolVersion> transportProtocolVersion_data
%type <kp_blob> kp_blob
%type <kp_blob> kp_blob_data
%type <default_event_list> default_event_list
%type <default_event_list> default_event_list_data
%%

Asap2File
Expand Down Expand Up @@ -1487,6 +1492,27 @@ daq_event_data : IDENTIFIER IDENTIFIER NUMBER{
// TODO: Implement
$$ = new DAQ_EVENT(@$, $3);
}
| IDENTIFIER {
// TODO: Implement
$$ = new DAQ_EVENT(@$, $1);
}
| daq_event_data default_event_list {
$$ = $1;
$$.default_event_list = $2;
}
;
default_event_list : BEGIN DEFAULT_EVENT_LIST default_event_list_data END DEFAULT_EVENT_LIST {
$$ = $3;
}
;

default_event_list_data : {
$$ = new DEFAULT_EVENT_LIST(@$);
}
| default_event_list_data IDENTIFIER NUMBER {
$$ = $1;
$$.events.Add($3);
}
;


Expand All @@ -1495,9 +1521,9 @@ daq : BEGIN DAQ daq_data END DAQ {
}
;

daq_data : IDENTIFIER NUMBER NUMBER NUMBER IDENTIFIER IDENTIFIER IDENTIFIER IDENTIFIER NUMBER IDENTIFIER IDENTIFIER{
daq_data : IDENTIFIER NUMBER NUMBER NUMBER IDENTIFIER_list NUMBER IDENTIFIER_list{
//TODO: Implement constructor
$$ = new DAQ(@$);
$$ = new DAQ(@$, $1, $2, $3, $4, $5, $6, $7);
}
| daq_data timestamp_supported {
$$ = $1;
Expand All @@ -1522,6 +1548,10 @@ daq_list_data : NUMBER IDENTIFIER IDENTIFIER IDENTIFIER NUMBER IDENTIFIER NUMBER
//TODO: Implement constructor
$$ = new DAQ_LIST(@$, $1, $3, $5, $7, $9);
}
| NUMBER IDENTIFIER IDENTIFIER IDENTIFIER NUMBER IDENTIFIER NUMBER IDENTIFIER NUMBER IDENTIFIER NUMBER{
//TODO: Implement constructor
$$ = new DAQ_LIST(@$, $1, $3, $5, $7, $9, $11);
}
;

event : BEGIN EVENT event_data END EVENT {
Expand Down Expand Up @@ -1580,28 +1610,36 @@ page : BEGIN PAGE page_data END PAGE {
}
;
page_data : NUMBER IDENTIFIER IDENTIFIER IDENTIFIER {
//Todo: Implement PAGE constructor
//$$ = $1;
//$$ = new PAGE(@$, $1, $1, $1, $1, $1)
}
;

cal_param_group : BEGIN CAL_PARAM_GROUP cal_param_group_data END CAL_PARAM_GROUP {
//$$ = $3;
$$ = $3;
}
;

cal_param_group_data : IDENTIFIER QUOTED_STRING IDENTIFIER NUMBER IDENTIFIER NUMBER IDENTIFIER QUOTED_STRING NUMBER NUMBER NUMBER NUMBER{
//$$ = new CAL_PARAM_GROUP(@$);
// Todo: Give good names to properties
$$ = new CAL_PARAM_GROUP(@$, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12);
};

protocol_layer : BEGIN PROTOCOL_LAYER protocol_layer_data END PROTOCOL_LAYER {
protocol_layer : BEGIN PROTOCOL_LAYER protocol_layer_data END PROTOCOL_LAYER {
$$ = $3;
}
;

protocol_layer_data : NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER IDENTIFIER_list{
//TODO: Implement constructor
//$$ = new CAL_PARAM_GROUP(@$);
$$ = new PROTOCOL_LAYER(@$, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11);
}
| NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER IDENTIFIER_list QUOTED_STRING{
$$ = new PROTOCOL_LAYER(@$, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12);
}
| protocol_layer_data OPTIONAL_CMD IDENTIFIER {
$$ = $1;
$$.optional_cmd.Add($3);
};


Expand Down
2 changes: 1 addition & 1 deletion Asap2/Asap2.Parser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ private object EnumToStringOrAbort(Type type, string strIn)
{
return Enum.Parse(type, strIn);
}
catch (ArgumentException e)
catch (ArgumentException)
{
StringBuilder values = new StringBuilder();
string[] myArray = Enum.GetNames(type);
Expand Down
1 change: 1 addition & 0 deletions Asap2/Asap2.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
<Compile Include="Asap2Tree\CHARACTERISTIC.cs" />
<Compile Include="Asap2Tree\CHECKSUM.cs" />
<Compile Include="Asap2Tree\COMPU_METHOD.cs" />
<Compile Include="Asap2Tree\DEFAULT_EVENT_LIST.cs" />
<Compile Include="Asap2Tree\DEFINED_PAGES.cs" />
<Compile Include="Asap2Tree\CODE_CHK.cs" />
<Compile Include="Asap2Tree\DIAG_BAUD.cs" />
Expand Down
1 change: 0 additions & 1 deletion Asap2/Asap2Tree/AXIS_PTS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ public AXIS_PTS(Location location, string Name, string LongIdentifier, UInt64 Ad

/// <summary>
/// Reference to the relevant record of the description of the conversion method (see <see cref="COMPU_METHOD"/>).
/// If there is no conversion method, as in the case of <see cref="CURVE_AXIS"/>,
/// the parameter ‘Conversion’ should be set to “NO_COMPU_METHOD" (measurement and calibration systems must be able to handle this case).
/// </summary>
[Element(7, IsArgument = true, Comment = " Conversion ")]
Expand Down
29 changes: 29 additions & 0 deletions Asap2/Asap2Tree/CAL_PARAM_GROUP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,34 @@ public class CAL_PARAM_GROUP : Asap2Base
public CAL_PARAM_GROUP(Location location) : base(location)
{
}

public CAL_PARAM_GROUP(Location location, string s1, string s2, string s3, decimal d1, string s4, decimal d2, string s5, string s6, decimal d3, decimal d4, decimal d5, decimal d6) : this(location)
{
S1 = s1;
S2 = s2;
S3 = s3;
D1 = d1;
S4 = s4;
D2 = d2;
S5 = s5;
S6 = s6;
D3 = d3;
D4 = d4;
D5 = d5;
D6 = d6;
}

public string S1 { get; }
public string S2 { get; }
public string S3 { get; }
public decimal D1 { get; }
public string S4 { get; }
public decimal D2 { get; }
public string S5 { get; }
public string S6 { get; }
public decimal D3 { get; }
public decimal D4 { get; }
public decimal D5 { get; }
public decimal D6 { get; }
}
}
Loading

0 comments on commit 3819f34

Please sign in to comment.