使用 azure C sdk,可以使用Map_AddOrUpdate(propMap, "propKey", propText)
. 有没有类似的东西?我在用着
const Protocol = require('azure-iot-device-mqtt').Mqtt;
const Client = require('azure-iot-device').Client;
const Message = require('azure-iot-device').Message;
client = Client.fromConnectionString(deviceConnectionString, Protocol);
// misc code
return new Promise( (resolve,reject) => {
client.sendEvent(message,(err,res) => {
if ( err ) {
logger.error(TAG,'Failed to send message: ', err.toString())
reject(err)
}
if (res) logger.info(TAG,'Send status: ' + res.constructor.name);
resolve(res)
})
})
我无法在客户端界面中找到任何允许我设置信封属性的内容。