【发布时间】:2012-04-13 07:47:33
【问题描述】:
我正在使用node-smpp,想知道如何发送“deliver_sm”请求并将“TLV”响应添加到 user_message_reference。
node-smpp / lib / smpp.js 的摘录:
exports.addTLV = function(tag, options) {
options.tag = tag;
defs.tlvs[tlv] = options;
defs.tlvsById[options.id] = options;
};
测试代码:
var tlv = new Object();
tlv.tag = 0x001E; // smpp.receipted_message_id;
tlv.lenght = msgid.lenght;
tlv.value = msgid;
smpp.addTLV(tlv,tlv);
结果:
defs.tlvs[tlv] = options;
^
ReferenceError: tlv is not defined
【问题讨论】:
-
SMPP 是模块名吗?还有 TLV 是什么意思?
-
TLV = Type-length-value 添加到与 ASN.1 格式协议通用的 PDU 的参数。见en.wikipedia.org/wiki/Type-length-value