Fiware Orion:发现 httpCustom 通知中的属性
Fiware Orion: Discover attributes in httpCustom notifications
Orion 允许使用模板负载创建订阅:
subject: {
entities: [{ idPattern: "*"}]
}
httpCustom: {
payload: "The temperature is ${temperature} degrees"
}
但是因为我可以在传感器模式上创建订阅,
我不一定知道有效载荷中的属性名称...我怎么能发现它们?
您需要知道属性名称才能使用宏包含它们,例如${temperature}
。
请注意,自定义通知被设计为一种易于使用的机制来执行简单的替换(但功能强大以涵盖许多 third-party 集成案例),而不是一种完整的模板语言,包括循环、关联映射等(至少目前是这样;)
Orion 允许使用模板负载创建订阅:
subject: {
entities: [{ idPattern: "*"}]
}
httpCustom: {
payload: "The temperature is ${temperature} degrees"
}
但是因为我可以在传感器模式上创建订阅, 我不一定知道有效载荷中的属性名称...我怎么能发现它们?
您需要知道属性名称才能使用宏包含它们,例如${temperature}
。
请注意,自定义通知被设计为一种易于使用的机制来执行简单的替换(但功能强大以涵盖许多 third-party 集成案例),而不是一种完整的模板语言,包括循环、关联映射等(至少目前是这样;)