{
  "synLogic": "int $ret \u003d $api($1, $2, $3, $4, $5);",
  "help": "The ns_protobuf_encode is used to encode the proto file and give result in protobuf encoded format(binary)",
  "notes": "",
  "returns": "int",
  "arguments": "\u003ctable class\u003d\"newGuiTable\" style\u003d\"width:100%\" \u003e \u003ctr\u003e \u003cth\u003e Argument \u003c/th\u003e  \u003cth\u003e Description \u003c/th\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd\u003e Xml Data \u003c/td\u003e \u003ctd\u003e The input XML data or XML file name to be encoded in protobuf format \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e		\u003ctd\u003e File Or Buffer \u003c/td\u003e \u003ctd\u003e A flag to indicate whether the xml_data parameter contains the XML file name or the actual XML data. If set to 1, the xml_data parameter is considered as the XML file name. If set to 0, the xml_data parameter is considered as the actual XML data. \u003c/td\u003e	\u003c/tr\u003e \u003ctr\u003e \u003ctd\u003e Proto file name \u003c/td\u003e \u003ctd\u003e The name of the proto file that contains the message definition to be encoded. \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e  \u003ctd\u003e Message Type \u003c/td\u003e  \u003ctd\u003e The name of the message type defined in the proto file to be encoded. \u003c/td\u003e \u003c/tr\u003e  \u003ctr\u003e   \u003ctd\u003e Encode Param \u003c/td\u003e \u003ctd\u003e The name of the NS parameter in which the encoded data will be stored. \u003c/td\u003e \u003c/tr\u003e \u003c/table\u003e",
  "parameterization": "argument xml_data can be parametrized using standard parametrization",
  "name": "ns_protobuf_encode",
  "syntax": "int ns_protobuf_encode(char *xml_data, int is_file_or_buffer, char *proto_fname, char *msg_type, char *enc_param)",
  "javaSyntax": "",
  "cEx": "flow()\n{\n  //For XML File name(mode 1)\n  int len \u003d ns_protobuf_encode(\"/home/cavisson/work_2/scripts/Protobuf/Protobuf/Protobuf_Script/Noida.xml\", 1, \"/home/cavisson/work/scripts//Protobuf/Protobuf_Script/data_2.proto\", \"Noida\", \"dec_encode\");\n\n  // For Buffer(xml data)(mode 0)\n  int len \u003d ns_protobuf_encode(\"Cavisson_encode\" , 0, \"/home/cavisson/work/scripts/Protobuf/Protobuf_Script/wire_type.proto\", \"DataType\", \"dec_encode_wire_type\");\n}",
  "javaEx": "",
  "insertStrC": "ns_protobuf_encode(char *xml_data, int is_file_or_buffer, char *proto_fname, char *msg_type, char *enc_param);",
  "insertStrJava": "",
  "description": "The ns_protobuf_encode is used to encode the proto file and give result in protobuf encoded format(binary)",
  "component": [
    {
      "id": "$1",
      "type": "TEXT_VAR",
      "label": "Xml Data",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter XML Data",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "labelVarCheckbox": "",
      "argIndex": 0,
      "validate": {
        "inputType": "Text",
        "disabled": false,
        "required": true,
        "min": 0,
        "max": 0
      }
    },
    {
      "id": "$2",
      "type": "Dropdown",
      "label": "File Or Buffer",
      "value": "0",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter file type",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "list": [
        {
          "label": "XML File Name",
          "value": "0"
        },
        {
          "label": "XML file data",
          "value": "1"
        }
      ],
      "labelVarCheckbox": "",
      "argIndex": 0,
      "validate": {
        "inputType": "text",
        "disabled": false,
        "required": true,
        "min": 0,
        "max": 0
      }
    },
    {
      "id": "$3",
      "type": "TextField",
      "label": "Proto file name",
      "labelVarCheckbox": "",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Proto file name",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "validate": {
        "inputType": "Text",
        "required": true 
      }
    },
	{
      "id": "$4",
      "type": "TextField",
      "label": "Message Type",
      "labelVarCheckbox": "",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Message Type",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "validate": {
        "inputType": "Text",
        "required": false
      }
    },
	{
      "id": "$5",
      "type": "TextField",
      "label": "Encode Param",
      "labelVarCheckbox": "",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Encode Param",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "validate": {
        "inputType": "Text",
        "required": false
      }
    },
	{
      "id": "$ret",
      "type": "TextField",
      "label": "Return Variable",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter Return Variable",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "labelVarCheckbox": "",
      "argIndex": 0,
	  "title": "First character must be Alpha.\r\nOther characters are Alpha, Numeric or Underscore",
      "validate": {
        "inputType": "Text",
		"pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,63}$",
        "disabled": false,
        "required": false,
        "min": 0,
        "max": 0,
        "method": "isValidVar(arg)"
      }
    }
  ] 
}