场景
使用HongDian DTU后需要在原本发送的逻辑前先发送HongDian规定的内容
实现代码
DTU组件接口:
1 | namespace DesignPatterns.Decorator |
标准DTU组件实现:
1 | namespace DesignPatterns.Decorator |
宏电DTU组件实现:
1 | namespace DesignPatterns.Decorator |
相关调用
1 | IDtuComponent standDtu = new StandDtuComponent(); |
Out:1
2发送宏电Dtu数据
发送透明DTU数据