aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-06-28 00:11:55 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-06-28 00:11:55 +0200
commit7d3f0a811c733ac73817f5049562b6ebab2abc28 (patch)
tree76cd5a40e742cc46a26aa127ba3f1ddd3aea9724
parentda303a309a15cf0aa890c638445c1649201dd678 (diff)
Add basic acse definitions
-rw-r--r--ACSE/acse.go59
-rw-r--r--CSTA/user-information.go40
2 files changed, 99 insertions, 0 deletions
diff --git a/ACSE/acse.go b/ACSE/acse.go
new file mode 100644
index 0000000..6b799b2
--- /dev/null
+++ b/ACSE/acse.go
@@ -0,0 +1,59 @@
+package acse
+
+// 2.2.0.0.1
+
+type ObjectIdentifier []int // asn1.ObjectIdentifier
+
+// Application Constructed implicit 0
+type AARQ struct {
+ ProtocolVersion Version // 0 implicit BitString
+ ApplicationContextName ObjectIdentifier // 1
+ UserInformation interface{} // 30 implicit
+}
+
+type Version byte
+
+const (
+ Version1 Version = iota
+)
+
+// Application Constructed implicit 1
+type AARE struct {
+ ProtocolVersion Version // 0 implicit BitString
+ ApplicationContextName ObjectIdentifier // 1
+ Result Result // 2
+ ResultSourceDiagnostic AcseServiceUser // 3
+ UserInformation interface{} // 30 implicit
+}
+
+type Result int
+
+const (
+ Accepted Result = iota
+ RejectedPermanent
+)
+
+type AcseServiceUser int
+
+const (
+ Null AcseServiceUser = iota
+ NoReasonGiven
+)
+
+// Application Constructed implicit 2
+type RLRQ struct{}
+
+// Application Constructed implicit 3
+type RLRE struct{}
+
+// Application Constructed implicit 4
+type ABRT struct {
+ AbortSource AbortSource // 0 implicit
+}
+
+type AbortSource int
+
+const (
+ ServiceUser AbortSource = iota
+ ServiceProvider
+)
diff --git a/CSTA/user-information.go b/CSTA/user-information.go
new file mode 100644
index 0000000..aa8cd7f
--- /dev/null
+++ b/CSTA/user-information.go
@@ -0,0 +1,40 @@
+package csta
+
+// 1.3.12.0.285.200
+
+var OID = []int{1, 3, 12, 0, 285, 200}
+
+type ACSEUserInformationForCSTA struct {
+ NewDefinition struct { // 0 implicit
+ CSTAVersion CSTAVersion
+ }
+}
+
+type CSTAVersion byte
+
+const (
+ VersionOne CSTAVersion = iota // ECMA-180
+ VersionTwo // ECMA-218
+ VersionThree // ECMA-285, 1st Edition
+ VersionFour // ISO/IEC 18952
+ VersionFive // ECMA-285, 2nd Edition
+ VersionSix // ECMA-323
+ VersionSeven // ECMA-323, 2nd Edition
+ VersionEight // ECMA-323, 3rd Edition
+ VersionNine // ECMA-323, 4th Edition, Tag option
+ VersionTen // ECMA-323, 4th Edition, short Tag option
+ VersionEleven // ECMA-323, 4th Edition, dynamic transformation option
+ VersionTwelve // ECMA-323, 5th Edition, Tag option
+ VersionThirteen // ECMA-323, 5th Edition, short option
+ VersionFourteen // ECMA-323, 5th Edition, dynamic transformation option
+ VersionFifteen // ECMA-285, 3rd Edition
+ VersionSixteen // ECMA-323, 6th Edition, Tag option
+ VersionSeventeen // ECMA-323, 6th Edition, short Tag option
+ VersionEighteen // ECMA-323, 6th Edition, dynamic transformatin option
+ VersionNineteen // ECMA-285, 4th Edition
+ VersionTwenty // Reserved for future use
+ VersionTwentyone // Reserved for future use
+ VersionTwentytwo // Reserved for future use
+ VersionTwentythree // Reserved for future use
+ VersionTwentyfour // Reserved for future use
+)