我面临的任务是从 OPC 系统中提取历史数据,然后将这些数据存储到我们 BI 团队的独立数据库中。
虽然我是一名经验丰富的开发人员,但我以前从未使用过 OPC UA。我在这里找到了OPC基金会提供的最新库:
https://github.com/OPCFoundation/UA-.NETStandardLibrary
此存储库中有一个示例控制台客户端应用程序。然而,我没有找到HDA(历史数据访问)的任何线索。那么,有人可以帮忙吗?
而且,我实际上是公司里唯一有IT背景的人。经理告诉我,还有另一个人正在使用一些第 3 方应用程序维护 OPC 系统,因此我认为没有必要实现任何有关 OPC 服务器的操作。换句话说,我想我只需要实现一个 OPC 客户端连接到一些可以在该 OPC 应用程序中找到的 URL。我的假设正确吗?
总结起来,有两个问题:
任何帮助将不胜感激。
我在我的应用程序中有一个mapView,我正在使用我自己的图像作为MKAnnotationView,这是pin图像.这是我设置它的代码.
-(RMAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(RentPin *)annotation{
static NSString *identifier = @"MyLocation";
if ([annotation isKindOfClass:[RentPin class]]) {
RMAnnotationView *annotationView = (RMAnnotationView *)[self.mapView dequeueReusableAnnotationViewWithIdentifier:identifier];
if(annotationView == nil){
annotationView = [[RMAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:identifier];
annotationView.enabled = YES;
annotationView.canShowCallout = NO;
annotationView.image = [UIImage imageNamed:@"home44.png"];
annotationView.centerOffset = CGPointMake(-10, -10);
}else{
annotationView.annotation = annotation;
}
return annotationView;
}
return nil;
}
Run Code Online (Sandbox Code Playgroud)
它工作正常,自定义图像也正常显示,但当我捏mapView以放大/缩小地图时,我注意到自定义图像在地图上失去了准确性.请看下面的图片.
https://www.dropbox.com/s/irrgmohppf08fzr/image1.png 此图显示引脚位于此位置,非常准确.
https://www.dropbox.com/s/vvlr4ckk6molqd7/image2.png 缩小mapView后,针脚穿过街道,显示该地址在湖中....
(对不起链接,因为由于声誉不足而无法发布图片.)
有人可以帮我这个吗?我的图像是44x44,我也尝试设置引脚的centerOffset,它无法在所有缩放级别动态解决这个问题.