| | |
| | | package com.mes.job; |
| | | |
| | | import com.mes.milo.runner.subscription.SubscriptionCallback; |
| | | import com.mes.milo.service.MiloService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | |
| | | @Slf4j |
| | | public class OpcCacheGlassTask { |
| | | |
| | | @Autowired |
| | | MiloService miloService; |
| | | |
| | | @Autowired |
| | | SubscriptionCallback cacheGlassSubscriptionCallback; |
| | | |
| | | @Scheduled(fixedDelay = Long.MAX_VALUE) |
| | | public void startOpcTask() throws Exception { |
| | | miloService.subscriptionFromOpcUa(Arrays.asList("my.device.x1", "my.device.x2"), cacheGlassSubscriptionCallback); |
| | | } |
| | | // @Autowired |
| | | // MiloService miloService; |
| | | // |
| | | // @Autowired |
| | | // SubscriptionCallback cacheGlassSubscriptionCallback; |
| | | // |
| | | // @Scheduled(fixedDelay = Long.MAX_VALUE) |
| | | // public void startOpcTask() throws Exception { |
| | | // miloService.subscriptionFromOpcUa(Arrays.asList("my.device.x1", "my.device.x2"), cacheGlassSubscriptionCallback); |
| | | // } |
| | | } |