Concatenated Connector Functions API

Concatenated connector functions JS API guide

This file provides methods to build concatenated function executions. These methods belong to cf global object.

JS API

response(responseFunctionCriteria, responsePayload)

Sets a call for a RESPONSE connector function if there is one which matches the south criterias indicated in responseFunctionCriteria’s value setting the in payload with responsePayload’s value.

Kind: global function
Returns: Void

Param Type Description
responseFunctionCriteria string The south criteria that will be used to find a RESPONSE connector function.
responsePayload any 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.

Example of use:

var resp = {
    'result': {
        'code': 'SUCCESSFUL',
        'description': 'Operation finished successful'
    },
    'data': {}
};

cf.response('snmps://1.0.1.4.5.123456.1.7', resp);

collection(collectionFunctionCriteria, collectionPayload)

Sets a call for a COLLECTION connector function if there is one which matches the south criterias indicated in collectionFunctionCriteria’s value setting the in payload with collectionPayload’s value.

Kind: global function
Returns: Void

Param Type Description
collectionFunctionCriteria string The south criteria that will be used to find a COLLECTION connector function.
collectionPayload any 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.

Example of use:

var colMsg = {
    '1.0.1.4.5.123456.1.7.1': 'device name',
    '1.0.1.4.5.123456.1.7.2': 'device description',
};

cf.collection('snmps://1.0.1.4.5.123456.1.7', colMsg);