protocol-opcua/opcua-device-protocol-detail.component.ts
selector | opcua-device-protocol-detail |
templateUrl | ./opcua-device-protocol-detail.html |
Properties |
Methods |
constructor(changeDetectorRef: ChangeDetectorRef, opcuaService: OpcuaService, alertService: AlertService, router: Router)
|
|||||||||||||||
Parameters :
|
actionHandler | ||||
actionHandler(actionObject)
|
||||
Parameters :
Returns :
void
|
addVariable |
addVariable()
|
Returns :
void
|
canSave | ||||
canSave(deviceTypeForm)
|
||||
Parameters :
Returns :
boolean
|
extractOverridSubscriptionType | ||||
extractOverridSubscriptionType(_mapping)
|
||||
Parameters :
Returns :
{}
|
getEmptyMappingObject |
getEmptyMappingObject()
|
Returns :
{ id: string; browsePath: {}; }
|
getMapping |
getMapping()
|
Returns :
any
|
getOverriddenSubscriptionsByPath | ||||
getOverriddenSubscriptionsByPath(browsePath)
|
||||
Parameters :
Returns :
any
|
getStructuredResource | ||||
getStructuredResource(resource)
|
||||
Parameters :
Returns :
any
|
ngAfterContentChecked |
ngAfterContentChecked()
|
Returns :
void
|
Async ngOnInit |
ngOnInit()
|
Returns :
any
|
prepareRequestJson | ||||
prepareRequestJson(_model)
|
||||
Parameters :
Returns :
{}
|
removeVariable | ||||
removeVariable(mappingObject)
|
||||
Parameters :
Returns :
void
|
Async save |
save()
|
Returns :
any
|
trackByIndex | ||||||
trackByIndex(index: number)
|
||||||
Parameters :
Returns :
number
|
updateVariable | ||||
updateVariable(mappingObject)
|
||||
Parameters :
Returns :
void
|
updateViableMapping | ||||
updateViableMapping(model)
|
||||
Parameters :
Returns :
any
|
getParentAttr |
Default value : () => {...}
|
initialModel |
Type : OpcuaDeviceType
|
Default value : {
id: '',
fieldbusType: 'opcuaV2',
description: '',
unit: '',
fieldbusVersion: 4,
name: '',
referencedServerId: '',
referencedRootNodeId: '',
subscriptionType: {
type: 'None'
},
mappings: [],
overriddenSubscriptions: [],
applyConstraints: {
browsePathMatchesRegex: '',
matchesNodeIds: [],
serverObjectHasFragment: '',
matchesServerIds: []
},
enabled: ''
}
|
instanceList |
Type : QueryList<OpcuaDeviceProtocolMapping>
|
Decorators :
@ViewChildren(OpcuaDeviceProtocolMapping)
|
isLoaded |
Default value : true
|
model |
Type : any
|
selectedNode |
Type : any
|
server |
Type : any
|
<c8y-title *ngIf="!isLoaded">{{ model.name }}</c8y-title>
<div>
<form #deviceTypeForm="ngForm" name="detailForm" *ngIf="!isLoaded">
<opcua-device-protocol-description [model]="model"></opcua-device-protocol-description>
<div class="card m-b-4">
<div class="card-header separator">
<h4 translate>Variables</h4>
</div>
<div class="list-group" *ngIf="model.mappings.length > 0" ngModelGroup="variable">
<opcua-device-protocol-mapping
*ngFor="let resource of getMapping(); trackBy: trackByIndex; let i = index"
[index]="i"
[referencedServerId]="model.referencedServerId"
[referencedRootNodeId]="model.referencedRootNodeId"
[resource]="getStructuredResource(resource)"
[getParentAttr]="getParentAttr"
(onAction)="actionHandler($event)"
>
</opcua-device-protocol-mapping>
</div>
<div class="card-block">
<div class="c8y-empty-state text-left" *ngIf="model.mappings.length === 0">
<h1 c8yIcon="sliders"></h1>
<p translate>No variables to display. Click below to add.</p>
</div>
<button
title="{{ 'Add variable' | translate }}"
class="btn-add-block addVariableBtn"
(click)="addVariable()"
>
<i c8yIcon="plus-circle"></i> {{ 'Add variable' | translate }}
</button>
</div>
</div>
<div class="card m-b-4">
<div class="card-header separator">
<h4 translate>Data reporting</h4>
</div>
<div class="card-block" ngModelGroup="subscription">
<opcua-device-protocol-data-reporting
[groupName]="'subscription'"
[model]="model"
></opcua-device-protocol-data-reporting>
</div>
</div>
<div class="card">
<div class="card-header separator">
<h4 translate>Auto apply constraints</h4>
</div>
<div class="card-block overflow-visible" ngModelGroup="autoApply">
<opcua-auto-apply [model]="model"></opcua-auto-apply>
</div>
</div>
<span>
<div class="text-center page-footer m-t-16">
<div class="btn-save-wrapper animated">
<button
title="{{ 'Save' | translate }}"
id="deviceTypeSave"
class="btn btn-primary"
(click)="save()"
[disabled]="canSave(deviceTypeForm)"
translate
>
Save
</button>
</div>
</div>
</span>
</form>
</div>