function AzureIoTDevice(config) {
        // Store node for further use
        var node = this;
        node.deviceid = config.deviceid;
        node.pnpModelid = config.pnpModelid;
        node.connectiontype = config.connectiontype;
        node.authenticationmethod = config.authenticationmethod;
        node.enrollmenttype = config.enrollmenttype;
        node.iothub = config.iothub;
        node.isIotcentral = config.isIotcentral;
        node.scopeid = config.scopeid;
        node.saskey = config.saskey;
        node.protocol = config.protocol;
        node.methods = config.methods;
        node.DPSpayload = config.DPSpayload;
        node.gatewayHostname = config.gatewayHostname;
        node.cert = config.cert;
        node.key = config.key;
        node.ca = config.ca;

        // Create the Node-RED node
        RED.nodes.createNode(node, config);
        setStatus(node, statusEnum.disconnected);

        // Create the device
        initiateDeviceSettings(node);
    }
// Setup node-red node to represent Azure IoT Device
Setup node-red node to represent Azure IoT Device
Setup node - red node to represent Azure IoT Device
function AzureIoTDevice(config) {
        var node = this;
        node.deviceid = config.deviceid;
        node.pnpModelid = config.pnpModelid;
        node.connectiontype = config.connectiontype;
        node.authenticationmethod = config.authenticationmethod;
        node.enrollmenttype = config.enrollmenttype;
        node.iothub = config.iothub;
        node.isIotcentral = config.isIotcentral;
        node.scopeid = config.scopeid;
        node.saskey = config.saskey;
        node.protocol = config.protocol;
        node.methods = config.methods;
        node.DPSpayload = config.DPSpayload;
        node.gatewayHostname = config.gatewayHostname;
        node.cert = config.cert;
        node.key = config.key;
        node.ca = config.ca;
        RED.nodes.createNode(node, config);
        setStatus(node, statusEnum.disconnected);
        initiateDeviceSettings(node);
    }
function AzureIoTDevice ( config ) { var node = this ; node . deviceid = config . deviceid ; node . pnpModelid = config . pnpModelid ; node . connectiontype = config . connectiontype ; node . authenticationmethod = config . authenticationmethod ; node . enrollmenttype = config . enrollmenttype ; node . iothub = config . iothub ; node . isIotcentral = config . isIotcentral ; node . scopeid = config . scopeid ; node . saskey = config . saskey ; node . protocol = config . protocol ; node . methods = config . methods ; node . DPSpayload = config . DPSpayload ; node . gatewayHostname = config . gatewayHostname ; node . cert = config . cert ; node . key = config . key ; node . ca = config . ca ; RED . nodes . createNode ( node , config ) ; setStatus ( node , statusEnum . disconnected ) ; initiateDeviceSettings ( node ) ; }
Setup node-red node to represent Azure IoT Device
Setup node - red node to represent Azure IoT Device
// Store node for further use // Create the Node-RED node // Create the device