Commit 422e9da1 authored by ASN.1 Documenter's avatar ASN.1 Documenter
Browse files

temp doc files

parent 1f5e0157
Loading
Loading
Loading
Loading
+20 −30
Original line number Diff line number Diff line
@@ -9,6 +9,8 @@ DEFINITIONS AUTOMATIC TAGS ::=

BEGIN

--! [[TOC]]

IMPORTS 
--! Include ETSI TS 102 894-2 references from https://forge.etsi.org/rep/ITS/asn1/cdd_ts102894_2/blob/master/ITS-Container.asn
ItsPduHeader, Latitude, Longitude, TimestampIts, ProtectedZoneRadius, ProtectedZoneID FROM ITS-Container {
@@ -22,8 +24,8 @@ itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1)
en (302637) cam (2) version (2)
}

--! Include ETSI TS 103 300-3 references from https://forge.etsi.org/rep/ITS/asn1/vam-ts103300_3/blob/master/VAM-Temp-Imports.asn  
--!     *This is temporary*   
--! Include ETSI TS 103 300-3 references from https://forge.etsi.org/rep/ITS/asn1/vam-ts103300_3/blob/master/VAM-Temp-Imports.asn <br>  
--!     *This is temporary * :<br> 
--!       *Import from **VAM-Temp-Imports** will be changed to CDD ETSI TS 102 894-2 Release 2 when available*
AreaCircular, AreaRectangle, AreaPolygon, OffsetPoint, SemiRangeLength, WGS84AngleValue FROM VAM-Temp-Imports { 
itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg1(1)  
@@ -31,15 +33,13 @@ ts(103300) temp-imports(255) version1(1)
}
;

--! _Interference Management Zone Message Root_

--! This DF includes DEs for the IMZM _protocolVersion_, the IMZ message type identifier _messageID_ 
--! and the station identifier _stationID_ of the originating ITS-S.
--! This DF includes DEs for the IMZM `protocolVersion`, the IMZ message type identifier `messageID` 
--! and the station identifier `stationID` of the originating ITS-S.
IMZM ::= SEQUENCE {
--! * The DE _protocolVersion_ is used to select the appropriate protocol decoder at the receiving ITS-S.
--!   For TS 103 724 V2.1.1, the value of the DE _protocolVersion_ shall be set to 1.
--! * The DE _messageID_ shall be harmonized with other V2X message identifier definitions.
--!   For IMZM, the DE messageID shall be set to @todo imzm(15).  
--! * The DE `protocolVersion` is used to select the appropriate protocol decoder at the receiving ITS-S.
--!   For TS 103 724 V2.1.1, the value of the DE `protocolVersion` shall be set to `1`.
--! * The DE `messageID` shall be harmonized with other V2X message identifier definitions.
--!   For IMZM, the DE `messageID` shall be set to @todo `imzm(15)`.  
   header ItsPduHeader,
   imzm InterferenceManagementZoneMessage
}
@@ -52,9 +52,8 @@ InterferenceManagementZoneMessage ::= SEQUENCE {
}

--! The sequence of containers in the @ref IMZM. Other containers may be added in the future.

ImzmParameters ::= SEQUENCE {
    --! imported from CAM-PDU-Descriptions
    --! imported from @ref CAM-PDU-Descriptions
    basicContainer BasicContainer, 
    --! container specific to the @ref IMZM
    imzmContainer ImzmContainer,
@@ -72,8 +71,8 @@ ImzmContainer ::= SEQUENCE {

--! A list of up to 16 interference management communication zones.
--!
--! EXAMPLE: An interference management communication zone may be defined around a 
--!          CEN DSRC road side equipment or an urban rail operational area.  
--! > EXAMPLE: An interference management communication zone may be defined around a 
--! >          CEN DSRC road side equipment or an urban rail operational area.  
--!
--! @category: Infrastructure information, Communication information
InterferenceManagementZones ::= SEQUENCE (SIZE(1..16)) OF InterferenceManagementZone
@@ -105,7 +104,6 @@ ZoneDefinition::= SEQUENCE{
    ...
}

--! _Interference Management Info_
--! A list of up to 16 definitions of which interference management may be applied in the zone, 
--! per affected frequency channels.  
--! NOTE: in the case where no mitigation should be applied by the ITS-S, this is indicated 
@@ -113,7 +111,6 @@ ZoneDefinition::= SEQUENCE{
--! @category: Infrastructure information, Communication information
InterferenceManagementInfo::= SEQUENCE (SIZE(1..16,...)) OF InterferenceManagementInfoPerChannel

--! _InterferenceManagementInfoPerChannel_   
--! A break up of the interference management information per affected frequency channels.  
--!
--! @category: Infrastructure information, Communication information
@@ -124,8 +121,8 @@ InterferenceManagementInfoPerChannel ::= SEQUENCE {
    interferenceManagementZoneType        InterferenceManagementZoneType,
    --! Type of the mitigation to be used in the interference management zone.
    interferenceManagementMitigationType  InterferenceManagementMitigationType OPTIONAL,
    --! Time at which the validity of the interference management communication zone will expire.<br>
    --! _This DE is present when the interference management is temporarily valid._
    --! Time at which the validity of the interference management communication zone will expire.
    --! > This DE is present when the interference management is temporarily valid.
    expiryTime                            TimestampIts OPTIONAL, --! from ITS-Container
    ...
}
@@ -195,7 +192,6 @@ MitigationPerTechnologyClass ::= SEQUENCE {
   ...
}

--! @brief DE- channel access technology class 
--! Access technology to which the mitigation type applies.
--! @category: Communication information
AccessTechnologyClass ::= ENUMERATED {
@@ -210,8 +206,7 @@ AccessTechnologyClass ::= ENUMERATED {
   ...
}

--! @brief DF- Shape of the interference management zone
--! Bounding box of an interference management  zone
--! Shape of the interference management zone.
--! @category: GeoReference information
InterferenceManagementZoneShape::= CHOICE {
   rectangle    AreaRectangle,
@@ -221,23 +216,18 @@ InterferenceManagementZoneShape::= CHOICE {
   ...
}

--! @brief DF- Area Ellipse
--! Area Ellipse copied from CPM TR 103 562. Will be removed when CDD Release 2 is available.
--! Describes an elliptical area. The ellipse is centred about the reference point 
--! of the ITS-S or about the nodeCenterPoint (if provided).
--! @category: GeoReference information
AreaEllipse  ::= SEQUENCE {
    --! @details nodeCenterPoint
    --! Optional offset point about which the ellipse is centred with respect to the reference
    --! position of the ITS-S.
    nodeCenterPoint             OffsetPoint OPTIONAL,
    --! @details semiMajorRangeLength
    --! Minor radius of the ellipse.
    semiMajorRangeLength        SemiRangeLength,
    --! @details semiMinorRangeLength
    --! Major radius of the ellipse.
    semiMinorRangeLength        SemiRangeLength,
    --! @details semiMajorRangeOrientation
    --! Orientation of the semiMajorRangeLength of the ellipse in the WGS84 coordinate system.
    semiMajorRangeOrientation   WGS84AngleValue
}
+41 −44
Original line number Diff line number Diff line
@@ -30,33 +30,33 @@ import re # for regular expressions

## extract doxygen-tag namespace
RE_MODULE = re.compile(
	'^(\w[\w-]*)[\s{](?:.|\n)*DEFINITIONS(?:.|\n)*::=\s*BEGIN'
	r'^(\w[\w-]*)[\s{](?:.|\n)*DEFINITIONS(?:.|\n)*::=\s*BEGIN'
	, re.IGNORECASE | re.VERBOSE | re.DOTALL | re.MULTILINE)
RE_EXPORTS = re.compile(
	'^\s*EXPORTS .*?;' 
	r'^\s*EXPORTS .*?;' 
	, re.VERBOSE | re.DOTALL | re.MULTILINE)

RE_IMPORTS = re.compile(
	'^\s*IMPORTS .*?;' 
	r'^\s*IMPORTS .*?;' 
	, re.VERBOSE | re.DOTALL | re.MULTILINE)

RE_END = re.compile(
	'^\s*END\s*$' 
	r'^\s*END\s*$' 
	, re.VERBOSE | re.MULTILINE)

RE_DOXY_COMMENTS = re.compile(
	'^\s*--[-#!*]\s?'
	r'^\s*--[-#!]\s'
	, re.VERBOSE | re.MULTILINE)

RE_DOXY_C_COMMENTS = re.compile(
	'^\s*/\*\*\s(.*?)\*/'
	, re.VERBOSE | re.MULTILINE)
	r'^\s*/\*\*\s(.*?)\*/'
	, re.VERBOSE | re.MULTILINE | re.DOTALL)

RE_COMMENT = re.compile(
	'--.*?(?:--|$)'
	r'--.*?(?:--|\n)'
	, re.VERBOSE | re.MULTILINE)

RE_TYPE = re.compile(r'(([A-Z][\w-]*)\s*::=[\w\s]+(?:{(.*?)})?.*?)\n\s*\n'
RE_TYPE = re.compile(r'(([A-Z][\w-]*)\s*::=[\w \t]+(?:{(.*?)})?.*?)\n\s*\n'
	, re.VERBOSE | re.MULTILINE | re.DOTALL)

extTypes = {}
@@ -69,35 +69,40 @@ def indentString(s, indent):
	return s

def parseText(content, indent=None):
	c = RE_DOXY_COMMENTS.sub('', content)
	if c is not None:
		content = c
	c = RE_DOXY_C_COMMENTS.sub(r'\g<1>', content)
	if c is not None:
		content = c
	c = RE_COMMENT.sub('', content)
	# we need to keep only documenting text under the /** */ and --!
	c = re.sub(r'^\s*--[-!#]\s(.*)', '/** \g<1>*/', content, 0, re.MULTILINE)
	if c is not None:
		content = c
	if indent is not None:
		content = indentString(content, indent)
	ret = ''
	for m in RE_DOXY_C_COMMENTS.finditer(content):
		lines = m[1].splitlines()
		for l in lines:
			l = re.sub(r'\s*\*', '', l, 1).rstrip()
			ret += l + '\n'
	def repl_ref(m):
		return '[**{0}**]({1}#{0})'.format(m[1], extTypes.get(m[1],''))
	c = re.sub(r'@ref\s+([\w-]+)', repl_ref, content, 0, re.VERBOSE | re.MULTILINE)
	c = re.sub(r'@ref\s+([\w-]+)', repl_ref, ret, 0, re.VERBOSE | re.MULTILINE)
	if c is not None:
		content = c
	return content
		ret = c
	c = re.sub(r'@class\s+([\w-]+)', '', ret, 0, re.VERBOSE | re.MULTILINE)
	if c is not None:
		ret = c
	c = re.sub(r'@brief\s+', '', ret, 0, re.VERBOSE | re.MULTILINE)
	if c is not None:
		ret = c
	return ret
cpos=0
def parseModule(mname, content):
	global cpos
	cpos = 0
	def repl_import(m):
		global cpos
		cpos = m.start()
		ret = '## Imports:\n'
	ret = ''
	m = re.search(r'^\s*IMPORTS\s*(.*?);', content, re.VERBOSE | re.DOTALL | re.MULTILINE)
	if m is not None:
		pos = 0
		if m[1] is not None:
			ret += '## Imports:\n'
			s = m[1]
			for fm in re.finditer(r'^([,\s\w-]*?)FROM\s*([\w-]+)\s*({[^}]*})?', s, re.VERBOSE | re.MULTILINE):
			for fm in re.finditer(r'^([,\s\w-]*?)FROM\s*([\w-]+)\s*({[^}]*}(?:\s+WITH\s+SUCCESSORS)?)?', s, re.VERBOSE | re.MULTILINE):
				imName = fm[2]
				for im in re.finditer(r'[^,\s]+', fm[1], 0):
					extTypes[im[0]] = imName+'.md'
@@ -105,21 +110,12 @@ def parseModule(mname, content):
				ret += parseText(s[pos:fm.start()], 3)+'\n'
				pos = fm.end()
			ret += parseText(s[pos:])
		cpos += len(ret)
		return ret
		cpos = m.end()

	c = re.sub(r'^\s*IMPORTS\s*(.*?);', repl_import, content, 1, re.VERBOSE | re.DOTALL | re.MULTILINE)
	if c is not None:
		content = c

	def repl_exports(m):
		global cpos
		if cpos < m.start():
			cpos = m.start()
		return ''
	c = re.sub(r'^\s*EXPORTS.*?;', repl_exports, content, 1, re.VERBOSE | re.DOTALL | re.MULTILINE)
	if c is not None:
		content = c
	m = re.search(r'^\s*EXPORTS.*?;', content, re.VERBOSE | re.DOTALL | re.MULTILINE)
	if m is not None:
		if cpos < m.end():
			cpos = m.end()
	
	# parse types
	def repl_type (m, doc):
@@ -132,8 +128,8 @@ def parseModule(mname, content):
			pos = 0
			for fm in re.finditer('^\s*([\w-]+?)\s+(OCTET\s+STRING|BIT\s+STRING|[A-Z][.\w-]+)?(.*?)(?:,|$)', m[3], re.VERBOSE | re.MULTILINE | re.DOTALL):
				if fm[2] is not None:
					t = fm[2].strip()
					f = fm[1].strip()
					t = fm[2].strip()
					if re.match('^OCTET\s+STRING|BIT\s+STRING|BOOLEAN|INTEGER|FLOAT', t, re.VERBOSE|re.MULTILINE) is not None:
						ret += '* {0} **{1}** {2}<br>\n'.format(f, t, fm[3] or '')
					else:
@@ -142,10 +138,11 @@ def parseModule(mname, content):
				pos = fm.end()
		
		return ret + '```asn1\n' + re.sub(r'^\s*--.*\n', '', m[1].strip(), 0, re.MULTILINE) +'\n```\n\n'
	ret = content[:cpos]

	pos = 0
	for m in RE_TYPE.finditer(content[cpos:]):
		ret += repl_type (m, m.string[pos:m.start()])
		ss = repl_type (m, m.string[pos:m.start()])
		ret += ss
		pos = m.end()
	return ret

+17 −22
Original line number Diff line number Diff line
@@ -10,23 +10,22 @@ Include ETSI TS 102 894-2 references from https://forge.etsi.org/rep/ITS/asn1/cd
Include ETSI EN 302 637-2 references from https://forge.etsi.org/rep/ITS/asn1/cam_en302637_2/blob/master/CAM-PDU-Descriptions.asn

 * **VAM-Temp-Imports** *{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg1(1) ts(103300) temp-imports(255) version1(1) }*<br/>
Include ETSI TS 103 300-3 references from https://forge.etsi.org/rep/ITS/asn1/vam-ts103300_3/blob/master/VAM-Temp-Imports.asn
This is temporary*
Include ETSI TS 103 300-3 references from https://forge.etsi.org/rep/ITS/asn1/vam-ts103300_3/blob/master/VAM-Temp-Imports.asn <br>
This is temporary * :<br>
Import from **VAM-Temp-Imports** will be changed to CDD ETSI TS 102 894-2 Release 2 when available*

## <a name="IMZM"></a>IMZM

_Interference Management Zone Message Root_
This DF includes DEs for the IMZM _protocolVersion_, the IMZ message type identifier _messageID_
and the station identifier _stationID_ of the originating ITS-S.
This DF includes DEs for the IMZM `protocolVersion`, the IMZ message type identifier `messageID`
and the station identifier `stationID` of the originating ITS-S.


Fields:
* header [**ItsPduHeader**](ITS-Container.md#ItsPduHeader) <br>
 The DE _protocolVersion_ is used to select the appropriate protocol decoder at the receiving ITS-S.
  For TS 103 724 V2.1.1, the value of the DE _protocolVersion_ shall be set to 1.
 The DE _messageID_ shall be harmonized with other V2X message identifier definitions.
  For IMZM, the DE messageID shall be set to @todo imzm(15).
 The DE `protocolVersion` is used to select the appropriate protocol decoder at the receiving ITS-S.
  For TS 103 724 V2.1.1, the value of the DE `protocolVersion` shall be set to `1`.
 The DE `messageID` shall be harmonized with other V2X message identifier definitions.
  For IMZM, the DE `messageID` shall be set to @todo `imzm(15)`.
* imzm [**InterferenceManagementZoneMessage**](#InterferenceManagementZoneMessage) <br>
```asn1
IMZM ::= SEQUENCE {
@@ -58,7 +57,7 @@ The sequence of containers in the [**IMZM**](#IMZM). Other containers may be add

Fields:
* basicContainer [**BasicContainer**](CAM-PDU-Descriptions.md#BasicContainer) <br>
imported from CAM-PDU-Descriptions
imported from [**CAM-PDU-Descriptions**](#CAM-PDU-Descriptions)
* imzmContainer [**ImzmContainer**](#ImzmContainer) <br>
container specific to the [**IMZM**](#IMZM)
```asn1
@@ -89,8 +88,8 @@ ImzmContainer ::= SEQUENCE {
## <a name="InterferenceManagementZones"></a>InterferenceManagementZones

A list of up to 16 interference management communication zones.
--! EXAMPLE: An interference management communication zone may be defined around a
         CEN DSRC road side equipment or an urban rail operational area.
--! > EXAMPLE: An interference management communication zone may be defined around a
>          CEN DSRC road side equipment or an urban rail operational area.
--! @category: Infrastructure information, Communication information


@@ -149,7 +148,6 @@ ZoneDefinition::= SEQUENCE{

## <a name="InterferenceManagementInfo"></a>InterferenceManagementInfo

_Interference Management Info_
A list of up to 16 definitions of which interference management may be applied in the zone,
per affected frequency channels.
NOTE: in the case where no mitigation should be applied by the ITS-S, this is indicated
@@ -163,7 +161,6 @@ InterferenceManagementInfo::= SEQUENCE (SIZE(1..16,...)) OF InterferenceManageme

## <a name="InterferenceManagementInfoPerChannel"></a>InterferenceManagementInfoPerChannel

_InterferenceManagementInfoPerChannel_
A break up of the interference management information per affected frequency channels.
--! @category: Infrastructure information, Communication information

@@ -176,8 +173,8 @@ Type of the interference management zone.
* interferenceManagementMitigationType [**InterferenceManagementMitigationType**](#InterferenceManagementMitigationType)  OPTIONAL<br>
Type of the mitigation to be used in the interference management zone.
* expiryTime [**TimestampIts**](ITS-Container.md#TimestampIts)  OPTIONAL<br>
Time at which the validity of the interference management communication zone will expire.<br>
_This DE is present when the interference management is temporarily valid._
Time at which the validity of the interference management communication zone will expire.
> This DE is present when the interference management is temporarily valid.
```asn1
InterferenceManagementInfoPerChannel ::= SEQUENCE {
    interferenceManagementChannel         InterferenceManagementChannel,
@@ -296,7 +293,6 @@ MitigationPerTechnologyClass ::= SEQUENCE {

## <a name="AccessTechnologyClass"></a>AccessTechnologyClass

DE- channel access technology class
Access technology to which the mitigation type applies.
@category: Communication information

@@ -314,8 +310,7 @@ AccessTechnologyClass ::= ENUMERATED {

## <a name="InterferenceManagementZoneShape"></a>InterferenceManagementZoneShape

DF- Shape of the interference management zone
Bounding box of an interference management  zone
Shape of the interference management zone.
@category: GeoReference information