Skip to content
Permalink
Browse files

mantis 0000872

  • Loading branch information...
gmamais
gmamais committed Jun 17, 2019
1 parent 4e6a988 commit ed11d00757ca9b17083afde0f3c4288e3ed6c280
@@ -29,8 +29,8 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<DocumentationFile>bin\Debug\Asn1f4.XML</DocumentationFile>
<Prefer32Bit>true</Prefer32Bit>
<StartWorkingDirectory>C:\prj\GitHub\asn1scc\tmp4\pres-when</StartWorkingDirectory>
<StartArguments>-c -ACN -atc -o c_out/ a.asn1 a.acn</StartArguments>
<StartWorkingDirectory>C:\prj\GitHub\asn1scc\mantis\0000872</StartWorkingDirectory>
<StartArguments>-icdUper out2.html a.asn1</StartArguments>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -26,6 +26,8 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<WarningLevel>3</WarningLevel>
<DocumentationFile>bin\Debug\BackendAst.XML</DocumentationFile>
<StartWorkingDirectory>C:\prj\GitHub\asn1scc\mantis\0000872</StartWorkingDirectory>
<StartArguments>-icdUper out2.html a.asn1</StartArguments>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -314,14 +314,21 @@ let PrintTas (stgFileName:string) (m:Asn1Module) (tas:IcdTypeAssignment) (r:AstR
let getModuleIcdTasses (m:Asn1Module) =

m.TypeAssignments |>
Seq.collect(fun x -> GetMySelfAndChildren x.Type) |>
Seq.collect(fun x -> GetMySelfAndChildren x.Type) |>
//Seq.choose(fun x -> match x.Kind with ReferenceType ref -> Some (ref.baseInfo.modName.Value,ref.baseInfo.tasName.Value) |_ -> None) |> Seq.toList
Seq.choose(fun x ->
let comments =
match x.tasInfo with
| Some tas ->
match m.TypeAssignments |> List.tryFind(fun ts -> ts.Name.Value = tas.tasName) with
| Some tas -> tas.Comments
| None -> [||]
| None -> [||]
let td = x.FT_TypeDefintion.[CommonTypes.C]
match td.kind with
| "FE_Reference2OtherType" | "FE_Reference2RTL" -> None
| "NewTypeDefinition" -> Some {IcdTypeAssignment.name = td.asn1Name; comments=[||]; t=x; isBlue = false}
| _ (*NewSubTypeDefinition*) -> Some {IcdTypeAssignment.name = td.asn1Name; comments=[||]; t=x; isBlue = true} )
| "NewTypeDefinition" -> Some {IcdTypeAssignment.name = td.asn1Name; comments=comments; t=x; isBlue = false}
| _ (*NewSubTypeDefinition*) -> Some {IcdTypeAssignment.name = td.asn1Name; comments=comments; t=x; isBlue = true} )
|> Seq.toList

let PrintModule (stgFileName:string) (m:Asn1Module) (f:Asn1File) (r:AstRoot) =
@@ -0,0 +1,7 @@
D DEFINITIONS ::=
BEGIN

-- Units: volts
Volt ::= BOOLEAN

END
@@ -0,0 +1,245 @@
table
{
border: 2px solid black;
border-collapse: collapse;
font-family: Arial, Helvetica, sans-serif;
max-width: 60em;
}

table td
{
border-left: 1px solid gray;
border-top: 1px solid gray;
padding-top: 2pt;
padding-bottom: 2pt;
padding-left: 3pt;
padding-right: 3pt;
}

table td:first-child
{
border-left: none;
}

.headerRow
{
background-color: #BBBBBB;
}

.typeRow
{
font-size: 14pt;
color: white;
background-color: gray;
white-space: nowrap;
}

.hrNo
{
text-align: center;
color: white;
font-size: 10pt;
width: 1%;
}

.hrField
{
text-align: left;
color: white;
font-size: 10pt;
width: 15%;
}

.hrComment
{
text-align: left;
color: white;
font-size: 10pt;
width: 20%;
}

.hrType
{
text-align: left;
color: white;
font-size: 10pt;
width: 20%;
}

.hrConstraint
{
text-align: left;
color: white;
font-size: 10pt;
white-space: nowrap;
width: 1%;
}

.hrConstraint2
{
text-align: left;
color: white;
font-size: 10pt;
}

.hrOptional
{
text-align: left;
color: white;
font-size: 10pt;
white-space: nowrap;
width: 1%;
}

.hrMin
{
text-align: left;
color: white;
font-size: 10pt;
white-space: nowrap;
width: 1%;
}

.hrMax
{
text-align: left;
color: white;
font-size: 10pt;
white-space: nowrap;
width: 1%;
}

.CommentRow
{
background-color: #e9e9e9;
height: 18pt;
}

.OddRow
{
background-color: #e9e9e9;
height: 18pt;
}

.EvenRow
{
background-color: #DBDBDB;
height: 18pt;
}

.no
{
text-align: center;
color: black;
font-size: 9pt;
}

.field
{
text-align: left;
color: black;
font-size: 9pt;
}

.comment
{
color: black;
font-size: 9pt;
text-align: left;
}

.comment2
{
color: black;
font-size: 9pt;
text-align: left;
}

.threeDots
{
color: black;
font-size: 9pt;
text-align:center;
}

.type
{
text-align: left;
color: black;
font-size: 9pt;
}

.constraint
{
text-align: left;
color: black;
white-space: nowrap;
font-size: 9pt;
}

.optional
{
text-align: left;
color: black;
font-size: 9pt;
white-space: nowrap;
}

.min
{
text-align: right;
color: black;
font-size: 9pt;
}

.max
{
text-align: right;
color: black;
font-size: 9pt;
}

h1
{
font-family: Verdana, Sans-Serif;
color: black;
font-size: 14pt;
}

h2
{
font-family: Verdana, Sans-Serif;
color: black;
font-size: 12pt;
}

a
{
color: black;
}

a.fileLink
{
color: white;
}

a.acnParamsLink
{
color: white;
text-decoration: none;
vertical-align: super;
font-size: 8pt;
}

ul.enumeration
{
list-style-type: square;
margin-top: 0pt;
margin-bottom: 1pt;
padding-left: 20pt;
}

font.enumeration_name
{
font-style: italic;
}
@@ -0,0 +1,76 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>ICD</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<link rel="stylesheet" href="out.css" />
</head>
<body>
<em>The following tables describe the binary encodings of the data model using the ACN Encoding Rules.
</em><br/><br/>
<div style="width: 100%">
<h1>Module D</h1>
<i>Defined in: a.asn1.</i><p>
</p>
<a name="ICD_Volt"></a>
<table width="100%" >
<tbody>

<tr class="typeRow">
<td colspan="2" >
Volt <font size="-1">(BOOLEAN)</font>
<font size="-2"><a href="#ASN1_Volt" class="fileLink">ASN.1</a> </font>
</td>

<td align="left">
<font size="-1">Min:&nbsp;1&nbsp;bytes</font>
</td>

<td align="left">
<font size="-1">Max:&nbsp;1&nbsp;bytes</font>
</td>
</tr>

<tr class="CommentRow">
<td class="comment2" colspan="4"></td>
</tr>

<tr class="headerRow">
<td class="hrConstraint2" colspan="2">Constraints</td>
<td class="hrMin">Min Length (bits)</td>
<td class="hrMax">Max Length (bits)</td>
</tr>

<tr class="OddRow">
<td class="constraint" colspan="2">N.A.</td>
<td class="min" >1</td>
<td class="max" >1</td>
</tr>

</tbody>
</table>
&nbsp;<br/>
</div>

<hr />
<a name="ACN_PARAMS_EXPLAINED123"></a>
<em>ACN Parameters</em><br/>
In the standard ASN.1 encodings such as uPER, BER etc, the encoding and decoding of any type has no external dependencies. For example, the encoded data for a SEQUENCE OF depends on the number of items in the SEQUENCE OF (the length determinant) and the type of item contained in the SEQUENCE. On the other hand, ACN allows types to be parameterized. For instance, the length of a SEQUENCE OF may be determined by the value of an external field. In this case, the SEQUENCE OF is parameterized and the input parameter is the field providing the length.
<hr />
<br/>
<div style="width: 100%">
<h1 >File : a.asn1</h1>
<div style="width: 100%; white-space:pre; font-family:Courier New; font-size:small">
D <b><font color="#5F9EA0">DEFINITIONS</font></b> ::=
<b><font color="#5F9EA0">BEGIN</font></b>

<font color="#008000"><i>-- Units: volts
</i></font><a name="ACN_Volt"></a><a href="#ICD_Volt"><font color="#B8860B"><b>Volt</b></font></a> ::= <b><font color="#5F9EA0">BOOLEAN</font></b>

<b><font color="#5F9EA0">END</font></b>
</div>
</div>


</body>
</html>

0 comments on commit ed11d00

Please sign in to comment.
You can’t perform that action at this time.