diff --git a/e2sm/lib/RIC-ControlAction-Name.c b/e2sm/lib/RIC-ControlAction-Name.c
new file mode 100644
index 0000000..346ea42
--- /dev/null
+++ b/e2sm/lib/RIC-ControlAction-Name.c
@@ -0,0 +1,109 @@
+/*
+ * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
+ * From ASN.1 module "E2SM-KPM-RC"
+ * 	found in "e2sm-kpm-rc.asn"
+ * 	`asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example -D .`
+ */
+
+#include "RIC-ControlAction-Name.h"
+
+static const int permitted_alphabet_table_1[256] = {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/*                  */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/*                  */
+ 1, 0, 0, 0, 0, 0, 0, 2, 3, 4, 0, 5, 6, 7, 8, 9,	/* .      '() +,-./ */
+10,11,12,13,14,15,16,17,18,19,20, 0, 0,21, 0,22,	/* 0123456789:  = ? */
+ 0,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,	/*  ABCDEFGHIJKLMNO */
+38,39,40,41,42,43,44,45,46,47,48, 0, 0, 0, 0, 0,	/* PQRSTUVWXYZ      */
+ 0,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,	/*  abcdefghijklmno */
+64,65,66,67,68,69,70,71,72,73,74, 0, 0, 0, 0, 0,	/* pqrstuvwxyz      */
+};
+static const int permitted_alphabet_code2value_1[74] = {
+32,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54,
+55,56,57,58,61,63,65,66,67,68,69,70,71,72,73,74,
+75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,
+97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,
+113,114,115,116,117,118,119,120,121,122,};
+
+
+static int check_permitted_alphabet_1(const void *sptr) {
+	const int *table = permitted_alphabet_table_1;
+	/* The underlying type is PrintableString */
+	const PrintableString_t *st = (const PrintableString_t *)sptr;
+	const uint8_t *ch = st->buf;
+	const uint8_t *end = ch + st->size;
+	
+	for(; ch < end; ch++) {
+		uint8_t cv = *ch;
+		if(!table[cv]) return -1;
+	}
+	return 0;
+}
+
+int
+RIC_ControlAction_Name_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
+			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
+	const PrintableString_t *st = (const PrintableString_t *)sptr;
+	size_t size;
+	
+	if(!sptr) {
+		ASN__CTFAIL(app_key, td, sptr,
+			"%s: value not given (%s:%d)",
+			td->name, __FILE__, __LINE__);
+		return -1;
+	}
+	
+	size = st->size;
+	
+	if((size >= 1 && size <= 150)
+		 && !check_permitted_alphabet_1(st)) {
+		/* Constraint check succeeded */
+		return 0;
+	} else {
+		ASN__CTFAIL(app_key, td, sptr,
+			"%s: constraint failed (%s:%d)",
+			td->name, __FILE__, __LINE__);
+		return -1;
+	}
+}
+
+static int asn_PER_MAP_RIC_ControlAction_Name_1_v2c(unsigned int value) {
+	if(value >= sizeof(permitted_alphabet_table_1)/sizeof(permitted_alphabet_table_1[0]))
+		return -1;
+	return permitted_alphabet_table_1[value] - 1;
+}
+static int asn_PER_MAP_RIC_ControlAction_Name_1_c2v(unsigned int code) {
+	if(code >= sizeof(permitted_alphabet_code2value_1)/sizeof(permitted_alphabet_code2value_1[0]))
+		return -1;
+	return permitted_alphabet_code2value_1[code];
+}
+/*
+ * This type is implemented using PrintableString,
+ * so here we adjust the DEF accordingly.
+ */
+static asn_oer_constraints_t asn_OER_type_RIC_ControlAction_Name_constr_1 CC_NOTUSED = {
+	{ 0, 0 },
+	-1	/* (SIZE(0..MAX)) */};
+asn_per_constraints_t asn_PER_type_RIC_ControlAction_Name_constr_1 CC_NOTUSED = {
+	{ APC_CONSTRAINED,	 7,  7,  32,  122 }	/* (32..122) */,
+	{ APC_CONSTRAINED | APC_EXTENSIBLE,  8,  8,  1,  150 }	/* (SIZE(1..150,...)) */,
+	asn_PER_MAP_RIC_ControlAction_Name_1_v2c,	/* Value to PER code map */
+	asn_PER_MAP_RIC_ControlAction_Name_1_c2v	/* PER code to value map */
+};
+static const ber_tlv_tag_t asn_DEF_RIC_ControlAction_Name_tags_1[] = {
+	(ASN_TAG_CLASS_UNIVERSAL | (19 << 2))
+};
+asn_TYPE_descriptor_t asn_DEF_RIC_ControlAction_Name = {
+	"RIC-ControlAction-Name",
+	"RIC-ControlAction-Name",
+	&asn_OP_PrintableString,
+	asn_DEF_RIC_ControlAction_Name_tags_1,
+	sizeof(asn_DEF_RIC_ControlAction_Name_tags_1)
+		/sizeof(asn_DEF_RIC_ControlAction_Name_tags_1[0]), /* 1 */
+	asn_DEF_RIC_ControlAction_Name_tags_1,	/* Same as above */
+	sizeof(asn_DEF_RIC_ControlAction_Name_tags_1)
+		/sizeof(asn_DEF_RIC_ControlAction_Name_tags_1[0]), /* 1 */
+	{ &asn_OER_type_RIC_ControlAction_Name_constr_1, &asn_PER_type_RIC_ControlAction_Name_constr_1, RIC_ControlAction_Name_constraint },
+	0, 0,	/* No members */
+	0	/* No specifics */
+};
+
