Eric Betts 2 лет назад
Родитель
Сommit
3a00184049
5 измененных файлов с 123 добавлено и 5 удалено
  1. 14 4
      lib/asn1/SamCommand.c
  2. 4 1
      lib/asn1/SamCommand.h
  3. 60 0
      lib/asn1/Version.c
  4. 39 0
      lib/asn1/Version.h
  5. 6 0
      seader.asn1

+ 14 - 4
lib/asn1/SamCommand.c

@@ -11,7 +11,7 @@ static asn_oer_constraints_t asn_OER_type_SamCommand_constr_1 CC_NOTUSED = {
 	{ 0, 0 },
 	-1};
 asn_per_constraints_t asn_PER_type_SamCommand_constr_1 CC_NOTUSED = {
-	{ APC_CONSTRAINED,	 1,  1,  0,  1 }	/* (0..1) */,
+	{ APC_CONSTRAINED,	 2,  2,  0,  2 }	/* (0..2) */,
 	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
 	0, 0	/* No PER value map */
 };
@@ -25,6 +25,15 @@ asn_TYPE_member_t asn_MBR_SamCommand_1[] = {
 		0, 0, /* No default value */
 		"requestPacs"
 		},
+	{ ATF_NOFLAGS, 0, offsetof(struct SamCommand, choice.version),
+		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
+		-1,	/* IMPLICIT tag at current level */
+		&asn_DEF_NULL,
+		0,
+		{ 0, 0, 0 },
+		0, 0, /* No default value */
+		"version"
+		},
 	{ ATF_NOFLAGS, 0, offsetof(struct SamCommand, choice.cardDetected),
 		(ASN_TAG_CLASS_CONTEXT | (13 << 2)),
 		-1,	/* IMPLICIT tag at current level */
@@ -37,7 +46,8 @@ asn_TYPE_member_t asn_MBR_SamCommand_1[] = {
 };
 static const asn_TYPE_tag2member_t asn_MAP_SamCommand_tag2el_1[] = {
     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* requestPacs */
-    { (ASN_TAG_CLASS_CONTEXT | (13 << 2)), 1, 0, 0 } /* cardDetected */
+    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* version */
+    { (ASN_TAG_CLASS_CONTEXT | (13 << 2)), 2, 0, 0 } /* cardDetected */
 };
 asn_CHOICE_specifics_t asn_SPC_SamCommand_specs_1 = {
 	sizeof(struct SamCommand),
@@ -45,7 +55,7 @@ asn_CHOICE_specifics_t asn_SPC_SamCommand_specs_1 = {
 	offsetof(struct SamCommand, present),
 	sizeof(((struct SamCommand *)0)->present),
 	asn_MAP_SamCommand_tag2el_1,
-	2,	/* Count of tags in the map */
+	3,	/* Count of tags in the map */
 	0, 0,
 	-1	/* Extensions start */
 };
@@ -59,7 +69,7 @@ asn_TYPE_descriptor_t asn_DEF_SamCommand = {
 	0,	/* No tags (count) */
 	{ &asn_OER_type_SamCommand_constr_1, &asn_PER_type_SamCommand_constr_1, CHOICE_constraint },
 	asn_MBR_SamCommand_1,
-	2,	/* Elements count */
+	3,	/* Elements count */
 	&asn_SPC_SamCommand_specs_1	/* Additional specs */
 };
 

+ 4 - 1
lib/asn1/SamCommand.h

@@ -13,6 +13,7 @@
 
 /* Including external dependencies */
 #include "RequestPacs.h"
+#include <NULL.h>
 #include "CardDetected.h"
 #include <constr_CHOICE.h>
 
@@ -24,6 +25,7 @@ extern "C" {
 typedef enum SamCommand_PR {
 	SamCommand_PR_NOTHING,	/* No components present */
 	SamCommand_PR_requestPacs,
+	SamCommand_PR_version,
 	SamCommand_PR_cardDetected
 } SamCommand_PR;
 
@@ -32,6 +34,7 @@ typedef struct SamCommand {
 	SamCommand_PR present;
 	union SamCommand_u {
 		RequestPacs_t	 requestPacs;
+		NULL_t	 version;
 		CardDetected_t	 cardDetected;
 	} choice;
 	
@@ -42,7 +45,7 @@ typedef struct SamCommand {
 /* Implementation */
 extern asn_TYPE_descriptor_t asn_DEF_SamCommand;
 extern asn_CHOICE_specifics_t asn_SPC_SamCommand_specs_1;
-extern asn_TYPE_member_t asn_MBR_SamCommand_1[2];
+extern asn_TYPE_member_t asn_MBR_SamCommand_1[3];
 extern asn_per_constraints_t asn_PER_type_SamCommand_constr_1;
 
 #ifdef __cplusplus

+ 60 - 0
lib/asn1/Version.c

@@ -0,0 +1,60 @@
+/*
+ * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
+ * From ASN.1 module "Seader"
+ * 	found in "seader.asn1"
+ * 	`asn1c -D ./lib/asn1 -no-gen-example -pdu=all`
+ */
+
+#include "Version.h"
+
+static asn_TYPE_member_t asn_MBR_Version_1[] = {
+	{ ATF_NOFLAGS, 0, offsetof(struct Version, v),
+		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
+		-1,	/* IMPLICIT tag at current level */
+		&asn_DEF_OCTET_STRING,
+		0,
+		{ 0, 0, 0 },
+		0, 0, /* No default value */
+		"v"
+		},
+	{ ATF_NOFLAGS, 0, offsetof(struct Version, f),
+		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
+		-1,	/* IMPLICIT tag at current level */
+		&asn_DEF_OCTET_STRING,
+		0,
+		{ 0, 0, 0 },
+		0, 0, /* No default value */
+		"f"
+		},
+};
+static const ber_tlv_tag_t asn_DEF_Version_tags_1[] = {
+	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
+};
+static const asn_TYPE_tag2member_t asn_MAP_Version_tag2el_1[] = {
+    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* v */
+    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* f */
+};
+static asn_SEQUENCE_specifics_t asn_SPC_Version_specs_1 = {
+	sizeof(struct Version),
+	offsetof(struct Version, _asn_ctx),
+	asn_MAP_Version_tag2el_1,
+	2,	/* Count of tags in the map */
+	0, 0, 0,	/* Optional elements (not needed) */
+	-1,	/* First extension addition */
+};
+asn_TYPE_descriptor_t asn_DEF_Version = {
+	"Version",
+	"Version",
+	&asn_OP_SEQUENCE,
+	asn_DEF_Version_tags_1,
+	sizeof(asn_DEF_Version_tags_1)
+		/sizeof(asn_DEF_Version_tags_1[0]), /* 1 */
+	asn_DEF_Version_tags_1,	/* Same as above */
+	sizeof(asn_DEF_Version_tags_1)
+		/sizeof(asn_DEF_Version_tags_1[0]), /* 1 */
+	{ 0, 0, SEQUENCE_constraint },
+	asn_MBR_Version_1,
+	2,	/* Elements count */
+	&asn_SPC_Version_specs_1	/* Additional specs */
+};
+

+ 39 - 0
lib/asn1/Version.h

@@ -0,0 +1,39 @@
+/*
+ * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
+ * From ASN.1 module "Seader"
+ * 	found in "seader.asn1"
+ * 	`asn1c -D ./lib/asn1 -no-gen-example -pdu=all`
+ */
+
+#ifndef	_Version_H_
+#define	_Version_H_
+
+
+#include <asn_application.h>
+
+/* Including external dependencies */
+#include <OCTET_STRING.h>
+#include <constr_SEQUENCE.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Version */
+typedef struct Version {
+	OCTET_STRING_t	 v;
+	OCTET_STRING_t	 f;
+	
+	/* Context for parsing across buffer boundaries */
+	asn_struct_ctx_t _asn_ctx;
+} Version_t;
+
+/* Implementation */
+extern asn_TYPE_descriptor_t asn_DEF_Version;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif	/* _Version_H_ */
+#include <asn_internal.h>

+ 6 - 0
seader.asn1

@@ -22,6 +22,7 @@ ErrorResponse ::= SEQUENCE {
 
 SamCommand ::= CHOICE {
   requestPacs [1] IMPLICIT RequestPacs,
+  version [2] IMPLICIT NULL,
   cardDetected [13] IMPLICIT CardDetected
 }
 
@@ -79,4 +80,9 @@ FrameProtocol ::= ENUMERATED {
   iclass (4)
 }
 
+Version ::= SEQUENCE {
+  v [0] IMPLICIT OCTET STRING,
+  f [1] IMPLICIT OCTET STRING
+}
+
 END