| | |
| | | public abstract class BaseInvokeSyncService implements IInvoke, IBaseTopic, ICustomizeTopic { |
| | | |
| | | /** |
| | | * 获取产品吗 |
| | | * |
| | | * @return 产品吗 |
| | | */ |
| | | public abstract String getProductKey(); |
| | | |
| | | /** |
| | | * 发送rrpc 请求 |
| | | * |
| | | * @param deviceName 设备名 |
| | | * @param iRequestFrame 编码帧 |
| | | * @return 返回的解码帧实体类 |
| | | */ |
| | | public abstract CommonFrame sendRRPC(String deviceName, IRequestFrame iRequestFrame); |
| | | |
| | | /** |
| | | * 发送rrpc 请求 |
| | | * |
| | | * @param deviceName 设备名 |
| | |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public InvokeThingServiceResponse.Data invokeThing(String deviceName, InvokeParam param) { |
| | | /** |
| | | * 调用自定义topic |
| | | * https://help.aliyun.com/document_detail/69584.htm?spm=a2c4g.11186623.0.0.25b33982bSQSom#reference-snk-mrz-wdb |
| | | * |
| | | * @param deviceName 设备名 |
| | | * @param param 参数 |
| | | * @return 设备返回的结果 |
| | | */ |
| | | protected InvokeThingServiceResponse.Data invokeThing(String deviceName, InvokeParam param) { |
| | | // 填充服务调用的参数 |
| | | InvokeThingServiceRequest request = new InvokeThingServiceRequest(); |
| | | // 设备证书之productKey |