| | |
| | | import com.sandu.ximon.admin.config.RealtimeServerBean; |
| | | import com.sandu.ximon.admin.service.PoleLightemitService; |
| | | import com.sandu.ximon.admin.utils.request.*; |
| | | import com.sandu.ximon.dao.domain.PoleLightemitEntity; |
| | | import com.squareup.okhttp.*; |
| | | import org.apache.commons.lang.StringEscapeUtils; |
| | | import org.apache.commons.lang.StringUtils; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 发送最新的数据 |
| | | * @param lightemitControlCode |
| | | */ |
| | | public void sendLastCommand(String lightemitControlCode) { |
| | | PoleLightemitEntity poleLightemitEntity = poleLightemitService.getLedByLightControlCode(lightemitControlCode); |
| | | if (poleLightemitEntity == null || StringUtils.isBlank(poleLightemitEntity.getRequestBody())) { |
| | | return; |
| | | } |
| | | this.post(realtimeServerBean.getCommand() + lightemitControlCode, poleLightemitEntity.getRequestBody()); |
| | | } |
| | | |
| | | /** |
| | | * 获取led屏画面 |
| | | * |
| | | * @param ledCode |
| | |
| | | LogUtils.error("设置结果:-------------------" + result); |
| | | } |
| | | |
| | | |
| | | /* |
| | | 设置led亮度 |
| | | */ |
| | | public void setBrightness(String ledCode, Integer brightness) { |
| | | |
| | | SetBrightness setBrightness = new SetBrightness(); |
| | | setBrightness.arg1 = brightness; |
| | | String postBody = new Gson().toJson(setBrightness); |
| | | |
| | | //请求 |
| | | String result = post(realtimeServerBean.getCommand() + ledCode, postBody); |
| | | LogUtils.error("设置结果:-------------------" + result); |
| | | } |
| | | |
| | | // 获取led音量 |
| | | public String getVoiume(String ledCode) { |
| | | GetVolume getVolume = new GetVolume(); |