{
  "api": "cf-js-api",
  "docsBaseUrl": "https://documentation.opengate.es/",
  "functions": [
    {
      "examples": [
        {
          "code": "http.server.response.status=200;\nhttp.server.response.body={'msg': 'OK'};\nhttp.server.response.send();\n//continue CF execution\nreturn collection;",
          "language": "javascript"
        }
      ],
      "id": "server.response.send",
      "internal": false,
      "kind": "function",
      "name": "send",
      "namespace": "server.response",
      "page": {
        "title": "HTTP JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/http/",
        "weight": 10
      },
      "signature": "server.response.send()",
      "summary": "Creates HTTP Response with defined properties. The response will be sent once the CF is finished correctly.",
      "url": "api/device_integration/connector_functions/protocol_apis/http/#serverresponsesend"
    },
    {
      "examples": [
        {
          "code": "http.client.uri = \"https://remotehost/uri\";\nhttp.client.headers = {'X-Api-Key':'apikey'};\nhttp.client.body = {'operation_name':'custom_operation_request'};\nvar httpResp = http.client.post();",
          "language": "javascript"
        }
      ],
      "id": "client.post",
      "internal": false,
      "kind": "function",
      "name": "post",
      "namespace": "client",
      "page": {
        "title": "HTTP JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/http/",
        "weight": 10
      },
      "signature": "client.post()",
      "summary": "Performs POST using defined configuration. Overrides defined method.",
      "url": "api/device_integration/connector_functions/protocol_apis/http/#clientpost"
    },
    {
      "examples": [
        {
          "code": "http.client.uri = \"https://remotehost/uri\";\nhttp.client.headers = {'X-Api-Key':'apikey'};\nhttp.client.body = {'operation_name':'custom_operation_request'};\nvar httpResp = http.client.put();",
          "language": "javascript"
        }
      ],
      "id": "client.put",
      "internal": false,
      "kind": "function",
      "name": "put",
      "namespace": "client",
      "page": {
        "title": "HTTP JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/http/",
        "weight": 10
      },
      "signature": "client.put()",
      "summary": "Performs PUT using defined configuration. Overrides defined method.",
      "url": "api/device_integration/connector_functions/protocol_apis/http/#clientput"
    },
    {
      "examples": [
        {
          "code": "http.client.uri = \"https://remotehost/uri\";\nhttp.client.headers = {'X-Api-Key':'apikey'};\nvar httpResp = http.client.get();",
          "language": "javascript"
        }
      ],
      "id": "client.get",
      "internal": false,
      "kind": "function",
      "name": "get",
      "namespace": "client",
      "page": {
        "title": "HTTP JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/http/",
        "weight": 10
      },
      "signature": "client.get()",
      "summary": "Performs GET using defined configuration. Overrides defined method.",
      "url": "api/device_integration/connector_functions/protocol_apis/http/#clientget"
    },
    {
      "examples": [
        {
          "code": "http.client.uri = \"https://remotehost/uri\";\nhttp.client.headers = {'X-Api-Key':'apikey'};\nvar httpResp = http.client.delete();",
          "language": "javascript"
        }
      ],
      "id": "client.delete",
      "internal": false,
      "kind": "function",
      "name": "delete",
      "namespace": "client",
      "page": {
        "title": "HTTP JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/http/",
        "weight": 10
      },
      "signature": "client.delete()",
      "summary": "Performs DELETE using defined configuration. Overrides defined method.",
      "url": "api/device_integration/connector_functions/protocol_apis/http/#clientdelete"
    },
    {
      "examples": [
        {
          "code": "http.client.uri = \"https://remotehost/uri\";\nhttp.client.headers = {'X-Api-Key':'apikey'};\nhttp.client.body = {'operation_name':'custom_operation_request'};\nvar httpResp = http.client.patch();",
          "language": "javascript"
        }
      ],
      "id": "client.patch",
      "internal": false,
      "kind": "function",
      "name": "patch",
      "namespace": "client",
      "page": {
        "title": "HTTP JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/http/",
        "weight": 10
      },
      "signature": "client.patch()",
      "summary": "Performs PATCH using defined configuration. Overrides defined method.",
      "url": "api/device_integration/connector_functions/protocol_apis/http/#clientpatch"
    },
    {
      "examples": [
        {
          "code": "http.client.method = \"GET\";\nhttp.client.uri = \"https://remotehost/uri\";\nhttp.client.headers = {'X-Api-Key':'apikey'};\nhttp.client.body = {'operation_name':'custom_operation_request'};\nvar httpResp = http.client.request();",
          "language": "javascript"
        }
      ],
      "id": "client.request",
      "internal": false,
      "kind": "function",
      "name": "request",
      "namespace": "client",
      "page": {
        "title": "HTTP JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/http/",
        "weight": 10
      },
      "signature": "client.request()",
      "summary": "Performs configured http request. method property must be defined.",
      "url": "api/device_integration/connector_functions/protocol_apis/http/#clientrequest"
    },
    {
      "examples": [
        {
          "code": "var operationParameters = cf.operationParameters(operationObj);",
          "language": "javascript"
        }
      ],
      "id": "cf.operationParameters",
      "internal": false,
      "kind": "function",
      "name": "operationParameters",
      "namespace": "cf",
      "page": {
        "title": "JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/",
        "weight": 10
      },
      "params": [
        {
          "name": "operationObj",
          "type": "Object"
        }
      ],
      "returns": {
        "description": "\\* - Returns *parameters* field. It can be a complex object. If operationObj is not a correct Request object, null will be returned."
      },
      "signature": "cf.operationParameters(operationObj)",
      "summary": "Extract from operationObj *parameters* field. This function could be used in REQUEST CFs, when the payload is Operation Request json.",
      "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/#cfoperationparametersoperationobj"
    },
    {
      "id": "cf.operationTimestamp",
      "internal": false,
      "kind": "function",
      "name": "operationTimestamp",
      "namespace": "cf",
      "page": {
        "title": "JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/",
        "weight": 10
      },
      "params": [
        {
          "name": "operationObj",
          "type": "Object"
        }
      ],
      "returns": {
        "description": "number - Returns timestamp field. If operationObj is not correct Request object, null will be returned."
      },
      "signature": "cf.operationTimestamp(operationObj)",
      "summary": "Extract from operationObj timestamp field. This function could be used in REQUEST CFs, when the payload is Operation Request json.",
      "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/#cfoperationtimestampoperationobj"
    },
    {
      "id": "cf.operationName",
      "internal": false,
      "kind": "function",
      "name": "operationName",
      "namespace": "cf",
      "page": {
        "title": "JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/",
        "weight": 10
      },
      "params": [
        {
          "name": "operationObj",
          "type": "Object"
        }
      ],
      "returns": {
        "description": "String - Returns name field. If operationObj is not correct Request object, null will be returned."
      },
      "signature": "cf.operationName(operationObj)  String",
      "summary": "Extract from operationObj name field. This function could be used in REQUEST CFs, when the payload is Operation Request json.",
      "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/#cfoperationnameoperationobj--string"
    },
    {
      "id": "cf.operationId",
      "internal": false,
      "kind": "function",
      "name": "operationId",
      "namespace": "cf",
      "page": {
        "title": "JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/",
        "weight": 10
      },
      "params": [
        {
          "name": "operationObj",
          "type": "Object"
        }
      ],
      "returns": {
        "description": "String - Returns id field. If operationObj is not correct Request object, null will be returned."
      },
      "signature": "cf.operationId(operationObj)  String",
      "summary": "Extract from operationObj id field. This function could be used in REQUEST CFs, when the payload is Operation Request json.",
      "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/#cfoperationidoperationobj--string"
    },
    {
      "id": "cf.operationDeviceId",
      "internal": false,
      "kind": "function",
      "name": "operationDeviceId",
      "namespace": "cf",
      "page": {
        "title": "JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/",
        "weight": 10
      },
      "params": [
        {
          "name": "operationObj",
          "type": "Object"
        }
      ],
      "returns": {
        "description": "String - Returns deviceId field. If operationObj is not correct Request object, null will be returned."
      },
      "signature": "cf.operationDeviceId(operationObj)  String",
      "summary": "Extract from operationObj deviceId field. This function could be used in REQUEST CFs, when the payload is Operation Request json.",
      "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/#cfoperationdeviceidoperationobj--string"
    },
    {
      "id": "responseCF",
      "internal": false,
      "kind": "function",
      "name": "responseCF",
      "namespace": "",
      "page": {
        "title": "JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/",
        "weight": 10
      },
      "params": [
        {
          "description": "data to be used as payload in Response Connector Function.",
          "name": "responseData",
          "type": "\\*"
        },
        {
          "description": "the criteria to be used to search response connector function.",
          "name": "responseFunctionCriteria",
          "type": "String"
        }
      ],
      "signature": "responseCF(responseData, responseFunctionCriteria)",
      "summary": "Used in Request connector functions to define a concatenated Response action.",
      "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/#responsecfresponsedata-responsefunctioncriteria"
    },
    {
      "id": "collectCF",
      "internal": false,
      "kind": "function",
      "name": "collectCF",
      "namespace": "",
      "page": {
        "title": "JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/",
        "weight": 10
      },
      "params": [
        {
          "description": "data to be used as payload in Collection Connector Function.",
          "name": "collectionData",
          "type": "\\*"
        },
        {
          "description": "the criteria to be used to search collection connector function.",
          "name": "collectionFunctionCriteria",
          "type": "String"
        }
      ],
      "signature": "collectCF(collectionData, collectionFunctionCriteria)",
      "summary": "Used in Request or Response connector functions to define a concatenated Collection action.",
      "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/#collectcfcollectiondata-collectionfunctioncriteria"
    },
    {
      "id": "publishOnTopic",
      "internal": false,
      "kind": "function",
      "name": "publishOnTopic",
      "namespace": "",
      "page": {
        "title": "JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/",
        "weight": 10
      },
      "params": [
        {
          "description": "Data to be published. It will be converted to string.",
          "name": "payload",
          "type": "\\*"
        },
        {
          "description": "topic uri.",
          "name": "topic",
          "type": "String"
        },
        {
          "description": "device id.",
          "name": "deviceId",
          "type": "String"
        }
      ],
      "signature": "publishOnTopic(payload, topic, deviceId)",
      "summary": "Publish specified payload for specified topic and device.",
      "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/#publishontopicpayload-topic-deviceid"
    },
    {
      "id": "ogCollection",
      "internal": false,
      "kind": "function",
      "name": "ogCollection",
      "namespace": "",
      "page": {
        "title": "JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/",
        "weight": 10
      },
      "params": [
        {
          "description": "Array of datastreams objects. If not specified empty array will be set.",
          "name": "datastreams",
          "type": "Array"
        },
        {
          "description": "String with deviceId. If not defined null will be set.",
          "name": "device",
          "type": "String"
        },
        {
          "description": "String with version. If not specified, \"1.0.0\" value will be used.",
          "name": "version",
          "type": "String"
        }
      ],
      "returns": {
        "description": "Object - Json with Opengate Data Collection object."
      },
      "signature": "ogCollection(datastreams, device, version)",
      "summary": "Creates OG collection main object.",
      "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/#ogcollectiondatastreams-device-version"
    },
    {
      "id": "ogCollectionDs",
      "internal": false,
      "kind": "function",
      "name": "ogCollectionDs",
      "namespace": "",
      "page": {
        "title": "JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/",
        "weight": 10
      },
      "params": [
        {
          "description": "String with datastreamid. If not provided null will be set.",
          "name": "datastreamId",
          "type": "String"
        },
        {
          "description": "String with feed name. If not provided null will be set.",
          "name": "feed",
          "type": "String"
        },
        {
          "description": "Array of datapoints objects. If not provided empty array will be set.",
          "name": "datapoints",
          "type": "Array"
        }
      ],
      "returns": {
        "description": "Object - Json with Opengate Data Collection Datastream object."
      },
      "signature": "ogCollectionDs(datastreamId, feed, datapoints)",
      "summary": "Creates OG collection datastream object.",
      "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/#ogcollectiondsdatastreamid-feed-datapoints"
    },
    {
      "id": "ogCollectionDp",
      "internal": false,
      "kind": "function",
      "name": "ogCollectionDp",
      "namespace": "",
      "page": {
        "title": "JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/",
        "weight": 10
      },
      "params": [
        {
          "description": "collected value. If not provided null will be set.",
          "name": "value",
          "type": "\\*"
        },
        {
          "description": "Number with collection timestamp. If not provided null will be set.",
          "name": "at",
          "type": "number"
        },
        {
          "description": "String with source name. If not provided null will be set.",
          "name": "source",
          "type": "String"
        },
        {
          "description": "String with source description. If not provided null will be set.",
          "name": "sourceInfo",
          "type": "String"
        }
      ],
      "signature": "ogCollectionDp(value, at, source, sourceInfo)",
      "summary": "Creates OG collection datapoint object.",
      "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/#ogcollectiondpvalue-at-source-sourceinfo"
    },
    {
      "id": "addOgCollectionDp",
      "internal": false,
      "kind": "function",
      "name": "addOgCollectionDp",
      "namespace": "",
      "page": {
        "title": "JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/",
        "weight": 10
      },
      "params": [
        {
          "description": "Datapoint object to be added.",
          "name": "datapoint",
          "type": "Object"
        },
        {
          "description": "Opengate collection object with current collection data.",
          "name": "ogCollection",
          "type": "Object"
        },
        {
          "description": "Datastream object identifier in collection object. If not exist, it will be created.",
          "name": "datastreamId",
          "type": "String"
        },
        {
          "description": "feed name, only used if the datastream must be created.",
          "name": "feed",
          "type": "String"
        }
      ],
      "signature": "addOgCollectionDp(datapoint, ogCollection, datastreamId, feed)",
      "summary": "Adds datapoint to specified datastream in the collection object, if datastream does not exist, it creates the datastream.",
      "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/#addogcollectiondpdatapoint-ogcollection-datastreamid-feed"
    },
    {
      "id": "ogResponse",
      "internal": false,
      "kind": "function",
      "name": "ogResponse",
      "namespace": "",
      "page": {
        "title": "JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/",
        "weight": 10
      },
      "params": [
        {
          "description": "operation request id. If not provided null will be set.",
          "name": "id",
          "type": "String"
        },
        {
          "description": "launched operation name. If not provided null will be set.",
          "name": "name",
          "type": "String"
        },
        {
          "description": "operation request device id. If not provided null will be set.",
          "name": "deviceId",
          "type": "String"
        },
        {
          "description": "operation result code. If not provided null will be set.",
          "name": "resultCode",
          "type": "String"
        },
        {
          "description": "operation result description. If not provided null will be set.",
          "name": "resultDescription",
          "type": "String"
        },
        {
          "description": "If not defined, empty array will be defined.",
          "name": "steps",
          "type": "Array"
        },
        {
          "description": "Operation response timestamp. If not provided current timestamp will be set.",
          "name": "timestamp",
          "type": "String"
        },
        {
          "description": "Trusted boot value. If not provided null will be set.",
          "name": "trustedBoot",
          "type": "String"
        },
        {
          "description": "If not specified \"8.0\" will be set.",
          "name": "version",
          "type": "String"
        }
      ],
      "returns": {
        "description": "Object - OG response object"
      },
      "signature": "ogResponse(id, name, deviceId, resultCode, resultDescription, steps, timestamp, trustedBoot, version)",
      "summary": "Creates OG response object",
      "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/#ogresponseid-name-deviceid-resultcode-resultdescription-steps-timestamp-trustedboot-version"
    },
    {
      "id": "ogStep",
      "internal": false,
      "kind": "function",
      "name": "ogStep",
      "namespace": "",
      "page": {
        "title": "JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/",
        "weight": 10
      },
      "params": [
        {
          "description": "step name. If not provided null will be set.",
          "name": "name",
          "type": "String"
        },
        {
          "description": "step result. If not provided null will be set.",
          "name": "result",
          "type": "String"
        },
        {
          "description": "description string. If not provided, null will be assigned.",
          "name": "description",
          "type": "String"
        },
        {
          "description": "array of stepResponse objects. If not provided, empty array will be assigned.",
          "name": "stepResponseList",
          "type": "String"
        }
      ],
      "returns": {
        "description": "OG step object"
      },
      "signature": "ogStep(name, result, description, stepResponseList)",
      "summary": "Creates OG step object used in opengate response object.",
      "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/#ogstepname-result-description-stepresponselist"
    },
    {
      "id": "ogStepResponse",
      "internal": false,
      "kind": "function",
      "name": "ogStepResponse",
      "namespace": "",
      "page": {
        "title": "JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/",
        "weight": 10
      },
      "params": [
        {
          "description": "step name. If not provided null will be set.",
          "name": "name",
          "type": "\\*"
        },
        {
          "description": "object with value. If not provided empty object will be assigned.",
          "name": "value",
          "type": "Object"
        }
      ],
      "returns": {
        "description": "OG step response object"
      },
      "signature": "ogStepResponse(name, value)",
      "summary": "Creates OG step response object, used in step object.",
      "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/#ogstepresponsename-value"
    },
    {
      "id": "httpRequest",
      "internal": false,
      "kind": "function",
      "name": "httpRequest",
      "namespace": "",
      "page": {
        "title": "JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/",
        "weight": 10
      },
      "params": [
        {
          "description": "Object with requests parameters: 'method', 'uri' and 'headers'.    - 'method': GET, POST, PUT, DELETE.   - 'uri': request uri.   - 'headers': json with http request headers.",
          "name": "request",
          "type": "Object"
        },
        {
          "description": "data to be sent. It can be null.",
          "name": "payload",
          "type": "\\*"
        }
      ],
      "returns": {
        "description": "Object - JSON with response. It will have two fields: 'statusCode' with http result code and 'body' with response body content."
      },
      "signature": "httpRequest(request, payload)",
      "summary": "Executes specified request with specified payload.",
      "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/#httprequestrequest-payload"
    },
    {
      "id": "webSocketMsg",
      "internal": false,
      "kind": "function",
      "name": "webSocketMsg",
      "namespace": "",
      "page": {
        "title": "JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/",
        "weight": 10
      },
      "params": [
        {
          "description": "data to be published. It will be converted to string.",
          "name": "payload",
          "type": "\\*"
        },
        {
          "description": "Device identifier with the opened websocket",
          "name": "deviceId",
          "type": "String"
        }
      ],
      "signature": "webSocketMsg(payload, deviceId)",
      "summary": "Send message to opened websocket",
      "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/#websocketmsgpayload-deviceid"
    },
    {
      "id": "entityValue",
      "internal": false,
      "kind": "function",
      "name": "entityValue",
      "namespace": "",
      "page": {
        "title": "JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/",
        "weight": 10
      },
      "params": [
        {
          "description": "entity Object with flattened entity.",
          "name": "entity",
          "type": "Object"
        },
        {
          "description": "Datastream name, for example: 'provision.device.identifier'.",
          "name": "datastream",
          "type": "String"
        },
        {
          "description": "Array Index. If provided datastream is an array (i.e. comm module), element index must be specified.",
          "name": "index",
          "type": "number"
        }
      ],
      "returns": {
        "description": "\\* - Specified datastream \"value\" field. It can be complex object. null if datastream does not exist."
      },
      "signature": "entityValue(entity, datastream, index)",
      "summary": "Extract from entity specified datastream \"value\" field value.",
      "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/#entityvalueentity-datastream-index"
    },
    {
      "id": "entitiesValue",
      "internal": false,
      "kind": "function",
      "name": "entitiesValue",
      "namespace": "",
      "page": {
        "title": "JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/",
        "weight": 10
      },
      "params": [
        {
          "description": "Array of objects with flattened entity.",
          "name": "entities",
          "type": "Array"
        },
        {
          "description": "Datastream name, for example: 'provision.device.identifier'.",
          "name": "datastream",
          "type": "String"
        },
        {
          "description": "Array Index. If provided datastream is an array (i.e. comm module), element index must be specified.",
          "name": "index",
          "type": "number"
        }
      ],
      "returns": {
        "description": "\\* - Specified datastream \"value\" field. It can be complex object. null if datastream does not exist."
      },
      "signature": "entitiesValue(entities, datastream, index)",
      "summary": "Extract from the first entity of entities array specified datastream \"value\" field value.",
      "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/#entitiesvalueentities-datastream-index"
    },
    {
      "id": "entityAt",
      "internal": false,
      "kind": "function",
      "name": "entityAt",
      "namespace": "",
      "page": {
        "title": "JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/",
        "weight": 10
      },
      "params": [
        {
          "description": "entity Object with flattened entity.",
          "name": "entity",
          "type": "Object"
        },
        {
          "description": "Datastream name, for example: 'provision.device.identifier'.",
          "name": "datastream",
          "type": "String"
        },
        {
          "description": "Array Index. If provided datastream is an array (i.e. comm module), element index must be specified.",
          "name": "index",
          "type": "number"
        }
      ],
      "returns": {
        "description": "Specified datastream \"at\" field. It can be complex object. null if datastream does not exist."
      },
      "signature": "entityAt(entity, datastream, index)",
      "summary": "Extract from entity specified datastream \"at\" field value.",
      "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/#entityatentity-datastream-index"
    },
    {
      "id": "entityDate",
      "internal": false,
      "kind": "function",
      "name": "entityDate",
      "namespace": "",
      "page": {
        "title": "JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/",
        "weight": 10
      },
      "params": [
        {
          "description": "entity Object with flattened entity.",
          "name": "entity",
          "type": "Object"
        },
        {
          "description": "Datastream name, for example: 'provision.device.identifier'.",
          "name": "datastream",
          "type": "String"
        },
        {
          "description": "Array Index. If provided datastream is an array (i.e. comm module), element index must be specified.",
          "name": "index",
          "type": "number"
        }
      ],
      "returns": {
        "description": "Specified datastream \"date\" field. It can be complex object. null if datastream does not exist."
      },
      "signature": "entityDate(entity, datastream, index)",
      "summary": "Extract from entity specified datastream \"date\" field value.",
      "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/#entitydateentity-datastream-index"
    },
    {
      "id": "entitySource",
      "internal": false,
      "kind": "function",
      "name": "entitySource",
      "namespace": "",
      "page": {
        "title": "JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/",
        "weight": 10
      },
      "params": [
        {
          "description": "entity Object with flattened entity.",
          "name": "entity",
          "type": "Object"
        },
        {
          "description": "Datastream name, for example: 'provision.device.identifier'.",
          "name": "datastream",
          "type": "String"
        },
        {
          "description": "Array Index. If provided datastream is an array (i.e. comm module), element index must be specified.",
          "name": "index",
          "type": "number"
        }
      ],
      "returns": {
        "description": "Specified datastream \"source\" field. It can be complex object. null if datastream does not exist."
      },
      "signature": "entitySource(entity, datastream, index)",
      "summary": "Extract from entity specified datastream \"source\" field value.",
      "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/#entitysourceentity-datastream-index"
    },
    {
      "id": "entitySourceInfo",
      "internal": false,
      "kind": "function",
      "name": "entitySourceInfo",
      "namespace": "",
      "page": {
        "title": "JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/",
        "weight": 10
      },
      "params": [
        {
          "description": "entity Object with flattened entity.",
          "name": "entity",
          "type": "Object"
        },
        {
          "description": "Datastream name, for example: 'provision.device.identifier'.",
          "name": "datastream",
          "type": "String"
        },
        {
          "description": "Array Index. If provided datastream is an array (i.e. comm module), element index must be specified.",
          "name": "index",
          "type": "number"
        }
      ],
      "returns": {
        "description": "Specified datastream \"sourceInfo\" field. It can be complex object. null if datastream does not exist."
      },
      "signature": "entitySourceInfo(entity, datastream, index)",
      "summary": "Extract from entity specified datastream \"sourceInfo\" field value.",
      "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/#entitysourceinfoentity-datastream-index"
    },
    {
      "id": "log",
      "internal": false,
      "kind": "function",
      "name": "log",
      "namespace": "",
      "page": {
        "title": "JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/",
        "weight": 10
      },
      "params": [
        {
          "description": "The function takes as parameters a list of elements to be concatenated to generate the string message to be printed.",
          "name": "...msg",
          "type": "any"
        }
      ],
      "signature": "log(...msg)",
      "summary": "Creates Info level logging messages. It concatenates msg parameters in the final string to be logged.",
      "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/#logmsg"
    },
    {
      "id": "encryptString",
      "internal": false,
      "kind": "function",
      "name": "encryptString",
      "namespace": "",
      "page": {
        "title": "JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/",
        "weight": 10
      },
      "params": [
        {
          "description": "The value to encrypt.",
          "name": "originalValue",
          "type": "string"
        },
        {
          "description": "The datastream of provision type, of the datamodel that define this value. This datastream has the configuration of encryption.",
          "name": "datastreamConfiguration",
          "type": "string"
        },
        {
          "description": "The organization name to which the datamodel belongs.",
          "name": "organizationName",
          "type": "string"
        }
      ],
      "returns": {
        "description": "The originalValue encrypted"
      },
      "signature": "encryptString(originalValue, datastreamConfiguration, organizationName)",
      "summary": "Encrypt an original string with the configuration established by the datastream of the organization",
      "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/#encryptstringoriginalvalue-datastreamconfiguration-organizationname"
    },
    {
      "id": "decryptString",
      "internal": false,
      "kind": "function",
      "name": "decryptString",
      "namespace": "",
      "page": {
        "title": "JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/",
        "weight": 10
      },
      "params": [
        {
          "description": "The encrypted value to decrypt.",
          "name": "encryptedValue",
          "type": "string"
        },
        {
          "description": "The datastream of provision type, of the datamodel that define this value. This datastream has the configuration of encryption.",
          "name": "datastreamConfiguration",
          "type": "string"
        },
        {
          "description": "The organization name to which the datamodel belongs.",
          "name": "organizationName",
          "type": "string"
        }
      ],
      "returns": {
        "description": "The encryptedValue decrypted"
      },
      "signature": "decryptString(encryptedValue, datastreamConfiguration, organizationName)",
      "summary": "Decrypt an encrypted string with the configuration established by the datastream of the organization",
      "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/#decryptstringencryptedvalue-datastreamconfiguration-organizationname"
    },
    {
      "id": "getAddressTypeFromAddress",
      "internal": false,
      "kind": "function",
      "name": "getAddressTypeFromAddress",
      "namespace": "",
      "page": {
        "title": "JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/",
        "weight": 10
      },
      "params": [
        {
          "description": "The address which the type will be calculated for.",
          "name": "address",
          "type": "string"
        }
      ],
      "returns": {
        "description": "The address type"
      },
      "signature": "getAddressTypeFromAddress(address)",
      "summary": "Calculates the address type from a given address",
      "url": "api/device_integration/connector_functions/core_javascript_api/javascript_api/#getaddresstypefromaddressaddress"
    },
    {
      "examples": [
        {
          "code": "var value = entity._value('provision.device.identifier');",
          "language": "javascript"
        }
      ],
      "id": "entity._value",
      "internal": false,
      "kind": "function",
      "name": "_value",
      "namespace": "entity",
      "page": {
        "title": "Entity JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/entity/",
        "weight": 20
      },
      "params": [
        {
          "description": "The datastream name.",
          "name": "datastream",
          "type": "string"
        },
        {
          "description": "Element index of datastream array.",
          "name": "index",
          "type": "any"
        }
      ],
      "returns": {
        "description": "\u003ccode\u003e\\*\u003c/code\u003e - Specified datastream \"value\" field. It can be complex object. null if datastream does not exist."
      },
      "signature": "entity._value (datastream, index)",
      "summary": "Extract from entity specified datastream “value” field value using parameters",
      "url": "api/device_integration/connector_functions/core_javascript_api/entity/#entity_value-datastream-index"
    },
    {
      "examples": [
        {
          "code": "var at = entity._at('provision.device.identifier');",
          "language": "javascript"
        }
      ],
      "id": "entity._at",
      "internal": false,
      "kind": "function",
      "name": "_at",
      "namespace": "entity",
      "page": {
        "title": "Entity JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/entity/",
        "weight": 20
      },
      "params": [
        {
          "description": "The datastream name.",
          "name": "datastream",
          "type": "string"
        },
        {
          "description": "Element index of datastream array.",
          "name": "index",
          "type": "any"
        }
      ],
      "returns": {
        "description": "Specified datastream \"at\" field. It can be complex object. null if datastream does not exist."
      },
      "signature": "entity._at (datastream, index)",
      "summary": "Extract from entity specified datastream “at” field value using parameters",
      "url": "api/device_integration/connector_functions/core_javascript_api/entity/#entity_at-datastream-index"
    },
    {
      "examples": [
        {
          "code": "var date = entity._date('provision.device.identifier');",
          "language": "javascript"
        }
      ],
      "id": "entity._date",
      "internal": false,
      "kind": "function",
      "name": "_date",
      "namespace": "entity",
      "page": {
        "title": "Entity JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/entity/",
        "weight": 20
      },
      "params": [
        {
          "description": "The datastream name.",
          "name": "datastream",
          "type": "string"
        },
        {
          "description": "Element index of datastream array.",
          "name": "index",
          "type": "any"
        }
      ],
      "returns": {
        "description": "Specified datastream \"date\" field. It can be complex object. null if datastream does not exist."
      },
      "signature": "entity._date (datastream, index)",
      "summary": "Extract from entity specified datastream date field value using parameters",
      "url": "api/device_integration/connector_functions/core_javascript_api/entity/#entity_date-datastream-index"
    },
    {
      "examples": [
        {
          "code": "var source = entity._source('provision.device.identifier');",
          "language": "javascript"
        }
      ],
      "id": "entity._source",
      "internal": false,
      "kind": "function",
      "name": "_source",
      "namespace": "entity",
      "page": {
        "title": "Entity JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/entity/",
        "weight": 20
      },
      "params": [
        {
          "description": "The datastream name.",
          "name": "datastream",
          "type": "string"
        },
        {
          "description": "Element index of datastream array.",
          "name": "index",
          "type": "any"
        }
      ],
      "returns": {
        "description": "Specified datastream \"source\" field. It can be complex object. null if datastream does not exist."
      },
      "signature": "entity._source (datastream, index)",
      "summary": "Extract from entity specified datastream “source” field value using parameters",
      "url": "api/device_integration/connector_functions/core_javascript_api/entity/#entity_source-datastream-index"
    },
    {
      "examples": [
        {
          "code": "var sourceInfo = entity._sourceInfo('provision.device.identifier');",
          "language": "javascript"
        }
      ],
      "id": "entity._sourceInfo",
      "internal": false,
      "kind": "function",
      "name": "_sourceInfo",
      "namespace": "entity",
      "page": {
        "title": "Entity JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/entity/",
        "weight": 20
      },
      "params": [
        {
          "description": "The datastream name.",
          "name": "datastream",
          "type": "string"
        },
        {
          "description": "Element index of datastream array.",
          "name": "index",
          "type": "any"
        }
      ],
      "returns": {
        "description": "Specified datastream \"sourceInfo\" field. It can be complex object. null if datastream does not exist."
      },
      "signature": "entity._sourceInfo(datastream, index)",
      "summary": "Extract from entity specified datastream “sourceInfo” field value using parameters",
      "url": "api/device_integration/connector_functions/core_javascript_api/entity/#entity_sourceinfodatastream-index"
    },
    {
      "examples": [
        {
          "code": "mqtt.publish({'operation_name':'custom_operation_request'});",
          "language": "javascript"
        },
        {
          "code": "mqtt.device='other_device';\nmqtt.topic = 'destination/topic';\nmqtt.publish('Message to be sent');",
          "language": "javascript"
        }
      ],
      "id": "mqtt.publish",
      "internal": false,
      "kind": "function",
      "name": "publish",
      "namespace": "mqtt",
      "page": {
        "title": "MQTT JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/mqtt/",
        "weight": 20
      },
      "params": [
        {
          "description": "Message to be sent. It can be string or a json object",
          "name": "payload",
          "type": "*"
        }
      ],
      "signature": "mqtt.publish(payload)",
      "summary": "Publish a message on mqtt topic",
      "url": "api/device_integration/connector_functions/protocol_apis/mqtt/#mqttpublishpayload"
    },
    {
      "examples": [
        {
          "code": "var now = Date.now() / 1000;\ncollection.addDatapoint('device.name', 'collected name from cf', now,'mySource','mySourceInfo');",
          "language": "javascript"
        }
      ],
      "id": "collection.addDatapoint",
      "internal": false,
      "kind": "function",
      "name": "addDatapoint",
      "namespace": "collection",
      "page": {
        "title": "Inner Collections API",
        "url": "api/device_integration/connector_functions/core_javascript_api/inner_collections/",
        "weight": 30
      },
      "params": [
        {
          "description": "Datastream identifier by which the datapoint will be identified.",
          "name": "datastreamId",
          "type": "string"
        },
        {
          "description": "Collected value. If not provided null will be set.",
          "name": "value",
          "type": "any"
        },
        {
          "description": "Number with collection timestamp in seconds. If not provided null will be set.",
          "name": "at",
          "type": "number"
        },
        {
          "description": "String with source name. If not provided null will be set.",
          "name": "source",
          "type": "string"
        },
        {
          "description": "String with source description. If not provided null will be set.",
          "name": "sourceInfo",
          "type": "string"
        }
      ],
      "returns": {
        "description": "Void"
      },
      "signature": "collection.addDatapoint(datastreamId, value, at, source, sourceInfo)",
      "summary": "Builds a datapoint object and adds it to the specified datastream in the datastreams list in the collection global object.",
      "url": "api/device_integration/connector_functions/core_javascript_api/inner_collections/#collectionadddatapointdatastreamid-value-at-source-sourceinfo"
    },
    {
      "examples": [
        {
          "code": "collection.setFeed('device.name', 'myFeed');",
          "language": "javascript"
        }
      ],
      "id": "collection.setFeed",
      "internal": false,
      "kind": "function",
      "name": "setFeed",
      "namespace": "collection",
      "page": {
        "title": "Inner Collections API",
        "url": "api/device_integration/connector_functions/core_javascript_api/inner_collections/",
        "weight": 30
      },
      "params": [
        {
          "description": "Datastream identifier by which the datapoint will be identified.",
          "name": "datastreamId",
          "type": "string"
        },
        {
          "description": "The feed name to set to the specified datastream.",
          "name": "feed",
          "type": "string"
        }
      ],
      "returns": {
        "description": "Void"
      },
      "signature": "collection.setFeed(datastreamId, feed)",
      "summary": "Sets the feed name to a specific datastream in the datastreams list in the collection global object.",
      "url": "api/device_integration/connector_functions/core_javascript_api/inner_collections/#collectionsetfeeddatastreamid-feed"
    },
    {
      "examples": [
        {
          "code": "collection.send();",
          "language": "javascript"
        }
      ],
      "id": "collection.send",
      "internal": false,
      "kind": "function",
      "name": "send",
      "namespace": "collection",
      "page": {
        "title": "Inner Collections API",
        "url": "api/device_integration/connector_functions/core_javascript_api/inner_collections/",
        "weight": 30
      },
      "returns": {
        "description": "Void"
      },
      "signature": "collection.send()",
      "summary": "Sends a collection message to the OpenGate's collection messages flow using the datastreams list in the collection global object, after that this list is cleaned.",
      "url": "api/device_integration/connector_functions/core_javascript_api/inner_collections/#collectionsend"
    },
    {
      "examples": [
        {
          "code": "var dpValue = collection.getValue('device.name');\n// dpValue will be 'collected name from cf'",
          "language": "javascript"
        }
      ],
      "id": "collection.getValue",
      "internal": false,
      "kind": "function",
      "name": "getValue",
      "namespace": "collection",
      "page": {
        "title": "Inner Collections API",
        "url": "api/device_integration/connector_functions/core_javascript_api/inner_collections/",
        "weight": 30
      },
      "params": [
        {
          "description": "Datastream identifier which value must be returned",
          "name": "datastream",
          "type": "string"
        },
        {
          "description": "Datapoint index. If not defined first datapoint will be returned",
          "name": "dpIndex",
          "type": "number"
        }
      ],
      "signature": "collection.getValue(datastream, dpIndex)",
      "summary": "Searches for a datapoint value for the specified datastreamId. It is possible to specify the datapoint index inside the datastream. If not found, a null value will be returned.",
      "url": "api/device_integration/connector_functions/core_javascript_api/inner_collections/#collectiongetvaluedatastream-dpindex"
    },
    {
      "examples": [
        {
          "code": "websocket.payload = {someField:someValue};\nwebsocket.deviceId = 'someDeviceId'\nwebsocket.sendMsg();",
          "language": "javascript"
        }
      ],
      "id": "websocket.sendMsg",
      "internal": false,
      "kind": "function",
      "name": "sendMsg",
      "namespace": "websocket",
      "page": {
        "title": "Websocket JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/websocket/",
        "weight": 30
      },
      "returns": {
        "description": "Object"
      },
      "signature": "websocket.sendMsg()",
      "summary": "Executes specified request using the properties of the websocket object",
      "url": "api/device_integration/connector_functions/protocol_apis/websocket/#websocketsendmsg"
    },
    {
      "examples": [
        {
          "code": "// sending CHANGED status (2.04), and a number 1 as body (two bytes unsigned integer - little endian)\ncoap.server.response.status = 204; \ncoap.server.response.body = new Uint8Array([01, 00]); \ncoap.server.response.send();\n",
          "language": "javascript"
        }
      ],
      "id": "coap.server.response.send",
      "internal": false,
      "kind": "function",
      "name": "send",
      "namespace": "coap.server.response",
      "page": {
        "title": "CoAP API",
        "url": "api/device_integration/connector_functions/protocol_apis/coap/",
        "weight": 40
      },
      "signature": "coap.server.response.send()",
      "summary": "The status, body and contentFormat are saved for inclusion in the CoAP response.",
      "url": "api/device_integration/connector_functions/protocol_apis/coap/#coapserverresponsesend"
    },
    {
      "examples": [
        {
          "code": "response.addStep('FACTORY_RESET', 'SUCCESSFUL', 'direct step from CF');",
          "language": "javascript"
        }
      ],
      "id": "response.addStep",
      "internal": false,
      "kind": "function",
      "name": "addStep",
      "namespace": "response",
      "page": {
        "title": "Operation Steps API",
        "url": "api/device_integration/connector_functions/core_javascript_api/operation_steps/",
        "weight": 40
      },
      "params": [
        {
          "description": "Step name. If not provided null will be set.",
          "name": "name",
          "type": "string"
        },
        {
          "description": "Step result. If not provided null will be set.",
          "name": "result",
          "type": "string"
        },
        {
          "description": "Step result description. If not provided null will be set.",
          "name": "description",
          "type": "string"
        },
        {
          "description": "StepResponse objects array. If not provided, empty array will be assigned.",
          "name": "stepResponseList",
          "type": "string"
        }
      ],
      "returns": {
        "description": "Void"
      },
      "signature": "response.addStep(name, result, description, stepResponseList)",
      "summary": "Builds a step result object and adds it to the steps list in the response global object.",
      "url": "api/device_integration/connector_functions/core_javascript_api/operation_steps/#responseaddstepname-result-description-stepresponselist"
    },
    {
      "examples": [
        {
          "code": "response.sendSteps();",
          "language": "javascript"
        }
      ],
      "id": "response.sendSteps",
      "internal": false,
      "kind": "function",
      "name": "sendSteps",
      "namespace": "response",
      "page": {
        "title": "Operation Steps API",
        "url": "api/device_integration/connector_functions/core_javascript_api/operation_steps/",
        "weight": 40
      },
      "returns": {
        "description": "Void"
      },
      "signature": "response.sendSteps()",
      "summary": "Sends a step response message to the OpenGate's operation messages flow using the steps list in the response object, after that this list is cleaned.",
      "url": "api/device_integration/connector_functions/core_javascript_api/operation_steps/#responsesendsteps"
    },
    {
      "examples": [
        {
          "code": "response.successful(\"CF finished correctly\");",
          "language": "javascript"
        },
        {
          "code": "{\n    \"operation\": {\n        \"response\": {\n            //...\n            \"resultCode\": \"SUCCESSFUL\",\n            \"resultDescription\": \"CF finished correctly\",\n            //...\n        }\n    }\n}",
          "language": "json"
        }
      ],
      "id": "response.successful",
      "internal": false,
      "kind": "function",
      "name": "successful",
      "namespace": "response",
      "page": {
        "title": "Operation Steps API",
        "url": "api/device_integration/connector_functions/core_javascript_api/operation_steps/",
        "weight": 40
      },
      "params": [
        {
          "description": "Descriptive text for result.",
          "name": "statusDescription",
          "type": "string"
        }
      ],
      "returns": {
        "description": "Void"
      },
      "signature": "response.successful(statusDescription)",
      "summary": "This method sets the SUCCESSFUL statusCode with the provided description.",
      "url": "api/device_integration/connector_functions/core_javascript_api/operation_steps/#responsesuccessfulstatusdescription"
    },
    {
      "examples": [
        {
          "code": "response.errorProcessing(\"Error executing CF\");",
          "language": "javascript"
        },
        {
          "code": "{\n    \"operation\": {\n        \"response\": {\n            //...\n            \"resultCode\": \"ERROR_PROCESSING\",\n            \"resultDescription\": \"Error executing CF\",\n            //...\n        }\n    }\n}",
          "language": "json"
        }
      ],
      "id": "response.errorProcessing",
      "internal": false,
      "kind": "function",
      "name": "errorProcessing",
      "namespace": "response",
      "page": {
        "title": "Operation Steps API",
        "url": "api/device_integration/connector_functions/core_javascript_api/operation_steps/",
        "weight": 40
      },
      "params": [
        {
          "description": "Descriptive text for result.",
          "name": "statusDescription",
          "type": "string"
        }
      ],
      "returns": {
        "description": "Void"
      },
      "signature": "response.errorProcessing(statusDescription)",
      "summary": "This method sets the ERROR_PROCESSING statusCode with the provided description.",
      "url": "api/device_integration/connector_functions/core_javascript_api/operation_steps/#responseerrorprocessingstatusdescription"
    },
    {
      "examples": [
        {
          "code": "response.errorInParam(\"Incorrect param from CF\");",
          "language": "javascript"
        },
        {
          "code": "{\n    \"operation\": {\n        \"response\": {\n            //...\n            \"resultCode\": \"ERROR_IN_PARAM\",\n            \"resultDescription\": \"Incorrect param from CF\",\n            //...\n        }\n    }\n}",
          "language": "json"
        }
      ],
      "id": "response.errorInParam",
      "internal": false,
      "kind": "function",
      "name": "errorInParam",
      "namespace": "response",
      "page": {
        "title": "Operation Steps API",
        "url": "api/device_integration/connector_functions/core_javascript_api/operation_steps/",
        "weight": 40
      },
      "params": [
        {
          "description": "Descriptive text for result.",
          "name": "statusDescription",
          "type": "string"
        }
      ],
      "returns": {
        "description": "Void"
      },
      "signature": "response.errorInParam(statusDescription)",
      "summary": "This method sets the ERROR_IN_PARAM statusCode with the provided description.",
      "url": "api/device_integration/connector_functions/core_javascript_api/operation_steps/#responseerrorinparamstatusdescription"
    },
    {
      "examples": [
        {
          "code": "response.notSupported(\"Not supported from CF\");",
          "language": "javascript"
        },
        {
          "code": "{\n    \"operation\": {\n        \"response\": {\n            //...\n            \"resultCode\": \"NOT_SUPPORTED\",\n            \"resultDescription\": \"Not supported from CF\",\n            //...\n        }\n    }\n}",
          "language": "json"
        }
      ],
      "id": "response.notSupported",
      "internal": false,
      "kind": "function",
      "name": "notSupported",
      "namespace": "response",
      "page": {
        "title": "Operation Steps API",
        "url": "api/device_integration/connector_functions/core_javascript_api/operation_steps/",
        "weight": 40
      },
      "params": [
        {
          "description": "Descriptive text for result.",
          "name": "statusDescription",
          "type": "string"
        }
      ],
      "returns": {
        "description": "Void"
      },
      "signature": "response.notSupported(statusDescription)",
      "summary": "This method sets the NOT_SUPPORTED statusCode with the provided description.",
      "url": "api/device_integration/connector_functions/core_javascript_api/operation_steps/#responsenotsupportedstatusdescription"
    },
    {
      "examples": [
        {
          "code": "response.errorTimeout(\"Timeout error from CF\");",
          "language": "javascript"
        },
        {
          "code": "{\n    \"operation\": {\n        \"response\": {\n            //...\n            \"resultCode\": \"ERROR_TIMEOUT\",\n            \"resultDescription\": \"Timeout error from CF\",\n            //...\n        }\n    }\n}",
          "language": "json"
        }
      ],
      "id": "response.errorTimeout",
      "internal": false,
      "kind": "function",
      "name": "errorTimeout",
      "namespace": "response",
      "page": {
        "title": "Operation Steps API",
        "url": "api/device_integration/connector_functions/core_javascript_api/operation_steps/",
        "weight": 40
      },
      "params": [
        {
          "description": "Descriptive text for result.",
          "name": "statusDescription",
          "type": "string"
        }
      ],
      "returns": {
        "description": "Void"
      },
      "signature": "response.errorTimeout(statusDescription)",
      "summary": "This method sets the ERROR_TIMEOUT statusCode with the provided description.",
      "url": "api/device_integration/connector_functions/core_javascript_api/operation_steps/#responseerrortimeoutstatusdescription"
    },
    {
      "examples": [
        {
          "code": "response.unknownResult(\"Unknow result from CF\");",
          "language": "javascript"
        },
        {
          "code": "{\n    \"operation\": {\n        \"response\": {\n            //...\n            \"resultCode\": \"UNKNOWN_RESULT\",\n            \"resultDescription\": \"Unknow result from CF\",\n            //...\n        }\n    }\n}",
          "language": "json"
        }
      ],
      "id": "response.unknownResult",
      "internal": false,
      "kind": "function",
      "name": "unknownResult",
      "namespace": "response",
      "page": {
        "title": "Operation Steps API",
        "url": "api/device_integration/connector_functions/core_javascript_api/operation_steps/",
        "weight": 40
      },
      "params": [
        {
          "description": "Descriptive text for result.",
          "name": "statusDescription",
          "type": "string"
        }
      ],
      "returns": {
        "description": "Void"
      },
      "signature": "response.unknownResult(statusDescription)",
      "summary": "This method sets the UNKNOWN_RESULT statusCode with the provided description.",
      "url": "api/device_integration/connector_functions/core_javascript_api/operation_steps/#responseunknownresultstatusdescription"
    },
    {
      "examples": [
        {
          "code": "dlms.ip = \"127.0.0.1\"\ndlms.connect()",
          "language": "javascript"
        }
      ],
      "id": "dlms.connect",
      "internal": false,
      "kind": "function",
      "name": "connect",
      "namespace": "dlms",
      "page": {
        "title": "DLMS JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms/",
        "weight": 50
      },
      "signature": "dlms.connect()",
      "summary": "Opens DLMS connection (default via TCP transport).",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms/#dlmsconnect"
    },
    {
      "examples": [
        {
          "code": "// After connection has been established\ndlms.addAttr(1, \"1.2.3.4.5.6\", 2)\nvar getResult = dlms.get() // More details on get() next",
          "language": "javascript"
        }
      ],
      "id": "dlms.addAttr",
      "internal": false,
      "kind": "function",
      "name": "addAttr",
      "namespace": "dlms",
      "page": {
        "title": "DLMS JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms/",
        "weight": 50
      },
      "params": [
        {
          "description": "The class ID of the object to access",
          "name": "classId",
          "type": "Array"
        },
        {
          "description": "The name of the object to access",
          "name": "obisCode",
          "type": "string"
        },
        {
          "description": "The attribute index of the object",
          "name": "attrId",
          "type": "number"
        }
      ],
      "signature": "dlms.addAttr(classId, obisCode, attrId)",
      "summary": "Applicable for normal gets.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms/#dlmsaddattrclassid-obiscode-attrid"
    },
    {
      "examples": [
        {
          "code": "// After connection has been established\ndlms.addAttr(1, \"1.2.3.4.5.6\", 2, \"unsigned\", 254)\nvar setResult = dlms.set() // More details on set next",
          "language": "javascript"
        }
      ],
      "id": "dlms.addAttr~2",
      "internal": false,
      "kind": "function",
      "name": "addAttr",
      "namespace": "dlms",
      "overloadOf": "dlms.addAttr",
      "page": {
        "title": "DLMS JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms/",
        "weight": 50
      },
      "params": [
        {
          "description": "The class ID of the object to access",
          "name": "classId",
          "type": "Array"
        },
        {
          "description": "The name of the object to access",
          "name": "obisCode",
          "type": "string"
        },
        {
          "description": "The attribute index of the object",
          "name": "attrId",
          "type": "number"
        },
        {
          "description": "The data type of the value to set",
          "name": "type",
          "type": "string"
        },
        {
          "description": "The data value to set",
          "name": "value",
          "type": "see data types"
        }
      ],
      "signature": "dlms.addAttr(classId, obisCode, attrId, type, value)",
      "summary": "Applicable for normal sets.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms/#dlmsaddattrclassid-obiscode-attrid-type-value"
    },
    {
      "examples": [
        {
          "code": "// After connection has been established\n//dlms.addAttr(1, \"1.2.3.4.5.6\", 2, \"unsigned\", 254)\ndlms.addAttr(1, \"1.2.3.4.5.6\", 2, {\"type\": \"unsigned\", \"value\": 254}) // This is similar to the previous addAttr (commented)\nvar setResult = dlms.set() // More details on set next",
          "language": "javascript"
        },
        {
          "code": "// After connection has been established\ndlms.addAttr(1, \"1.2.3.4.5.6\", 2)\nvar getResult = dlms.get() // More details on get next\ndlms.addAttr(1, \"1.2.3.4.5.255\", 2, getResult[0]) // Set on object 1.2.3.4.5.255 the value (and data type) retrieved from object 1.2.3.4.5.6\nvar setResult = dlms.set() // More details on set next",
          "language": "javascript"
        }
      ],
      "id": "dlms.addAttr~3",
      "internal": false,
      "kind": "function",
      "name": "addAttr",
      "namespace": "dlms",
      "overloadOf": "dlms.addAttr",
      "page": {
        "title": "DLMS JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms/",
        "weight": 50
      },
      "params": [
        {
          "description": "The class ID of the object to access",
          "name": "classId",
          "type": "Array"
        },
        {
          "description": "The name of the object to access",
          "name": "obisCode",
          "type": "string"
        },
        {
          "description": "The attribute index of the object",
          "name": "attrId",
          "type": "number"
        },
        {
          "description": "The data with both type and value to set",
          "name": "data",
          "type": "object` (with `type` and `value`)"
        }
      ],
      "signature": "dlms.addAttr(classId, obisCode, attrId, data)",
      "summary": "Applicable for normal sets.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms/#dlmsaddattrclassid-obiscode-attrid-data"
    },
    {
      "examples": [
        {
          "code": "dlms.addAttr(1, \"1.2.3.4.5.6\", 2, {\"accessSelector\": 1, \"accessParameters\": {\"type\": \"unsigned\", \"value\": 254}})",
          "language": "javascript"
        },
        {
          "code": "// Example by range\ndlms.addAttr(7, '7.0.99.99.3.255', 2, {\n\taccessSelector: 1,\n\taccessParameters: {\n\t\ttype: 'structure',\n\t\tvalue: [{\n\t\t\ttype: 'structure',\n\t\t\tvalue: [{\n\t\t\t\ttype: 'long-unsigned',\n\t\t\t\tvalue: 1\n\t\t\t}, {\n\t\t\t\ttype: 'octet-string',\n\t\t\t\tvalue: [0, 0, 1, 1, 0, 255]\n\t\t\t}, {\n\t\t\t\ttype: 'integer',\n\t\t\t\tvalue: 2\n\t\t\t}, {\n\t\t\t\ttype: 'long-unsigned',\n\t\t\t\tvalue: 0\n\t\t\t}]\n\t\t}, {\n\t\t\ttype: 'double-long-unsigned',\n\t\t\tvalue: 1735884000\n\t\t}, {\n\t\t\ttype: 'double-long-unsigned',\n\t\t\tvalue: 1736229600\n\t\t}, {\n\t\t\ttype: 'array',\n\t\t\tvalue: []\n\t\t}]\n\t}\n})",
          "language": "javascript"
        }
      ],
      "id": "dlms.addAttr~4",
      "internal": false,
      "kind": "function",
      "name": "addAttr",
      "namespace": "dlms",
      "overloadOf": "dlms.addAttr",
      "page": {
        "title": "DLMS JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms/",
        "weight": 50
      },
      "params": [
        {
          "description": "The class ID of the object to access",
          "name": "classId",
          "type": "Array"
        },
        {
          "description": "The name of the object to access",
          "name": "obisCode",
          "type": "string"
        },
        {
          "description": "The attribute index of the object",
          "name": "attrId",
          "type": "number"
        },
        {
          "description": "The selective access descriptor",
          "name": "selectiveAccess",
          "type": "object` (with `accessSelector` and `accessParameters`)"
        }
      ],
      "signature": "dlms.addAttr(classId, obisCode, attrId, selectiveAccess)",
      "summary": "Applicable for gets with selective access.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms/#dlmsaddattrclassid-obiscode-attrid-selectiveaccess"
    },
    {
      "examples": [
        {
          "code": "// For normal get\ndlms.addAttr({classId: 1, obisCode: \"1.2.3.4.5.6\", attrId: 2})\n// For normal set\ndlms.addAttr({classId: 1, obisCode: \"1.2.3.4.5.6\", attrId: 2, type: \"unsigned\", value: 254})\n// For get with selective access\ndlms.addAttr({classId: 1, obisCode: \"1.2.3.4.5.6\", attrId: 2, accessSelector: 1, accessParameters: {type: \"unsigned\", value: 254}})",
          "language": "javascript"
        }
      ],
      "id": "dlms.addAttr~5",
      "internal": false,
      "kind": "function",
      "name": "addAttr",
      "namespace": "dlms",
      "overloadOf": "dlms.addAttr",
      "page": {
        "title": "DLMS JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms/",
        "weight": 50
      },
      "signature": "dlms.addAttr(attribute)",
      "summary": "Generic signature applicable for all cases.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms/#dlmsaddattrattribute"
    },
    {
      "examples": [
        {
          "code": "// After connection has been established\ndlms.addAttr(1, \"0.0.0.0.0.0\", 2) // Example for null-data\ndlms.addAttr(1, \"0.0.0.0.0.1\", 2) // Example for array\ndlms.addAttr(1, \"0.0.0.0.0.2\", 2) // Example for structure\ndlms.addAttr(1, \"0.0.0.0.0.3\", 2) // Example for boolean\ndlms.addAttr(1, \"0.0.0.0.0.4\", 2) // Example for bit-string\ndlms.addAttr(1, \"0.0.0.0.0.5\", 2) // Example for double-long\n// Rest on number examples are omitted because they are similar to double-long\ndlms.addAttr(1, \"0.0.0.0.0.6\", 2) // Example for octet-string\ndlms.addAttr(1, \"0.0.0.0.0.7\", 2) // Example for visible-string\n// utf8-string example is omitted because it's similar to visible-string\n\nvar result = dlms.get() // Descriptive (true can also be passed)\nlog(result[0]) // Expected output: {\"result\":\"success\",\"classId\":1,\"obisCode\":\"0.0.0.0.0.0\",\"attrId\":2,\"type\":\"null-data\",\"value\":null}]\nlog(result[1]) // Expected output: {\"result\":\"success\",\"classId\":1,\"obisCode\":\"0.0.0.0.0.1\",\"attrId\":2,\"type\":\"array\",\"value\":[{\"type\":\"long-unsigned\",\"value\":1},{\"type\":\"long-unsigned\",\"value\":2},{\"type\":\"long-unsigned\",\"value\":3}]}\nlog(result[2]) // Expected output: {\"result\":\"success\",\"classId\":1,\"obisCode\":\"0.0.0.0.0.2\",\"attrId\":2,\"type\":\"structure\",\"value\":[{\"type\":\"unsigned\",\"value\":1},{\"type\":\"long-unsigned\",\"value\":2},{\"type\":\"array\",\"value\":[{\"type\":\"visible-string\",\"value\":\"one\"},{\"type\":\"visible-string\",\"value\":\"two\"}]}]}\nlog(result[3]) // Expected output: {\"result\":\"success\",\"classId\":1,\"obisCode\":\"0.0.0.0.0.3\",\"attrId\":2,\"type\":\"boolean\",\"value\":true}\nlog(result[4]) // Expected output: {\"result\":\"success\",\"classId\":1,\"obisCode\":\"0.0.0.0.0.4\",\"attrId\":2,\"type\":\"bit-string\",\"value\":[true,false,true]}\nlog(result[5]) // Expected output: {\"result\":\"success\",\"classId\":1,\"obisCode\":\"0.0.0.0.0.5\",\"attrId\":2,\"type\":\"double-long\",\"value\":1}\nlog(result[6]) // Expected output: {\"result\":\"success\",\"classId\":1,\"obisCode\":\"0.0.0.0.0.6\",\"attrId\":2,\"type\":\"octet-string\",\"value\":[116,101,115,116]}\nlog(result[7]) // Expected output: {\"result\":\"success\",\"classId\":1,\"obisCode\":\"0.0.0.0.0.7\",\"attrId\":2,\"type\":\"visible-string\",\"value\":\"test\"}",
          "language": "javascript"
        },
        {
          "code": "// After connection has been established\n// Simple value types are returned exactly the same as descriptive mode, null-data is included to viasually see this\ndlms.addAttr(1, \"0.0.0.0.0.0\", 2) // Example for null-data\n// Simple value types are returned exactly the same as descriptive mode, null-data is included to viasually see this\ndlms.addAttr(1, \"0.0.0.0.0.1\", 2) // Example for array\ndlms.addAttr(1, \"0.0.0.0.0.2\", 2) // Example for structure\n\nvar result = dlms.get(false) // Non descriptive\nlog(result[0]) // Expected output: {\"result\":\"success\",\"classId\":1,\"obisCode\":\"0.0.0.0.0.0\",\"attrId\":2,\"type\":\"null-data\",\"value\":null}]\nlog(result[1]) // Expected output: {\"result\":\"success\",\"classId\":1,\"obisCode\":\"0.0.0.0.0.1\",\"attrId\":2,\"type\":\"array\",\"value\":[1,2,3]}\nlog(result[2]) // Expected output: {\"result\":\"success\",\"classId\":1,\"obisCode\":\"0.0.0.0.0.2\",\"attrId\":2,\"type\":\"structure\",\"value\":[1,2,[\"one\",\"two\"]]}",
          "language": "javascript"
        }
      ],
      "id": "dlms.get",
      "internal": false,
      "kind": "function",
      "name": "get",
      "namespace": "dlms",
      "page": {
        "title": "DLMS JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms/",
        "weight": 50
      },
      "params": [
        {
          "description": "Descriptive mode returns complex data as `Array` of `object` containing `type` and `value` for each object, non descriptive mode flattens the returned array",
          "name": "descriptive",
          "type": "boolean"
        },
        {
          "description": "Whether to force the get to request elements one by one instead of using a list when `MULTIPLE_REFERENCES` conformance is enabled (if it's not set the global `forceGetWithoutList` will be used)",
          "name": "forceWithoutList",
          "type": "boolean"
        }
      ],
      "returns": {
        "description": "`Array` - Array of JSONs with responses. Each JSON will have six fields: `result` of the get operation, the requested `classId`, `obisCode` and `attrId`, `type` with the data type of the received value and the `value` received from the device. An optional `error` field may be returned for any error that happened during the get."
      },
      "signature": "dlms.get(descriptive, forceWithoutList)",
      "summary": "Executes a multi DLMS get attribute request with the previously specified payload (addAttr(classId, obisCode, attrId)).",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms/#dlmsgetdescriptive-forcewithoutlist"
    },
    {
      "examples": [
        {
          "code": "// After connection has been established\ndlms.addAttr(1, \"0.0.0.0.0.0\", 2, \"null-data\", null) // Example for null-data\ndlms.addAttr(1, \"0.0.0.0.0.1\", 2, \"array\", [{\"type\":\"long-unsigned\",\"value\":1},{\"type\":\"long-unsigned\",\"value\":2},{\"type\":\"long-unsigned\",\"value\":3}]) // Example for array\ndlms.addAttr(1, \"0.0.0.0.0.2\", 2, \"structure\", [{\"type\":\"unsigned\",\"value\":1},{\"type\":\"long-unsigned\",\"value\":2},{\"type\":\"array\",\"value\":[{\"type\":\"visible-string\",\"value\":\"one\"},{\"type\":\"visible-string\",\"value\":\"two\"}]}]) // Example for structure\ndlms.addAttr(1, \"0.0.0.0.0.3\", 2, \"boolean\", false) // Example for boolean\ndlms.addAttr(1, \"0.0.0.0.0.4\", 2, \"bit-string\", [true, false, true, false]) // Example for bit-string as boolean array (default type)\ndlms.addAttr(1, \"0.0.0.0.0.4\", 2, \"bit-string\", \"1010\") // Example for bit-string as string with the bit-string representation (alternative set value type, a get will always return it as boolean array)\ndlms.addAttr(1, \"0.0.0.0.0.5\", 2, \"double-long\", 1) // Example for double-long\n// Rest on number examples are omitted because they are similar to double-long\ndlms.addAttr(1, \"0.0.0.0.0.6\", 2, \"octet-string\", [116, 101, 115, 116]) // Example for octet-string as byte array (default type)\ndlms.addAttr(1, \"0.0.0.0.0.6\", 2, \"octet-string\", \"test\") // Example for octet-string as string (alternative set value type, a get will always return it as byte array)\ndlms.addAttr(1, \"0.0.0.0.0.7\", 2, \"visible-string\", \"test\") // Example for visible-string\n// utf8-string example is omitted because it's similar to visible-string\n\nvar result = dlms.set() // Descriptive mode does not really matter, because return should always be null-data.\nlog(result[0]) // Expected output: {\"result\":\"success\",\"classId\":1,\"obisCode\":\"0.0.0.0.0.0\",\"attrId\":2,\"type\":\"null-data\",\"value\":null}]\n// All remaining results are similar, including returning null-data.",
          "language": "javascript"
        }
      ],
      "id": "dlms.set",
      "internal": false,
      "kind": "function",
      "name": "set",
      "namespace": "dlms",
      "page": {
        "title": "DLMS JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms/",
        "weight": 50
      },
      "params": [
        {
          "description": "**Does not matter on `set()`**. It's included to have the same signature as `get()` and in case a device returns something in a set.",
          "name": "descriptive",
          "type": "boolean"
        },
        {
          "description": "Whether to force the set to request elements one by one instead of using a list when `MULTIPLE_REFERENCES` conformance is enabled (if it's not set the global `forceSetWithoutList` will be used)",
          "name": "forceWithoutList",
          "type": "boolean"
        }
      ],
      "returns": {
        "description": "`Array` - Array of JSONs with responses. Each JSON will have six fields: `result` of the set operation, the requested `classId`, `obisCode` and `attrId`, `type` with the data type of the received value and the `value` received from the device. An optional `error` field may be returned for any error that happened during the set."
      },
      "signature": "dlms.set(descriptive)",
      "summary": "Executes a multi DLMS set attribute request with the previously specified payload (addAttr(classId, obisCode, attrId, type, value)).",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms/#dlmssetdescriptive"
    },
    {
      "id": "dlms.addMethod",
      "internal": false,
      "kind": "function",
      "name": "addMethod",
      "namespace": "dlms",
      "page": {
        "title": "DLMS JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms/",
        "weight": 50
      },
      "params": [
        {
          "description": "The class ID of the object to access",
          "name": "classId",
          "type": "Array"
        },
        {
          "description": "The name of the object to access",
          "name": "obisCode",
          "type": "string"
        },
        {
          "description": "The method index in the object",
          "name": "methodId",
          "type": "string"
        },
        {
          "description": "The data type of the value to pass to the method",
          "name": "type",
          "type": "string"
        },
        {
          "description": "The data value to pass to the method",
          "name": "value",
          "type": "string"
        }
      ],
      "signature": "dlms.addMethod(classId, obisCode, methodId, type, value)",
      "summary": "addMethod() is used for method() function.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms/#dlmsaddmethodclassid-obiscode-methodid-type-value"
    },
    {
      "examples": [
        {
          "code": "// After connection has been established\ndlms.addMethod(7, \"1.0.99.1.0.255\", 2) // Example for method needing null-data as parameter (default type and value)\ndlms.addMethod(7, \"1.0.99.1.0.254\", 2, \"unsigned\", 0) // Example for method needing 0 (unsigned) as parameter\n\nvar result = dlms.method()\nlog(result[0]) // Expected output: {\"result\":\"success\",\"classId\":1,\"obisCode\":\"1.0.99.1.0.255\",\"methodId\":2,\"type\":\"null-data\",\"value\":null}]\nlog(result[1]) // Expected output: {\"result\":\"success\",\"classId\":1,\"obisCode\":\"1.0.99.1.0.254\",\"methodId\":2,\"type\":\"boolean\",\"value\":true}",
          "language": "javascript"
        }
      ],
      "id": "dlms.method",
      "internal": false,
      "kind": "function",
      "name": "method",
      "namespace": "dlms",
      "page": {
        "title": "DLMS JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms/",
        "weight": 50
      },
      "params": [
        {
          "description": "Descriptive mode returns complex data as `Array` of `object` containing `type` and `value` for each object, non descriptive mode flattens the returned array",
          "name": "descriptive",
          "type": "boolean"
        }
      ],
      "returns": {
        "description": "`Array` - Array of JSONs with responses. Each JSON will have six fields: `result` of the method operation, the requested `classId`, `obisCode` and `methodId`, `type` with the data type of the received value and the `value` received from the device. An optional `error` field may be returned for any error that happened during the method (for example an error decoding the optional return parameters)."
      },
      "signature": "dlms.method(descriptive)",
      "summary": "Executes a multi DLMS method (or action) request with the previously specified payload (addMethod(classId, obisCode, methodId, type, value)).",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms/#dlmsmethoddescriptive"
    },
    {
      "id": "dlms.initializeNextFrameCounter",
      "internal": false,
      "kind": "function",
      "name": "initializeNextFrameCounter",
      "namespace": "dlms",
      "page": {
        "title": "DLMS JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms/",
        "weight": 50
      },
      "params": [
        {
          "description": "The current frame counter sent by the device.",
          "name": "currentFrameCounter",
          "type": "number"
        }
      ],
      "signature": "dlms.initializeNextFrameCounter(currentFrameCounter)",
      "summary": "Sets the invocation counter of the ciphering to the next value of the received frame counter. This is used for devices that maintain two separate frame counters (one for transmit and one for receive). Usually the current _Management Frame Counter - On-line_ is received in a _CompactFrame_ notification and that value is the one that needs to be passed to this function for that device.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms/#dlmsinitializenextframecountercurrentframecounter"
    },
    {
      "id": "dlms.getInvocationCounter",
      "internal": false,
      "kind": "function",
      "name": "getInvocationCounter",
      "namespace": "dlms",
      "page": {
        "title": "DLMS JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms/",
        "weight": 50
      },
      "returns": {
        "description": "`number` (integer)."
      },
      "signature": "dlms.getInvocationCounter()",
      "summary": "Returns the current invocation counter of the ciphering.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms/#dlmsgetinvocationcounter"
    },
    {
      "id": "dlms.disconnect",
      "internal": false,
      "kind": "function",
      "name": "disconnect",
      "namespace": "dlms",
      "page": {
        "title": "DLMS JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms/",
        "weight": 50
      },
      "signature": "dlms.disconnect()",
      "summary": "Close the DLMS connection.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms/#dlmsdisconnect"
    },
    {
      "examples": [
        {
          "code": "var typeDescription = {\"type\": \"structure\", \"items\": [\n\t\t{\"type\": \"long-unsigned\"},\n\t\t{\"type\": \"unsigned\"},\n\t\t{\"type\": \"array\", \"length\": 1, \"subtype\": {\"type\": \"long-unsigned\"}},\n\t\t{\"type\": \"array\", \"length\": 1, \"subtype\": {\"type\": \"double-long-unsigned\"}},\n\t\t{\"type\": \"structure\", \"items\": [\n\t\t\t{\"type\": \"unsigned\"}, {\"type\": \"long-unsigned\"}\n\t\t]},\n\t\t{\"type\": \"octet-string\"}\n\t]\n}",
          "language": "javascript"
        },
        {
          "code": "var {result: data, error} = dlms.getCompactData(typeDescription, payload);\nif (error) {\n    log(\"Error: \" + error);\n} else {\n    log(data) // Expected output: {\"type\":\"structure\",\"value\":[{\"type\":\"long-unsigned\",\"value\":1},{\"type\":\"unsigned\",\"value\":2},{\"type\":\"array\",\"value\":[{\"type\":\"long-unsigned\",\"value\":3}]},{\"type\":\"array\",\"value\":[{\"type\":\"double-long-unsigned\",\"value\":4}]},{\"type\":\"structure\",\"value\":[{\"type\":\"unsigned\",\"value\":5},{\"type\":\"long-unsigned\",\"value\":6}]},{\"type\":\"octet-string\",\"value\":[83,112,97,114,101,32,79,98,106,101,99,116]}]}\n}\n\nvar {result: data, error} = dlms.getCompactData(typeDescription, payload, false);\nif (error) {\n    log(\"Error: \" + error);\n} else {\n    log(data) // Expected output: [1,2,[3],[4],[5,6],[83, 112, 97, 114, 101, 32, 79, 98, 106, 101, 99, 116]]\n}",
          "language": "javascript"
        }
      ],
      "id": "dlms.getCompactData",
      "internal": false,
      "kind": "function",
      "name": "getCompactData",
      "namespace": "dlms",
      "page": {
        "title": "DLMS JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms/",
        "weight": 50
      },
      "params": [
        {
          "description": "Object with the description of the data. The attributes of the object will be different according to the data expected'",
          "name": "typeDescription",
          "type": "Object"
        },
        {
          "description": "Array of bytes with the compact data (for example the DLMS notification data or element received)",
          "name": "value",
          "type": "Array` of `number` (or `Object` containing an `octet-string` `type` with its `value`)"
        },
        {
          "description": "Descriptive mode returns complex data as `Array` of `object` containing `type` and `value` for each object, non descriptive mode flattens the returned array",
          "name": "descriptive",
          "type": "boolean"
        },
        {
          "description": "Determines if the compact data decoding of arrays must be in italian mode or not (`explicitArrayLengthInContent`)",
          "name": "italianMode",
          "type": "boolean"
        }
      ],
      "returns": {
        "description": "`Object` - Object containing `result` and/or `error`. On success, `result` contains the parsed compact data (either in descriptive (with `type` in each value) or non-descriptive (direct values) format depending on the `descriptive` parameter). On error, the `error` will contain the error description and `result` may be `null` or contain a best-effort decoding of the compact data that may be incorrect."
      },
      "signature": "dlms.getCompactData(typeDescription, value, descriptive, italianMode)",
      "summary": "Extract the compact data serialized in a byte array according to the description given.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms/#dlmsgetcompactdatatypedescription-value-descriptive-italianmode"
    },
    {
      "examples": [
        {
          "code": "// compact-data containing all \n\nvar dateTime = data[0]\nlog(dateTime) // Expected output: {\"type\":\"date-time\",\"value\":{\"year\":2023,\"month\":11,\"dayOfMonth\":28,\"dayOfWeek\":2,\"hour\":10,\"minute\":26,\"second\":55,\"hundredthsOfSecond\":0,\"deviation\":-60,\"status\":0}}\nlog(dlms.getDate(dateTime).toISOString()) // Expected output: 2023-11-28T11:26:55.000Z\nlog(dlms.getDate(dateTime.value).toISOString()) // Expected output: 2023-11-28T11:26:55.000Z\n\nvar date = data[1]\nlog(date) // Expected output: {\"type\":\"date\",\"value\":{\"year\":2023,\"month\":11,\"dayOfMonth\":28,\"dayOfWeek\":2}}\nlog(dlms.getDate(date).toISOString()) // Expected output: 2023-11-28T00:00:00.000Z\nlog(dlms.getDate(date.value).toISOString()) // Expected output: 2023-11-28T00:00:00.000Z\n\nvar time = data[2]\nlog(time) // Expected output: {\"type\":\"date\",\"value\":{\"hour\":16,\"minute\":1,\"second\":2,\"hundredthsOfSecond\":20}}\nlog(dlms.getDate(time).toISOString()) // Expected output: 0000-01-01T16:01:02.200Z\nlog(dlms.getDate(time.value).toISOString()) // Expected output: 0000-01-01T16:01:02.200Z\n\nvar octet = data[3]\nlog(octet) // Expected output: {\"type\":\"octet-string\",\"value\":[7, 231, 11, 28, 2, 10, 26, 55, 0, -1, -60, 0]}\nlog(dlms.getDate(octet).toISOString()) // Expected output: 2023-11-28T11:26:55.000Z\nlog(dlms.getDate(octet.value).toISOString()) // Expected output: 2023-11-28T11:26:55.000Z\n\nvar undefinedDateTimeInOctet = data[4]\nlog(undefinedDateTimeInOctet) // Expected output: {\"type\":\"octet-string\",\"value\":[-1, -1, -1, -1, -1, -1, -1, -1, -1, -128, 0, -1]}\nlog(dlms.getDate(undefinedDateTimeInOctet).toISOString()) // Expected output: 0000-01-01T00:00:00.000Z\nlog(dlms.getDate(undefinedDateTimeInOctet.value).toISOString()) // Expected output: 0000-01-01T00:00:00.000Z\n\nlog(dlms.getDate(dlms.unspecifiedDateTime()).toISOString()) // Expected output: 0000-01-01T00:00:00.000Z",
          "language": "javascript"
        }
      ],
      "id": "dlms.getDate",
      "internal": false,
      "kind": "function",
      "name": "getDate",
      "namespace": "dlms",
      "page": {
        "title": "DLMS JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms/",
        "weight": 50
      },
      "params": [
        {
          "description": "The best-effort `Date` possible",
          "name": "value",
          "type": "_dateTime_ object or `Array` of `number` (or `Object` having `type` `date-time`, `date`, `time` or `octet-string` with its `value`)"
        }
      ],
      "returns": {
        "description": "`Date`",
        "type": "Date"
      },
      "signature": "dlms.getDate(value)",
      "summary": "Extract the Date of a _dateTime_ object or an octet-string. Some _dateTime_ objects or octet-string may not contain a complete date and this method will return a date that may not be as accurate as you expect. You should check the _dateTime_ object for unspecified value.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms/#dlmsgetdatevalue--date"
    },
    {
      "examples": [
        {
          "code": "log(dlms.getDateTime(new Date('2023-11-28T10:24:00.000Z'))) // Expected output: {\"year\":2023,\"month\":11,\"dayOfMonth\":28,\"dayOfWeek\":2,\"hour\":10,\"minute\":24,\"second\":0,\"hundredthsOfSecond\":0,\"deviation\":0,\"status\":0}\nlog(dlms.getDateTime(new Date('2023-11-28T10:24:00.299Z'))) // Expected output: {\"year\":2023,\"month\":11,\"dayOfMonth\":28,\"dayOfWeek\":2,\"hour\":10,\"minute\":24,\"second\":0,\"hundredthsOfSecond\":29,\"deviation\":0,\"status\":0}\nlog(dlms.getDateTime(new Date('Tue Nov 28 2023 11:24:00 GMT+0100'))) // Expected output: {\"year\":2023,\"month\":11,\"dayOfMonth\":28,\"dayOfWeek\":2,\"hour\":10,\"minute\":24,\"second\":0,\"hundredthsOfSecond\":0,\"deviation\":0,\"status\":0}\n\n// compact-data containing all values\n\nvar octet = data[0]\nlog(octet) // Expected output: {\"type\":\"octet-string\",\"value\":[7, 231, 11, 28, 2, 10, 26, 55, 0, -1, -60, 0]}\nlog(dlms.getDateTime(octet)) // Expected output: {\"year\":2023,\"month\":11,\"dayOfMonth\":28,\"dayOfWeek\":2,\"hour\":10,\"minute\":26,\"second\":55,\"hundredthsOfSecond\":0,\"deviation\":-60,\"status\":0}\nlog(dlms.getDateTime(octet)) // Expected output: {\"year\":2023,\"month\":11,\"dayOfMonth\":28,\"dayOfWeek\":2,\"hour\":10,\"minute\":26,\"second\":55,\"hundredthsOfSecond\":0,\"deviation\":-60,\"status\":0}\n\nvar undefinedDateTimeInOctet = data[1]\nlog(undefinedDateTimeInOctet) // Expected output: {'type': 'octet-string', 'value': [-1, -1, -1, -1, -1, -1, -1, -1, -1, -128, 0, -1]}\nlog(dlms.getDateTime(undefinedDateTimeInOctet)) // Expected output: {\"year\":65535,\"month\":255,\"dayOfMonth\":255,\"dayOfWeek\":255,\"hour\":255,\"minute\":255,\"second\":255,\"hundredthsOfSecond\":255,\"deviation\":32768,\"status\":255}\nlog(dlms.getDateTime(undefinedDateTimeInOctet.value)) // Expected output: {\"year\":65535,\"month\":255,\"dayOfMonth\":255,\"dayOfWeek\":255,\"hour\":255,\"minute\":255,\"second\":255,\"hundredthsOfSecond\":255,\"deviation\":32768,\"status\":255}",
          "language": "javascript"
        }
      ],
      "id": "dlms.getDateTime",
      "internal": false,
      "kind": "function",
      "name": "getDateTime",
      "namespace": "dlms",
      "page": {
        "title": "DLMS JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms/",
        "weight": 50
      },
      "params": [
        {
          "description": "Value containing a dateTime compatible value",
          "name": "value",
          "type": "Date` or `Array` of `number` (or `Object` having `type` of `octet-string` with its `value`)"
        }
      ],
      "returns": {
        "description": "`Object`"
      },
      "signature": "dlms.getDateTime(value)",
      "summary": "Extract the _dateTime_ object of a Date or an octet-string. The resulting _dateTime_ objects generated from a Date will use UTC time specifying a deviation of 0. If you need something else construct the _dateTime_ object manually.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms/#dlmsgetdatetimevalue"
    },
    {
      "examples": [
        {
          "code": "dlms.addAttr(1, '0.0.0.0.0.0', 2, 'octet-string', dlms.undefinedDateTime())\nlog(dlms.getDate(dlms.undefinedDateTime()).toISOString()) // Expected output: 0000-01-01T00:00:00.000Z",
          "language": "javascript"
        }
      ],
      "id": "dlms.undefinedDateTime",
      "internal": false,
      "kind": "function",
      "name": "undefinedDateTime",
      "namespace": "dlms",
      "page": {
        "title": "DLMS JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms/",
        "weight": 50
      },
      "returns": {
        "description": "`Object`"
      },
      "signature": "dlms.undefinedDateTime()",
      "summary": "Get _dateTime_ object with all its fields set to not specified.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms/#dlmsundefineddatetime"
    },
    {
      "examples": [
        {
          "code": "dlms.addAttr(1, '0.0.0.0.0.0', 2, 'octet-string', dlms.unspecifiedDateTime())\nlog(dlms.getDate(dlms.unspecifiedDateTime()).toISOString()) // Expected output: 0000-01-01T00:00:00.000Z",
          "language": "javascript"
        }
      ],
      "id": "dlms.unspecifiedDateTime",
      "internal": false,
      "kind": "function",
      "name": "unspecifiedDateTime",
      "namespace": "dlms",
      "page": {
        "title": "DLMS JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms/",
        "weight": 50
      },
      "returns": {
        "description": "`Object`"
      },
      "signature": "dlms.unspecifiedDateTime()",
      "summary": "Get _dateTime_ object with all its fields set to not specified.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms/#dlmsunspecifieddatetime"
    },
    {
      "examples": [
        {
          "code": "var opResult = operation.getAllPending();",
          "language": "javascript"
        }
      ],
      "id": "operation.getAllPending",
      "internal": false,
      "kind": "function",
      "name": "getAllPending",
      "namespace": "operation",
      "page": {
        "title": "Operation JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/operation/",
        "weight": 50
      },
      "signature": "operation.getAllPending()",
      "summary": "This function does not require parameters.",
      "url": "api/device_integration/connector_functions/core_javascript_api/operation/#operationgetallpending"
    },
    {
      "examples": [
        {
          "code": "var opResult = operation.getNotFinished();",
          "language": "javascript"
        }
      ],
      "id": "operation.getNotFinished",
      "internal": false,
      "kind": "function",
      "name": "getNotFinished",
      "namespace": "operation",
      "page": {
        "title": "Operation JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/operation/",
        "weight": 50
      },
      "signature": "operation.getNotFinished()",
      "summary": "This function does not require parameters.",
      "url": "api/device_integration/connector_functions/core_javascript_api/operation/#operationgetnotfinished"
    },
    {
      "examples": [
        {
          "code": "var opResult = operation.getByCustomCondition({ 'eq': { 'operationStatus': 'IN_PROGRESS' } });",
          "language": "javascript"
        },
        {
          "code": "var opResult = operation.getAllPending();\nif (opResult.error) {\n    return error;\n}\nopResult.forEach(op =\u003e op.activate());",
          "language": "javascript"
        }
      ],
      "id": "operation.getByCustomCondition",
      "internal": false,
      "kind": "function",
      "name": "getByCustomCondition",
      "namespace": "operation",
      "page": {
        "title": "Operation JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/operation/",
        "weight": 50
      },
      "params": [
        {
          "description": "Filter condition to apply (e.g., `{ 'eq': { 'operationStatus': 'IN_PROGRESS' } }`)",
          "name": "customCondition",
          "type": "Object"
        }
      ],
      "signature": "operation.getByCustomCondition(customCondition)",
      "summary": "##### opResult -- Object Functions",
      "url": "api/device_integration/connector_functions/core_javascript_api/operation/#operationgetbycustomconditioncustomcondition"
    },
    {
      "examples": [
        {
          "code": "dlms_gas.init();",
          "language": "javascript"
        },
        {
          "code": "dlms_gas.init(entity._value(\"provision.administration.organiaztion)+\"_dev\");",
          "language": "javascript"
        }
      ],
      "id": "dlms_gas.init",
      "internal": false,
      "kind": "function",
      "name": "init",
      "namespace": "dlms_gas",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Optional organization name.",
          "name": "confEntityName",
          "type": "string"
        }
      ],
      "signature": "dlms_gas.init(confEntityName)",
      "summary": "Initializes the DLMS Gas API context. It loads provisioned and collected data from meter entity and provisioned configuration data from configuratiion entity if it is found. By default it uses the meter's organization name to find created configuration entity, if it was created with different name it must be passed as argument.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#dlms_gasinitconfentityname"
    },
    {
      "examples": [
        {
          "code": "var res = dlms_gas.decode();",
          "language": "javascript"
        }
      ],
      "id": "dlms_gas.decode",
      "internal": false,
      "kind": "function",
      "name": "decode",
      "namespace": "dlms_gas",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Template to force.",
          "name": "customTemplate",
          "type": "Object"
        },
        {
          "description": "Enable descriptive format.",
          "name": "descriptive",
          "type": "boolean"
        }
      ],
      "signature": "dlms_gas.decode(customTemplate, descriptive)",
      "summary": "Decodes received payload after identifying the template and collects data. Internally it calls to behavior specific decode method. See DLMS Manufacturer Behavior section below for full specification of that method.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#dlms_gasdecodecustomtemplate-descriptive"
    },
    {
      "examples": [
        {
          "code": "//standard behavior\ndlms_gas.pendingActions();",
          "language": "javascript"
        },
        {
          "code": "//skip statistics and force push events configuration retrieval\ndlms_gas.actions.retrieveStatistics = false;\ndlms_gas.actions.retrievePushEventsConfigurations = true;\ndlms_gas.actions.forcePushConf = true;\ndlms_gas.pendingActions();",
          "language": "javascript"
        }
      ],
      "id": "dlms_gas.pendingActions",
      "internal": false,
      "kind": "function",
      "name": "pendingActions",
      "namespace": "dlms_gas",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "signature": "dlms_gas.pendingActions()",
      "summary": "Executes the full session flow. Internally it calls to behavior specific pendingActions method. See DLMS Manufacturer Behavior section below for full specification of that method.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#dlms_gaspendingactions"
    },
    {
      "examples": [
        {
          "code": "dlms_gas.collect();",
          "language": "javascript"
        }
      ],
      "id": "dlms_gas.collect",
      "internal": false,
      "kind": "function",
      "name": "collect",
      "namespace": "dlms_gas",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "signature": "dlms_gas.collect()",
      "summary": "Used at the end of the script to send collected data for meter entity, cell enity and organization entity. Internally it calls to specific behavior collect method.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#dlms_gascollect"
    },
    {
      "examples": [
        {
          "code": "const customBehavior = {/*behavior specification*/};\ndlms_gas.customBehavior(customBehavior);",
          "language": "javascript"
        }
      ],
      "id": "dlms_gas.customBehavior",
      "internal": false,
      "kind": "function",
      "name": "customBehavior",
      "namespace": "dlms_gas",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "The behavior to use. If empty, is like using `default` behavior.",
          "name": "behavior",
          "type": "Object"
        }
      ],
      "signature": "dlms_gas.customBehavior(behavior)",
      "summary": "Changes the default behavior to a custom one. Internall it set dlms_gas.behaviorName property to \"custom\" and dlms_gas.custom property with the behavior provided as argument.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#dlms_gascustombehaviorbehavior"
    },
    {
      "id": "dlms_gas._exec",
      "internal": false,
      "kind": "function",
      "name": "_exec",
      "namespace": "dlms_gas",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Type of call to execute.",
          "name": "callType",
          "type": "string"
        },
        {
          "description": "mtype for messages sent to device.",
          "name": "dType",
          "type": "number"
        },
        {
          "description": "mtype for messages received from device.",
          "name": "uType",
          "type": "number"
        }
      ],
      "signature": "dlms_gas._exec(callType, dType, uType)",
      "summary": "It executes specified standard dlms call (get, set, method). It will use the dType and uType for msRaw collection. It will return an object with the result from dlms standard function or with the error message. This method is just utility and is not intended to be used directly. Instead it must be used dlms_gas.get, dlms_gas.set, dlms_gas.method or dlms_gas.getByRange.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#dlms_gas_execcalltype-dtype-utype"
    },
    {
      "examples": [
        {
          "code": "dlms.addAttr(1, '0.0.94.39.58.255', 2);\ndlms.addAttr(45, '0.1.25.4.0.255', 2);\ndlms.addAttr(3, '0.0.96.6.6.255', 2);\nconst res = dlms_gas.get(-8, 4);",
          "language": "javascript"
        },
        {
          "code": "{\n  \"1_0.94.39.58.255_2\": ...returned value from dlms.get... ,\n  \"45_0.1.25.4.0.255_2\": ...returned value from dlms.get... ,\n  \"3_0.96.6.6.255_2\": ...returned value from dlms.get...\n}",
          "language": "javascript"
        },
        {
          "code": "{\n  \"error\": \"...errors specification separated by ';'\",\n  \"1_0.0.94.39.58.255_2\": ...returned value from dlms.get...\n}",
          "language": "javascript"
        },
        {
          "code": "{\n  \"error\": \"... error message ...\"\n}",
          "language": "javascript"
        }
      ],
      "id": "dlms_gas.get",
      "internal": false,
      "kind": "function",
      "name": "get",
      "namespace": "dlms_gas",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "mtype for messages sent to device.",
          "name": "dType",
          "type": "number"
        },
        {
          "description": "mtype for messages received from device.",
          "name": "uType",
          "type": "number"
        }
      ],
      "signature": "dlms_gas.get(dType, uType)",
      "summary": "It wrapes dlms.get calls adding extra behavior. dType and uType will be used for msRaw collection. The dlms.get response will be flattened in order to store the values in a single object. See examples below.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#dlms_gasgetdtype-utype"
    },
    {
      "examples": [
        {
          "code": "dlms.addAttr(22, '0.0.15.0.1.255', 2, 'structure', [{ 'type': 'octet-string', 'value': [0, 0, 10, 0, 106, -1] }, { 'type': 'long-unsigned', 'value': vst }]);\ndlms.addAttr(22, '0.0.15.0.1.255', 4, 'array', [{ 'type': 'structure', 'value': [{ 'type': 'octet-string', 'value': timeOctet }, { 'type': 'octet-string', 'value': dateOctet }] }]);\nconst dlmsResp = dlms_gas.set(-13, 6);",
          "language": "javascript"
        },
        {
          "code": "{\n  \"22_0.0.15.0.1.255_2\": \"success\",\n  \"22_0.0.15.0.1.255_4\": \"success\"\n}",
          "language": "javascript"
        },
        {
          "code": "{\n  \"error\": \"...errors specification...\",\n  \"22_0.0.15.0.1.255_2\": \"error message\",\n  \"22_0.0.15.0.1.255_4\": \"success\"\n}",
          "language": "javascript"
        },
        {
          "code": "{\n  \"error\": \"... error message ...\"\n}",
          "language": "javascript"
        }
      ],
      "id": "dlms_gas.set",
      "internal": false,
      "kind": "function",
      "name": "set",
      "namespace": "dlms_gas",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "mtype for messages sent to device.",
          "name": "dType",
          "type": "number"
        },
        {
          "description": "mtype for messages received from device.",
          "name": "uType",
          "type": "number"
        }
      ],
      "signature": "dlms_gas.set(dType, uType)",
      "summary": "It wrapes dlms.set calls adding extra behavior. dType and uType will be used for msRaw collection. The dlms.set response will be flattened in order to store the values in a single object. See examples below.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#dlms_gassetdtype-utype"
    },
    {
      "examples": [
        {
          "code": "dlms.addMethod(3, '7.0.96.5.1.255', 1, 'integer', 0);\nconst dlmsResp = dlms_gas.method(-18, 18);",
          "language": "javascript"
        },
        {
          "code": "{\n  \"3_7.0.96.5.1.255_1\": \"success\"\n}",
          "language": "javascript"
        },
        {
          "code": "{\n  \"error\": \"...errors specification...\",\n  \"3_7.0.96.5.1.255_1\": \"error message\"\n}",
          "language": "javascript"
        },
        {
          "code": "{\n  \"error\": \"... error message ...\"\n}",
          "language": "javascript"
        }
      ],
      "id": "dlms_gas.method",
      "internal": false,
      "kind": "function",
      "name": "method",
      "namespace": "dlms_gas",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "mtype for messages sent to device.",
          "name": "dType",
          "type": "number"
        },
        {
          "description": "mtype for messages received from device.",
          "name": "uType",
          "type": "number"
        }
      ],
      "signature": "dlms_gas.method(dType, uType)",
      "summary": "It wrapes dlms.method calls adding extra behavior. dType and uType will be used for msRaw collection. The dlms.method response will be flattened in order to store the values in a single object. See examples below.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#dlms_gasmethoddtype-utype"
    },
    {
      "examples": [
        {
          "code": "const res = dlms_gas.getByRange(7, '0.0.99.1.0.255', 2, 1, 8, '0.0.1.0.0.255', 2, 'double-long-unsigned', lastIndex, currentIndex, 10, -8, 4);",
          "language": "javascript"
        }
      ],
      "id": "dlms_gas.getByRange",
      "internal": false,
      "kind": "function",
      "name": "getByRange",
      "namespace": "dlms_gas",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Class ID of the object.",
          "name": "classId",
          "type": "number"
        },
        {
          "description": "OBIS code.",
          "name": "obis",
          "type": "string"
        },
        {
          "description": "Attribute ID.",
          "name": "attrId",
          "type": "number"
        },
        {
          "description": "Access selector (e.g., 1 for range).",
          "name": "accessSelector",
          "type": "number"
        },
        {
          "description": "Selector's parameter Class ID.",
          "name": "paramClassID",
          "type": "number"
        },
        {
          "description": "Selector's parameter OBIS code.",
          "name": "paramObis",
          "type": "string"
        },
        {
          "description": "Selector's parameter Attribute ID.",
          "name": "paramAttrId",
          "type": "number"
        },
        {
          "description": "Data type for range values (e.g., 'double-long-unsigned').",
          "name": "rangeType",
          "type": "string"
        },
        {
          "description": "Start of range.",
          "name": "rangeFrom",
          "type": "number"
        },
        {
          "description": "End of range.",
          "name": "rangeTo",
          "type": "number"
        },
        {
          "description": "Maximum range size. For event buffer ranges, the number of elements per page. For temporal ranges max period for page.",
          "name": "maxRangePerPage",
          "type": "number"
        },
        {
          "description": "mtype for messages sent to device.",
          "name": "dType",
          "type": "number"
        },
        {
          "description": "mtype for messages received from device.",
          "name": "uType",
          "type": "number"
        }
      ],
      "signature": "dlms_gas.getByRange(classId, obis, attrId, accessSelector, paramClassID, paramObis, paramAttrId, rangeType, rangeFrom, rangeTo, maxRangePerPage, dType, uType)",
      "summary": "It retrieves values by range using dlms.get with selective access. It retrieves all the values within the range, even if the device returns values in multiple pages. In case of any page retrieval fails, the error will be added to the error property and the response will be \"success\" for the rest of the pages.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#dlms_gasgetbyrangeclassid-obis-attrid-accessselector-paramclassid-paramobis-paramattrid-rangetype-rangefrom-rangeto-maxrangeperpage-dtype-utype"
    },
    {
      "examples": [
        {
          "code": "dlms_gas.init();\ndlms_gas.config.__initApiKey('your-api-key');",
          "language": "javascript"
        }
      ],
      "id": "config.__initApiKey",
      "internal": false,
      "kind": "function",
      "name": "__initApiKey",
      "namespace": "config",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "The API key to be forced into the session context.",
          "name": "apiKey",
          "type": "string"
        }
      ],
      "signature": "config.__initApiKey(apiKey)",
      "summary": "Internal utility used to initialize the API key.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#config__initapikeyapikey"
    },
    {
      "id": "behavior.getName",
      "internal": false,
      "kind": "function",
      "name": "getName",
      "namespace": "behavior",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Meter provisioned manufacturer name.",
          "name": "manufacturer",
          "type": "string"
        }
      ],
      "signature": "behavior.getName(manufacturer)",
      "summary": "Calculates and returns behavior name from manufacturer parameter (Not case session). This method is called from dlms_gas.init function only if dlms_gas.behaviorName is null.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#behaviorgetnamemanufacturer"
    },
    {
      "examples": [
        {
          "code": "const chain = dlms_gas.behavior.calculateChain('custom');\n//it will return following chain: ['custom', 'pietro', 'default']",
          "language": "javascript"
        },
        {
          "code": "//having custom behavior with invalid baseBehavior, for example 'nonExistentBehavior'\nconst chain = dlms_gas.behavior.calculateChain('custom');\n//it will return following chain: ['custom', 'default']",
          "language": "javascript"
        }
      ],
      "id": "behavior.calculateChain",
      "internal": false,
      "kind": "function",
      "name": "calculateChain",
      "namespace": "behavior",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "The name of the behavior to calculate the chain for. If null, it uses dlms_gas.behaviorName",
          "name": "behaviorName",
          "type": "string"
        },
        {
          "description": "A set of behavior names that have already been visited. Used to detect circular references",
          "name": "visited",
          "type": "Set\u003cstring\u003e"
        }
      ],
      "signature": "behavior.calculateChain(behaviorName, visited)",
      "summary": "Internall utility to calculate recursively the behavior chain. It is called from dlms_gas.init and it will return a Set with all behaviors to be checked when a function or property is called. It will take into account that specified behavior exists, if not it will return default behavior as last element of the chain. Something similiar will happen if there is a circular baseBehavior reference.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#behaviorcalculatechainbehaviorname-visited"
    },
    {
      "id": "behavior.property",
      "internal": false,
      "kind": "function",
      "name": "property",
      "namespace": "behavior",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "The name of the property to retrieve",
          "name": "propertyName",
          "type": "string"
        }
      ],
      "signature": "behavior.property(propertyName)",
      "summary": "Returns property value from behavior chain in order to call it. It will return the property value if exists in any behavior in the chain, if not it will return null.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#behaviorpropertypropertyname"
    },
    {
      "examples": [
        {
          "code": "    const address = dlms_gas.behavior.function(\"encodeIpPort\")(pConf.platform.ip, pConf.platform.port);",
          "language": "javascript"
        },
        {
          "code": "const cb = {\n  \"retrieveStatistics\": function(data){\n    dlms_gas.behavior.function('retrieveStatistics')(); //Bad practice: Infinite recursion\n    dlms_gas.default.retrieveStatistics(); //the correct way to do it\n    dlms_gas.honeywell.retrieveStatistics(); //the correct way to do it\n    //... extra code ...\n  }\n}",
          "language": "javascript"
        }
      ],
      "id": "behavior.function",
      "internal": false,
      "kind": "function",
      "name": "function",
      "namespace": "behavior",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "The name of the function to retrieve",
          "name": "functionName",
          "type": "string"
        }
      ],
      "signature": "behavior.function(functionName)",
      "summary": "Returns function from behavior chain in order to call it. It will return the function if exists in any behavior in the chain, if not it will empty function.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#behaviorfunctionfunctionname"
    },
    {
      "id": "default.apnConfig",
      "internal": false,
      "kind": "function",
      "name": "apnConfig",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object returned by `operation` api.",
          "name": "op",
          "type": "Object"
        }
      ],
      "signature": "default.apnConfig(op)",
      "summary": "Apn configuration operation logic. Configures the SIM APN and PLMN code on the device and processes the operation response.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultapnconfigop"
    },
    {
      "id": "default.automaticActions",
      "internal": false,
      "kind": "function",
      "name": "automaticActions",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "signature": "default.automaticActions()",
      "summary": "Orchestrates automatic data retrieval functions. These functions retrieve data from the device depending on last collected data and new received data. Following functions are called in order:",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultautomaticactions"
    },
    {
      "id": "default.closeConnection",
      "internal": false,
      "kind": "function",
      "name": "closeConnection",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "signature": "default.closeConnection()",
      "summary": "Called at then end of pendingActions function. In this case (default behavior) it is empty.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultcloseconnection"
    },
    {
      "id": "default.collect",
      "internal": false,
      "kind": "function",
      "name": "collect",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "signature": "default.collect()",
      "summary": "Sends the gathered datapoints for the device, cell, and organizational unit. It takes into account if dls_gas.devCollection, dls_gas.cellCollection or dls_gas.uoCollection are defined and they have identifier field is defined.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultcollect"
    },
    {
      "id": "default.collectBillingPeriodSnapshotData",
      "internal": false,
      "kind": "function",
      "name": "collectBillingPeriodSnapshotData",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object containing the billing period data.",
          "name": "billingPeriodData",
          "type": "object"
        }
      ],
      "signature": "default.collectBillingPeriodSnapshotData(billingPeriodData)",
      "summary": "Collects the billing period data snapshot. Receives an with the values of decoded billing period snapshot:",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultcollectbillingperiodsnapshotdatabillingperioddata"
    },
    {
      "id": "default.collectDiagnostic",
      "internal": false,
      "kind": "function",
      "name": "collectDiagnostic",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Diagnostic value to be decoded.",
          "name": "diagnostic",
          "type": "number"
        },
        {
          "description": "Timestamp to be used for collection. If not defined current time will be used.",
          "name": "at",
          "type": "number"
        },
        {
          "description": "If defined it will be used as datapoint source.",
          "name": "source",
          "type": "string"
        },
        {
          "description": "If defined it will be used as datapoint sourceInfo.",
          "name": "sourceInfo",
          "type": "object"
        }
      ],
      "signature": "default.collectDiagnostic(diagnostic, at, source, sourceInfo)",
      "summary": "Decodes a 16-bit diagnostic value into individual status flags that are collected with specified at, source and sourceInfo.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultcollectdiagnosticdiagnostic-at-source-sourceinfo"
    },
    {
      "id": "default.collectHourlyDiagnostics",
      "internal": false,
      "kind": "function",
      "name": "collectHourlyDiagnostics",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Array with hourly diagnostics values",
          "name": "diagnosticsArray",
          "type": "Array"
        },
        {
          "description": "Timestamp to be used as reference.",
          "name": "at",
          "type": "number"
        }
      ],
      "signature": "default.collectHourlyDiagnostics(diagnosticsArray, unixTime)",
      "summary": "Collects an array of hourly diagnostics values with at time as reference.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultcollecthourlydiagnosticsdiagnosticsarray-unixtime"
    },
    {
      "id": "default.collectHourlyVolumes",
      "internal": false,
      "kind": "function",
      "name": "collectHourlyVolumes",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Array with hourly volume increments",
          "name": "incsArray",
          "type": "Array"
        },
        {
          "description": "Timestamp to be used as reference.",
          "name": "at",
          "type": "number"
        }
      ],
      "signature": "default.collectHourlyVolumes(incsArray, at)",
      "summary": "Collects an array of hourly volume increments with at time as reference.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultcollecthourlyvolumesincsarray-at"
    },
    {
      "examples": [
        {
          "code": "// For received compact frame\ndlms_gas.manufacturer.function(\"collectMsRaw\")(contextParams.templateId, utils.bytes.toHexString(payload.value), payload.value.length);\n// For dlms request sent to device\ndlms_gas.manufacturer.function(\"collectMsRaw\")(-22);\n// For dlms response received from device\ndlms_gas.manufacturer.function(\"collectMsRaw\")(22);",
          "language": "javascript"
        }
      ],
      "id": "default.collectMsRaw",
      "internal": false,
      "kind": "function",
      "name": "collectMsRaw",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Message type.",
          "name": "mType",
          "type": "number"
        },
        {
          "description": "Raw hex payload.",
          "name": "payload",
          "type": "string"
        },
        {
          "description": "Payload size in bytes.",
          "name": "payloadSize",
          "type": "number"
        }
      ],
      "signature": "default.collectMsRaw(mType, payload, payloadSize)",
      "summary": "Internal utility to collect raw messages. It adds msRaw datapoint to device, cell and organizational unit collections. Datapoint is composed by provided arguments.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultcollectmsrawmtype-payload-payloadsize"
    },
    {
      "id": "default.collectNetworkStatus",
      "internal": false,
      "kind": "function",
      "name": "collectNetworkStatus",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Status to be decoded.",
          "name": "networkStatus",
          "type": "number"
        },
        {
          "description": "Timestamp to be used for collection. If not defined current time will be used.",
          "name": "at",
          "type": "number"
        }
      ],
      "signature": "default.collectNetworkStatus(networkStatus, at)",
      "summary": "Decodes an 8-bit network status integer value into individual flags and adds it to the device collection.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultcollectnetworkstatusnetworkstatus-at"
    },
    {
      "id": "default.collectTarifPlan",
      "internal": false,
      "kind": "function",
      "name": "collectTarifPlan",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Array of bytes representing the tariff plan.",
          "name": "tariffPlann",
          "type": "array"
        },
        {
          "description": "Timestamp to be used for collection. If not defined current time will be used.",
          "name": "at",
          "type": "number"
        }
      ],
      "signature": "default.collectTarifPlan(tariffPlann, at)",
      "summary": "Transforms and collects received array of two numbers into an array of two bytes hexadecimal string.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultcollecttarifplantariffplann-at"
    },
    {
      "id": "default.collectDailyLoadProfilesArray",
      "internal": false,
      "kind": "function",
      "name": "collectDailyLoadProfilesArray",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Array of daily profiles to collect.",
          "name": "loadProfiles",
          "type": "Array"
        },
        {
          "description": "Optional source identifier.",
          "name": "source",
          "type": "string"
        },
        {
          "description": "Optional source information.",
          "name": "sourceInfo",
          "type": "object"
        }
      ],
      "signature": "default.collectDailyLoadProfilesArray(loadProfiles, source, sourceInfo)",
      "summary": "Collects from received daily profiles with specified source and sourceInfo. Each element of array must be an object with the following fields:",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultcollectdailyloadprofilesarrayloadprofiles-source-sourceinfo"
    },
    {
      "id": "default.commsBatStatus",
      "internal": false,
      "kind": "function",
      "name": "commsBatStatus",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object returned by `operation` api.",
          "name": "op",
          "type": "Object"
        }
      ],
      "signature": "default.commsBatStatus(op)",
      "summary": "Comms bat status retrieval operation logic. Retrieves battery status and communication statistics from the device and processes the operation response.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultcommsbatstatusop"
    },
    {
      "id": "default.configClient",
      "internal": false,
      "kind": "function",
      "name": "configClient",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "signature": "default.configClient()",
      "summary": "Initializes the dlms client parameters for sending requests to the device. This method is called from dlms_gas.init function.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultconfigclient"
    },
    {
      "id": "default.createCellIfNecessary",
      "internal": false,
      "kind": "function",
      "name": "createCellIfNecessary",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "signature": "default.createCellIfNecessary()",
      "summary": "Automatically provisions a new NBIoT Cell entity in Opengate if it doesn't exist. It uses NBcellID as entity name.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultcreatecellifnecessary"
    },
    {
      "examples": [
        {
          "code": "const date = new Date(\"2026-04-23T05:30:00.000Z\");\nconst dateOctet = dlms_gas.manufacturer.function(\"dateToDateOctet\")(date);\n// Example: dateOctet = { result: [ 7, 234, 4, 23, 4 ] }",
          "language": "javascript"
        }
      ],
      "id": "default.dateToDateOctet",
      "internal": false,
      "kind": "function",
      "name": "dateToDateOctet",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Date to convert.",
          "name": "date",
          "type": "Date"
        }
      ],
      "signature": "default.dateToDateOctet(date)",
      "summary": "Converts a JavaScript Date object into DLMS octet-string format for date (5 bytes).",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultdatetodateoctetdate"
    },
    {
      "examples": [
        {
          "code": "const date = new Date(\"2026-04-23T05:30:00.000Z\");\nconst dateOctet = dlms_gas.manufacturer.function(\"dateToTimeOctet\")(date);\n// Example: dateOctet = { result: [ 5, 30, 0, 0 ] }",
          "language": "javascript"
        }
      ],
      "id": "default.dateToTimeOctet",
      "internal": false,
      "kind": "function",
      "name": "dateToTimeOctet",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Date to convert.",
          "name": "date",
          "type": "Date"
        }
      ],
      "signature": "default.dateToTimeOctet(date)",
      "summary": "Converts a JavaScript Date object into DLMS octet-string format for time (4 bytes).",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultdatetotimeoctetdate"
    },
    {
      "examples": [
        {
          "code": "const decodedData = dlms_gas.manufacturer.function(\"decode\")();\n// Correct result: decodedData = { result: [22, 225, 37, 203, 0, 15, 225, 233, 128, 255, 123, 32, 241, 71, 57, 187, 177, 79, 2, 48] }\n// some error case: decodedData = { error: \"error description\" }",
          "language": "javascript"
        }
      ],
      "id": "default.decode",
      "internal": false,
      "kind": "function",
      "name": "decode",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Template to be used for compact frame decoding.",
          "name": "customTemplate",
          "type": "object"
        },
        {
          "description": "If true, the decoded values will be in a more descriptive format.",
          "name": "descriptive",
          "type": "boolean"
        }
      ],
      "signature": "default.decode(customTemplate, descriptive)",
      "summary": "The main entry point for Compact Frame decoding. It identifies the correct template based on the templateId in the context (or it uses the provided customTemplate), performs the decoding, and triggers the collection logic.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultdecodecustomtemplate-descriptive"
    },
    {
      "examples": [
        {
          "code": "const fwBytes = [0x01, 0x02, 0x03, 0x04, 0x05, 0x06];\nconst fwVersion = dlms_gas.manufacturer.function(\"decodeFw\")(fwBytes);\n// Example: fwVersion = { result: \"Version:1.2.3;Build:0x4506;Fecha:2026-04-23\" }",
          "language": "javascript"
        }
      ],
      "id": "default.decodeFw",
      "internal": false,
      "kind": "function",
      "name": "decodeFw",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Array of 6 bytes representing the firmware version.",
          "name": "fwBytes",
          "type": "Array\u003cnumber\u003e"
        }
      ],
      "signature": "default.decodeFw(fwBytes)",
      "summary": "Decodes a 6-byte array into a descriptive firmware version string including version numbers, build commit (hex), and date.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultdecodefwfwbytes"
    },
    {
      "id": "default.doPushEventConfiguration",
      "internal": false,
      "kind": "function",
      "name": "doPushEventConfiguration",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Event number (1, 2, 3, 4).",
          "name": "event",
          "type": "number"
        },
        {
          "description": "Configuration for the event.",
          "name": "conf",
          "type": "object"
        }
      ],
      "signature": "default.doPushEventConfiguration(event, conf)",
      "summary": "Internal function that executes the actual DLMS set operations to apply push event configurations.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultdopusheventconfigurationevent-conf"
    },
    {
      "examples": [
        {
          "code": "const ip = \"127.0.0.1\";\nconst port = 8080;\nconst ipPort = dlms_gas.manufacturer.function(\"encodeIpPort\")(ip, port);\n// Example: ipPort = [ 49, 50, 55, 46, 48, 46, 48, 46, 49, 58, 56, 48, 56, 48];",
          "language": "javascript"
        }
      ],
      "id": "default.encodeIpPort",
      "internal": false,
      "kind": "function",
      "name": "encodeIpPort",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "IP address to encode.",
          "name": "ip",
          "type": "string"
        },
        {
          "description": "Port to encode.",
          "name": "port",
          "type": "number"
        }
      ],
      "signature": "default.encodeIpPort(ip, port)",
      "summary": "Encodes an IP address and port into a 22-byte octet-string for push configuration.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultencodeipportip-port"
    },
    {
      "examples": [
        {
          "code": "[\n  {\n    \"dateOctet\": \"[-1, -1, -1, 3, -40]\",\n    \"timeOctet\": \"[0, 5, 0, 0]\"\n  },\n  {\n    \"dateOctet\": \"[-1, -1, -1, 3, -40]\",\n    \"timeOctet\": \"[3, 5, 0, 0]\"\n  },\n  {\n    \"dateOctet\": \"[-1, -1, -1, -1, -1]\",\n    \"timeOctet\": \"[-1, -1, -1, -1]\"\n  },\n  {\n    \"dateOctet\": \"[-1, -1, -1, -1, -1]\",\n    \"timeOctet\": \"[-1, -1, -1, -1]\"\n  }\n]",
          "language": "json"
        }
      ],
      "id": "default.eventScheduleArray",
      "internal": false,
      "kind": "function",
      "name": "eventScheduleArray",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object with event's day periodicty value and hour specification value from operation paraemeters.",
          "name": "scheduleData",
          "type": "Object"
        }
      ],
      "signature": "default.eventScheduleArray(scheduleData)",
      "summary": "Event DLMS schedule array generation logic. Generates the event schedule array for push events configuration. Adds the 4 events with corresponding periodicity and hour specification including disabled events.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaulteventschedulearrayscheduledata"
    },
    {
      "id": "default.fota",
      "internal": false,
      "kind": "function",
      "name": "fota",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object returned by `operation` api.",
          "name": "op",
          "type": "Object"
        }
      ],
      "signature": "default.fota(op)",
      "summary": "FOTA configuration operation logic. It manages specific scheduling, fota process initialization, blocks transfers by sessions and different process status management. It manage the operation status allong all the process.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultfotaop"
    },
    {
      "id": "default.fotaAdjustBlocks",
      "internal": false,
      "kind": "function",
      "name": "fotaAdjustBlocks",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "List of blocks retrieved in CF22",
          "name": "imageTransferBlocksMap",
          "type": "Array"
        },
        {
          "description": "Expected number of blocks calculated in FOTA process initialization.",
          "name": "expectedNumberOfBlocks",
          "type": "number"
        }
      ],
      "signature": "default.fotaAdjustBlocks(imageTransferBlocksMap, expectedNumberOfBlocks)",
      "summary": "Recalculates and returns blocks map according to the expectedNumberOfBlocks calculated at the FOTA operation beginig. If received array shorter than expected it is filled with false values. If it is larger, it is truncated to the expected number of blocks.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultfotaadjustblocksimagetransferblocksmap-expectednumberofblocks"
    },
    {
      "id": "default.fotaBlocksTransfer",
      "internal": false,
      "kind": "function",
      "name": "fotaBlocksTransfer",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object returned by `operation` api.",
          "name": "op",
          "type": "Object"
        }
      ],
      "signature": "default.fotaBlocksTransfer(op, blocksStatusMap)",
      "summary": "Orchestrates the transmission of multiple firmware blocks in a single session, respecting the maximum messages allowed for the current ECL. It manages specially first and last block sent to update operation status. It also manages errors per session.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultfotablockstransferop-blocksstatusmap"
    },
    {
      "id": "default.fotaBlockTransfer",
      "internal": false,
      "kind": "function",
      "name": "fotaBlockTransfer",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object returned by `operation` api.",
          "name": "op",
          "type": "Object"
        }
      ],
      "signature": "default.fotaBlockTransfer(blockIndex, bundleName, bundleVersion, deploymentName, deploymentVersion)",
      "summary": "Executes the actual transmission of a single firmware block calling dlms.sendFotaPage method. It increase success and error counters.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultfotablocktransferblockindex-bundlename-bundleversion-deploymentname-deploymentversion"
    },
    {
      "examples": [
        {
          "code": "{\n  \"result\": \"[1, 77, 14, 50, 145, 16, 132, 16, 233, 67, 18, 99, 235, 189,...]\"\n}",
          "language": "json"
        }
      ],
      "id": "default.fotaCalculateIdentifier",
      "internal": false,
      "kind": "function",
      "name": "fotaCalculateIdentifier",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object returned by `operation` api.",
          "name": "op",
          "type": "Object"
        }
      ],
      "signature": "default.fotaCalculateIdentifier(op)",
      "summary": "Calculates the unique image identifier based on KDL, hashtag, and activation date. It adds at the beginning of the identifier follwing bytes 014D.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultfotacalculateidentifierop"
    },
    {
      "id": "default.fotaCheckAllowed",
      "internal": false,
      "kind": "function",
      "name": "fotaCheckAllowed",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object returned by `operation` api.",
          "name": "op",
          "type": "Object"
        }
      ],
      "signature": "default.fotaCheckAllowed(op)",
      "summary": "Verifies if the device is correctly configured for FOTA (valid block size and FOTA enabled). It updates operation status according to the validation.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultfotacheckallowedop"
    },
    {
      "id": "default.fotaCheckBadSessions",
      "internal": false,
      "kind": "function",
      "name": "fotaCheckBadSessions",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "signature": "default.fotaCheckBadSessions()",
      "summary": "Aborts the FOTA process if the number of consecutive bad sessions reaches the maximum allowed threshold and throws an error. It uses badSessionsCounter and maxBadSessions from dlms_gas.config.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultfotacheckbadsessions"
    },
    {
      "id": "default.fotaCheckSessionBlocksErrors",
      "internal": false,
      "kind": "function",
      "name": "fotaCheckSessionBlocksErrors",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "signature": "default.fotaCheckSessionBlocksErrors()",
      "summary": "Just checks session errors rate and updates bad sessions counter.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultfotachecksessionblockserrors"
    },
    {
      "id": "default.fotaContinueProcess",
      "internal": false,
      "kind": "function",
      "name": "fotaContinueProcess",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object returned by `operation` api.",
          "name": "op",
          "type": "Object"
        }
      ],
      "signature": "default.fotaContinueProcess(op)",
      "summary": "Internal function used to continue FOTA operation from different sessions: it manage different process status, sends blocks and finalizes operation according to final status (including device default scheduling).",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultfotacontinueprocessop"
    },
    {
      "id": "default.fotaImgActivate",
      "internal": false,
      "kind": "function",
      "name": "fotaImgActivate",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object returned by `operation` api.",
          "name": "op",
          "type": "Object"
        }
      ],
      "signature": "default.fotaImgActivate(op)",
      "summary": "Function intended to invoke image activation DLMS method, but actually is empty function in default behavior. It can be implemented in specific behaviors.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultfotaimgactivateop"
    },
    {
      "id": "default.fotaImgVerify",
      "internal": false,
      "kind": "function",
      "name": "fotaImgVerify",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object returned by `operation` api.",
          "name": "op",
          "type": "Object"
        }
      ],
      "signature": "default.fotaImgVerify(op)",
      "summary": "Function intended to invoke image verification DLMS method, but actually is empty function in default behavior. It can be implemented in specific behaviors.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultfotaimgverifyop"
    },
    {
      "id": "default.fotaImgTransferInitiate",
      "internal": false,
      "kind": "function",
      "name": "fotaImgTransferInitiate",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object returned by `operation` api.",
          "name": "op",
          "type": "Object"
        }
      ],
      "signature": "default.fotaImgTransferInitiate(op)",
      "summary": "Invokes image transfer process initiation DLMS method and calculates the total number of blocks based on the firmware size and configured block size. It updates operation status.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultfotaimgtransferinitiateop"
    },
    {
      "id": "default.fotaRestoreDefaultSchedule",
      "internal": false,
      "kind": "function",
      "name": "fotaRestoreDefaultSchedule",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object returned by `operation` api.",
          "name": "op",
          "type": "Object"
        }
      ],
      "signature": "default.fotaRestoreDefaultSchedule(op)",
      "summary": "Restores the default push strategy schedule after the FOTA process is finished or cancelled. It updates operation status.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultfotarestoredefaultscheduleop"
    },
    {
      "id": "default.fotaScheduleForFota",
      "internal": false,
      "kind": "function",
      "name": "fotaScheduleForFota",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object returned by `operation` api.",
          "name": "op",
          "type": "Object"
        }
      ],
      "signature": "default.fotaScheduleForFota(op)",
      "summary": "Temporary updates the push strategy schedule to a more aggressive frequency (every hour) during the FOTA process to speed up block transmission. It updates operation status.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultfotascheduleforfotaop"
    },
    {
      "id": "default.fotaStartProcess",
      "internal": false,
      "kind": "function",
      "name": "fotaStartProcess",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object returned by `operation` api.",
          "name": "op",
          "type": "Object"
        }
      ],
      "signature": "default.fotaStartProcess(op)",
      "summary": "Internal function used to complete first steps of FOTA operation: device status validation, device special scheduling and fota process initialization in the meter.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultfotastartprocessop"
    },
    {
      "examples": [
        {
          "code": "{\n  \"transferStatus\": 1,\n  \"blocksMap\": \"[true, true, false, false]\"\n}",
          "language": "json"
        }
      ],
      "id": "default.fotaStateFromCf22",
      "internal": false,
      "kind": "function",
      "name": "fotaStateFromCf22",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object returned by `operation` api.",
          "name": "op",
          "type": "Object"
        }
      ],
      "signature": "default.fotaStateFromCf22(op)",
      "summary": "It retrieves CF22 and updates session data to continue with FOTA proess.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultfotastatefromcf22op"
    },
    {
      "id": "default.fotaStatus0",
      "internal": false,
      "kind": "function",
      "name": "fotaStatus0",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object returned by `operation` api.",
          "name": "op",
          "type": "Object"
        },
        {
          "description": "FOTA status object with returned by `fotaStateFromCf22` function.",
          "name": "fotaState",
          "type": "object"
        }
      ],
      "signature": "default.fotaStatus0(op, fotaState)",
      "summary": "Executed when the devices Compact Frame 22 retrieve status 0. Actually it calls fotaStatusUnknown function because this function is not supposed to be executed.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultfotastatus0op-fotastate"
    },
    {
      "id": "default.fotaStatus1",
      "internal": false,
      "kind": "function",
      "name": "fotaStatus1",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object returned by `operation` api.",
          "name": "op",
          "type": "Object"
        },
        {
          "description": "FOTA status object with returned by `fotaStateFromCf22` function.",
          "name": "fotaState",
          "type": "object"
        }
      ],
      "signature": "default.fotaStatus1(op, fotaState)",
      "summary": "Executed when the devices Compact Frame 22 retrieve status 1. Try to send pending blocks or call image verification function.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultfotastatus1op-fotastate"
    },
    {
      "id": "default.fotaStatus2",
      "internal": false,
      "kind": "function",
      "name": "fotaStatus2",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object returned by `operation` api.",
          "name": "op",
          "type": "Object"
        },
        {
          "description": "FOTA status object with returned by `fotaStateFromCf22` function.",
          "name": "fotaState",
          "type": "object"
        }
      ],
      "signature": "default.fotaStatus2(op, fotaState)",
      "summary": "Executed when the devices Compact Frame 22 retrieve status 2. In default behavior it does nothing.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultfotastatus2op-fotastate"
    },
    {
      "id": "default.fotaStatus3",
      "internal": false,
      "kind": "function",
      "name": "fotaStatus3",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object returned by `operation` api.",
          "name": "op",
          "type": "Object"
        },
        {
          "description": "FOTA status object with returned by `fotaStateFromCf22` function.",
          "name": "fotaState",
          "type": "object"
        }
      ],
      "signature": "default.fotaStatus3(op, fotaState)",
      "summary": "Executed when the devices Compact Frame 22 retrieve status 3. It just calls to fotaImgActivate function.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultfotastatus3op-fotastate"
    },
    {
      "id": "default.fotaStatus4",
      "internal": false,
      "kind": "function",
      "name": "fotaStatus4",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object returned by `operation` api.",
          "name": "op",
          "type": "Object"
        },
        {
          "description": "FOTA status object with returned by `fotaStateFromCf22` function.",
          "name": "fotaState",
          "type": "object"
        }
      ],
      "signature": "default.fotaStatus4(op, fotaState)",
      "summary": "Executed when the devices Compact Frame 22 retrieve status 4. It finishes the FOTA process with image verification error.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultfotastatus4op-fotastate"
    },
    {
      "id": "default.fotaStatus5",
      "internal": false,
      "kind": "function",
      "name": "fotaStatus5",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object returned by `operation` api.",
          "name": "op",
          "type": "Object"
        },
        {
          "description": "FOTA status object with returned by `fotaStateFromCf22` function.",
          "name": "fotaState",
          "type": "object"
        }
      ],
      "signature": "default.fotaStatus5(op, fotaState)",
      "summary": "Executed when the devices Compact Frame 22 retrieve status 5. In default behavior it does nothing.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultfotastatus5op-fotastate"
    },
    {
      "id": "default.fotaStatus6",
      "internal": false,
      "kind": "function",
      "name": "fotaStatus6",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object returned by `operation` api.",
          "name": "op",
          "type": "Object"
        },
        {
          "description": "FOTA status object with returned by `fotaStateFromCf22` function.",
          "name": "fotaState",
          "type": "object"
        }
      ],
      "signature": "default.fotaStatus6(op, fotaState)",
      "summary": "Executed when the devices Compact Frame 22 retrieve status 6. Asks to device for new firmware data, restores default scheduling and finlizes FOTA operation.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultfotastatus6op-fotastate"
    },
    {
      "id": "default.fotaStatus7",
      "internal": false,
      "kind": "function",
      "name": "fotaStatus7",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object returned by `operation` api.",
          "name": "op",
          "type": "Object"
        },
        {
          "description": "FOTA status object with returned by `fotaStateFromCf22` function.",
          "name": "fotaState",
          "type": "object"
        }
      ],
      "signature": "default.fotaStatus7(op, fotaState)",
      "summary": "Executed when the devices Compact Frame 22 retrieve status 7. It finishes the FOTA process with image activation error.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultfotastatus7op-fotastate"
    },
    {
      "id": "default.fotaStatusUnknown",
      "internal": false,
      "kind": "function",
      "name": "fotaStatusUnknown",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object returned by `operation` api.",
          "name": "op",
          "type": "Object"
        },
        {
          "description": "FOTA status object with returned by `fotaStateFromCf22` function.",
          "name": "fotaState",
          "type": "object"
        }
      ],
      "signature": "default.fotaStatusUnknown(op, fotaState)",
      "summary": "Executed when the devices Compact Frame 22 retrieve an unexpected status. In default behavior it just incresaes bad sessions counter.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultfotastatusunknownop-fotastate"
    },
    {
      "id": "default.fotaUpdateLostSteps",
      "internal": false,
      "kind": "function",
      "name": "fotaUpdateLostSteps",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "FOTA status object with returned by `fotaStateFromCf22` function.",
          "name": "fotaState",
          "type": "object"
        },
        {
          "description": "Object returned by `operation` api.",
          "name": "op",
          "type": "Object"
        }
      ],
      "signature": "default.fotaUpdateLostSteps(fotaState, op)",
      "summary": "Function that depending on fotaState (process status and blocks maps) updates operation lost steps.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultfotaupdateloststepsfotastate-op"
    },
    {
      "id": "default.fotaUpdateSuccessBlocksFromDevice",
      "internal": false,
      "kind": "function",
      "name": "fotaUpdateSuccessBlocksFromDevice",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Array with boolean values representing the status of each block.",
          "name": "imageTransferBlocksMap",
          "type": "Array"
        }
      ],
      "signature": "default.fotaUpdateSuccessBlocksFromDevice(imageTransferBlocksMap)",
      "summary": "Updates the internal block transmission counter based on the blocks retrieved form CF 22.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultfotaupdatesuccessblocksfromdeviceimagetransferblocksmap"
    },
    {
      "examples": [
        {
          "code": "[\n  {\n    \"value\": \"120\",\n    \"at\": \"1783051200\"\n  },\n  {\n    \"value\": \"125\",\n    \"at\": \"1783054800\"\n  },\n  {\n    \"value\": \"150\",\n    \"at\": \"1783058400\"\n  },\n  {\n    \"value\": \"200\",\n    \"at\": \"1783062000\"\n  }\n  ....\n]",
          "language": "json"
        }
      ],
      "id": "default.getHourlyArrayWithAt",
      "internal": false,
      "kind": "function",
      "name": "getHourlyArrayWithAt",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Array with hourly data (volumes, diagnostics...)",
          "name": "hourlyArray",
          "type": "Array"
        },
        {
          "description": "Timestamp to be used as reference",
          "name": "refTime",
          "type": "number"
        }
      ],
      "signature": "default.getHourlyArrayWithAt(hourlyArray, refTime)",
      "summary": "From an array with hourly data (volumes, diagnostics...) and with refTime as reference, build an array with the at time of each increment.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultgethourlyarraywithathourlyarray-reftime"
    },
    {
      "id": "default.getPeriodictyOctet",
      "internal": false,
      "kind": "function",
      "name": "getPeriodictyOctet",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Name of periodicty. Check table below for supported values.",
          "name": "period",
          "type": "string"
        },
        {
          "description": "Time value. It is used just to check if it is null and then return `Disabled` octet",
          "name": "time",
          "type": "string"
        }
      ],
      "signature": "default.getPeriodictyOctet(period, time)",
      "summary": "Returns the DLMS date octet-string representing the periodicity for push event schedulation. It takes into account both period and time.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultgetperiodictyoctetperiod-time"
    },
    {
      "id": "default.getTimeOctet",
      "internal": false,
      "kind": "function",
      "name": "getTimeOctet",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Name of periodicty. If it is null or `Disabled`, then \"Disabled\" time octet (`[-1, -1, -1, -1]`) will be returned",
          "name": "period",
          "type": "string"
        },
        {
          "description": "Time value. It is parsed into time octet. If it si null, then \"Disabled\" (`[-1, -1, -1, -1]`) octet will be returned",
          "name": "time",
          "type": "string"
        }
      ],
      "signature": "default.getTimeOctet(period, time)",
      "summary": "Returns the DLMS time octet for push event schedulation. It takes into account both period and time.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultgettimeoctetperiod-time"
    },
    {
      "id": "default.getStepByName",
      "internal": false,
      "kind": "function",
      "name": "getStepByName",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object returned by `operation` api.",
          "name": "op",
          "type": "Object"
        },
        {
          "description": "Name of the step to search.",
          "name": "stepName",
          "type": "string"
        },
        {
          "description": "Whether to check in the current step response. Default value is `false`",
          "name": "checkInCurrentResponse",
          "type": "boolean"
        }
      ],
      "signature": "default.getStepByName(op, stepName, checkInCurrentResponse)",
      "summary": "Search in passed operation object if the step is already completed. If checkInCurrentResponse is not specified, it will check only in steps completed in the operation. If checkInCurrentResponse is specified and it is true, it will check also in the steps added in current execution.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultgetstepbynameop-stepname-checkincurrentresponse"
    },
    {
      "id": "default.hourlyValues",
      "internal": false,
      "kind": "function",
      "name": "hourlyValues",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object returned by `operation` api.",
          "name": "op",
          "type": "Object"
        }
      ],
      "signature": "default.hourlyValues(op)",
      "summary": "Horly values retrieval operation logic. Retrieves hourly incremental volume values from the device by range and processes the operation response.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaulthourlyvaluesop"
    },
    {
      "id": "default.initAndCollectCf47",
      "internal": false,
      "kind": "function",
      "name": "initAndCollectCf47",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object with decoded compact frame data return from `dlms.getCompactData()` method.",
          "name": "data",
          "type": "Object"
        }
      ],
      "signature": "default.initAndCollectCf47(data)",
      "summary": "Function called from dlms_gas.decode after decoding 47 compact frame from received notification. Initialize parameters to be used later and collects received fields.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultinitandcollectcf47data"
    },
    {
      "id": "default.initAndCollectCf48",
      "internal": false,
      "kind": "function",
      "name": "initAndCollectCf48",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object with decoded compact frame data return from `dlms.getCompactData()` method.",
          "name": "data",
          "type": "Object"
        }
      ],
      "signature": "default.initAndCollectCf48(data)",
      "summary": "Function called from dlms_gas.decode after decoding 48 compact frame from received notification. Initialize parameters to be used later and collects received fields.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultinitandcollectcf48data"
    },
    {
      "id": "default.initAndCollectCf49",
      "internal": false,
      "kind": "function",
      "name": "initAndCollectCf49",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object with decoded compact frame data return from `dlms.getCompactData()` method.",
          "name": "data",
          "type": "Object"
        }
      ],
      "signature": "default.initAndCollectCf49(data)",
      "summary": "Function called from dlms_gas.decode after decoding 49 compact frame from received notification. Initialize parameters to be used later and collects received fields.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultinitandcollectcf49data"
    },
    {
      "id": "default.initAndCollectCf51",
      "internal": false,
      "kind": "function",
      "name": "initAndCollectCf51",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object with decoded compact frame data return from `dlms.getCompactData()` method.",
          "name": "data",
          "type": "Object"
        }
      ],
      "signature": "default.initAndCollectCf51(data)",
      "summary": "Function called from dlms_gas.decode after decoding 51 compact frame from received notification. Initialize parameters to be used later and collects received fields.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultinitandcollectcf51data"
    },
    {
      "id": "default.initAndCollectCf97",
      "internal": false,
      "kind": "function",
      "name": "initAndCollectCf97",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object with decoded compact frame data return from `dlms.getCompactData()` method.",
          "name": "data",
          "type": "Object"
        }
      ],
      "signature": "default.initAndCollectCf97(data)",
      "summary": "Function called from dlms_gas.decode() after decoding 97 compact frame from received notification. Initialize parameters to be used later and collects received fields.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultinitandcollectcf97data"
    },
    {
      "id": "default.operations",
      "internal": false,
      "kind": "function",
      "name": "operations",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "signature": "default.operations()",
      "summary": "Dispatches and executes active operations from the Opengate platform. Retrieves all alive operations for the device using [Operations JS Api](/api/device_integration/connector_functions/core_javascript_api/operation/). It iterates through supportedOps and executes the process for any matching active operation.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultoperations"
    },
    {
      "id": "default.pendingActions",
      "internal": false,
      "kind": "function",
      "name": "pendingActions",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "signature": "default.pendingActions()",
      "summary": "The main entry point for a standard communication session. It orchestrates the actions to be performed in a session. It uses dlms_gas.actions object to determine which actions to perform.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultpendingactions"
    },
    {
      "id": "default.periodicActions",
      "internal": false,
      "kind": "function",
      "name": "periodicActions",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "signature": "default.periodicActions()",
      "summary": "Orchestrates periodic data retrieval functions. These functions retrieve data from the device periodically:",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultperiodicactions"
    },
    {
      "id": "default.pushStrategy",
      "internal": false,
      "kind": "function",
      "name": "pushStrategy",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object returned by `operation` api.",
          "name": "op",
          "type": "Object"
        }
      ],
      "signature": "default.pushStrategy(op)",
      "summary": "Push configuration operation logic. Configures the push communication strategy (Compact Frame selection, platform address/port, and scheduling) for the four supported push events and process the operation response.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultpushstrategyop"
    },
    {
      "id": "default.requestNonMetroLogs",
      "internal": false,
      "kind": "function",
      "name": "requestNonMetroLogs",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object returned by `operation` api.",
          "name": "op",
          "type": "Object"
        }
      ],
      "signature": "default.requestNonMetroLogs(op)",
      "summary": "Non metrological logs retrieval operation logic. Retrieves non-metrological event logs from the device by range and processes the operation response.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultrequestnonmetrologsop"
    },
    {
      "id": "default.resetDiagnostic",
      "internal": false,
      "kind": "function",
      "name": "resetDiagnostic",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object returned by `operation` api.",
          "name": "op",
          "type": "Object"
        }
      ],
      "signature": "default.resetDiagnostic(op)",
      "summary": "Reset diagnostic operation logic. Resets the device's diagnostic status flags by executing the corresponding DLMS method and process the operation response.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultresetdiagnosticop"
    },
    {
      "id": "default.restoreOnlineFrameCounter",
      "internal": false,
      "kind": "function",
      "name": "restoreOnlineFrameCounter",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "signature": "default.restoreOnlineFrameCounter()",
      "summary": "This method is used when received compact frame does not contain onlineFrameCounter and it is necessary to request it to the device in order to set correct values for next requests.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultrestoreonlineframecounter"
    },
    {
      "id": "default.retrieveDailyProfiles",
      "internal": false,
      "kind": "function",
      "name": "retrieveDailyProfiles",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "signature": "default.retrieveDailyProfiles()",
      "summary": "If the device does not communicate in last days it will ask for all missing daily profiles.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultretrievedailyprofiles"
    },
    {
      "id": "default.retrieveInitialData",
      "internal": false,
      "kind": "function",
      "name": "retrieveInitialData",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "If `true`, retrieves the data even if it was previously collected.",
          "name": "force",
          "type": "boolean"
        }
      ],
      "signature": "default.retrieveInitialData(force)",
      "summary": "Retrieves one-time device information. It will check if device.software datastream is not collected or force parameter is true. If so it will retrieve following data:",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultretrieveinitialdataforce"
    },
    {
      "id": "default.retrieveMetrologicalEvents",
      "internal": false,
      "kind": "function",
      "name": "retrieveMetrologicalEvents",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "signature": "default.retrieveMetrologicalEvents()",
      "summary": "Retrieves missing metrological events from the device by range, starting from the last collected counter.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultretrievemetrologicalevents"
    },
    {
      "id": "default.retrievePushEventsConfigurations",
      "internal": false,
      "kind": "function",
      "name": "retrievePushEventsConfigurations",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "signature": "default.retrievePushEventsConfigurations(force)",
      "summary": "Retrieves configuration for all push events (1-4) configuration.  It will check for each event if confCFx datastream is not collected or force parameter is true. If so it will retrieve push event configuration.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultretrievepusheventsconfigurationsforce"
    },
    {
      "id": "default.retrieveStatistics",
      "internal": false,
      "kind": "function",
      "name": "retrieveStatistics",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "If `true`, retrieves the data even if the data is not too old.",
          "name": "force",
          "type": "boolean"
        }
      ],
      "signature": "default.retrieveStatistics(force)",
      "summary": "Retrieves periodically communication statistics (Signal Power, RSRQ, RSRP, ECL, Battery remaining time....). It will check statisticsRefDs datastreams at value and if the data is too old (using periodicDataAgeMillis as reference).",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultretrievestatisticsforce"
    },
    {
      "id": "default.rsrqFromRaw",
      "internal": false,
      "kind": "function",
      "name": "rsrqFromRaw",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "signature": "default.rsrqFromRaw(raw)",
      "summary": "Returns converted raw RSRQ to dB/dBm following standard dlms specfication.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultrsrqfromrawraw"
    },
    {
      "id": "default.rsrpFromRaw",
      "internal": false,
      "kind": "function",
      "name": "rsrpFromRaw",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "signature": "default.rsrpFromRaw(raw)",
      "summary": "Returns converted raw RSRQ to dB/dBm following standard dlms specfication.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultrsrpfromrawraw"
    },
    {
      "id": "default.setClock",
      "internal": false,
      "kind": "function",
      "name": "setClock",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "signature": "default.setClock()",
      "summary": "Checks drift and synchronizes device time.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultsetclock"
    },
    {
      "id": "default.signalQualityFromRaw",
      "internal": false,
      "kind": "function",
      "name": "signalQualityFromRaw",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Raw signal quality value (0-31).",
          "name": "raw",
          "type": "number"
        }
      ],
      "signature": "default.signalQualityFromRaw(raw)",
      "summary": "Converts raw CSQ value to dBm following DLMS specification.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultsignalqualityfromrawraw"
    },
    {
      "id": "default.strategy",
      "internal": false,
      "kind": "function",
      "name": "strategy",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "First bit.",
          "name": "b1",
          "type": "number"
        },
        {
          "description": "Second bit.",
          "name": "b0",
          "type": "number"
        }
      ],
      "signature": "default.strategy(b1, b0)",
      "summary": "Decodes the communication strategy from two bits.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultstrategyb1-b0"
    },
    {
      "examples": [
        {
          "code": "var s = dlms_gas.manufacturer.function(\"tauInSecondsFromRaw\")(0x21);",
          "language": "javascript"
        }
      ],
      "id": "default.tauInSecondsFromRaw",
      "internal": false,
      "kind": "function",
      "name": "tauInSecondsFromRaw",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "8-bit timer value.",
          "name": "raw\"",
          "type": "number"
        }
      ],
      "signature": "default.tauInSecondsFromRaw(raw)",
      "summary": "Decodes TAU timer to seconds following DLMS specification.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaulttauinsecondsfromrawraw"
    },
    {
      "id": "default.tmrInSecondsFromRaw",
      "internal": false,
      "kind": "function",
      "name": "tmrInSecondsFromRaw",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "8-bit timer value.",
          "name": "raw\"",
          "type": "number"
        }
      ],
      "signature": "default.tmrInSecondsFromRaw(raw)",
      "summary": "Decodes raw TMR to seconds following dlms specfication.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaulttmrinsecondsfromrawraw"
    },
    {
      "id": "default.valveManagement",
      "internal": false,
      "kind": "function",
      "name": "valveManagement",
      "namespace": "default",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Operation request object.",
          "name": "op",
          "type": "Object"
        }
      ],
      "signature": "default.valveManagement(op)",
      "summary": "Valve managment operation logic. Executes valve Open/Close commands and process the operation response.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#defaultvalvemanagementop"
    },
    {
      "id": "pietro.decodeFw",
      "internal": false,
      "kind": "function",
      "name": "decodeFw",
      "namespace": "pietro",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "signature": "pietro.decodeFw(fwBytes)",
      "summary": "Specific firmware decoding for Pietro devices. It returns a simplified version string.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#pietrodecodefwfwbytes"
    },
    {
      "id": "honeywell.closeConnection",
      "internal": false,
      "kind": "function",
      "name": "closeConnection",
      "namespace": "honeywell",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "signature": "honeywell.closeConnection()",
      "summary": "Graceful disconnect via DLMS method specific for Honeywell devices.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#honeywellcloseconnection"
    },
    {
      "id": "honeywell.retrieveStatistics",
      "internal": false,
      "kind": "function",
      "name": "retrieveStatistics",
      "namespace": "honeywell",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "signature": "honeywell.retrieveStatistics(force)",
      "summary": "Specific statistics retrieval for Honeywell devices, excluding some attributes not supported by these devices.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#honeywellretrievestatisticsforce"
    },
    {
      "id": "honeywell.tauInSecondsFromRaw",
      "internal": false,
      "kind": "function",
      "name": "tauInSecondsFromRaw",
      "namespace": "honeywell",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "signature": "honeywell.tauInSecondsFromRaw(raw)",
      "summary": "Overrides the default TAU conversion to return directlty the raw value.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#honeywelltauinsecondsfromrawraw"
    },
    {
      "id": "honeywell.tmrInSecondsFromRaw",
      "internal": false,
      "kind": "function",
      "name": "tmrInSecondsFromRaw",
      "namespace": "honeywell",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "signature": "honeywell.tmrInSecondsFromRaw(raw)",
      "summary": "Overrides the default TMR conversion to return directlty the raw value.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#honeywelltmrinsecondsfromrawraw"
    },
    {
      "examples": [
        {
          "code": "[\n  {\n    \"dateOctet\": \"[-1, -1, -1, 3, -40]\",\n    \"timeOctet\": \"[0, 5, 0, 0]\"\n  },\n  {\n    \"dateOctet\": \"[-1, -1, -1, 3, -40]\",\n    \"timeOctet\": \"[3, 5, 0, 0]\"\n  }\n]",
          "language": "json"
        }
      ],
      "id": "honeywell.eventScheduleArray",
      "internal": false,
      "kind": "function",
      "name": "eventScheduleArray",
      "namespace": "honeywell",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object with event's day periodicty value and hour specification value from operation paraemeters.",
          "name": "scheduleData",
          "type": "Object"
        }
      ],
      "signature": "honeywell.eventScheduleArray(scheduleData)",
      "summary": "Event DLMS schedule array generation logic. Generates the event schedule array for push events configuration. Adds just the events not disabledwith corresponding periodicity and hour specification.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#honeywelleventschedulearrayscheduledata"
    },
    {
      "id": "spark.fotaImgVerify",
      "internal": false,
      "kind": "function",
      "name": "fotaImgVerify",
      "namespace": "spark",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Operation request object.",
          "name": "op",
          "type": "Object"
        }
      ],
      "signature": "spark.fotaImgVerify(op)",
      "summary": "Invokes FOTA image verify DLMS method. It updates the operation status accordingly to the response",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#sparkfotaimgverifyop"
    },
    {
      "examples": [
        {
          "code": "{\n  \"result\": \"[14, 50, 145, 16, 132, 16, 233, 67, 18, 99, 235, 189,...]\"\n}",
          "language": "json"
        }
      ],
      "id": "spark.fotaCalculateIdentifier",
      "internal": false,
      "kind": "function",
      "name": "fotaCalculateIdentifier",
      "namespace": "spark",
      "page": {
        "title": "DLMS Gas JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/",
        "weight": 60
      },
      "params": [
        {
          "description": "Object returned by `operation` api.",
          "name": "op",
          "type": "Object"
        }
      ],
      "signature": "spark.fotaCalculateIdentifier(op)",
      "summary": "Calculates the unique image identifier based on KDL, hashtag, and activation date.",
      "url": "api/device_integration/connector_functions/protocol_apis/dlms_gas/#sparkfotacalculateidentifierop"
    },
    {
      "examples": [
        {
          "code": "provision.identifier = \"device_123\";\nconst resp = provision.get();\nif (!resp.error \u0026\u0026 resp.result) {\n    logger.info(\"Entity identifier:\", resp.result._value(\"provision.administration.identifier\"));\n}",
          "language": "javascript"
        },
        {
          "code": "const resp = provision.get(\"device_123\");\nif (!resp.error \u0026\u0026 resp.result) {\n    logger.info(\"Entity identifier:\", resp.result._value(\"provision.administration.identifier\"));\n}",
          "language": "javascript"
        },
        {
          "code": "const resp = provision.get(\"device_123\");\nif (resp.error) {\n    logger.error(\"Some error:\", resp.error);\n}",
          "language": "javascript"
        }
      ],
      "id": "provision.get",
      "internal": false,
      "kind": "function",
      "name": "get",
      "namespace": "provision",
      "page": {
        "title": "Provision JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/provision/",
        "weight": 60
      },
      "params": [
        {
          "description": "(Optional) Entity identifier. If not defined `identifier` field will be used.",
          "name": "id",
          "type": "string"
        }
      ],
      "returns": {
        "description": "`Object` - If entity is found, entity data will be returned in `result`. If it is not found, `result` field will be null. If some error happened, it will be returned in `error` field."
      },
      "signature": "provision.get(id)",
      "summary": "Retrieves an existing entity from the database with specified identifier.",
      "url": "api/device_integration/connector_functions/core_javascript_api/provision/#provisiongetid"
    },
    {
      "examples": [
        {
          "code": "provision.identifier = \"new_device_001\";\nprovision.plan = \"TEST_PLAN\";\nprovision.extraDatastreams = [{ \"provision.device.name\": \"cellName\" }, { \"provision.device.administrativeState\": \"ACTIVE\" }, { \"provision.device.specificType\": \"COMHUB\" }, { \"provision.tec\": \"NBIoT Cell\" }];\nconst resp = provision.create();\nif(!resp.error \u0026\u0026 resp.result == 201) {\n    logger.info('Created');\n} else {\n    logger.error('Error creating entity:', resp.error);\n}",
          "language": "javascript"
        },
        {
          "code": "{\n    \"provision.administration.channel\": {\n        \"_value\": {\n            \"_current\": {\n                \"value\": \"defaultChannel\"\n            }\n        }\n    },\n    \"provision.administration.identifier\": {\n        \"_value\": {\n            \"_current\": {\n                \"value\": \"new_device_001\"\n            }\n        }\n    },\n    \"provision.administration.organization\": {\n        \"_value\": {\n            \"_current\": {\n                \"value\": \"deviceOrg\"\n            }\n        }\n    },\n    \"provision.administration.serviceGroup\": {\n        \"_value\": {\n            \"_current\": {\n                \"value\": \"emptyServiceGroup\"\n            }\n        }\n    },\n    \"provision.administration.plan\": {\n        \"_value\": {\n            \"_current\": {\n                \"value\": \"TEST_PLAN\"\n            }\n        }\n    },\n    \"provision.device.name\": {\n        \"_value\": {\n            \"_current\": {\n                \"value\": \"cellName\"\n            }\n        }\n    },\n    \"provision.device.administrativeState\": {\n        \"_value\": {\n            \"_current\": {\n                \"value\": \"ACTIVE\"\n            }\n        }\n    },\n    \"provision.device.specificType\": {\n        \"_value\": {\n            \"_current\": {\n                \"value\": \"COMHUB\"\n            }\n        }\n    },\n    \"provision.tec\": {\n        \"_value\": {\n            \"_current\": {\n                \"value\": \"NBIoT Cell\"\n            }\n        }\n    }\n}",
          "language": "javascript"
        },
        {
          "code": "const body = {\n    \"provision.administration.channel\": {\n        \"_value\": {\n            \"_current\": {\n                \"value\": \"defaultChannel\"\n            }\n        }\n    },\n    \"provision.administration.identifier\": {\n        \"_value\": {\n            \"_current\": {\n                \"value\": \"new_device_001\"\n            }\n        }\n    },\n    \"provision.administration.organization\": {\n        \"_value\": {\n            \"_current\": {\n                \"value\": \"deviceOrg\"\n            }\n        }\n    },\n    \"provision.administration.serviceGroup\": {\n        \"_value\": {\n            \"_current\": {\n                \"value\": \"emptyServiceGroup\"\n            }\n        }\n    }\n};\nconst resp = provision.create(body);\nif(!resp.error \u0026\u0026 resp.result == 201) {\n    logger.info('Created');\n} else {\n    logger.error('Error creating entity:', resp.error);\n}",
          "language": "javascript"
        }
      ],
      "id": "provision.create",
      "internal": false,
      "kind": "function",
      "name": "create",
      "namespace": "provision",
      "page": {
        "title": "Provision JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/provision/",
        "weight": 60
      },
      "params": [
        {
          "description": "(Optional) Complete JSON body for the creation request. If not provided, it is generated from the object properties.",
          "name": "fullBody",
          "type": "Object"
        }
      ],
      "returns": {
        "description": "`Object` - An object containing either `result` (201 status) or `error`."
      },
      "signature": "provision.create(fullBody)",
      "summary": "Creates a new entity in the platform.",
      "url": "api/device_integration/connector_functions/core_javascript_api/provision/#provisioncreatefullbody"
    },
    {
      "examples": [
        {
          "code": "var resp = {\n    'result': {\n        'code': 'SUCCESSFUL',\n        'description': 'Operation finished successful'\n    },\n    'data': {}\n};\n\ncf.response('snmps://1.0.1.4.5.123456.1.7', resp);",
          "language": "javascript"
        }
      ],
      "id": "cf.response",
      "internal": false,
      "kind": "function",
      "name": "response",
      "namespace": "cf",
      "page": {
        "title": "Concatenated Connector Functions API",
        "url": "api/device_integration/connector_functions/core_javascript_api/concatenated/",
        "weight": 70
      },
      "params": [
        {
          "description": "The south criteria that will be used to find a RESPONSE connector function.",
          "name": "responseFunctionCriteria",
          "type": "string"
        },
        {
          "description": "It can be a String or a JSON object. In case it is null or not provided, the current connector function response object will be used instead. It is the in payload for the concatenated RESPONSE connector function.",
          "name": "responsePayload",
          "type": "any"
        }
      ],
      "returns": {
        "description": "Void"
      },
      "signature": "cf.response(responseFunctionCriteria, responsePayload)",
      "summary": "Sets a call for a RESPONSE connector function, if there is one that matches the south criteria indicated in responseFunctionCriteria, setting its input payload to the value of responsePayload.",
      "url": "api/device_integration/connector_functions/core_javascript_api/concatenated/#cfresponseresponsefunctioncriteria-responsepayload"
    },
    {
      "examples": [
        {
          "code": "var colMsg = {\n    '1.0.1.4.5.123456.1.7.1': 'device name',\n    '1.0.1.4.5.123456.1.7.2': 'device description',\n};\n\ncf.collection('snmps://1.0.1.4.5.123456.1.7', colMsg);",
          "language": "javascript"
        }
      ],
      "id": "cf.collection",
      "internal": false,
      "kind": "function",
      "name": "collection",
      "namespace": "cf",
      "page": {
        "title": "Concatenated Connector Functions API",
        "url": "api/device_integration/connector_functions/core_javascript_api/concatenated/",
        "weight": 70
      },
      "params": [
        {
          "description": "The south criteria that will be used to find a COLLECTION connector function.",
          "name": "collectionFunctionCriteria",
          "type": "string"
        },
        {
          "description": "It can be a String or a JSON object. In case it is null or not provided, the current connector function response object will be used instead. It is the in payload for the concatenated COLLECTION connector function.",
          "name": "collectionPayload",
          "type": "any"
        }
      ],
      "returns": {
        "description": "Void"
      },
      "signature": "cf.collection(collectionFunctionCriteria, collectionPayload)",
      "summary": "Sets a call for a COLLECTION connector function, if there is one that matches the south criteria indicated in collectionFunctionCriteria, setting its input payload to the value of collectionPayload.",
      "url": "api/device_integration/connector_functions/core_javascript_api/concatenated/#cfcollectioncollectionfunctioncriteria-collectionpayload"
    },
    {
      "examples": [
        {
          "code": "iec102.ip=\"127.0.0.1\";\niec102.port=\"3000\";\niec102.linkAddress=\"1\";\niec102.useMeasurePoint=\"1\";\niec102.usePasswordAccess=\"1\";\n\niec102.source=\"DEVICE_GSM_DATACALL\";\niec102.sourcesInfo=\"Accessing Register through GSM data call to Device\";\n\niec102.msisdn = \"123412341324\";\niec102.userName = \"userName\";\niec102.password = \"password\";\niec102.portConfig = \"portConfig\";\n\nvar connectionStatus = iec102.connect(\"GSM\");\nif(!connectionStatus.connected) {\n    /* Connection not established. \n    At this point response object is fulfilled \n    with error code and description and skipped steps. \n    */\n    return response;\n}",
          "language": "javascript"
        },
        {
          "code": "{\n    \"datastreams\": [\n        {\n            \"id\": \"device.communicationModules[].subscription.mobile.presence.gsm\",\n            \"datapoints\": [\n                {\n                    \"value\": \"NOK\",\n                    \"at\": 1698793200000,\n                    \"source\": \"DEVICE_GSM_DATACALL\",\n                    \"sourceInfo\": \"Accessing Register through GSM data call to Device\"\n                }\n            ]\n        }\n    ]\n}",
          "language": "json"
        },
        {
          "code": "{\n    \"version\": \"8.0\",\n    \"trustedBoot\": null,\n    \"operation\": {\n        \"response\": {\n            \"id\": \"request_id\",\n            \"name\": \"GET_METER_INFO\",\n            \"deviceId\": \"device_id\",\n            \"resultCode\": \"ERROR_PROCESSING\",\n            \"resultDescription\": \"Called meter responded an ERROR\",\n            \"steps\": [\n                {\n                    \"name\": \"timeRequest\",\n                    \"result\": \"SKIPPED\",\n                    \"description\": \"Unable to make a data call\"\n                }\n            ],\n            \"timestamp\": 1698793200000\n        }\n    }\n}",
          "language": "json"
        }
      ],
      "id": "iec102.connect",
      "internal": false,
      "kind": "function",
      "name": "connect",
      "namespace": "iec102",
      "page": {
        "title": "IEC102 JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/iec102/",
        "weight": 70
      },
      "signature": "iec102.connect(registerType)",
      "summary": "There is a connect method used to establish the connection with the device. When this method is called, it internally completes several actions:",
      "url": "api/device_integration/connector_functions/protocol_apis/iec102/#iec102connectregistertype"
    },
    {
      "examples": [
        {
          "code": "var asduResult = iec102.asdus.timeRequest();",
          "language": "javascript"
        },
        {
          "code": "{\n    \"status\": false,\n    \"description\": \"Success\",\n    \"readingState\": \"READ\",\n    \"data\":{\n        \"Datetime\": {\n            \"date\": \"2023-11-01\",\n            \"time\": \"12:00:00\",\n            \"timezone\": \"GMT+1\",\n            \"dst\": 0\n        }\n    }\n}",
          "language": "json"
        },
        {
          "code": "var asduResult = iec102.asdus.timeRequest();\nif(asduResult.result){\n    response.addStep(\"TIME_REQUEST\", \"SUCCESSFUL\", asduResult.description);\n    response.send();\n    collection.addDatapoint(\"device.clock\", asduResult.data.Datetime);\n    collection.send();\n}",
          "language": "javascript"
        },
        {
          "code": "var execConfig = {\n    \"step\": {\n        \"sent\": true\n    },\n    \"collection\": {\n        \"sent\": true\n    }\n}\nvar asduResult = iec102.asdus.timeRequest(execConfig);",
          "language": "javascript"
        }
      ],
      "id": "iec102.asdus.timeRequest",
      "internal": false,
      "kind": "function",
      "name": "timeRequest",
      "namespace": "iec102.asdus",
      "page": {
        "title": "IEC102 JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/iec102/",
        "weight": 70
      },
      "params": [
        {
          "description": "`true` if ASDU finished correctly.",
          "name": "status",
          "type": "boolean"
        },
        {
          "description": "Descriptive message with execution result",
          "name": "description",
          "type": "string"
        },
        {
          "description": "Parameter used to communicate all iec102.asdus execution status",
          "name": "readingState",
          "type": "string"
        },
        {
          "description": "Json with ASDU execution result data. Each ASDU will have specific data",
          "name": "data",
          "type": "object"
        }
      ],
      "signature": "iec102.asdus.timeRequest()",
      "summary": "It is possible to execute one asdu directly. For example:",
      "url": "api/device_integration/connector_functions/protocol_apis/iec102/#iec102asdustimerequest"
    },
    {
      "examples": [
        {
          "code": "var execConfig = {\n    \"period\":{\n        \"initial\": 1698840000000,\n        \"final\": 1698840899000,\n        \"type\": \"previousQuarter\"\n    },\n    \"sleepTimeBeforeExec\": 5000\n    \"step\": {\n        \"send\": true\n    },\n    \"collection\": {\n        \"sent\": true\n    }\n}\niec102.asdus.add(\"timeRequest\", execConfig);",
          "language": "javascript"
        },
        {
          "code": "{\n    \"name\": \"timeRequest\",\n    \"execConfig\": {\n            \"period\":{\n                \"initial\": 1698840000000,\n                \"final\": 1698840899000,\n                \"type\": \"previousQuarter\"\n            },\n            \"sleepTimeBeforeExec\": 5000,\n            \"step\": {\n                \"send\": true\n            },\n            \"collection\": {\n                \"sent\": true\n            }\n        }\n}",
          "language": "json"
        },
        {
          "code": "// Step to be sent\n{\n    \"version\": \"8.0\",\n    \"trustedBoot\": null,\n    \"operation\": {\n        \"response\": {\n            \"steps\": [\n                {\n                    \"name\": \"TIME_REQUEST\",\n                    \"result\": \"SUCCESS\",\n                    \"description\": \"Success.\"\n                }\n            ],\n        }\n    }\n}\n// Collection to be sent\n{\n    \"datastreams\": [\n        \"id\": \"device.clock\",\n        \"datapoints\":[\n            {\n                \"value\": {\n                    \"date\": \"2023-11-01\",\n                    \"time\": \"12:00:00\",\n                    \"timezone\": \"GMT+1\",\n                    \"dst\": 0\n                },\n                \"at\": 1698793200000\n            }\n        ]\n    ]\n}",
          "language": "json"
        }
      ],
      "id": "iec102.asdus.add",
      "internal": false,
      "kind": "function",
      "name": "add",
      "namespace": "iec102.asdus",
      "page": {
        "title": "IEC102 JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/iec102/",
        "weight": 70
      },
      "signature": "iec102.asdus.add(name, execConfig)",
      "summary": "It is possible to add manually using iec102.asdus.add method. This method expect following parameters to define ASDU execution correctly:",
      "url": "api/device_integration/connector_functions/protocol_apis/iec102/#iec102asdusaddname-execconfig"
    },
    {
      "examples": [
        {
          "code": "{\n    \"status\": true,\n    \"description\": \"Success\"\n}",
          "language": "json"
        }
      ],
      "id": "connect",
      "internal": false,
      "kind": "function",
      "name": "connect",
      "namespace": "",
      "page": {
        "title": "IEC102 JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/iec102/",
        "weight": 70
      },
      "params": [
        {
          "description": "Specify connection procedure.",
          "name": "registerType",
          "type": "string"
        },
        {
          "description": "Strings to wait for in the response.",
          "name": "waitFor",
          "type": "array"
        }
      ],
      "returns": {
        "type": "Object"
      },
      "signature": "connect (registerType, waitFor)",
      "summary": "Establish connection with specified device. Before using this method connection parameters such as ip, port, timeout, etc. must be specified (some of them can have default values).",
      "url": "api/device_integration/connector_functions/protocol_apis/iec102/#connect-registertype-waitfor--object"
    },
    {
      "examples": [
        {
          "code": "{\n    \"status\": true,\n    \"description\": \"Success\"\n}",
          "language": "json"
        }
      ],
      "id": "connectWithIpAndPorts",
      "internal": false,
      "kind": "function",
      "name": "connectWithIpAndPorts",
      "namespace": "",
      "page": {
        "title": "IEC102 JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/iec102/",
        "weight": 70
      },
      "params": [
        {
          "description": "List of ports to be used",
          "name": "ports",
          "type": "array"
        },
        {
          "description": "Strings to wait for in the response.",
          "name": "waitFor",
          "type": "array"
        }
      ],
      "returns": {
        "type": "Object"
      },
      "signature": "connectWithIpAndPorts (ports, waitFor)",
      "summary": "Establish connection with specified device trying different ports. Before using this method connection parameters such as ip, timeout, etc. must be specified (some of them can have default values). In this case, a list of ports will be passed as parameters. For each port of the list, the connect method will be called until the connection is established correctly.",
      "url": "api/device_integration/connector_functions/protocol_apis/iec102/#connectwithipandports-ports-waitfor--object"
    },
    {
      "examples": [
        {
          "code": "var endpoints = [\n    {\n        \"ip\": \"127.0.0.1\",\n        \"port\": \"3000\",\n        \"userName\": \"userName\",\n        \"password\": \"password\"\n    },\n    {\n        \"ip\": \"127.0.0.2\",\n        \"port\": \"3001\",\n        \"userName\": \"userName2\",\n        \"password\": \"password2\"\n    }\n];\niec102.connectWithEndpoints(endpoints);",
          "language": "javascript"
        },
        {
          "code": "{\n    \"status\": true,\n    \"description\": \"Success\"\n}",
          "language": "json"
        }
      ],
      "id": "connectWithEndpoints",
      "internal": false,
      "kind": "function",
      "name": "connectWithEndpoints",
      "namespace": "",
      "page": {
        "title": "IEC102 JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/iec102/",
        "weight": 70
      },
      "params": [
        {
          "description": "List of objects with endpoints spec",
          "name": "endpoints",
          "type": "array"
        }
      ],
      "returns": {
        "type": "Object"
      },
      "signature": "connectWithEndpoints (endpoints)",
      "summary": "This method is special case for GSM connection.",
      "url": "api/device_integration/connector_functions/protocol_apis/iec102/#connectwithendpoints-endpoints--object"
    },
    {
      "id": "disconnect",
      "internal": false,
      "kind": "function",
      "name": "disconnect",
      "namespace": "",
      "page": {
        "title": "IEC102 JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/iec102/",
        "weight": 70
      },
      "signature": "disconnect ()",
      "summary": "Closes IEC102 connection",
      "url": "api/device_integration/connector_functions/protocol_apis/iec102/#disconnect-"
    },
    {
      "examples": [
        {
          "code": "{\n    \"status\": true,\n    \"description\": \"Success\"\n}",
          "language": "json"
        }
      ],
      "id": "send",
      "internal": false,
      "kind": "function",
      "name": "send",
      "namespace": "",
      "page": {
        "title": "IEC102 JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/iec102/",
        "weight": 70
      },
      "params": [
        {
          "description": "Command to send.",
          "name": "command",
          "type": "string"
        },
        {
          "description": "Strings to wait for in the response.",
          "name": "waitFor",
          "type": "List"
        },
        {
          "description": "Pattern to extract response from sent command.",
          "name": "pattern",
          "type": "string"
        }
      ],
      "returns": {
        "type": "Object"
      },
      "signature": "send (command, waitFor, pattern)",
      "summary": "Sends a command.",
      "url": "api/device_integration/connector_functions/protocol_apis/iec102/#send-command-waitfor-pattern--object"
    },
    {
      "id": "iec102.asdus.add~2",
      "internal": false,
      "kind": "function",
      "name": "add",
      "namespace": "iec102.asdus",
      "overloadOf": "iec102.asdus.add",
      "page": {
        "title": "IEC102 JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/iec102/",
        "weight": 70
      },
      "params": [
        {
          "description": "ASDU name",
          "name": "name",
          "type": "string"
        },
        {
          "description": "Execution configuration",
          "name": "execConfig",
          "type": "object"
        }
      ],
      "signature": "iec102.asdus.add(name, execConfig)",
      "summary": "Define an ASDU to be executed and add to asdus.asdusToExec array.",
      "url": "api/device_integration/connector_functions/protocol_apis/iec102/#iec102asdusaddname-execconfig-1"
    },
    {
      "id": "iec102.asdus.addFromParameters",
      "internal": false,
      "kind": "function",
      "name": "addFromParameters",
      "namespace": "iec102.asdus",
      "page": {
        "title": "IEC102 JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/iec102/",
        "weight": 70
      },
      "signature": "iec102.asdus.addFromParameters()",
      "summary": "Calculates all ASDUs to be executed from operations parameters adding them to asdus.asdusToExec array. This method only works if parameters object has specific properties.",
      "url": "api/device_integration/connector_functions/protocol_apis/iec102/#iec102asdusaddfromparameters"
    },
    {
      "examples": [
        {
          "code": "{\n    \"status\": true,\n    \"description\": \"Success\",\n    \"readingState\": null,\n}",
          "language": "json"
        }
      ],
      "id": "iec102.asdus.login",
      "internal": false,
      "kind": "function",
      "name": "login",
      "namespace": "iec102.asdus",
      "page": {
        "title": "IEC102 JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/iec102/",
        "weight": 70
      },
      "params": [
        {
          "description": "Execution configuration",
          "name": "execConfig",
          "type": "object"
        }
      ],
      "signature": "iec102.asdus.login(execConfig)",
      "summary": "Execute directly login ASDU.",
      "url": "api/device_integration/connector_functions/protocol_apis/iec102/#iec102asdusloginexecconfig"
    },
    {
      "examples": [
        {
          "code": "{\n    \"status\": true,\n    \"description\": \"Success\",\n    \"readingState\": null,\n}",
          "language": "json"
        }
      ],
      "id": "iec102.asdus.logout",
      "internal": false,
      "kind": "function",
      "name": "logout",
      "namespace": "iec102.asdus",
      "page": {
        "title": "IEC102 JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/iec102/",
        "weight": 70
      },
      "params": [
        {
          "description": "Execution configuration",
          "name": "execConfig",
          "type": "object"
        }
      ],
      "signature": "iec102.asdus.logout(execConfig)",
      "summary": "Execute directly logout ASDU.",
      "url": "api/device_integration/connector_functions/protocol_apis/iec102/#iec102asduslogoutexecconfig"
    },
    {
      "examples": [
        {
          "code": "{\n    \"status\": true,\n    \"description\": \"Success\",\n    \"readingState\": \"READ\",\n    \"data\": {\n        \"Datetime\": {\n            \"date\": \"2024-01-19\",\n            \"time\": \"09:36:58\",\n            \"timezone\": \"GMT+1\",\n            \"dst\": 0\n        }\n    }\n}",
          "language": "json"
        }
      ],
      "id": "iec102.asdus.timeRequest~2",
      "internal": false,
      "kind": "function",
      "name": "timeRequest",
      "namespace": "iec102.asdus",
      "overloadOf": "iec102.asdus.timeRequest",
      "page": {
        "title": "IEC102 JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/iec102/",
        "weight": 70
      },
      "params": [
        {
          "description": "Execution configuration",
          "name": "execConfig",
          "type": "object"
        }
      ],
      "signature": "iec102.asdus.timeRequest(execConfig)",
      "summary": "Execute directly timeRequest ASDU.",
      "url": "api/device_integration/connector_functions/protocol_apis/iec102/#iec102asdustimerequestexecconfig"
    },
    {
      "examples": [
        {
          "code": "{\n    \"status\": true,\n    \"description\": \"Success\",\n    \"readingState\": \"READ\",\n    \"data\": {\n        \"Contract1\": \"unknown\",\n        \"VoltageSecondary\": 0,\n        \"ManufacturerCode\": \"1\",\n        \"BatteryPercentage\": 44,\n        \"SerialPort1StartingAsciiString\": \"\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\",\n        \"IntensityPrimary\": 0,\n        \"IntegrationPeriod3\": 0,\n        \"VoltagePrimary\": 0,\n        \"IntegrationPeriod1\": 60,\n        \"IntegrationPeriod2\": 15,\n        \"SerialPort1Mode\": 0,\n        \"IntensitySecondary\": 0,\n        \"SerialNumber\": 333,\n        \"Model\": {\n            \"name\": \"AQ\",\n            \"version\": \"\",\n            \"manufacturer\": \"\",\n            \"manufacturerOUI\": \"\"\n        },\n        \"SerialPort1Codification\": \"8/No/2\",\n        \"ContractType\": \"Contract I\",\n        \"StandardDate\": \"2002-05-01\",\n        \"Firmware\": [\n            {\n                \"name\": \"Firmware version\",\n                \"version\": \"2\",\n                \"type\": \"FIRMWARE\"\n            }\n        ],\n        \"SerialPort1Baudrate\": 9600,\n        \"SerialPort2Baudrate\": 0,\n        \"SerialPort2Codification\": \"8/No/2\",\n        \"Datetime\": {\n            \"date\": \"2002-04-10\",\n            \"time\": \"00:00:00\",\n            \"timezone\": \"GMT+1\",\n            \"dst\": 0\n        }\n    }\n}",
          "language": "json"
        }
      ],
      "id": "iec102.asdus.configuration",
      "internal": false,
      "kind": "function",
      "name": "configuration",
      "namespace": "iec102.asdus",
      "page": {
        "title": "IEC102 JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/iec102/",
        "weight": 70
      },
      "params": [
        {
          "description": "Execution configuration",
          "name": "execConfig",
          "type": "object"
        }
      ],
      "signature": "iec102.asdus.configuration(execConfig)",
      "summary": "Execute directly configuration ASDU.",
      "url": "api/device_integration/connector_functions/protocol_apis/iec102/#iec102asdusconfigurationexecconfig"
    },
    {
      "examples": [
        {
          "code": "{\n    \"status\": true,\n    \"description\": \"Success\",\n    \"readingState\": \"READ\",\n    \"data\": {\n        \"RegistryDepth\": 4000,\n        \"LinkAddressCollected\": 1,\n        \"IntegrationPeriod\": 60,\n        \"AccessPassword\": 1,\n        \"MeasurePoint\": 1,\n        \"MeasurePointsQuantity\": 1\n    }\n}",
          "language": "json"
        }
      ],
      "id": "iec102.asdus.parameters",
      "internal": false,
      "kind": "function",
      "name": "parameters",
      "namespace": "iec102.asdus",
      "page": {
        "title": "IEC102 JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/iec102/",
        "weight": 70
      },
      "params": [
        {
          "description": "Execution configuration",
          "name": "execConfig",
          "type": "object"
        }
      ],
      "signature": "iec102.asdus.parameters(execConfig)",
      "summary": "Execute directly parameters ASDU.",
      "url": "api/device_integration/connector_functions/protocol_apis/iec102/#iec102asdusparametersexecconfig"
    },
    {
      "examples": [
        {
          "code": "{\n    \"status\": true,\n    \"description\": \"Success\",\n    \"readingState\": \"READ\",\n    \"data\": {\n        \"ManufacturerCode\": \"81\",\n        \"DeviceId\": \"501606407\"\n    }\n}",
          "language": "json"
        }
      ],
      "id": "iec102.asdus.deviceManufacturer",
      "internal": false,
      "kind": "function",
      "name": "deviceManufacturer",
      "namespace": "iec102.asdus",
      "page": {
        "title": "IEC102 JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/iec102/",
        "weight": 70
      },
      "params": [
        {
          "description": "Execution configuration",
          "name": "execConfig",
          "type": "object"
        }
      ],
      "signature": "iec102.asdus.deviceManufacturer(execConfig)",
      "summary": "Execute directly deviceManufacturer ASDU.",
      "url": "api/device_integration/connector_functions/protocol_apis/iec102/#iec102asdusdevicemanufacturerexecconfig"
    },
    {
      "examples": [
        {
          "code": "{\n    \"status\": true,\n    \"description\": \"Success\",\n    \"readingState\": \"READ\",\n    \"data\": {\n        \"ToDaylightSavingTime\": {\n            \"date\": \"2002-04-10\",\n            \"time\": \"00:00:00\",\n            \"timezone\": \"GMT+1\",\n            \"dst\": 0\n        },\n        \"ToStandardTime\": {\n            \"date\": \"2002-04-10\",\n            \"time\": \"00:00:00\",\n            \"timezone\": \"GMT+1\",\n            \"dst\": 0\n        }      \n    }\n}",
          "language": "json"
        }
      ],
      "id": "iec102.asdus.dayLightSavingTime",
      "internal": false,
      "kind": "function",
      "name": "dayLightSavingTime",
      "namespace": "iec102.asdus",
      "page": {
        "title": "IEC102 JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/iec102/",
        "weight": 70
      },
      "params": [
        {
          "description": "Execution configuration",
          "name": "execConfig",
          "type": "object"
        }
      ],
      "signature": "iec102.asdus.dayLightSavingTime(execConfig)",
      "summary": "Execute directly dayLightSavingTime ASDU.",
      "url": "api/device_integration/connector_functions/protocol_apis/iec102/#iec102asdusdaylightsavingtimeexecconfig"
    },
    {
      "examples": [
        {
          "code": "{\n    \"status\": true,\n    \"description\": \"Success\",\n    \"readingState\": \"READ\",\n    \"data\": {\n        \"frames\": [\n            {\n                \"ImportedActive\": 10,\n                \"Quadrant4Reactive\": 10,\n                \"Quadrant2Reactive\": 333,\n                \"Quadrant3Reactive\": 334,\n                \"ExportedActive\": 1000,\n                \"Quadrant1Reactive\": 333,\n                \"Timestamp\": 1705536000000\n            },\n            //...\n        ]\n    }\n}",
          "language": "json"
        }
      ],
      "id": "iec102.asdus.loadCurve",
      "internal": false,
      "kind": "function",
      "name": "loadCurve",
      "namespace": "iec102.asdus",
      "page": {
        "title": "IEC102 JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/iec102/",
        "weight": 70
      },
      "params": [
        {
          "description": "Execution configuration",
          "name": "execConfig",
          "type": "object"
        }
      ],
      "signature": "iec102.asdus.loadCurve(execConfig)",
      "summary": "Execute directly loadCurve ASDU.",
      "url": "api/device_integration/connector_functions/protocol_apis/iec102/#iec102asdusloadcurveexecconfig"
    },
    {
      "examples": [
        {
          "code": "{\n    \"status\": true,\n    \"description\": \"Success\",\n    \"readingState\": \"READ\",\n    \"data\": {\n        \"frames\": [\n            {\n                \"ImportedActive\": 10,\n                \"Quadrant4Reactive\": 10,\n                \"Quadrant2Reactive\": 333,\n                \"Quadrant3Reactive\": 334,\n                \"ExportedActive\": 1000,\n                \"Quadrant1Reactive\": 333,\n                \"Timestamp\": 1705536000000\n            },\n            {\n                \"ImportedActive\": 0,\n                \"Quadrant4Reactive\": 125,\n                \"Quadrant2Reactive\": 125,\n                \"Quadrant3Reactive\": 125,\n                \"ExportedActive\": 500,\n                \"Quadrant1Reactive\": 125,\n                \"Timestamp\": 1705536900000\n            }\n            //...\n        ]\n    }\n}",
          "language": "json"
        }
      ],
      "id": "iec102.asdus.loadCurveQuarter",
      "internal": false,
      "kind": "function",
      "name": "loadCurveQuarter",
      "namespace": "iec102.asdus",
      "page": {
        "title": "IEC102 JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/iec102/",
        "weight": 70
      },
      "params": [
        {
          "description": "Execution configuration",
          "name": "execConfig",
          "type": "object"
        }
      ],
      "signature": "iec102.asdus.loadCurveQuarter(execConfig)",
      "summary": "Execute directly loadCurveQuarter ASDU.",
      "url": "api/device_integration/connector_functions/protocol_apis/iec102/#iec102asdusloadcurvequarterexecconfig"
    },
    {
      "examples": [
        {
          "code": "{\n    \"status\": true,\n    \"description\": \"Success\",\n    \"readingState\": \"READ\",\n    \"data\": {\n        \"frames\": [\n            {\n                \"ImportedActive\": 10,\n                \"Quadrant4Reactive\": 10,\n                \"Quadrant2Reactive\": 333,\n                \"Quadrant3Reactive\": 334,\n                \"ExportedActive\": 1000,\n                \"Quadrant1Reactive\": 333,\n                \"Timestamp\": 1705536000000\n            }\n            //...\n        ]\n    }\n}",
          "language": "json"
        }
      ],
      "id": "iec102.asdus.loadCurveIncremental",
      "internal": false,
      "kind": "function",
      "name": "loadCurveIncremental",
      "namespace": "iec102.asdus",
      "page": {
        "title": "IEC102 JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/iec102/",
        "weight": 70
      },
      "params": [
        {
          "description": "Execution configuration",
          "name": "execConfig",
          "type": "object"
        }
      ],
      "signature": "iec102.asdus.loadCurveIncremental(execConfig)",
      "summary": "Execute directly loadCurveIncremental ASDU.",
      "url": "api/device_integration/connector_functions/protocol_apis/iec102/#iec102asdusloadcurveincrementalexecconfig"
    },
    {
      "examples": [
        {
          "code": "{\n    \"status\": true,\n    \"description\": \"Success\",\n    \"readingState\": \"READ\",\n    \"data\": {\n        \"frames\": [\n            {\n                \"ImportedActive\": 2,\n                \"Quadrant4Reactive\": 0,\n                \"Quadrant2Reactive\": 1,\n                \"Quadrant3Reactive\": 1,\n                \"ExportedActive\": 1,\n                \"Quadrant1Reactive\": 2,\n                \"Timestamp\": 1705536000000\n            },\n            {\n                \"ImportedActive\": 0,\n                \"Quadrant4Reactive\": 0,\n                \"Quadrant2Reactive\": 0,\n                \"Quadrant3Reactive\": 0,\n                \"ExportedActive\": 2,\n                \"Quadrant1Reactive\": 0,\n                \"Timestamp\": 1705536900000\n            }\n            //...\n        ]\n    }\n}",
          "language": "json"
        }
      ],
      "id": "iec102.asdus.loadCurveIncrementalQuarter",
      "internal": false,
      "kind": "function",
      "name": "loadCurveIncrementalQuarter",
      "namespace": "iec102.asdus",
      "page": {
        "title": "IEC102 JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/iec102/",
        "weight": 70
      },
      "params": [
        {
          "description": "Execution configuration",
          "name": "execConfig",
          "type": "object"
        }
      ],
      "signature": "iec102.asdus.loadCurveIncrementalQuarter(execConfig)",
      "summary": "Execute directly loadCurveIncrementalQuarter ASDU.",
      "url": "api/device_integration/connector_functions/protocol_apis/iec102/#iec102asdusloadcurveincrementalquarterexecconfig"
    },
    {
      "examples": [
        {
          "code": "{\n    \"status\": true,\n    \"description\": \"Success\",\n    \"readingState\": \"READ\",\n    \"data\": {\n        \"frames\": [\n            {\n                \"IncrementalActive\": 5060,\n                \"IncrementalCapacitiveReactive\": 54,\n                \"Memory\": \"Cur\",\n                \"AbsoluteCapacitiveReactive\": 4564,\n                \"Timestamp\": 1705653489884,\n                \"MaximumPower\": 19,\n                \"EndPeriodDateAsDatetime\": {\n                    \"date\": \"2024-02-29\",\n                    \"time\": \"23:59:00\",\n                    \"timezone\": \"GMT+1\",\n                    \"dst\": 0\n                },\n                \"RateIndex\": \"Tot\",\n                \"InitPeriodDateAsDatetime\": {\n                    \"date\": \"2024-02-01\",\n                    \"time\": \"00:00:00\",\n                    \"timezone\": \"GMT+1\",\n                    \"dst\": 0\n                },\n                \"ExcessPower\": 0,\n                \"AbsoluteActive\": 595452,\n                \"AbsoluteInductiveReactive\": 1207,\n                \"IncrementalInductiveReactive\": 6\n            },\n            //...\n        ]\n    }\n}",
          "language": "json"
        }
      ],
      "id": "iec102.asdus.currentPricing",
      "internal": false,
      "kind": "function",
      "name": "currentPricing",
      "namespace": "iec102.asdus",
      "page": {
        "title": "IEC102 JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/iec102/",
        "weight": 70
      },
      "params": [
        {
          "description": "Execution configuration",
          "name": "execConfig",
          "type": "object"
        }
      ],
      "signature": "iec102.asdus.currentPricing(execConfig)",
      "summary": "Execute directly currentPricing ASDU.",
      "url": "api/device_integration/connector_functions/protocol_apis/iec102/#iec102asduscurrentpricingexecconfig"
    },
    {
      "examples": [
        {
          "code": "{\n    \"status\": true,\n    \"description\": \"Success\",\n    \"readingState\": \"READ\",\n    \"data\": {\n        \"frames\": [\n            {\n                \"IncrementalActive\": 5060,\n                \"IncrementalCapacitiveReactive\": 54,\n                \"Memory\": \"Mem\",\n                \"AbsoluteCapacitiveReactive\": 4564,\n                \"Timestamp\": 1705653478357,\n                \"MaximumPower\": 19,\n                \"EndPeriodDateAsDatetime\": {\n                    \"date\": \"2024-02-29\",\n                    \"time\": \"23:59:00\",\n                    \"timezone\": \"GMT+1\",\n                    \"dst\": 0\n                },\n                \"RateIndex\": \"Tot\",\n                \"InitPeriodDateAsDatetime\": {\n                    \"date\": \"2024-02-01\",\n                    \"time\": \"00:00:00\",\n                    \"timezone\": \"GMT+1\",\n                    \"dst\": 0\n                },\n                \"ExcessPower\": 0,\n                \"AbsoluteActive\": 595452,\n                \"AbsoluteInductiveReactive\": 1207,\n                \"IncrementalInductiveReactive\": 6\n            }\n            //...\n        ]\n    }\n}",
          "language": "json"
        }
      ],
      "id": "iec102.asdus.storedPricing",
      "internal": false,
      "kind": "function",
      "name": "storedPricing",
      "namespace": "iec102.asdus",
      "page": {
        "title": "IEC102 JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/iec102/",
        "weight": 70
      },
      "params": [
        {
          "description": "Execution configuration",
          "name": "execConfig",
          "type": "object"
        }
      ],
      "signature": "iec102.asdus.storedPricing(execConfig)",
      "summary": "Execute directly storedPricing ASDU.",
      "url": "api/device_integration/connector_functions/protocol_apis/iec102/#iec102asdusstoredpricingexecconfig"
    },
    {
      "examples": [
        {
          "code": "{\n    \"status\": true,\n    \"asdus\": {\n        \"login\": {\n            \"data\": null,\n            \"description\": \"Success\",\n            \"readingState\": null,\n            \"status\": true\n        },\n        \"timeRequest\": {\n            \"data\": {\n                \"Datetime\": {\n                    \"date\": \"2024-01-19\",\n                    \"time\": \"09:36:58\",\n                    \"timezone\": \"GMT+1\",\n                    \"dst\": 0\n                }\n            },\n            \"description\": \"Success\",\n            \"readingState\": \"READ\",\n            \"status\": true\n        },\n        \"parameters\": {\n            \"data\": {\n                \"RegistryDepth\": 4000,\n                \"LinkAddressCollected\": 1,\n                \"IntegrationPeriod\": 60,\n                \"AccessPassword\": 1,\n                \"MeasurePoint\": 1,\n                \"MeasurePointsQuantity\": 1\n            },\n            \"description\": \"Success\",\n            \"readingState\": \"READ\",\n            \"status\": true\n        },\n        \"deviceManufacturer\": {\n            \"data\": {\n                \"ManufacturerCode\": \"81\",\n                \"DeviceId\": \"501606407\"\n            },\n            \"description\": \"Success\",\n            \"readingState\": \"READ\",\n            \"status\": true\n        },\n        \"loadCurve\": {\n            \"data\": {\n                \"frames\": [\n                    {\n                        \"ImportedActive\": 10,\n                        \"Quadrant4Reactive\": 10,\n                        \"Quadrant2Reactive\": 333,\n                        \"Quadrant3Reactive\": 334,\n                        \"ExportedActive\": 1000,\n                        \"Quadrant1Reactive\": 333,\n                        \"Timestamp\": 1705536000000\n                    }\n                ]\n            },\n            \"description\": \"Success\",\n            \"readingState\": \"READ\",\n            \"status\": true\n        },\n        \"loadCurveQuarter\": {\n            \"data\": {\n                \"frames\": [\n                    {\n                        \"ImportedActive\": 10,\n                        \"Quadrant4Reactive\": 10,\n                        \"Quadrant2Reactive\": 333,\n                        \"Quadrant3Reactive\": 334,\n                        \"ExportedActive\": 1000,\n                        \"Quadrant1Reactive\": 333,\n                        \"Timestamp\": 1705536000000\n                    }\n                    //...\n                ]\n            },\n            \"description\": \"Success\",\n            \"readingState\": \"READ\",\n            \"status\": true\n        },\n        \"loadCurveIncremental\": {\n            \"data\": {\n                \"frames\": [\n                    {\n                        \"ImportedActive\": 10,\n                        \"Quadrant4Reactive\": 10,\n                        \"Quadrant2Reactive\": 333,\n                        \"Quadrant3Reactive\": 334,\n                        \"ExportedActive\": 1000,\n                        \"Quadrant1Reactive\": 333,\n                        \"Timestamp\": 1705536000000\n                    }\n                ]\n            },\n            \"description\": \"Success\",\n            \"readingState\": \"READ\",\n            \"status\": true\n        },\n        \"loadCurveIncrementalQuarter\": {\n            \"data\": {\n                \"frames\": [\n                    {\n                        \"ImportedActive\": 2,\n                        \"Quadrant4Reactive\": 0,\n                        \"Quadrant2Reactive\": 1,\n                        \"Quadrant3Reactive\": 1,\n                        \"ExportedActive\": 1,\n                        \"Quadrant1Reactive\": 2,\n                        \"Timestamp\": 1705536000000\n                    }\n                    //...\n                ]\n            },\n            \"description\": \"Success\",\n            \"readingState\": \"READ\",\n            \"status\": true\n        },\n        \"storedPricing\": {\n            \"data\": {\n                \"frames\": [\n                    {\n                        \"IncrementalActive\": 5060,\n                        \"IncrementalCapacitiveReactive\": 54,\n                        \"Memory\": \"Mem\",\n                        \"AbsoluteCapacitiveReactive\": 4564,\n                        \"Timestamp\": 1705653478357,\n                        \"MaximumPower\": 19,\n                        \"EndPeriodDateAsDatetime\": {\n                            \"date\": \"2024-02-29\",\n                            \"time\": \"23:59:00\",\n                            \"timezone\": \"GMT+1\",\n                            \"dst\": 0\n                        },\n                        \"RateIndex\": \"Tot\",\n                        \"InitPeriodDateAsDatetime\": {\n                            \"date\": \"2024-02-01\",\n                            \"time\": \"00:00:00\",\n                            \"timezone\": \"GMT+1\",\n                            \"dst\": 0\n                        },\n                        \"ExcessPower\": 0,\n                        \"AbsoluteActive\": 595452,\n                        \"AbsoluteInductiveReactive\": 1207,\n                        \"IncrementalInductiveReactive\": 6\n                    }\n                    //...\n                ]\n            },\n            \"description\": \"Success\",\n            \"readingState\": \"READ\",\n            \"status\": true\n        },\n        \"configuration\": {\n            \"data\": {\n                \"Contract1\": \"unknown\",\n                \"VoltageSecondary\": 0,\n                \"ManufacturerCode\": \"1\",\n                \"BatteryPercentage\": 44,\n                \"SerialPort1StartingAsciiString\": \"\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\",\n                \"IntensityPrimary\": 0,\n                \"IntegrationPeriod3\": 0,\n                \"VoltagePrimary\": 0,\n                \"IntegrationPeriod1\": 60,\n                \"IntegrationPeriod2\": 15,\n                \"SerialPort1Mode\": 0,\n                \"IntensitySecondary\": 0,\n                \"SerialNumber\": 333,\n                \"Model\": {\n                    \"name\": \"AQ\",\n                    \"version\": \"\",\n                    \"manufacturer\": \"\",\n                    \"manufacturerOUI\": \"\"\n                },\n                \"SerialPort1Codification\": \"8/No/2\",\n                \"ContractType\": \"Contract I\",\n                \"StandardDate\": \"2002-05-01\",\n                \"Firmware\": [\n                    {\n                        \"name\": \"Firmware version\",\n                        \"version\": \"2\",\n                        \"type\": \"FIRMWARE\"\n                    }\n                ],\n                \"SerialPort1Baudrate\": 9600,\n                \"SerialPort2Baudrate\": 0,\n                \"SerialPort2Codification\": \"8/No/2\",\n                \"Datetime\": {\n                    \"date\": \"2002-04-10\",\n                    \"time\": \"00:00:00\",\n                    \"timezone\": \"GMT+1\",\n                    \"dst\": 0\n                }\n            },\n            \"description\": \"Success\",\n            \"readingState\": \"READ\",\n            \"status\": true\n        },\n        \"currentPricing\": {\n            \"data\": {\n                \"frames\": [\n                    {\n                        \"IncrementalActive\": 5060,\n                        \"IncrementalCapacitiveReactive\": 54,\n                        \"Memory\": \"Cur\",\n                        \"AbsoluteCapacitiveReactive\": 4564,\n                        \"Timestamp\": 1705653489884,\n                        \"MaximumPower\": 19,\n                        \"EndPeriodDateAsDatetime\": {\n                            \"date\": \"2024-02-29\",\n                            \"time\": \"23:59:00\",\n                            \"timezone\": \"GMT+1\",\n                            \"dst\": 0\n                        },\n                        \"RateIndex\": \"Tot\",\n                        \"InitPeriodDateAsDatetime\": {\n                            \"date\": \"2024-02-01\",\n                            \"time\": \"00:00:00\",\n                            \"timezone\": \"GMT+1\",\n                            \"dst\": 0\n                        },\n                        \"ExcessPower\": 0,\n                        \"AbsoluteActive\": 595452,\n                        \"AbsoluteInductiveReactive\": 1207,\n                        \"IncrementalInductiveReactive\": 6\n                    }\n                    //...\n                ]\n            },\n            \"description\": \"Success\",\n            \"readingState\": \"READ\",\n            \"status\": true\n        },\n        \"logout\": {\n            \"data\": null,\n            \"description\": \"Success\",\n            \"readingState\": null,\n            \"status\": true\n        }\n    }\n}",
          "language": "json"
        }
      ],
      "id": "iec102.asdus.execute",
      "internal": false,
      "kind": "function",
      "name": "execute",
      "namespace": "iec102.asdus",
      "page": {
        "title": "IEC102 JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/iec102/",
        "weight": 70
      },
      "signature": "iec102.asdus.execute()",
      "summary": "Execute one by one all the ASDUs defined in asdus.asdusToExec.",
      "url": "api/device_integration/connector_functions/protocol_apis/iec102/#iec102asdusexecute"
    },
    {
      "examples": [
        {
          "code": "let result = kite.requestChangeTerminalStatus()\nif (result.isOk) {\n    collection.send()\n    response.successful(result.description)\n} else {\n    response.errorProcessing(result.description)\n}\n\nreturn response",
          "language": "javascript"
        }
      ],
      "id": "kite.requestChangeTerminalStatus",
      "internal": false,
      "kind": "function",
      "name": "requestChangeTerminalStatus",
      "namespace": "kite",
      "page": {
        "title": "Kite Javascript API",
        "url": "api/device_integration/connector_functions/protocol_apis/kite/",
        "weight": 90
      },
      "params": [
        {
          "description": "Status of the subscription.",
          "name": "status",
          "type": "string"
        }
      ],
      "signature": "kite.requestChangeTerminalStatus(status)",
      "summary": "Changes the subscription status using the specified parameter and completes the collection object with a new administrative status.",
      "url": "api/device_integration/connector_functions/protocol_apis/kite/#kiterequestchangeterminalstatusstatus"
    },
    {
      "examples": [
        {
          "code": "let result = kite.requestTerminalDetails()\nif (result.isOk) {\n    collection.send()\n    response.successful(result.description)\n} else {\n    response.errorProcessing(result.description)\n}\nreturn response",
          "language": "javascript"
        }
      ],
      "id": "kite.requestTerminalDetails",
      "internal": false,
      "kind": "function",
      "name": "requestTerminalDetails",
      "namespace": "kite",
      "page": {
        "title": "Kite Javascript API",
        "url": "api/device_integration/connector_functions/protocol_apis/kite/",
        "weight": 90
      },
      "signature": "kite.requestTerminalDetails()",
      "summary": "Gets the details of the subscription and complete collection object with result.",
      "url": "api/device_integration/connector_functions/protocol_apis/kite/#kiterequestterminaldetails"
    },
    {
      "examples": [
        {
          "code": "var dbVal = utils.atcmd.toDBm(1234);",
          "language": "javascript"
        }
      ],
      "id": "utils.atcmd.toDBm",
      "internal": false,
      "kind": "function",
      "name": "toDBm",
      "namespace": "utils.atcmd",
      "page": {
        "title": "UTILS JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/utils/",
        "weight": 90
      },
      "params": [
        {
          "description": "The GSM signal strength.",
          "name": "value",
          "type": "number"
        }
      ],
      "returns": {
        "description": "The translation to dBm value"
      },
      "signature": "utils.atcmd.toDBm(value)",
      "summary": "Translates the response got by the 'AT+CSQ' command, which is the GSM signal strength and a numerical value, to its corresponding dBm value.",
      "url": "api/device_integration/connector_functions/core_javascript_api/utils/#utilsatcmdtodbmvalue"
    },
    {
      "examples": [
        {
          "code": "var val = utils.endesa.torscp(\"1234\");",
          "language": "javascript"
        }
      ],
      "id": "utils.endesa.torscp",
      "internal": false,
      "kind": "function",
      "name": "torscp",
      "namespace": "utils.endesa",
      "page": {
        "title": "UTILS JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/utils/",
        "weight": 90
      },
      "params": [
        {
          "description": "value to be converted",
          "name": "value",
          "type": "string"
        }
      ],
      "signature": "utils.endesa.torscp(value)",
      "url": "api/device_integration/connector_functions/core_javascript_api/utils/#utilsendesatorscpvalue"
    },
    {
      "examples": [
        {
          "code": "var val = utils.endesa.toDbmPlusQuality(\"1234\");",
          "language": "javascript"
        }
      ],
      "id": "utils.endesa.toDbmPlusQuality",
      "internal": false,
      "kind": "function",
      "name": "toDbmPlusQuality",
      "namespace": "utils.endesa",
      "page": {
        "title": "UTILS JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/utils/",
        "weight": 90
      },
      "params": [
        {
          "description": "value to be converted",
          "name": "value",
          "type": "string"
        }
      ],
      "signature": "utils.endesa.toDbmPlusQuality(value)",
      "url": "api/device_integration/connector_functions/core_javascript_api/utils/#utilsendesatodbmplusqualityvalue"
    },
    {
      "examples": [
        {
          "code": "var newMsisdn = utils.endesa.prepareMsisdn(\"341234567890\");\n//newMsisdn will be: 1234567890",
          "language": "javascript"
        }
      ],
      "id": "utils.endesa.prepareMsisdn",
      "internal": false,
      "kind": "function",
      "name": "prepareMsisdn",
      "namespace": "utils.endesa",
      "page": {
        "title": "UTILS JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/utils/",
        "weight": 90
      },
      "params": [
        {
          "description": "msisdn to be converted",
          "name": "msisdn",
          "type": "string"
        }
      ],
      "returns": {
        "description": "returns msisdn parameter without format"
      },
      "signature": "utils.endesa.prepareMsisdn(msisdn)",
      "summary": "If msisdn starts with \"34\", then returns the value without \"34\".",
      "url": "api/device_integration/connector_functions/core_javascript_api/utils/#utilsendesapreparemsisdnmsisdn"
    },
    {
      "examples": [
        {
          "code": "var newCommand = utils.endesa.commandFrom(\"9600;8E1\");\n//newCommand will be: ATS37=9S13=1\\r\\n",
          "language": "javascript"
        }
      ],
      "id": "utils.endesa.commandFrom",
      "internal": false,
      "kind": "function",
      "name": "commandFrom",
      "namespace": "utils.endesa",
      "page": {
        "title": "UTILS JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/utils/",
        "weight": 90
      },
      "params": [
        {
          "description": "command to be translated",
          "name": "command",
          "type": "string"
        }
      ],
      "returns": {
        "description": "returns msisdn parameter without format"
      },
      "signature": "utils.endesa.commandFrom(command)",
      "summary": "Depending on the command value, specific translation will be returned.",
      "url": "api/device_integration/connector_functions/core_javascript_api/utils/#utilsendesacommandfromcommand"
    },
    {
      "examples": [
        {
          "code": "utils.odm.addValueToContext(\"key\", \"value\");",
          "language": "javascript"
        }
      ],
      "id": "utils.odm.addValueToContext",
      "internal": false,
      "kind": "function",
      "name": "addValueToContext",
      "namespace": "utils.odm",
      "page": {
        "title": "UTILS JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/utils/",
        "weight": 90
      },
      "params": [
        {
          "description": "key to be added to context",
          "name": "key",
          "type": "string"
        },
        {
          "description": "value to be added to context",
          "name": "value",
          "type": "string"
        }
      ],
      "signature": "utils.odm.addValueToContext(key,value)",
      "url": "api/device_integration/connector_functions/core_javascript_api/utils/#utilsodmaddvaluetocontextkeyvalue"
    },
    {
      "examples": [
        {
          "code": "utils.odm.sleep(1000);",
          "language": "javascript"
        }
      ],
      "id": "utils.odm.sleep",
      "internal": false,
      "kind": "function",
      "name": "sleep",
      "namespace": "utils.odm",
      "page": {
        "title": "UTILS JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/utils/",
        "weight": 90
      },
      "params": [
        {
          "description": "time to sleep in milliseconds",
          "name": "time",
          "type": "number"
        }
      ],
      "signature": "utils.odm.sleep(time)",
      "summary": "Sleeps for specified time",
      "url": "api/device_integration/connector_functions/core_javascript_api/utils/#utilsodmsleeptime"
    },
    {
      "examples": [
        {
          "code": "var encryptedValue = utils.odm.encryptString(\"originalValue\", \"datastreamConfiguration\", \"organizationName\");",
          "language": "javascript"
        }
      ],
      "id": "utils.odm.encryptString",
      "internal": false,
      "kind": "function",
      "name": "encryptString",
      "namespace": "utils.odm",
      "page": {
        "title": "UTILS JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/utils/",
        "weight": 90
      },
      "params": [
        {
          "description": "The value to encrypt.",
          "name": "originalValue",
          "type": "string"
        },
        {
          "description": "The datastream of provision type, of the datamodel that define this value. This datastream has the configuration of encryption.",
          "name": "datastreamConfiguration",
          "type": "string"
        },
        {
          "description": "The organization name to which the datamodel belongs.",
          "name": "organizationName",
          "type": "string"
        }
      ],
      "returns": {
        "description": "The originalValue encrypted"
      },
      "signature": "utils.odm.encryptString(originalValue, datastreamConfiguration, organizationName)",
      "summary": "Encrypt an original string with the configuration established by the datastream of the organization",
      "url": "api/device_integration/connector_functions/core_javascript_api/utils/#utilsodmencryptstringoriginalvalue-datastreamconfiguration-organizationname"
    },
    {
      "examples": [
        {
          "code": "var decryptedValue = utils.odm.decryptString(\"encryptedValue\", \"datastreamConfiguration\", \"organizationName\");",
          "language": "javascript"
        }
      ],
      "id": "utils.odm.decryptString",
      "internal": false,
      "kind": "function",
      "name": "decryptString",
      "namespace": "utils.odm",
      "page": {
        "title": "UTILS JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/utils/",
        "weight": 90
      },
      "params": [
        {
          "description": "The encrypted value to decrypt.",
          "name": "encryptedValue",
          "type": "string"
        },
        {
          "description": "The datastream of provision type, of the datamodel that define this value. This datastream has the configuration of encryption.",
          "name": "datastreamConfiguration",
          "type": "string"
        },
        {
          "description": "The organization name to which the datamodel belongs.",
          "name": "organizationName",
          "type": "string"
        }
      ],
      "returns": {
        "description": "The encryptedValue decrypted"
      },
      "signature": "utils.odm.decryptString(encryptedValue, datastreamConfiguration, organizationName)",
      "summary": "Decrypt an encrypted string with the configuration established by the datastream of the organization",
      "url": "api/device_integration/connector_functions/core_javascript_api/utils/#utilsodmdecryptstringencryptedvalue-datastreamconfiguration-organizationname"
    },
    {
      "examples": [
        {
          "code": "var addressType = utils.odm.getAddressTypeFromAddress(\"[IP_ADDRESS]\");\n//addressType will be: ipv4\n\nvar addressType = utils.odm.getAddressTypeFromAddress(\"2001:0db8:85a3:0000:0000:8a2e:0370:7334\");\n//addressType will be: ipv6",
          "language": "javascript"
        }
      ],
      "id": "utils.odm.getAddressTypeFromAddress",
      "internal": false,
      "kind": "function",
      "name": "getAddressTypeFromAddress",
      "namespace": "utils.odm",
      "page": {
        "title": "UTILS JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/utils/",
        "weight": 90
      },
      "params": [
        {
          "description": "The address which the type will be calculated for.",
          "name": "address",
          "type": "string"
        }
      ],
      "returns": {
        "description": "The address type"
      },
      "signature": "utils.odm.getAddressTypeFromAddress(address)",
      "summary": "Calculates the address type from a given address",
      "url": "api/device_integration/connector_functions/core_javascript_api/utils/#utilsodmgetaddresstypefromaddressaddress"
    },
    {
      "examples": [
        {
          "code": "var value = utils.odm.entitiesValue(entities, \"provision.device.identifier\", 0);",
          "language": "javascript"
        }
      ],
      "id": "utils.odm.entitiesValue",
      "internal": false,
      "kind": "function",
      "name": "entitiesValue",
      "namespace": "utils.odm",
      "page": {
        "title": "UTILS JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/utils/",
        "weight": 90
      },
      "params": [
        {
          "description": "Array of objects with flattened entity.",
          "name": "entities",
          "type": "Array"
        },
        {
          "description": "Datastream name, for example: 'provision.device.identifier'.",
          "name": "datastream",
          "type": "String"
        },
        {
          "description": "Array Index. If provided datastream is an array (i.e. comm module), element index must be specified.",
          "name": "index",
          "type": "number"
        }
      ],
      "returns": {
        "description": "\\* - Specified datastream \"value\" field. It can be complex object. null if datastream does not exist."
      },
      "signature": "utils.odm.entitiesValue(entities, datastream, index)",
      "summary": "Extract from the first entity of entities array specified datastream \"value\" field value.",
      "url": "api/device_integration/connector_functions/core_javascript_api/utils/#utilsodmentitiesvalueentities-datastream-index"
    },
    {
      "examples": [
        {
          "code": "var response = utils.odm.httpRequest({method: \"GET\", uri: \"http://example.com\", headers: {}}, null);",
          "language": "javascript"
        }
      ],
      "id": "utils.odm.httpRequest",
      "internal": false,
      "kind": "function",
      "name": "httpRequest",
      "namespace": "utils.odm",
      "page": {
        "title": "UTILS JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/utils/",
        "weight": 90
      },
      "params": [
        {
          "description": "Object with requests parameters: 'method', 'uri' and 'headers'.    - 'method': GET, POST, PUT, DELETE.   - 'uri': request uri.   - 'headers': json with http request headers.",
          "name": "request",
          "type": "Object"
        },
        {
          "description": "data to be sent. It can be null.",
          "name": "payload",
          "type": "\\*"
        }
      ],
      "returns": {
        "description": "Object - JSON with response. It will have two fields: 'statusCode' with http result code and 'body' with response body content."
      },
      "signature": "utils.odm.httpRequest(request, payload)",
      "summary": "Executes specified request with specified payload.",
      "url": "api/device_integration/connector_functions/core_javascript_api/utils/#utilsodmhttprequestrequest-payload"
    },
    {
      "examples": [
        {
          "code": "var period = utils.date.period.previousQuarter(1698841200000);//2023-11-01 12:20:00",
          "language": "javascript"
        },
        {
          "code": "{\n    \"initial\": 1698840000000, //2023-11-01 12:00:00:000\n    \"final\": 1698840899000, //2023-11-01 12:14:59:999\n    \"type\": \"previousQuarter\" \n}",
          "language": "json"
        }
      ],
      "id": "utils.date.period.previousQuarter",
      "internal": false,
      "kind": "function",
      "name": "previousQuarter",
      "namespace": "utils.date.period",
      "page": {
        "title": "UTILS JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/utils/",
        "weight": 90
      },
      "params": [
        {
          "description": "reference time in milliseconds",
          "name": "referenceTimeMillis",
          "type": "number"
        }
      ],
      "returns": {
        "description": "return an object with initial and final times of defined period"
      },
      "signature": "utils.date.period.previousQuarter(referenceTimeMillis)",
      "summary": "Calculates previous quarter from specified time in milliseconds.",
      "url": "api/device_integration/connector_functions/core_javascript_api/utils/#utilsdateperiodpreviousquarterreferencetimemillis"
    },
    {
      "examples": [
        {
          "code": "var period = utils.date.period.previousDay(1698841200000);//2023-11-01 12:20:00",
          "language": "javascript"
        },
        {
          "code": "{\n    \"initial\": 1698840000000, //2023-10-31 00:00:00:000\n    \"final\": 1698840899000, //2023-10-31 23:59:59:999\n    \"type\": \"previousDay\" \n}",
          "language": "javascript"
        }
      ],
      "id": "utils.date.period.previousDay",
      "internal": false,
      "kind": "function",
      "name": "previousDay",
      "namespace": "utils.date.period",
      "page": {
        "title": "UTILS JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/utils/",
        "weight": 90
      },
      "params": [
        {
          "description": "reference time in milliseconds",
          "name": "referenceTimeMillis",
          "type": "number"
        }
      ],
      "returns": {
        "description": "return an object with initial and final times of defined period"
      },
      "signature": "utils.date.period.previousDay(referenceTimeMillis)",
      "summary": "Calculates previous day from specified time in milliseconds.",
      "url": "api/device_integration/connector_functions/core_javascript_api/utils/#utilsdateperiodpreviousdayreferencetimemillis"
    },
    {
      "examples": [
        {
          "code": "var period = utils.date.period.previousWeek(1698841200000);//2023-11-01 12:20:00 (Wednesday)",
          "language": "javascript"
        },
        {
          "code": "{\n    \"initial\": 1698840000000, //2023-10-23 00:00:00:000 (Monday)\n    \"final\": 1698840899000, //2023-10-29 23:59:59:999 (Sunday)\n    \"type\": \"previousWeek\" \n}",
          "language": "json"
        }
      ],
      "id": "utils.date.period.previousWeek",
      "internal": false,
      "kind": "function",
      "name": "previousWeek",
      "namespace": "utils.date.period",
      "page": {
        "title": "UTILS JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/utils/",
        "weight": 90
      },
      "params": [
        {
          "description": "reference time in milliseconds",
          "name": "referenceTimeMillis",
          "type": "number"
        }
      ],
      "returns": {
        "description": "return an object with initial and final times of defined period"
      },
      "signature": "utils.date.period.previousWeek(referenceTimeMillis)",
      "summary": "Calculates previous week from specified time in milliseconds.",
      "url": "api/device_integration/connector_functions/core_javascript_api/utils/#utilsdateperiodpreviousweekreferencetimemillis"
    },
    {
      "examples": [
        {
          "code": "var period = utils.date.period.previousMonth(1698841200000);//2023-11-01 12:20:00",
          "language": "javascript"
        },
        {
          "code": "{\n    \"initial\": 1698840000000, //2023-10-01 00:00:00:000\n    \"final\": 1698840899000, //2023-10-31 23:59:59:999\n    \"type\": \"previousMonth\" \n}",
          "language": "json"
        }
      ],
      "id": "utils.date.period.previousMonth",
      "internal": false,
      "kind": "function",
      "name": "previousMonth",
      "namespace": "utils.date.period",
      "page": {
        "title": "UTILS JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/utils/",
        "weight": 90
      },
      "params": [
        {
          "description": "reference time in milliseconds",
          "name": "referenceTimeMillis",
          "type": "number"
        }
      ],
      "returns": {
        "description": "return an object with initial and final times of defined period"
      },
      "signature": "utils.date.period.previousMonth(referenceTimeMillis)",
      "summary": "Calculates previous month from specified time in milliseconds.",
      "url": "api/device_integration/connector_functions/core_javascript_api/utils/#utilsdateperiodpreviousmonthreferencetimemillis"
    },
    {
      "examples": [
        {
          "code": "var period = utils.date.period.customPeriodUtc(\"2011-11-01T14:20:00.000+0100\",\"2011-11-01T14:25:00.000+0100\");",
          "language": "javascript"
        },
        {
          "code": "{\n    \"initial\": 1698844800000, //2011-11-01T13:20:00.000\n    \"final\": 1698845100000, //2011-11-01T13:25:00.000\n    \"type\": \"custom\" \n}",
          "language": "javascript"
        }
      ],
      "id": "utils.date.period.customPeriodUtc",
      "internal": false,
      "kind": "function",
      "name": "customPeriodUtc",
      "namespace": "utils.date.period",
      "page": {
        "title": "UTILS JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/utils/",
        "weight": 90
      },
      "params": [
        {
          "description": "reference time in milliseconds",
          "name": "referenceTimeMillis",
          "type": "number"
        }
      ],
      "returns": {
        "description": "return an object with initial and final times of defined period"
      },
      "signature": "utils.date.period.customPeriodUtc(initialTimeStr, finalTimeStr)",
      "summary": "Calculates specified period in utc times in milliseconds.",
      "url": "api/device_integration/connector_functions/core_javascript_api/utils/#utilsdateperiodcustomperiodutcinitialtimestr-finaltimestr"
    },
    {
      "examples": [
        {
          "code": "var period = utils.date.period.lastMinutes(15, 1698841200000);//2023-11-01 12:20:00",
          "language": "javascript"
        },
        {
          "code": "{\n    \"initial\": 1698840000000, //2023-11-01 12:05:00:000\n    \"final\": 1698841200000, //2023-11-01 12:20:00:000\n    \"type\": \"lastMinutes\" \n}",
          "language": "json"
        }
      ],
      "id": "utils.date.period.lastMinutes",
      "internal": false,
      "kind": "function",
      "name": "lastMinutes",
      "namespace": "utils.date.period",
      "page": {
        "title": "UTILS JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/utils/",
        "weight": 90
      },
      "params": [
        {
          "description": "number of minutes of period",
          "name": "minutes",
          "type": "number"
        },
        {
          "description": "reference time in milliseconds",
          "name": "referenceTimeMillis",
          "type": "number"
        }
      ],
      "returns": {
        "description": "return an object with initial and final times of defined period"
      },
      "signature": "utils.date.period.lastMinutes(minutes, referenceTimeMillis)",
      "summary": "Calculates a period of defined minutes until reference time. If referenceTimeMillis is not defined, current time will be used as reference",
      "url": "api/device_integration/connector_functions/core_javascript_api/utils/#utilsdateperiodlastminutesminutes-referencetimemillis"
    },
    {
      "examples": [
        {
          "code": "var period = utils.date.period.lastHours(24, 1698841200000);//2023-11-01 12:20:00",
          "language": "javascript"
        },
        {
          "code": "{\n    \"initial\": 1698840000000, //2023-10-31 12:20:00:000\n    \"final\": 1698841200000, //2023-11-01 12:20:00:000\n    \"type\": \"lastHours\" \n}",
          "language": "javascript"
        }
      ],
      "id": "utils.date.period.lastHours",
      "internal": false,
      "kind": "function",
      "name": "lastHours",
      "namespace": "utils.date.period",
      "page": {
        "title": "UTILS JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/utils/",
        "weight": 90
      },
      "params": [
        {
          "description": "number of hours of period",
          "name": "hours",
          "type": "number"
        },
        {
          "description": "reference time in milliseconds",
          "name": "referenceTimeMillis",
          "type": "number"
        }
      ],
      "returns": {
        "description": "return an object with initial and final times of defined period"
      },
      "signature": "utils.date.period.lastHours(hours, referenceTimeMillis)",
      "summary": "Calculates a period of defined hours until reference time. If referenceTimeMillis is not defined, current time will be used as reference",
      "url": "api/device_integration/connector_functions/core_javascript_api/utils/#utilsdateperiodlasthourshours-referencetimemillis"
    },
    {
      "examples": [
        {
          "code": "var period = utils.date.period.lastDays(7, 1698841200000);//2023-11-01 12:20:00",
          "language": "javascript"
        },
        {
          "code": "{\n    \"initial\": 1698840000000, //2023-10-25 12:20:00:000\n    \"final\": 1698841200000, //2023-11-01 12:20:00:000\n    \"type\": \"lastDays\" \n}",
          "language": "javascript"
        }
      ],
      "id": "utils.date.period.lastDays",
      "internal": false,
      "kind": "function",
      "name": "lastDays",
      "namespace": "utils.date.period",
      "page": {
        "title": "UTILS JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/utils/",
        "weight": 90
      },
      "params": [
        {
          "description": "number of hours of period",
          "name": "days",
          "type": "number"
        },
        {
          "description": "reference time in milliseconds",
          "name": "referenceTimeMillis",
          "type": "number"
        }
      ],
      "returns": {
        "description": "return an object with initial and final times of defined period"
      },
      "signature": "utils.date.period.lastDays(days, referenceTimeMillis)",
      "summary": "Calculates a period of defined days until reference time. If referenceTimeMillis is not defined, current time will be used as reference",
      "url": "api/device_integration/connector_functions/core_javascript_api/utils/#utilsdateperiodlastdaysdays-referencetimemillis"
    },
    {
      "examples": [
        {
          "code": "var bytes = utils.bytes.fromHexString(\"09 4A 48\")",
          "language": "javascript"
        },
        {
          "code": "[09, 74, 72]",
          "language": "json"
        }
      ],
      "id": "utils.bytes.fromHexString",
      "internal": false,
      "kind": "function",
      "name": "fromHexString",
      "namespace": "utils.bytes",
      "page": {
        "title": "UTILS JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/utils/",
        "weight": 90
      },
      "params": [
        {
          "description": "String in hexadecimal format",
          "name": "hexString",
          "type": "\u003ccode\u003estring\u003c/code\u003e"
        }
      ],
      "returns": {
        "description": "return an \u003ccode\u003eUint8Array\u003c/code\u003e object equivalent to de hexadecimal String"
      },
      "signature": "utils.bytes.fromHexString(hexString)",
      "summary": "It will return:",
      "url": "api/device_integration/connector_functions/core_javascript_api/utils/#utilsbytesfromhexstringhexstring"
    },
    {
      "examples": [
        {
          "code": "var hexStr = utils.bytes.toHexString([09, 74, 72])",
          "language": "javascript"
        },
        {
          "code": "\"094A48\"",
          "language": "json"
        }
      ],
      "id": "utils.bytes.toHexString",
      "internal": false,
      "kind": "function",
      "name": "toHexString",
      "namespace": "utils.bytes",
      "page": {
        "title": "UTILS JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/utils/",
        "weight": 90
      },
      "params": [
        {
          "description": "hexadecimal string representation",
          "name": "array",
          "type": "\u003ccode\u003eArray of bytes\u003c/code\u003e"
        }
      ],
      "returns": {
        "description": "return the hexadecimal string representation."
      },
      "signature": "utils.bytes.toHexString(array)",
      "summary": "It will return:",
      "url": "api/device_integration/connector_functions/core_javascript_api/utils/#utilsbytestohexstringarray"
    },
    {
      "examples": [
        {
          "code": "var bytes = utils.bytes.fromText(\"Hello!\")",
          "language": "javascript"
        },
        {
          "code": "[72, 101, 108, 108, 111, 33]",
          "language": "json"
        }
      ],
      "id": "utils.bytes.fromText",
      "internal": false,
      "kind": "function",
      "name": "fromText",
      "namespace": "utils.bytes",
      "page": {
        "title": "UTILS JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/utils/",
        "weight": 90
      },
      "params": [
        {
          "description": "any text",
          "name": "str",
          "type": "\u003ccode\u003estring\u003c/code\u003e"
        }
      ],
      "returns": {
        "description": "return the \u003ccode\u003eUint8Array\u003c/code\u003e representation of the string with UTF encoding."
      },
      "signature": "utils.bytes.fromText(str)",
      "summary": "It will return:",
      "url": "api/device_integration/connector_functions/core_javascript_api/utils/#utilsbytesfromtextstr"
    },
    {
      "examples": [
        {
          "code": "var text = utils.bytes.toText([72, 101, 108, 108, 111, 33])",
          "language": "javascript"
        },
        {
          "code": "\"Hello!\"",
          "language": "json"
        }
      ],
      "id": "utils.bytes.toText",
      "internal": false,
      "kind": "function",
      "name": "toText",
      "namespace": "utils.bytes",
      "page": {
        "title": "UTILS JavaScript API",
        "url": "api/device_integration/connector_functions/core_javascript_api/utils/",
        "weight": 90
      },
      "params": [
        {
          "description": "bytes representing a text in UTF",
          "name": "bytes",
          "type": "\u003ccode\u003eArray of bytes\u003c/code\u003e"
        }
      ],
      "returns": {
        "description": "return the \u003ccode\u003estring\u003c/code\u003e representation of array of bytes in UTF."
      },
      "signature": "utils.bytes.toText(bytes)",
      "summary": "It will return:",
      "url": "api/device_integration/connector_functions/core_javascript_api/utils/#utilsbytestotextbytes"
    },
    {
      "examples": [
        {
          "code": "var key128 = utils.bytes.fromText('012345678902345a'); /* 128 bits for AES-128 */\nvar ivParam = utils.bytes.fromText('0123456789023452');\n\nvar inputData = [104, 111, 108, 97, 32, 99, 97, 114, 97, 108, 99, 111, 108, 52, 53, 54];\nvar encriptedData = crypt.aes.encrypt(\"AES/CBC/NoPadding\", key128, ivParam, inputData); \n\nlog(encriptedData) // Expected output: [178,19,136,33,80,100,25,183,126,178,19,125,139,24,212,253]",
          "language": "javascript"
        }
      ],
      "id": "crypt.aes.encrypt",
      "internal": false,
      "kind": "function",
      "name": "encrypt",
      "namespace": "crypt.aes",
      "page": {
        "title": "Cryptography API",
        "url": "api/device_integration/connector_functions/core_javascript_api/cryptography/",
        "weight": 100
      },
      "params": [
        {
          "description": "algorithm identifier, as required in java `javax.crypto.Cipher.getInstance(algorithm)`. For example: `AES/CBC/PKCS5Padding`",
          "name": "algorithm",
          "type": "\u003ccode\u003estring\u003c/code\u003e"
        },
        {
          "description": "key used to encrypt the data. In `AES` algorithms. The key size must match the selected algorithm. For example, AES algorithms support keys of 16 bytes (`AES-128`), 24 bytes (`AES-192`), or 32 bytes (`AES-256`).",
          "name": "key",
          "type": "\u003ccode\u003eUint8Array\u003c/code\u003e"
        },
        {
          "description": "Initialization vector (IV) used in encryption. Only allowed or required depending on the selected algorithm.",
          "name": "ivParam",
          "type": "\u003ccode\u003eUint8Array\u003c/code\u003e"
        },
        {
          "description": "data to be encoded",
          "name": "data",
          "type": "\u003ccode\u003eUint8Array\u003c/code\u003e"
        }
      ],
      "returns": {
        "description": "\u003ccode\u003eUint8Array\u003c/code\u003e"
      },
      "signature": "crypt.aes.encrypt(algorithm, key, ivParameterSpec, data)",
      "summary": "Encrypt the data using the selected AES algorithm with the provided shared key.",
      "url": "api/device_integration/connector_functions/core_javascript_api/cryptography/#cryptaesencryptalgorithm-key-ivparameterspec-data"
    },
    {
      "examples": [
        {
          "code": "var key128 = utils.bytes.fromText('012345678902345a'); /* 128 bits for AES-128 */\nvar ivParam = utils.bytes.fromText('0123456789023452');\n\nvar inputEncrypted = [178,19,136,33,80,100,25,183,126,178,19,125,139,24,212,253]\nvar data = crypt.aes.decrypt(\"AES/CBC/NoPadding\", key128, ivParam, inputEncrypted);\n\nlog(data) // Expected output: [104, 111, 108, 97, 32, 99, 97, 114, 97, 108, 99, 111, 108, 52, 53, 54] \n",
          "language": "javascript"
        }
      ],
      "id": "crypt.aes.decrypt",
      "internal": false,
      "kind": "function",
      "name": "decrypt",
      "namespace": "crypt.aes",
      "page": {
        "title": "Cryptography API",
        "url": "api/device_integration/connector_functions/core_javascript_api/cryptography/",
        "weight": 100
      },
      "params": [
        {
          "description": "algorithm identifier, as required in java `javax.crypto.Cipher.getInstance(algorithm)`. For example: `AES/CBC/PKCS5Padding`",
          "name": "algorithm",
          "type": "\u003ccode\u003estring\u003c/code\u003e"
        },
        {
          "description": "key used to decrypt the data. In `AES` algorithms. The key size must match the selected algorithm. For example, AES algorithms support keys of 16 bytes (`AES-128`), 24 bytes (`AES-192`), or 32 bytes (`AES-256`).",
          "name": "key",
          "type": "\u003ccode\u003eUint8Array\u003c/code\u003e"
        },
        {
          "description": "Initialization vector (IV) used in encryption. Only allowed or required depending on the selected algorithm.",
          "name": "ivParam",
          "type": "\u003ccode\u003eUint8Array\u003c/code\u003e"
        },
        {
          "description": "encoded data to be decrypted",
          "name": "data",
          "type": "\u003ccode\u003eUint8Array\u003c/code\u003e"
        }
      ],
      "returns": {
        "description": "\u003ccode\u003eUint8Array\u003c/code\u003e"
      },
      "signature": "crypt.aes.decrypt(algorithm, key, ivParameterSpec, data)",
      "summary": "Decrypt the data using the selected AES algorithm with the provided shared key.",
      "url": "api/device_integration/connector_functions/core_javascript_api/cryptography/#cryptaesdecryptalgorithm-key-ivparameterspec-data"
    },
    {
      "examples": [
        {
          "code": "var hashResult = crypt.hmac.sha256(\"Some data to be hashed\", \"hashingKey\");\nlog(hashResult) \n/* Expected output: \n{\n \"error\": null,\n \"result\": [-56, -6, 82, -104, -74, -100, -103, 112, 80, -89, -61, 85, -63, 58, -102, -54, -68, 15, 70, 60, 44, 85, 110, -100, -108, -95, -48, -3, 8, -25, 33, -4]\n}\n*/",
          "language": "javascript"
        }
      ],
      "id": "crypt.hmac.sha256",
      "internal": false,
      "kind": "function",
      "name": "sha256",
      "namespace": "crypt.hmac",
      "page": {
        "title": "Cryptography API",
        "url": "api/device_integration/connector_functions/core_javascript_api/cryptography/",
        "weight": 100
      },
      "params": [
        {
          "description": "Data to be hashed",
          "name": "data",
          "type": "\u003ccode\u003estring\u003c/code\u003e"
        },
        {
          "description": "key to be used for hashing",
          "name": "key",
          "type": "\u003ccode\u003eUint8Array\u003c/code\u003e"
        }
      ],
      "returns": {
        "description": "\u003ccode\u003eObject\u003c/code\u003e"
      },
      "signature": "crypt.hmac.sha256(data, key)",
      "summary": "Create a hash from provided string using sha256.",
      "url": "api/device_integration/connector_functions/core_javascript_api/cryptography/#crypthmacsha256data-key"
    },
    {
      "examples": [
        {
          "code": "var hashResult = crypt.hmac.sha512(\"Some data to be hashed\", \"hashingKey\");\nlog(hashResult) ;\n/* Expected output: \n{\n \"error\": null,\n \"result\": [-102, 54, -66, -103, -25, 112, 1, 118, -65, 122, -22, 27, 88, 106, -54, 122, -11, -109, -63, 99, -127, -23, -15, -43, 28, 109, -22, -65, 25, 45, -85, 9, 39, 44, 39, 75, -95, -47, -61, -103, 101, -80, -62, -35, -102, 74, -76, 45, 94, -7, -35, 8, -80, -80, -65, -103, 127, 104, 75, -65, -89, 111, -34, 109]\n}\n*/",
          "language": "javascript"
        }
      ],
      "id": "crypt.hmac.sha512",
      "internal": false,
      "kind": "function",
      "name": "sha512",
      "namespace": "crypt.hmac",
      "page": {
        "title": "Cryptography API",
        "url": "api/device_integration/connector_functions/core_javascript_api/cryptography/",
        "weight": 100
      },
      "params": [
        {
          "description": "Data to be hashed",
          "name": "data",
          "type": "\u003ccode\u003estring\u003c/code\u003e"
        },
        {
          "description": "key to be used for hashing",
          "name": "key",
          "type": "\u003ccode\u003eUint8Array\u003c/code\u003e"
        }
      ],
      "returns": {
        "description": "\u003ccode\u003eObject\u003c/code\u003e"
      },
      "signature": "crypt.hmac.sha512(data, key)",
      "summary": "Create a hash from provided string using sha512.",
      "url": "api/device_integration/connector_functions/core_javascript_api/cryptography/#crypthmacsha512data-key"
    },
    {
      "examples": [
        {
          "code": "// Example for get\nsnmp.addOid('1.3.6.1.4.1.2007.4.1.2.2.2.18.3.2.1.10.3');\nsnmp.get()\n\n//Example for set\nsnmp.addOid('1.0.1.4.5.123456.1.6', 'INTEGER', '3');\nsnmp.set()",
          "language": "javascript"
        }
      ],
      "id": "snmp.addOid",
      "internal": false,
      "kind": "function",
      "name": "addOid",
      "namespace": "snmp",
      "page": {
        "title": "SNMP JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/snmp/",
        "weight": 100
      },
      "params": [
        {
          "description": "OID to add.",
          "name": "oid",
          "type": "string"
        },
        {
          "description": "Type of the value.",
          "name": "type",
          "type": "string"
        },
        {
          "description": "Value to set.",
          "name": "value",
          "type": "string"
        }
      ],
      "signature": "snmp.addOid()",
      "summary": "Adds an OID to the list of OIDs to be retrieved/setted.",
      "url": "api/device_integration/connector_functions/protocol_apis/snmp/#snmpaddoid"
    },
    {
      "examples": [
        {
          "code": "snmp.addOid('1.3.6.1.4.1.2007.4.1.2.2.2.18.3.2.1.10.3');\nsnmp.addOid('1.3.6.1.4.1.2007.4.1.2.2.2.18.3.2.1.11.3');\nsnmp.get();",
          "language": "javascript"
        }
      ],
      "id": "snmp.get",
      "internal": false,
      "kind": "function",
      "name": "get",
      "namespace": "snmp",
      "page": {
        "title": "SNMP JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/snmp/",
        "weight": 100
      },
      "returns": {
        "description": "String - A JSON with response. This JSON will have two fields: 'result' of the get operation and 'data' with response of the device."
      },
      "signature": "snmp.get()",
      "summary": "Executes a multi SNMP get attribute request with specified payload. You must have previously given value to the properties snmp.ip, snmp.port (161 by default), snmp.community (in case of snmp version 1), snmp.version (3 by default), snmp.retries (3 by default), snmp.timeout (5000 by default) and security info in case of snmpv3 version (snmp.securityName, snmp.authentication, snmp.privacy, snmp.authPassphrase and snmp.privPassphrase).",
      "url": "api/device_integration/connector_functions/protocol_apis/snmp/#snmpget"
    },
    {
      "examples": [
        {
          "code": "snmp.addOid('1.0.1.4.5.123456.1.5', 'OCTET_STRING', params.variableList[0].value);\nsnmp.addOid('1.0.1.4.5.123456.1.6', 'INTEGER', '3');\nsnmp.set();",
          "language": "javascript"
        },
        {
          "code": "{\n  \"result\": {\n    \"code\": \"SUCCESSFUL\",\n    \"description\": \"Operation executed successfully\"\n  },\n  \"data\": {\n    \"oid\":\"value\",\n    \"oid1\":\"value1\",\n    ....\n    \"oidN\":\"valueN\"\n  }\n}",
          "language": "json"
        },
        {
          "code": "{\n  \"result\": {\n    \"code\": \"ERROR_PROCESSING\",\n    \"description\": \"Error getting data\"\n  },\n  \"data\": {}\n}",
          "language": "json"
        }
      ],
      "id": "snmp.set",
      "internal": false,
      "kind": "function",
      "name": "set",
      "namespace": "snmp",
      "page": {
        "title": "SNMP JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/snmp/",
        "weight": 100
      },
      "returns": {
        "description": "String - A JSON with response. This JSON will have two fields: 'result' of the get operation and 'data' with response of the device. This 'data' contains pairs of (oid, value)."
      },
      "signature": "snmp.set()",
      "summary": "Executes a multi SNMP set attribute request with specified payload. You must have previously given value to the properties snmp.ip, snmp.port (161 by default), snmp.community (in case of snmp version 1), snmp.version (3 by default), snmp.retries (3 by default), snmp.timeout (5000 by default) and security info in case of snmpv3 version (snmp.securityName, snmp.authentication, snmp.privacy, snmp.authPassphrase and snmp.privPassphrase).",
      "url": "api/device_integration/connector_functions/protocol_apis/snmp/#snmpset"
    },
    {
      "examples": [
        {
          "code": "ssh.ip = \"[IP_ADDRESS]\";\nssh.port = 22;\nssh.user = \"sshuser\";\nssh.password = \"password\";\n\n// this example shows how to connect to an SSH server and wait for the \"Connection established\" string.\nvar connectResult = ssh.connect([\"Connection established\"]);\n\nif (connectResult.result) {\n    // Connection was successful\n} else {\n    // Connection failed\n}",
          "language": "javascript"
        }
      ],
      "id": "ssh.connect",
      "internal": false,
      "kind": "function",
      "name": "connect",
      "namespace": "ssh",
      "page": {
        "title": "SSH JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/ssh/",
        "weight": 110
      },
      "params": [
        {
          "description": "Strings to wait for in the response.",
          "name": "waitFor",
          "type": "List"
        }
      ],
      "signature": "ssh.connect(waitFor)",
      "summary": "Establish a connection with the SSH server.",
      "url": "api/device_integration/connector_functions/protocol_apis/ssh/#sshconnectwaitfor"
    },
    {
      "examples": [
        {
          "code": "// this example shows how to send a command to an SSH server and wait for the \"/home/sshuser\" string.\nvar sendResult = ssh.send(\"ls -la\", \"*\", [\"/home/sshuser\"]);",
          "language": "javascript"
        }
      ],
      "id": "ssh.send",
      "internal": false,
      "kind": "function",
      "name": "send",
      "namespace": "ssh",
      "page": {
        "title": "SSH JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/ssh/",
        "weight": 110
      },
      "params": [
        {
          "description": "Command to send to the SSH server.",
          "name": "command",
          "type": "string"
        },
        {
          "description": "Pattern to extract response from sent command.",
          "name": "pattern",
          "type": "string"
        },
        {
          "description": "Strings to wait for in the response.",
          "name": "waitFor",
          "type": "List"
        }
      ],
      "signature": "ssh.send(command, pattern, waitFor)",
      "summary": "Sends a command to the SSH server and waits for the response.",
      "url": "api/device_integration/connector_functions/protocol_apis/ssh/#sshsendcommand-pattern-waitfor"
    },
    {
      "examples": [
        {
          "code": "ssh.disconnect();",
          "language": "javascript"
        }
      ],
      "id": "ssh.disconnect",
      "internal": false,
      "kind": "function",
      "name": "disconnect",
      "namespace": "ssh",
      "page": {
        "title": "SSH JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/ssh/",
        "weight": 110
      },
      "signature": "ssh.disconnect()",
      "summary": "Disconnects from the SSH server.",
      "url": "api/device_integration/connector_functions/protocol_apis/ssh/#sshdisconnect"
    },
    {
      "examples": [
        {
          "code": "telnet.ip = \"[IP_ADDRESS]\";\ntelnet.port = 23;\n\nvar connectResult = telnet.connect(\"\u003e\");\n\nif (connectResult.result) {\n    // Connection was successful\n} else {\n    // Connection failed\n}",
          "language": "javascript"
        }
      ],
      "id": "telnet.connect",
      "internal": false,
      "kind": "function",
      "name": "connect",
      "namespace": "telnet",
      "page": {
        "title": "Telnet Javascript API",
        "url": "api/device_integration/connector_functions/protocol_apis/telnet/",
        "weight": 120
      },
      "params": [
        {
          "description": "String to wait for in the response.",
          "name": "waitFor",
          "type": "string"
        }
      ],
      "signature": "telnet.connect (waitFor)",
      "summary": "Connects to the Telnet server using the properties of the Telnet object and the specified parameters.",
      "url": "api/device_integration/connector_functions/protocol_apis/telnet/#telnetconnect-waitfor"
    },
    {
      "examples": [
        {
          "code": "var sendResult = telnet.send(\"ls -la\", \"*\", \"\u003e\");",
          "language": "javascript"
        }
      ],
      "id": "telnet.send",
      "internal": false,
      "kind": "function",
      "name": "send",
      "namespace": "telnet",
      "page": {
        "title": "Telnet Javascript API",
        "url": "api/device_integration/connector_functions/protocol_apis/telnet/",
        "weight": 120
      },
      "params": [
        {
          "description": "Command to send to the Telnet server.",
          "name": "command",
          "type": "string"
        },
        {
          "description": "String to pattern match in the response. In RegExp format.",
          "name": "pattern",
          "type": "string"
        },
        {
          "description": "String to wait for in the response. If not specified, the default is `\u003e`.",
          "name": "waitFor",
          "type": "string"
        }
      ],
      "signature": "telnet.send (command, pattern, waitFor)",
      "summary": "Sends a command to the Telnet server and waits for the response with the specified parameters:",
      "url": "api/device_integration/connector_functions/protocol_apis/telnet/#telnetsend-command-pattern-waitfor"
    },
    {
      "examples": [
        {
          "code": "telnet.disconnect();",
          "language": "javascript"
        }
      ],
      "id": "telnet.disconnect",
      "internal": false,
      "kind": "function",
      "name": "disconnect",
      "namespace": "telnet",
      "page": {
        "title": "Telnet Javascript API",
        "url": "api/device_integration/connector_functions/protocol_apis/telnet/",
        "weight": 120
      },
      "signature": "telnet.disconnect ()",
      "summary": "Disconnects from the Telnet server.",
      "url": "api/device_integration/connector_functions/protocol_apis/telnet/#telnetdisconnect-"
    },
    {
      "examples": [
        {
          "code": "icmp.ip = \"10.10.10.174\";\nicmp.send();",
          "language": "javascript"
        },
        {
          "code": "{\n  \"result\": \"OK\",\n  \"datastreams\": [\n    {\n        \"id\":\"device.communicationModules[].subscription.address\",\n        \"datapoints\":[\n            {\n                \"value\":{\n                    \"value\": \"10.10.10.174\"\n                }\n            }\n        ]\n    },\n    {\n        \"id\":\"device.communicationModules[].subscription.presence.ip\",\n        \"datapoints\":[\n            {\n                \"value\": \"OK\"\n            }\n        ]\n    },\n    {\n        \"id\":\"device.communicationModules[].subscription.presence.ipRtt\",\n        \"datapoints\":[\n            {\n                \"value\": 6\n            }\n        ]\n    }\n  ]\n}",
          "language": "json"
        },
        {
          "code": "{\n  \"result\": \"NOK\",\n  \"deviceId\": \"deviceId\",\n  \"datastreams\": [\n    {\n      \"datastreamId\": \"collected.device.communicationModules.subscription.address\",\n      \"value\": \"172.19.18.95\"\n    },\n    {\n      \"datastreamId\": \"collected.device.communicationModules.subscription.presence.ip\",\n      \"value\": \"NOK\"\n    }\n  ]\n}",
          "language": "json"
        }
      ],
      "id": "icmp.send",
      "internal": false,
      "kind": "function",
      "name": "send",
      "namespace": "icmp",
      "page": {
        "title": "ICMP JavaScript API",
        "url": "api/device_integration/connector_functions/protocol_apis/icmp/",
        "weight": 130
      },
      "signature": "icmp.send()",
      "summary": "Send PING using the properties of the icmp object:",
      "url": "api/device_integration/connector_functions/protocol_apis/icmp/#icmpsend"
    }
  ],
  "generatedAt": "2026-08-17T11:35:12Z",
  "internal": false,
  "platformVersion": "20.5.1-SNAPSHOT",
  "schemaVersion": "1.0"
}