Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ jspm_packages

# Optional REPL history
.node_repl_history

.idea
18 changes: 10 additions & 8 deletions methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const NAMESPACES = {
"soap-env": "http://schemas.xmlsoap.org/soap/envelope/",
"xsd": "http://www.w3.org/2001/XMLSchema",
"xsi": "http://www.w3.org/2001/XMLSchema-instance",
"cwmp": "urn:dslforum-org:cwmp-1-0"
"cwmp": "urn:dslforum-org:cwmp-1-2"
};

const INFORM_PARAMS = [
Expand Down Expand Up @@ -149,13 +149,15 @@ function GetParameterValues(device, xmlIn, xmlOut, callback) {

for (let p of parameterNames) {
let name = p.text();
let value = device[name][1];
let type = device[name][2];
let valueStruct = parameterList.node("ParameterValueStruct");
valueStruct.node("Name", name);
valueStruct.node("Value", device[name][1]).attr({
"xsi:type": type
});
if(device[name]){
let value = device[name][1];
let type = device[name][2];
let valueStruct = parameterList.node("ParameterValueStruct");
valueStruct.node("Name", name);
valueStruct.node("Value", device[name][1]).attr({
"xsi:type": type
});
}
}

return callback(xmlOut);
Expand Down
2 changes: 1 addition & 1 deletion simulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const NAMESPACES = {
"soap-env": "http://schemas.xmlsoap.org/soap/envelope/",
"xsd": "http://www.w3.org/2001/XMLSchema",
"xsi": "http://www.w3.org/2001/XMLSchema-instance",
"cwmp": "urn:dslforum-org:cwmp-1-0"
"cwmp": "urn:dslforum-org:cwmp-1-2"
};

let nextInformTimeout = null;
Expand Down